systemd: configure and use internally provided systemd files [release 2.3.0-2mamba;Tue Sep 17 2019]

This commit is contained in:
Silvan Calarco 2024-01-05 21:35:04 +01:00
parent f998f8ecbf
commit 860cb24b4e

View File

@ -7,7 +7,7 @@
Name: cups Name: cups
Version: 2.3.0 Version: 2.3.0
Release: 1mamba Release: 2mamba
Summary: Common UNIX Printing System Summary: Common UNIX Printing System
Group: System/Spooling Group: System/Spooling
Vendor: openmamba Vendor: openmamba
@ -125,12 +125,12 @@ done
install -m0644 cups/string-private.h %{buildroot}%{_includedir}/cups/string-private.h install -m0644 cups/string-private.h %{buildroot}%{_includedir}/cups/string-private.h
install -m0644 cups/debug-private.h %{buildroot}%{_includedir}/cups/debug-private.h install -m0644 cups/debug-private.h %{buildroot}%{_includedir}/cups/debug-private.h
# systemd ## systemd
install -D -m0644 %{SOURCE3} %{buildroot}%{_unitdir}/cups.service #install -D -m0644 %{SOURCE3} %{buildroot}%{_unitdir}/cups.service
install -D -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/cups.socket #install -D -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/cups.socket
install -D -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/cups.path #install -D -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/cups.path
install -D -m0644 %{SOURCE6} %{buildroot}%{_unitdir}/cups-lpd.socket #install -D -m0644 %{SOURCE6} %{buildroot}%{_unitdir}/cups-lpd.socket
install -D -m0644 %{SOURCE7} %{buildroot}%{_unitdir}/cups-lpd@.service #install -D -m0644 %{SOURCE7} %{buildroot}%{_unitdir}/cups-lpd@.service
# basic cups client configuration file # basic cups client configuration file
echo "ServerName /run/cups/cups.sock" > %{buildroot}%{_sysconfdir}/cups/client.conf echo "ServerName /run/cups/cups.sock" > %{buildroot}%{_sysconfdir}/cups/client.conf
@ -163,6 +163,8 @@ chmod 755 %{buildroot}%{_libdir}/*.a
/usr/sbin/groupadd lpadmin -g %{lpadmin_gid} &>/dev/null /usr/sbin/groupadd lpadmin -g %{lpadmin_gid} &>/dev/null
/usr/sbin/useradd lpadmin -c "Cups printing daemon" -d /dev/null \ /usr/sbin/useradd lpadmin -c "Cups printing daemon" -d /dev/null \
-s /bin/false -u %{lpadmin_uid} -g %{lpadmin_gid} &>/dev/null -s /bin/false -u %{lpadmin_uid} -g %{lpadmin_gid} &>/dev/null
%systemd_pre org.cups.cupsd
%systemd_pre org.cups.cups-lpd.socket
exit 0 exit 0
%post %post
@ -175,16 +177,18 @@ if [ $1 -gt 1 ]; then
sed -i "s|ErrorPolicy stop-printer|ErrorPolicy retry-job|" %{_sysconfdir}/cups/printers.conf sed -i "s|ErrorPolicy stop-printer|ErrorPolicy retry-job|" %{_sysconfdir}/cups/printers.conf
fi fi
fi fi
%systemd_post cups %systemd_post org.cups.cupsd
%systemd_post org.cups.cups-lpd.socket
if [ $1 -ge 1 ]; then if [ $1 -ge 1 ]; then
systemctl -q daemon-reload systemctl -q daemon-reload
systemctl -q enable cups systemctl -q enable org.cups.cupsd
fi fi
: :
%preun %preun
# erase # erase
%systemd_preun cups %systemd_preun org.cups.cups-lpd.socket
%systemd_preun org.cups.cupsd
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
/usr/sbin/groupdel lp &>/dev/null /usr/sbin/groupdel lp &>/dev/null
/usr/sbin/userdel lp &>/dev/null /usr/sbin/userdel lp &>/dev/null
@ -195,7 +199,8 @@ fi
: :
%postun %postun
%systemd_postun_with_restart cups %systemd_postun_with_restart org.cups.cupsd
%systemd_postun_with_restart org.cups.cups-lpd
: :
%posttrans %posttrans
@ -253,11 +258,6 @@ fi
%{_unitdir}/org.cups.cupsd.socket %{_unitdir}/org.cups.cupsd.socket
%{_unitdir}/org.cups.cups-lpd.socket %{_unitdir}/org.cups.cups-lpd.socket
%{_unitdir}/org.cups.cups-lpd@.service %{_unitdir}/org.cups.cups-lpd@.service
%{_unitdir}/cups.path
%{_unitdir}/cups.service
%{_unitdir}/cups.socket
%{_unitdir}/cups-lpd.socket
%{_unitdir}/cups-lpd@.service
%{_datadir}/applications/cups.desktop %{_datadir}/applications/cups.desktop
%{_datadir}/icons/hicolor/*/apps/cups.png %{_datadir}/icons/hicolor/*/apps/cups.png
%dir %{_datadir}/cups %dir %{_datadir}/cups
@ -305,6 +305,9 @@ fi
#%doc CHANGES.txt README.txt #%doc CHANGES.txt README.txt
%changelog %changelog
* Tue Sep 17 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.0-2mamba
- systemd: configure and use internally provided systemd files
* Mon Sep 02 2019 Automatic Build System <autodist@mambasoft.it> 2.3.0-1mamba * Mon Sep 02 2019 Automatic Build System <autodist@mambasoft.it> 2.3.0-1mamba
- automatic version update by autodist - automatic version update by autodist