Help creating a permanent configuration change in /usr

Hi, I am trying to modify an XKB keymap file and persist that change. From what I have read, the proper way to do that is to create an RPM package. However, when I try to install it, I get the following error:

error: Checkout xkb-override-1.0-1.fc42.noarch: Hardlinking 54/04c91d3fb6b93d2be400b836a79cc850af6ba50845b80d6c39c096f2752644.file to de: File exists

I suspect my .spec file is the issue, so here it is:

Name:           xkb-override
Version:        1.0
Release:        1%{?dist}
Summary:        Override of de keymap file
License:        GPLv3
Source0:        %{name}-%{version}.tar.gz
BuildArch:      noarch

%description
This package contains a custom xkb/symbols/de file to override the default.

%prep
%setup -q

%install
# Create the necessary directory structure in the build root
mkdir -p %{buildroot}/usr/share/X11/xkb/symbols/
# Copy the file from the unpacked source directory to the build root
cp -v usr/share/X11/xkb/symbols/de %{buildroot}/usr/share/X11/xkb/symbols/

%files
/usr/share/X11/xkb/symbols/de


Any help would be appreciated
Was this page helpful?