at/at.spec

183 lines
4.8 KiB
RPMSpec
Raw Permalink Normal View History

2019-09-30 10:31:42 -04:00
Name: at
2022-12-29 11:15:40 +08:00
Version: 3.2.5
Release: 2
2019-09-30 10:31:42 -04:00
Summary: A job manager
License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC
2019-09-30 10:31:42 -04:00
URL: http://ftp.debian.org/debian/pool/main/a/at
2022-11-23 11:44:23 +08:00
Source0: http://software.calhariz.com/at/at_%{version}.orig.tar.gz
2019-09-30 10:31:42 -04:00
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
2020-01-16 15:57:50 +08:00
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
2022-12-29 11:15:40 +08:00
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
2020-01-16 15:57:50 +08:00
2020-01-16 20:56:04 +08:00
BuildRequires: gcc flex flex-static bison pam-devel smtpdaemon libffi
2020-01-16 15:57:50 +08:00
BuildRequires: autoconf libselinux-devel >= 1.27.9 perl(Test::Harness) perl(Test::More)
%{?systemd_requires}
Conflicts: crontabs <= 1.5
2019-09-30 10:31:42 -04:00
%description
AT and batch delay command scheduling utility and daemon.
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
2020-01-16 15:57:50 +08:00
cp %{SOURCE1} .
2019-09-30 10:31:42 -04:00
%build
autoconf
2020-01-16 15:57:50 +08:00
rm -f lex.yy.* y.tab.*
2019-09-30 10:31:42 -04:00
%configure --with-atspool=%{_localstatedir}/spool/at/spool \
2020-01-16 15:57:50 +08:00
--with-jobdir=%{_localstatedir}/spool/at \
--with-daemon_username=root \
--with-daemon_groupname=root \
--with-selinux \
--with-pam
2019-09-30 10:31:42 -04:00
2020-01-16 20:56:04 +08:00
/usr/bin/make -O -j4 V=1 VERBOSE=1
2019-09-30 10:31:42 -04:00
2020-01-16 15:57:50 +08:00
%install
make install \
DAEMON_USERNAME=`id -nu`\
DAEMON_GROUPNAME=`id -ng` \
DESTDIR=$RPM_BUILD_ROOT\
2022-12-29 11:15:40 +08:00
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 \
2020-01-16 15:57:50 +08:00
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
2019-09-30 10:31:42 -04:00
%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
2020-01-16 15:57:50 +08:00
%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
2019-09-30 10:31:42 -04:00
%{_bindir}/atrm
2020-01-16 15:57:50 +08:00
%{_bindir}/atq
2019-09-30 10:31:42 -04:00
%{_bindir}/batch
%{_sbindir}/atrun
2020-01-16 15:57:50 +08:00
%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
2019-09-30 10:31:42 -04:00
%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
2022-12-29 11:15:40 +08:00
* Tue Dec 27 2022 zhangnan <zhangnan134@huawei.com> - 3.2.5-1
- Typeenhancement
- IDNA
- SUG:NA
- DESC:update to 3.2.5
2022-11-23 11:44:23 +08:00
* 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
2021-12-25 16:45:17 +08:00
* 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
2020-01-16 20:56:04 +08:00
* Thu Jan 16 2020 chengquan<chengquan3@huawei.com> - 3.1.23-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix bug in make option
2020-01-16 15:57:50 +08:00
* Thu Jan 16 2020 chengquan<chengquan3@huawei.com> - 3.1.23-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix error in at command
2019-09-30 10:31:42 -04:00
* 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