# # spec file for package at # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: at #BuildRequires: autoconf >= 2.69 #BuildRequires: automake #BuildRequires: bison #BuildRequires: flex #BuildRequires: libselinux-devel #BuildRequires: pam-devel Url: ftp://ftp.debian.org/debian/pool/main/a/at Version: 3.1.13 Release: 4.3 Summary: A Job Manager License: GPL-2.0+ Group: System/Daemons Source: at_3.1.13.orig.tar.gz Source1: atd.init Source2: atd.pamd Source3: sysconfig.atd Source4: at.sleep Source5: atd.service # fix for spool/cron !!!!!!! Patch0: %{name}-3.1.13.patch Patch4: %{name}-3.1.13-joblist.patch Patch5: %{name}-3.1.13-selinux.patch Patch6: %{name}-3.1.13-pie.patch Patch7: %{name}-3.1.8-eal3-manpages.patch ## no bugs anymore for patch8. Just paranoia checking Patch8: %{name}-3.1.13-formatbugs.patch Patch9: %{name}-3.1.13-pam.patch Patch10: %{name}-3.1.13-massive_batch.patch Patch11: %{name}-3.1.13-documentation-dir.patch Patch12: %{name}-3.1.13-queue-nice-level.patch # PATCH-FIX-UPSTREAM pam-session-as-root (bnc#408986, bnc#239210) Patch14: %{name}-3.1.13-pam-session-as-root.patch # PATCH-FIX-UPSTREAM clean-up opened descriptors (bnc#533454, bnc#523346) Patch15: %{name}-3.1.13-leak-fix.patch #PATCH-FIX-OPENSUSE add proper system users to the deny list Patch16: at-3.1.8-denylist.patch #PATCH-FIX-UPSTREAM plan jobs with past time to tomorrow (bnc#672586) Patch17: %{name}-3.1.13-tomorrow.patch #PATCH-FIX-UPSTREAM wrong mtime handling of jobdir (bnc#680113) Patch19: %{name}-3.1.8-jobdir-mtime.patch Patch20: at-parse-suse-sysconfig.patch #PATCH-FIX-UPSTREAM fix makefile dependencies Patch21: at-makefile-deps.patch #PATCH-FIX-OPENSUSE Set pid dir to /run not /var/run Patch22: at-piddir.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: libHX-devel #BuildRequires: pkgconfig #BuildRequires: pkgconfig(systemd) #%{?systemd_requires} #%define has_systemd 1 #%endif BuildArch: i486 %description This program allows you to run jobs at specified times. %prep %setup -q %patch0 %patch4 %patch5 %patch6 %patch7 %patch8 %patch9 %patch10 %patch11 %patch12 %patch14 %patch15 %patch16 %patch17 -p1 %patch19 %patch20 -p1 %patch21 -p1 #%patch22 %build rm -fv y.tab.c y.tab.h lex.yy.c lex.yy.o y.tab.o autoreconf -fiv export SENDMAIL=%{_sbindir}/sendmail %configure \ --with-pam \ --with-daemon_username=daemon \ --with-daemon_groupname=daemon make %{?_smp_mflags} %install mkdir -p $RPM_BUILD_ROOT/etc/{init.d,pam.d} mkdir -p $RPM_BUILD_ROOT/usr/{bin,sbin,share/man/man{1,5,8}} mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates export CFLAGS="$RPM_OPT_FLAGS" export SENDMAIL=%{_sbindir}/sendmail make install IROOT=$RPM_BUILD_ROOT # Don't install docs here in this way mkdir docs mv $RPM_BUILD_ROOT/%{_prefix}/doc/at/* docs/ install %SOURCE1 $RPM_BUILD_ROOT/etc/init.d/atd 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 %if 0%{?has_systemd} install -D -m 0644 %{S:5} %{buildroot}%{_unitdir}/atd.service %{__install} -D -m 0755 %{S:4} %{buildroot}%{_prefix}/lib/systemd/system-sleep/atd.sh %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 # the rcscript used to be /etc/init.d/at if [ -f etc/init.d/at ] ; then rm -f etc/init.d/at %{insserv_cleanup} fi %{fillup_and_insserv -n atd atd } %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) %doc Problems Copyright COPYING README ChangeLog timespec %config(noreplace) /etc/at.deny %{_sbindir}/rcatd %config /etc/init.d/atd %config %attr(644,root,root) /etc/pam.d/atd %verify(not mode) %attr(4750,root,trusted) %{_bindir}/at %{_bindir}/atq %{_bindir}/atrm %{_bindir}/batch %{_mandir}/man?/* %{_sbindir}/atd %{_sbindir}/atrun %attr(700,at,at) %dir /var/spool/cron/atspool %attr(700,at,at) %dir /var/spool/cron/atjobs %attr(600,at,at) /var/spool/cron/atjobs/.SEQ /var/adm/fillup-templates/sysconfig.atd %if 0%{?has_systemd} #%{_unitdir}/atd.service %{_prefix}/lib/systemd/system-sleep/atd.sh %endif %changelog * Mon Jul 15 2013 werner@suse.de - No http://0pointer.de/public/systemd-units/atd.service anymore * Sat Jul 13 2013 crrodriguez@opensuse.org - systemd: start as non-forking service - systemd: start after systemd-user-sessions.service * Sat Jul 13 2013 crrodriguez@opensuse.org - Use /run not /var/run to store the pid file * Thu Jun 20 2013 crrodriguez@opensuse.org - at.sleep move away from pm-utils to systemd-sleep * Tue Jun 18 2013 schwab@suse.de - at-makefile-deps.patch: fix makefile dependencies * Tue Jun 11 2013 lang@b1-systems.de - updated to upstream 3.1.13 - ported patches to new source code in session with Stefan Seyfried - removed unnecessary patches * Sun Apr 14 2013 crrodriguez@opensuse.org - Ordering after syslog.target is no longer recommended. * Wed Feb 6 2013 opensuse@cboltz.de - fix author information in at-parse-suse-sysconfig.patch (bnc#780259#c25) * Sun Jan 6 2013 jengelh@inai.de - Use simpler HXmap_get in at-parse-suse-sysconfig.patch (bnc#780259) * Wed Nov 28 2012 crrodriguez@opensuse.org - When sysconfig variables are empty, do not set stuff to zero just use the defaults. * Wed Nov 28 2012 crrodriguez@opensuse.org - Fix systemd unit and sysconfig parsing the right way. * Mon Nov 26 2012 opensuse@cboltz.de - use /etc/sysconfig/atd variables in atd.service (bnc#780259#c4) * Thu Sep 13 2012 opensuse@cboltz.de - fix atd.service (bnc#780259) * Tue Dec 20 2011 coolo@suse.com - add autoconf as buildrequire to avoid implicit dependency * Tue Dec 20 2011 coolo@suse.com - remove call to suse_update_config (very old work around) * Mon Dec 5 2011 crrodriguez@opensuse.org - Fix rpmlint warnings * Mon Dec 5 2011 crrodriguez@opensuse.org - Support systemd. * Sat Sep 17 2011 jengelh@medozas.de - Remove redundant tags/sections from specfile - Use %%_smp_mflags for parallel build * Fri May 13 2011 vcizek@novell.com - added missing license to distribution (bnc#693355) * Tue Apr 19 2011 vcizek@novell.com - wrong jobdir mtime handling fixed (bnc#680113) thanks to Ingo Schwarze * Tue Apr 5 2011 vcizek@novell.com - fixed atd-atrm race condition (bnc#679857) * Tue Mar 1 2011 vcizek@novell.com - fixed bug introduced with at-3.1.8-tomorrow.patch (bnc#672586) * Mon Feb 7 2011 jslaby@suse.de - source pm-utils functions in suspend/resume script to avoid errors * Tue Feb 1 2011 vcizek@novell.com - at now shifts jobs with passed time without a date to tomorrow (bnc#668485) * Wed Nov 10 2010 coolo@novell.com - own parent directories * Tue Sep 28 2010 cristian.rodriguez@opensuse.org - /etc/at.deny has wrong account name [bnc#632250] * Tue Jul 20 2010 cristian.rodriguez@opensuse.org - wake up atd after suspend [bnc#592349] * Sat Jul 17 2010 cristian.rodriguez@opensuse.org - improve spec file - Should Recommend smtp_daemon * Wed Nov 18 2009 mseben@novell.com - added pam conversion function (reworked pam.patch) fate#306386 * Tue Nov 3 2009 coolo@novell.com - updated patches to apply with fuzz=0 * Thu Aug 27 2009 mseben@novell.com - closedir.patch renamed to leak-fix.patch and added others fixs of resource leaks (bnc#533454) * Thu Aug 13 2009 mseben@novell.com - added closedir.patch fix missing call of closedir() (bnc#523346) * Thu May 14 2009 puzel@suse.cz - added at-3.1.8-pam-session-as-root.patch (bnc#329210, bnc#408986) * Mon Mar 2 2009 sebo@suse.de - added cleanup_perm.patch to fix permissions for unlink (bnc#478733) * Thu Feb 12 2009 mseben@suse.cz - fixed nice level of queues : queue-nice-level.patch [bnc#225463] * Thu Jan 8 2009 prusnak@suse.cz - corrected selinux.patch [bnc#463521] * Wed Oct 8 2008 bwalle@suse.de - Fix documentation directory in at(1). * Mon Sep 1 2008 puzel@suse.cz - enabled SELinux support [Fate#303662] * Tue Apr 8 2008 mrueckert@suse.de - add at-3.1.8_massive_batch.patch: (bnc#347126) properly handle sighup when multiple jobs are submitted at the same time * Fri May 11 2007 mrueckert@suse.de - remove postfix from the build requires. (#225469) * Thu Mar 29 2007 meissner@suse.de - buildrequires flex,bison * Mon Mar 19 2007 mrueckert@suse.de - readd at-3.1.8-pam.diff: (#222563) The breaking part of the setreuid(daemon_uid,daemon_uid) in perm.c. uid 25 can not write audit messages. As upstream removed the pam code in perm.c aswell, we do the same here. * Mon Dec 18 2006 ro@suse.de - added sysconfig variables ATD_BATCH_INTERVAL and ATD_LOADAVG (fate#301318) * Tue Nov 28 2006 mrueckert@suse.de - remove at-3.1.8-pam.diff it just breaks at. * Tue Nov 21 2006 ro@suse.de - added PRIV_START/END calls around pam_start sections (#222412) * Fri Sep 1 2006 kukuk@suse.de - Add pam_loginuid.so to atd.pamd * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Thu Jan 12 2006 schwab@suse.de - Don't strip binaries. * Mon Dec 5 2005 kukuk@suse.de - Disable SELinux * Mon Aug 29 2005 kukuk@suse.de - Make pam config file non-executeable * Thu Aug 25 2005 kukuk@suse.de - Remove pam_loginuid.so [may fix #112802] * Mon Aug 15 2005 kukuk@suse.de - Update to at-3.1.8-11 tarball (includes old patches) - Add PAM support * Thu Jun 2 2005 kukuk@suse.de - Compile with -fpie/-pie - Update SELinux patch * Sat Feb 5 2005 meissner@suse.de - mark up for format string using functions. - fixed one error output * Tue May 25 2004 ro@suse.de - added "-t" docu to manpage * Thu Mar 25 2004 mmj@suse.de - Add postfix to # neededforbuild * Tue Mar 23 2004 thomas@suse.de - Added patch for EAL3 man-pages * Tue Mar 23 2004 thomas@suse.de - Added patch for LAuS * Wed Jan 28 2004 kukuk@suse.de - Add patch for SELinux * Mon Oct 27 2003 ro@suse.de - package /usr/bin/at as 4750,root,trusted as in permissions.secure - add verify (not mode) for /usr/bin/at - add run_permissions macro to postinstall * Sun Oct 19 2003 ro@suse.de - don't build as root * Tue Oct 7 2003 ro@suse.de - support "at -l -q queue" and "-t timespec" (#31957) (ported from FreeBSD) * Fri Aug 29 2003 kukuk@suse.de - Create at as system account [Bug #29611] * Fri Aug 15 2003 ro@suse.de - make "at -r" behave like "at -d" (#28753) - added restart_on_update/stop_on_removal macros * Fri Jul 18 2003 kukuk@suse.de - Fix spec file/Makefile to be able to build as normal user * Wed Jun 18 2003 ro@suse.de - added "X-UnitedLinux-Default-Enabled: no" to init-script * Wed Jun 18 2003 ro@suse.de - don't activate by default * Mon May 19 2003 ro@suse.de - fix filelist * Mon May 12 2003 ro@suse.de - use defattr * Tue Mar 11 2003 ro@suse.de - fix postinstall for updates (appeared in #24653) * Thu Nov 7 2002 tcrhak@suse.cz - fixed for bison 1.75: end rules with semicolon * Fri Aug 23 2002 bk@suse.de - mark /etc/at.deny as noreplace * Mon Aug 19 2002 kukuk@suse.de - Use $time instead of xntp in init script. * Thu Aug 1 2002 ro@suse.de - added prereqs * Mon Jul 1 2002 ro@suse.de - add ntp to Required-Start in init-script (#15833) * Mon May 27 2002 ro@suse.de - set SIGCHLD handler back to default when starting job * Thu May 23 2002 ro@suse.de - create user in install section * Wed May 22 2002 kukuk@suse.de - Create at user/group in preinstall script * Tue Apr 2 2002 ro@suse.de - don't try to copy config.guess and config.sub (already done by suse_update_config) * Wed Jan 16 2002 ro@suse.de - integrated two patches: at-3.1.8-heapcorruption.dif and at-3.1.8-o_excl.dif against heap corruption in time parser for commandline and for safer opening of a file (O_EXCL). - removed all generated files from patch and copy config.{sub,guess} from current automake * Wed Jan 9 2002 kukuk@suse.de - Fix path to timespec in at.1 manual page [Bug #12784] * Tue Jan 8 2002 egmont@suselinux.hu - removed colons from init script messages * Wed Jan 2 2002 kukuk@suse.de - Remove warning about cron and at (never worked before and user cannot see it) - Rename init script from at to atd - Don't source rc.config in init script (not needed any longer) - Remove $route from init script dependencies (does not exist) [Bug #12689] - Use BuildRoot * Fri Dec 14 2001 ro@suse.de - removed START_ATD * Mon Aug 6 2001 ro@suse.de - updated rc script * Fri Jun 15 2001 schwab@suse.de - Add %%suse_update_config. * Tue Nov 28 2000 ro@suse.de - startscript to etc/init.d * Mon Sep 25 2000 ro@suse.de - sorted * Wed Feb 16 2000 dipa@suse.de - apply debian patch at_3.1.8-8.diff full section of: at.c, at.1.in, at.deny, at_allow.5, atd.8.in, at.8.in, batch config.guess, config.sub, daemon.c, lex.yy.c, panic.c, parsetime.y, y.tab.c (fix for bug #1766) * Fri Feb 4 2000 ro@suse.de - fix missing getlock preload * Fri Feb 4 2000 ro@suse.de - applied security fixes from thomas * Mon Jan 17 2000 ro@suse.de - man -> usr/share/man * Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. * Tue Dec 8 1998 ro@suse.de - added reload to script (does a restart) * Mon Dec 7 1998 ro@suse.de - added symlink /sbin/rcat -> init.d/at * Mon Dec 7 1998 ro@suse.de - updated init-script * Fri Feb 27 1998 ro@suse.de - installed timespec in docdir / fixed path in manpage * Mon Oct 27 1997 ro@suse.de - update to version 3.1.8 ready for autobuild * Sun Jun 22 1997 florian@suse.de - update to version 3.1.7 * Sun Jun 1 1997 bs@suse.de - moved fillup stuff to var/adm/fillup-templates * Thu Jan 2 1997 bs@suse.de boot script beautified. * Thu Jan 2 1997 bs@suse.de recompiled and added README * Thu Jan 2 1997 bs@suse.de - /var/spool/atspool/atspool fixed. * Thu Jan 2 1997 bs@suse.de - new version 3.0 - fillup etc/rc.config and sbin/init.d/at added. * Thu Jan 2 1997 bs@suse.de switched to version pre-3.0-960812. New: atd (daemon) fillup etc/rc.config and sbin/init.d-stuff added. * Thu Jan 2 1997 florian@suse.de allow login names to be up to 16 characters long