2006-12-18 17:51:26 +00:00
|
|
|
#
|
2011-02-02 01:15:34 +00:00
|
|
|
# spec file for package at
|
2006-12-18 17:51:26 +00:00
|
|
|
#
|
2011-02-02 01:15:34 +00:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2006-12-18 17:51:26 +00:00
|
|
|
#
|
2008-09-01 12:45:30 +00:00
|
|
|
# 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.
|
|
|
|
|
2006-12-18 17:51:26 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2008-04-08 20:15:40 +00:00
|
|
|
|
2006-12-18 17:51:26 +00:00
|
|
|
Name: at
|
2007-05-11 13:30:39 +00:00
|
|
|
BuildRequires: bison flex pam-devel
|
2008-09-01 12:45:30 +00:00
|
|
|
BuildRequires: libselinux-devel
|
2008-04-08 20:15:40 +00:00
|
|
|
Url: ftp://ftp.debian.org/debian/pool/main/a/at
|
2011-12-06 16:59:26 +00:00
|
|
|
License: GPL-2.0+
|
2006-12-18 17:51:26 +00:00
|
|
|
Group: System/Daemons
|
|
|
|
Version: 3.1.8
|
2011-06-28 08:47:37 +00:00
|
|
|
Release: 1102
|
2006-12-18 17:51:26 +00:00
|
|
|
Summary: A Job Manager
|
|
|
|
Source: at_3.1.8-11.tar.gz
|
|
|
|
Source1: atd.init
|
|
|
|
Source2: atd.pamd
|
|
|
|
Source3: sysconfig.atd
|
2010-07-23 21:24:30 +00:00
|
|
|
Source4: at.sleep
|
2011-12-05 19:22:50 +00:00
|
|
|
Source5: http://0pointer.de/public/systemd-units/atd.service
|
2009-01-08 13:50:40 +00:00
|
|
|
Patch0: %{name}-%{version}.patch
|
|
|
|
Patch1: %{name}-%{version}-bison.patch
|
|
|
|
Patch2: %{name}-%{version}-delete_r.patch
|
|
|
|
Patch3: %{name}-%{version}-ttime.patch
|
|
|
|
Patch4: %{name}-%{version}-joblist.patch
|
|
|
|
Patch5: %{name}-%{version}-selinux.patch
|
|
|
|
Patch6: %{name}-%{version}-pie.patch
|
|
|
|
Patch7: %{name}-%{version}-eal3-manpages.patch
|
|
|
|
Patch8: %{name}-%{version}-formatbugs.patch
|
|
|
|
Patch9: %{name}-%{version}-pam.patch
|
|
|
|
Patch10: %{name}-%{version}-massive_batch.patch
|
|
|
|
Patch11: %{name}-%{version}-documentation-dir.patch
|
2009-02-12 21:41:28 +00:00
|
|
|
Patch12: %{name}-%{version}-queue-nice-level.patch
|
2009-03-03 20:45:38 +00:00
|
|
|
# PATCH-FIX-UPSTREAM cleanup_perm fix permissions for unlink (bnc#478733)
|
|
|
|
Patch13: %{name}-%{version}-cleanup_perm.patch
|
2011-04-11 12:30:15 +00:00
|
|
|
# PATCH-FIX-UPSTREAM pam-session-as-root (bnc#408986, bnc#239210)
|
2009-05-15 23:05:21 +00:00
|
|
|
Patch14: %{name}-%{version}-pam-session-as-root.patch
|
2011-04-11 12:30:15 +00:00
|
|
|
# PATCH-FIX-UPSTREAM clean-up opened descriptors (bnc#533454, bnc#523346)
|
2009-08-28 22:54:34 +00:00
|
|
|
Patch15: %{name}-%{version}-leak-fix.patch
|
2011-04-11 12:30:15 +00:00
|
|
|
#PATCH-FIX-OPENSUSE add proper system users to the deny list
|
2010-09-28 20:34:15 +00:00
|
|
|
Patch16: at-3.1.8-denylist.patch
|
2011-04-11 12:30:15 +00:00
|
|
|
#PATCH-FIX-UPSTREAM plan jobs with past time to tomorrow (bnc#672586)
|
2011-02-02 01:15:34 +00:00
|
|
|
Patch17: %{name}-%{version}-tomorrow.patch
|
2011-04-11 12:30:15 +00:00
|
|
|
#PATCH-FIX-UPSTREAM race condition of atrm against job execution (bnc#679857)
|
2011-04-07 14:40:54 +00:00
|
|
|
Patch18: %{name}-%{version}-atrm-race.patch
|
2011-04-19 08:01:10 +00:00
|
|
|
#PATCH-FIX-UPSTREAM wrong mtime handling of jobdir (bnc#680113)
|
|
|
|
Patch19: %{name}-%{version}-jobdir-mtime.patch
|
2006-12-18 17:51:26 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-07-17 02:26:23 +00:00
|
|
|
PreReq: %{_sbindir}/useradd %{_sbindir}/groupadd %fillup_prereq %insserv_prereq
|
2011-12-05 19:22:50 +00:00
|
|
|
PreReq: permissions
|
2010-07-19 18:46:42 +00:00
|
|
|
Recommends: smtp_daemon
|
2011-12-05 19:22:50 +00:00
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
BuildRequires: systemd
|
|
|
|
%{?systemd_requires}
|
|
|
|
%define has_systemd 1
|
|
|
|
%endif
|
2006-12-18 17:51:26 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
This program allows you to run jobs at specified times.
|
|
|
|
|
|
|
|
%prep
|
2009-01-08 13:50:40 +00:00
|
|
|
%setup -q
|
|
|
|
%patch0
|
2006-12-18 17:51:26 +00:00
|
|
|
%patch1
|
|
|
|
%patch2
|
|
|
|
%patch3
|
|
|
|
%patch4
|
2009-01-08 13:50:40 +00:00
|
|
|
%patch5
|
|
|
|
%patch6
|
|
|
|
%patch7
|
2006-12-18 17:51:26 +00:00
|
|
|
%patch8
|
|
|
|
%patch9
|
2007-03-20 00:14:00 +00:00
|
|
|
%patch10
|
2008-04-08 20:15:40 +00:00
|
|
|
%patch11
|
2009-02-12 21:41:28 +00:00
|
|
|
%patch12
|
2009-03-03 20:45:38 +00:00
|
|
|
%patch13
|
2010-09-28 20:34:15 +00:00
|
|
|
%patch14
|
2009-08-14 12:55:08 +00:00
|
|
|
%patch15
|
2010-09-28 20:34:15 +00:00
|
|
|
%patch16
|
2011-02-01 10:04:54 +00:00
|
|
|
%patch17 -p1
|
2011-04-07 14:40:54 +00:00
|
|
|
%patch18
|
2011-04-19 08:01:10 +00:00
|
|
|
%patch19
|
2010-09-28 20:34:14 +00:00
|
|
|
|
2006-12-18 17:51:26 +00:00
|
|
|
%build
|
|
|
|
%{?suse_update_config:%{suse_update_config -f}}
|
|
|
|
rm -fv y.tab.c y.tab.h lex.yy.c lex.yy.o y.tab.o
|
|
|
|
autoconf
|
2010-07-17 02:26:23 +00:00
|
|
|
export SENDMAIL=%{_sbindir}/sendmail
|
2009-01-08 13:50:40 +00:00
|
|
|
%configure \
|
|
|
|
--with-pam \
|
|
|
|
--with-selinux \
|
|
|
|
--with-daemon_username=at \
|
|
|
|
--with-daemon_groupname=at
|
2011-09-19 09:13:26 +00:00
|
|
|
make %{?_smp_mflags}
|
2006-12-18 17:51:26 +00:00
|
|
|
|
|
|
|
%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"
|
2010-07-17 02:26:23 +00:00
|
|
|
export SENDMAIL=%{_sbindir}/sendmail
|
2006-12-18 17:51:26 +00:00
|
|
|
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
|
2010-07-17 02:26:23 +00:00
|
|
|
ln -sf ../../etc/init.d/atd $RPM_BUILD_ROOT%{_sbindir}/rcatd
|
2006-12-18 17:51:26 +00:00
|
|
|
install -m644 %SOURCE2 $RPM_BUILD_ROOT/etc/pam.d/atd
|
|
|
|
install -m644 %SOURCE3 $RPM_BUILD_ROOT/var/adm/fillup-templates
|
2010-07-23 21:24:30 +00:00
|
|
|
%{__install} -D -m 0755 %{S:4} %{buildroot}%{_sysconfdir}/pm/sleep.d/99%{name}
|
2011-12-05 19:22:50 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
install -D -m 0644 %{S:5} %{buildroot}%{_unitdir}/atd.service
|
|
|
|
%endif
|
2010-07-23 21:24:29 +00:00
|
|
|
|
2006-12-18 17:51:26 +00:00
|
|
|
%pre
|
2010-07-17 02:26:23 +00:00
|
|
|
%{_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 || :
|
2011-12-05 19:22:50 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_add_pre atd.service
|
|
|
|
%endif
|
2006-12-18 17:51:26 +00:00
|
|
|
|
|
|
|
%preun
|
|
|
|
%stop_on_removal atd
|
2011-12-05 19:22:50 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_del_preun atd.service
|
|
|
|
%endif
|
2006-12-18 17:51:26 +00:00
|
|
|
|
|
|
|
%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 }
|
2011-12-05 19:22:50 +00:00
|
|
|
%set_permissions /usr/bin/at
|
|
|
|
%verifyscript
|
|
|
|
%verify_permissions -e /usr/bin/at
|
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_add_post atd.service
|
|
|
|
%endif
|
2006-12-18 17:51:26 +00:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%restart_on_update atd
|
|
|
|
%insserv_cleanup
|
2011-12-05 19:22:50 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_del_postun atd.service
|
|
|
|
%endif
|
2006-12-18 17:51:26 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2011-05-13 07:46:13 +00:00
|
|
|
%doc Problems Copyright COPYING README ChangeLog timespec
|
2006-12-18 17:51:26 +00:00
|
|
|
%config(noreplace) /etc/at.deny
|
2010-11-11 12:25:14 +00:00
|
|
|
%dir %{_sysconfdir}/pm
|
|
|
|
%dir %{_sysconfdir}/pm/sleep.d
|
2010-07-23 21:24:30 +00:00
|
|
|
%config %{_sysconfdir}/pm/sleep.d/99%{name}
|
2010-07-17 02:26:23 +00:00
|
|
|
%{_sbindir}/rcatd
|
2006-12-18 17:51:26 +00:00
|
|
|
%config /etc/init.d/atd
|
|
|
|
%config %attr(644,root,root) /etc/pam.d/atd
|
2010-07-17 02:26:23 +00:00
|
|
|
%verify(not mode) %attr(4750,root,trusted) %{_bindir}/at
|
|
|
|
%{_bindir}/atq
|
|
|
|
%{_bindir}/atrm
|
|
|
|
%{_bindir}/batch
|
|
|
|
%{_mandir}/man?/*
|
|
|
|
%{_sbindir}/atd
|
|
|
|
%{_sbindir}/atrun
|
2006-12-18 17:51:26 +00:00
|
|
|
%attr(700,at,at) %dir /var/spool/atspool
|
|
|
|
%attr(700,at,at) %dir /var/spool/atjobs
|
|
|
|
%attr(600,at,at) /var/spool/atjobs/.SEQ
|
|
|
|
/var/adm/fillup-templates/sysconfig.atd
|
2011-12-05 19:22:50 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%{_unitdir}/atd.service
|
|
|
|
%endif
|
2006-12-18 17:51:26 +00:00
|
|
|
|
2007-03-20 00:14:00 +00:00
|
|
|
%changelog
|