From a348750ec60d8fa5bad08d3df50c04b24c9624aa Mon Sep 17 00:00:00 2001 From: Brian McCafferty Date: Sat, 24 Sep 2022 08:29:53 +0100 Subject: [PATCH] Update onedrive.spec.in to fix error building RPM (#2145) 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. --- contrib/spec/onedrive.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/spec/onedrive.spec.in b/contrib/spec/onedrive.spec.in index a39190b0..4c3a4906 100644 --- a/contrib/spec/onedrive.spec.in +++ b/contrib/spec/onedrive.spec.in @@ -59,11 +59,11 @@ make %{_docdir}/%{name} %{_bindir}/%{name} %if 0%{?with_systemd} -%{_unitdir}/%{name}.service +%{_userunitdir}/%{name}.service %{_unitdir}/%{name}@.service %else %{_bindir}/onedrive_service.sh /etc/init.d/onedrive %endif -%changelog \ No newline at end of file +%changelog