Skip to content

Commit

Permalink
Update onedrive.spec.in to fix error building RPM (#2145)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bmccafferty committed Sep 24, 2022
1 parent 371b87f commit a348750
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/spec/onedrive.spec.in
Expand Up @@ -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
%changelog

0 comments on commit a348750

Please sign in to comment.