at/at.spec

183 lines
4.8 KiB
RPMSpec
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Name: at
Version: 3.2.5
Release: 2
Summary: A job manager
License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC
URL: http://ftp.debian.org/debian/pool/main/a/at
Source0: http://software.calhariz.com/at/at_%{version}.orig.tar.gz
Source1: pam_atd
Source2: atd.sysconf
Source3: atd.systemd
Patch0: at-aarch64.patch
Patch1: at-3.1.18-make.patch
Patch2: at-3.1.20-pam.patch
Patch3: at-3.1.14-opt_V.patch
Patch4: at-3.1.20-shell.patch
Patch5: at-3.1.18-nitpicks.patch
Patch6: at-3.1.14-fix_no_export.patch
Patch7: at-3.1.14-mailwithhostname.patch
Patch8: at-3.1.20-aborted-jobs.patch
Patch9: at-3.1.18-noabort.patch
Patch10: at-3.1.16-fclose-error.patch
Patch11: at-3.1.16-clear-nonjobs.patch
Patch12: at-3.1.20-lock-locks.patch
Patch13: at-3.1.23-document-n.patch
Patch14: at-3.1.20-log-jobs.patch
BuildRequires: gcc flex flex-static bison pam-devel smtpdaemon libffi
BuildRequires: autoconf libselinux-devel >= 1.27.9 perl(Test::Harness) perl(Test::More)
%{?systemd_requires}
Conflicts: crontabs <= 1.5
%description
AT and batch delay command scheduling utility and daemon.
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
cp %{SOURCE1} .
%build
autoconf
rm -f lex.yy.* y.tab.*
%configure --with-atspool=%{_localstatedir}/spool/at/spool \
--with-jobdir=%{_localstatedir}/spool/at \
--with-daemon_username=root \
--with-daemon_groupname=root \
--with-selinux \
--with-pam
/usr/bin/make -O -j4 V=1 VERBOSE=1
%install
make install \
DAEMON_USERNAME=`id -nu`\
DAEMON_GROUPNAME=`id -ng` \
DESTDIR=$RPM_BUILD_ROOT\
sbindir=%{_prefix}/sbin\
bindir=%{_bindir}\
prefix=%{_prefix}\
exec_prefix=%{_prefix}\
docdir=/usr/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`;
echo > $RPM_BUILD_ROOT%{_sysconfdir}/at.deny
mkdir docs
cp $RPM_BUILD_ROOT/%{_prefix}/doc/at/* docs/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/atd
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/atd
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}/
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_unitdir}/atd.service
rm -r $RPM_BUILD_ROOT%{_prefix}/doc
%check
make test
%pre
%preun
%systemd_preun atd.service
%post
touch %{_localstatedir}/spool/at/.SEQ
chmod 600 %{_localstatedir}/spool/at/.SEQ
chown root:root %{_localstatedir}/spool/at/.SEQ
%systemd_post atd.service
%postun
%systemd_postun_with_restart atd.service
%files
%license Copyright COPYING
%doc README timespec ChangeLog
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/at.deny
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/atd
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/atd
%attr(4755,root,root) %{_bindir}/at
%attr(0755,root,root) %{_sbindir}/atd
%{_bindir}/atrm
%{_bindir}/atq
%{_bindir}/batch
%{_sbindir}/atrun
%attr(0700,root,root) %dir %{_localstatedir}/spool/at
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %{_localstatedir}/spool/at/.SEQ
%attr(0700,root,root) %dir %{_localstatedir}/spool/at/spool
%attr(0644,root,root) /%{_unitdir}/atd.service
%files help
%{_mandir}/man*/*
%changelog
* Tue Apr 30 2024 Han Jinpeng <hanjinpeng@kylinos.cn> - 3.2.5-2
- Typeupdate
- IDNA
- SUG:NA
- DESC: Modify the license to SPDX format
Delete MIT and Public Domain license because it no longer appears in the upstream source
* Tue Dec 27 2022 zhangnan <zhangnan134@huawei.com> - 3.2.5-1
- Typeenhancement
- IDNA
- SUG:NA
- DESC:update to 3.2.5
* Wed Nov 23 2022 fuanan <fuanan3@h-partners.com> - 3.2.2-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Modify Source0
* Sat Oct 22 2022 yanglongkang<yanglongkang@h-partners.com> - 3.2.2-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Adding Patching Operations
provides relibility and self-healing capabilities for service
* Sat Dec 25 2021 yangzhuangzhuang<yangzhuangzhuang1@huawei.com> - 3.2.2-1
- Type:update
- ID:NA
- SUG:NA
- DESC:update version to 3.2.2
* Thu Jan 16 2020 chengquan<chengquan3@huawei.com> - 3.1.23-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix bug in make option
* Thu Jan 16 2020 chengquan<chengquan3@huawei.com> - 3.1.23-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix error in at command
* Sun Sep 29 2019 chengquan<chengquan3@huawei.com> - 3.1.23-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix bug in %post marco
* Tue Sep 24 2019 chengquan <chengquan3@huawei.com> - 3.1.23-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:revise requires of systemd
* Wed Sep 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.1.23-1
- Package init