systemd-cron/systemd-cron.spec

157 lines
4.7 KiB
RPMSpec

Name: systemd-cron
Version: 1.15.19
Release: 2mamba
Summary: systemd units to provide cron daemon functionality by running scripts in cron directories
Group: System/Servers
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/systemd-cron
Source: https://github.com/systemd-cron/systemd-cron.git/v%{version}/systemd-cron-%{version}.tar.bz2
Source1: systemd-cron-sysusers.conf
Source2: systemd-cron-crontab
Patch0: systemd-cron-1.5.17-cron-failure-disable-DynamicUser.patch
License: MIT
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
## AUTOBUILDREQ-END
%systemd_requires
Requires: debianutils
Requires: postfix
Provides: vixie-cron
Obsoletes: vixie-cron <= 4.1-3mamba
%description
systemd units to provide cron daemon functionality by running scripts in cron directories.
The crontabs are automaticaly translated using (/usr)/lib/systemd/system-generators/systemd-crontab-generator.
%debug_package
%prep
%setup -q
#%patch0 -p1
%build
./configure \
--prefix=%{_prefix} \
--unitdir=%{_unitdir} \
--generatordir=%{_systemdgeneratordir} \
--confdir=%{_sysconfdir} \
--enable-minutely --enable-quarterly --enable-semi_annually --enable-yearly \
--enable-persistent --enable-setgid --enable-randomized-delay
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
install -d %{buildroot}%{_sysconfdir}/cron.{d,boot,minutely,hourly,daily,weekly,monthly,quarterly,semi-annually,yearly}
install -d -m0775 %{buildroot}/var/spool/cron
echo "g crontab - -" >> %{buildroot}%{_sysusersdir}/systemd-cron.conf
install -D -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/crontab
install -d -m0755 %{buildroot}%{_presetdir}
echo "enable cron.target" > %{buildroot}%{_presetdir}/50-systemd-cron.preset
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pre
%sysusers_create_package systemd-cron %{SOURCE1}
:
%post
touch /run/crond.reboot
touch /run/crond.bootdir
%systemd_post cron.target
:
%preun
%systemd_preun cron.target
:
%postun
%systemd_postun cron.target
:
%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/crontab
%dir %{_sysconfdir}/cron.boot
%dir %{_sysconfdir}/cron.d
%dir %{_sysconfdir}/cron.minutely
%dir %{_sysconfdir}/cron.hourly
%dir %{_sysconfdir}/cron.daily
%dir %{_sysconfdir}/cron.weekly
%dir %{_sysconfdir}/cron.monthly
%dir %{_sysconfdir}/cron.quarterly
%dir %{_sysconfdir}/cron.semi-annually
%dir %{_sysconfdir}/cron.yearly
%{_bindir}/crontab
%{_unitdir}/cron-boot.service
%{_unitdir}/cron-boot.target
%{_unitdir}/cron-boot.timer
%{_unitdir}/cron-daily.service
%{_unitdir}/cron-daily.target
%{_unitdir}/cron-daily.timer
%{_unitdir}/cron-failure@.service
%{_unitdir}/cron-hourly.service
%{_unitdir}/cron-hourly.target
%{_unitdir}/cron-hourly.timer
%{_unitdir}/cron-minutely.service
%{_unitdir}/cron-minutely.target
%{_unitdir}/cron-minutely.timer
%{_unitdir}/cron-monthly.service
%{_unitdir}/cron-monthly.target
%{_unitdir}/cron-monthly.timer
%{_unitdir}/cron-quarterly.service
%{_unitdir}/cron-quarterly.target
%{_unitdir}/cron-quarterly.timer
%{_unitdir}/cron-semi-annually.service
%{_unitdir}/cron-semi-annually.target
%{_unitdir}/cron-semi-annually.timer
%{_unitdir}/cron-update.path
%{_unitdir}/cron-update.service
%{_unitdir}/cron-weekly.service
%{_unitdir}/cron-weekly.target
%{_unitdir}/cron-weekly.timer
%{_unitdir}/cron-yearly.service
%{_unitdir}/cron-yearly.target
%{_unitdir}/cron-yearly.timer
%{_unitdir}/cron.target
%{_presetdir}/50-systemd-cron.preset
%dir %{_prefix}/lib/systemd-cron
%{_prefix}/lib/systemd-cron/boot_delay
%attr(2755,root,crontab) %{_prefix}/lib/systemd-cron/crontab_setgid
%{_prefix}/lib/systemd-cron/mail_on_failure
%{_prefix}/lib/systemd-cron/remove_stale_stamps
%{_systemdgeneratordir}/systemd-crontab-generator
%{_sysusersdir}/systemd-cron.conf
%attr(0770,root,crontab) %dir /var/spool/cron
%{_mandir}/man1/crontab.1*
%{_mandir}/man5/anacrontab.5*
%{_mandir}/man5/crontab.5*
%{_mandir}/man7/systemd.cron.7*
%{_mandir}/man8/systemd-crontab-generator.8*
%doc LICENSE
%changelog
* Fri Jan 06 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 1.15.19-2mamba
- fix missing _cron-failure user by not overwriting sysusers file
* Sun Jul 17 2022 Automatic Build System <autodist@mambasoft.it> 1.15.19-1mamba
- automatic version update by autodist
* Tue Feb 08 2022 Automatic Build System <autodist@mambasoft.it> 1.15.18-1mamba
- automatic version update by autodist
* Thu Mar 25 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.5.17-2mamba
- workaround cron-failure not sending email by unsetting DynamicUser=yes
* Fri Mar 05 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.5.17-1mamba
- package created using the webbuild interface