Accepting request 95490 from home:elvigia:branches:Base:System
- Fix rpmlint warnings - Support systemd. OBS-URL: https://build.opensuse.org/request/show/95490 OBS-URL: https://build.opensuse.org/package/show/Base:System/at?expand=0&rev=40
This commit is contained in:
parent
d320fcc337
commit
9919188956
10
at.changes
10
at.changes
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 5 19:19:40 UTC 2011 - crrodriguez@opensuse.org
|
||||
|
||||
- Fix rpmlint warnings
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 5 19:05:48 UTC 2011 - crrodriguez@opensuse.org
|
||||
|
||||
- Support systemd.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 17 13:28:30 UTC 2011 - jengelh@medozas.de
|
||||
|
||||
|
29
at.spec
29
at.spec
@ -31,6 +31,7 @@ Source1: atd.init
|
||||
Source2: atd.pamd
|
||||
Source3: sysconfig.atd
|
||||
Source4: at.sleep
|
||||
Source5: http://0pointer.de/public/systemd-units/atd.service
|
||||
Patch0: %{name}-%{version}.patch
|
||||
Patch1: %{name}-%{version}-bison.patch
|
||||
Patch2: %{name}-%{version}-delete_r.patch
|
||||
@ -60,7 +61,13 @@ Patch18: %{name}-%{version}-atrm-race.patch
|
||||
Patch19: %{name}-%{version}-jobdir-mtime.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
PreReq: %{_sbindir}/useradd %{_sbindir}/groupadd %fillup_prereq %insserv_prereq
|
||||
PreReq: permissions
|
||||
Recommends: smtp_daemon
|
||||
%if 0%{?suse_version} > 1140
|
||||
BuildRequires: systemd
|
||||
%{?systemd_requires}
|
||||
%define has_systemd 1
|
||||
%endif
|
||||
|
||||
%description
|
||||
This program allows you to run jobs at specified times.
|
||||
@ -115,13 +122,22 @@ ln -sf ../../etc/init.d/atd $RPM_BUILD_ROOT%{_sbindir}/rcatd
|
||||
install -m644 %SOURCE2 $RPM_BUILD_ROOT/etc/pam.d/atd
|
||||
install -m644 %SOURCE3 $RPM_BUILD_ROOT/var/adm/fillup-templates
|
||||
%{__install} -D -m 0755 %{S:4} %{buildroot}%{_sysconfdir}/pm/sleep.d/99%{name}
|
||||
%if 0%{?has_systemd}
|
||||
install -D -m 0644 %{S:5} %{buildroot}%{_unitdir}/atd.service
|
||||
%endif
|
||||
|
||||
%pre
|
||||
%{_sbindir}/groupadd -g 25 -o -r at 2> /dev/null || :
|
||||
%{_sbindir}/useradd -r -o -g at -u 25 -s /bin/bash -c "Batch jobs daemon" -d /var/spool/atjobs at 2> /dev/null || :
|
||||
%if 0%{?has_systemd}
|
||||
%service_add_pre atd.service
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%stop_on_removal atd
|
||||
%if 0%{?has_systemd}
|
||||
%service_del_preun atd.service
|
||||
%endif
|
||||
|
||||
%post
|
||||
# update hack
|
||||
@ -131,11 +147,19 @@ rm -f etc/init.d/at
|
||||
%{insserv_cleanup}
|
||||
fi
|
||||
%{fillup_and_insserv -n atd atd }
|
||||
%run_permissions
|
||||
%set_permissions /usr/bin/at
|
||||
%verifyscript
|
||||
%verify_permissions -e /usr/bin/at
|
||||
%if 0%{?has_systemd}
|
||||
%service_add_post atd.service
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%restart_on_update atd
|
||||
%insserv_cleanup
|
||||
%if 0%{?has_systemd}
|
||||
%service_del_postun atd.service
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
@ -158,5 +182,8 @@ fi
|
||||
%attr(700,at,at) %dir /var/spool/atjobs
|
||||
%attr(600,at,at) /var/spool/atjobs/.SEQ
|
||||
/var/adm/fillup-templates/sysconfig.atd
|
||||
%if 0%{?has_systemd}
|
||||
%{_unitdir}/atd.service
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
9
atd.service
Normal file
9
atd.service
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Execution Queue Daemon
|
||||
After=syslog.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/atd -f
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user