|
@@ -4,37 +4,33 @@
|
|
|
Summary: Job spooling tools.
|
|
|
Summary(ja): ジョブスプーリングツール
|
|
|
Name: at
|
|
|
-Version: 3.1.23
|
|
|
-Release: 1%{?_dist_release}
|
|
|
+Version: 3.2.5
|
|
|
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
|
|
|
License: GPLv3+ and GPLv2+ and ISC and MIT and Public Domain
|
|
|
-URL: http://ftp.debian.org/debian/pool/main/a/at
|
|
|
+URL: https://ftp.debian.org/debian/pool/main/a/at
|
|
|
|
|
|
-Source: http://ftp.debian.org/debian/pool/main/a/at/at_%{version}.orig.tar.gz
|
|
|
+Source: https://ftp.debian.org/debian/pool/main/a/at/at_%{version}.orig.tar.gz
|
|
|
Source1: pam_atd
|
|
|
Source2: atd.init
|
|
|
Source3: atd.sysconf
|
|
|
Source5: atd.systemd
|
|
|
|
|
|
-Patch0: at-aarch64.patch
|
|
|
-Patch1: at-3.1.18-make.patch
|
|
|
-Patch2: at-3.1.20-pam.patch
|
|
|
-Patch4: at-3.1.14-opt_V.patch
|
|
|
-Patch5: at-3.1.20-shell.patch
|
|
|
-Patch6: at-3.1.18-nitpicks.patch
|
|
|
-Patch8: at-3.1.14-fix_no_export.patch
|
|
|
-Patch9: at-3.1.14-mailwithhostname.patch
|
|
|
-Patch10: at-3.1.14-usePOSIXtimers.patch
|
|
|
-Patch12: at-3.1.20-aborted-jobs.patch
|
|
|
-Patch13: at-3.1.18-noabort.patch
|
|
|
-Patch14: at-3.1.16-fclose-error.patch
|
|
|
-Patch15: at-3.1.16-clear-nonjobs.patch
|
|
|
-Patch16: at-3.1.18-utc-dst.patch
|
|
|
-Patch17: at-3.1.20-lock-locks.patch
|
|
|
-Patch18: at-3.1.23-document-n.patch
|
|
|
-Patch19: at-3.1.20-log-jobs.patch
|
|
|
-
|
|
|
-# http://mantis.vinelinux.org/view.php?id=2483
|
|
|
-Patch20: at-3.1.23-usePOSIXtimers-fix.patch
|
|
|
+Patch0: at-3.2.5-address-sast.patch
|
|
|
+Patch1: at-aarch64.patch
|
|
|
+Patch2: at-3.2.5-make.patch
|
|
|
+Patch3: at-3.2.5-pam.patch
|
|
|
+Patch4: at-3.1.14-opt_V.patch
|
|
|
+Patch5: at-3.2.2-shell.patch
|
|
|
+Patch6: at-3.2.5-nitpicks.patch
|
|
|
+Patch7: at-3.1.14-fix_no_export.patch
|
|
|
+Patch8: at-3.2.5-mailwithhostname.patch
|
|
|
+Patch9: at-3.2.5-aborted-jobs.patch
|
|
|
+Patch10: at-3.2.5-noabort.patch
|
|
|
+Patch11: at-3.1.16-fclose-error.patch
|
|
|
+Patch12: at-3.1.16-clear-nonjobs.patch
|
|
|
+Patch13: at-3.2.2-lock-locks.patch
|
|
|
+Patch14: at-3.1.23-document-n.patch
|
|
|
+Patch15: at-3.1.20-log-jobs.patch
|
|
|
|
|
|
BuildRequires: fileutils
|
|
|
BuildRequires: flex
|
|
@@ -60,7 +56,6 @@ Conflicts: crontabs <= 1.5
|
|
|
BuildRequires: postfix
|
|
|
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
|
-
|
|
|
%description
|
|
|
At and batch read commands from standard input or from a specified
|
|
|
file. At allows you to specify that a command will be run at a
|
|
@@ -84,16 +79,20 @@ batch はシステムの負荷レベルが特定のレベルを下回るとコ
|
|
|
メモ: もし毎日/週などの同じ時間にくり返される必要があるジョブであれば、
|
|
|
代わりに crontab を使うべきでしょう。
|
|
|
|
|
|
+
|
|
|
+%debug_package
|
|
|
+
|
|
|
+
|
|
|
%prep
|
|
|
%setup -q
|
|
|
cp %{SOURCE1} .
|
|
|
%autopatch -p1
|
|
|
-# patch10 touches configure.in
|
|
|
-autoconf
|
|
|
-# for patch11
|
|
|
-rm -f lex.yy.* y.tab.*
|
|
|
+
|
|
|
|
|
|
%build
|
|
|
+# uselles files
|
|
|
+rm -f lex.yy.* y.tab.*
|
|
|
+
|
|
|
%configure --with-atspool=%{_localstatedir}/spool/at/spool \
|
|
|
--with-jobdir=%{_localstatedir}/spool/at \
|
|
|
--with-daemon_username=root \
|
|
@@ -104,30 +103,22 @@ rm -f lex.yy.* y.tab.*
|
|
|
|
|
|
make
|
|
|
|
|
|
-%check
|
|
|
-# don't run "make test" by default
|
|
|
-%{?_without_check: %define _without_check 1}
|
|
|
-%{!?_without_check: %define _without_check 1}
|
|
|
-
|
|
|
-%if ! %{_without_check}
|
|
|
- LANG=C make test > /dev/null
|
|
|
-%endif
|
|
|
|
|
|
%install
|
|
|
rm -rf %{buildroot}
|
|
|
make install \
|
|
|
DAEMON_USERNAME=`id -nu`\
|
|
|
DAEMON_GROUPNAME=`id -ng` \
|
|
|
- DESTDIR=%{buildroot}\
|
|
|
- sbindir=%{buildroot}%{_prefix}/sbin\
|
|
|
- bindir=%{buildroot}%{_bindir}\
|
|
|
- prefix=%{buildroot}%{_prefix}\
|
|
|
- exec_prefix=%{buildroot}%{_prefix}\
|
|
|
- docdir=%{buildroot}/usr/doc\
|
|
|
- mandir=%{buildroot}%{_mandir}\
|
|
|
- etcdir=%{buildroot}%{_sysconfdir} \
|
|
|
- ATJOB_DIR=%{buildroot}%{_localstatedir}/spool/at \
|
|
|
- ATSPOOL_DIR=%{buildroot}%{_localstatedir}/spool/at/spool \
|
|
|
+ DESTDIR=%{buildroot} \
|
|
|
+ sbindir=%{_prefix}/sbin \
|
|
|
+ bindir=%{_bindir} \
|
|
|
+ prefix=%{_prefix} \
|
|
|
+ exec_prefix=%{_prefix} \
|
|
|
+ docdir=%{_prefix}/doc \
|
|
|
+ mandir=%{_mandir} \
|
|
|
+ etcdir=%{_sysconfdir} \
|
|
|
+ ATJOB_DIR=%{_localstatedir}/spool/at \
|
|
|
+ ATSPOOL_DIR=%{_localstatedir}/spool/at/spool \
|
|
|
INSTALL_ROOT_USER=`id -nu` \
|
|
|
INSTALL_ROOT_GROUP=`id -nu`;
|
|
|
|
|
@@ -153,15 +144,40 @@ install -m 755 %{SOURCE3} %{buildroot}/etc/sysconfig/atd
|
|
|
# remove unpackaged files from the buildroot
|
|
|
rm -r %{buildroot}%{_prefix}/doc
|
|
|
|
|
|
-%clean
|
|
|
-rm -rf %{buildroot}
|
|
|
+
|
|
|
+%check
|
|
|
+# don't run "make test" by default
|
|
|
+%{?_without_check: %define _without_check 1}
|
|
|
+%{!?_without_check: %define _without_check 1}
|
|
|
+
|
|
|
+%if ! %{_without_check}
|
|
|
+ LANG=C make test > /dev/null
|
|
|
+%endif
|
|
|
+
|
|
|
+%pre
|
|
|
+%if %{with systemd}
|
|
|
+if [ -e %{_initdir}/atd ]; then
|
|
|
+ /sbin/service atd stop >/dev/null 2>&1 ||:
|
|
|
+ /sbin/chkconfig --del atd >/dev/null 2>&1 ||:
|
|
|
+fi
|
|
|
+%endif
|
|
|
+
|
|
|
|
|
|
%post
|
|
|
touch %{_localstatedir}/spool/at/.SEQ
|
|
|
chmod 600 %{_localstatedir}/spool/at/.SEQ
|
|
|
-chown daemon.daemon %{_localstatedir}/spool/at/.SEQ
|
|
|
+chown daemon:daemon %{_localstatedir}/spool/at/.SEQ
|
|
|
%if %{with systemd}
|
|
|
+if [ -e %{_initdir}/atd ]; then
|
|
|
+ /sbin/service atd stop >/dev/null 2>&1 || :
|
|
|
+ /sbin/chkconfig --del atd >/dev/null 2>&1 || :
|
|
|
+ /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
|
+ /usr/bin/systemctl enable atd.service >/dev/null 2>&1 || :
|
|
|
+ /usr/bin/systemctl try-restart atd.service >/dev/null 2>&1 || :
|
|
|
+ exit 0
|
|
|
+else
|
|
|
%systemd_post atd.service
|
|
|
+fi
|
|
|
%else
|
|
|
# must be in chkconfig on
|
|
|
/sbin/chkconfig --add atd
|
|
@@ -171,7 +187,7 @@ chown daemon.daemon %{_localstatedir}/spool/at/.SEQ
|
|
|
%if %{with systemd}
|
|
|
%systemd_preun atd.service
|
|
|
%else
|
|
|
-if [ "$1" = 0 ] ; then
|
|
|
+if [ "$1" = 0 -o -x /usr/bin/systemctl ] ; then
|
|
|
/sbin/service atd stop
|
|
|
/sbin/chkconfig --del atd
|
|
|
fi
|
|
@@ -181,13 +197,13 @@ fi
|
|
|
%if %{with systemd}
|
|
|
%systemd_postun_with_restart atd.service
|
|
|
%else
|
|
|
-if [ "$1" -ge "1" ]; then
|
|
|
+if [ "$1" -ge "1" -a ! -x /usr/bin/systemctl ]; then
|
|
|
/sbin/service atd condrestart
|
|
|
fi
|
|
|
%endif
|
|
|
|
|
|
+
|
|
|
%files
|
|
|
-%defattr(-,root,root)
|
|
|
%doc docs/*
|
|
|
%config %{_sysconfdir}/at.deny
|
|
|
%if %{with systemd}
|
|
@@ -207,8 +223,13 @@ fi
|
|
|
%{_bindir}/atrm
|
|
|
%{_bindir}/atq
|
|
|
%attr(4755,root,root) %{_bindir}/at
|
|
|
+%{_datadir}/at
|
|
|
+
|
|
|
|
|
|
%changelog
|
|
|
+* Wed Aug 28 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.2.5-1
|
|
|
+- new upstream release.
|
|
|
+
|
|
|
* Sat Apr 04 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.23-1
|
|
|
- new upstream release.
|
|
|
- imported Patch12-19 from rawhide.
|