Updating the line
%{_unitdir}/%{name}.service
to
%{_userunitdir}/%{name}.service
This fixes the issue when building the RPM on RHEL7/8/9 with the following error:
RPM build errors:
File not found: /root/rpmbuild/BUILDROOT/onedrive-2.4.20-1.el7.x86_64/usr/lib/systemd/system/onedrive.service
This is due to the file actually being created in:
/root/rpmbuild/BUILDROOT/onedrive-2.4.20-1.el7.x86_64/usr/lib/systemd/user/onedrive.service
Changing _unitdir to _userunitdir fixes this error and allows the RPMs to be build correctly.
* Update spec file based on confirming working on various platforms
* Update .gitignore as those files dont exist any more
* Add RPM packaging howto document
* Update readme.me to reflect project display name
* Move lots of stuff into contrib directory to clean up root folder
* Update autoconf files for new location of some files
* Refactor README split and move to docs directory
* Update INSTALL.md
* Update Makefile.in
* Install docs from new location
* Uninstall docs correctly
* Update Dockerfile
* Fix up Dockerfile spacing
* Move systemd stuff to contrib
* Move docker specific stuff to contrib/docker, update docs
* Fix Alpine and Stretch docker files
* Update configure after changed file locations
* Update INSTALL.md to include pkg-config as requirement
* Move also entrypoint.sh to contrib/docker
* Update 'min-notif-changes' to 'min-notify-changes' which was missed in PR #467
* Update to add --sync-root-files to usage.md and man page
* Update usage.md to include --auth-files ARG details