202 lines
6.0 KiB
RPMSpec
202 lines
6.0 KiB
RPMSpec
%define atdaemon_groupid 65022
|
|
%define atdaemon_userid 65022
|
|
|
|
Name: at
|
|
Version: 3.2.4
|
|
Release: 1mamba
|
|
Summary: Job spooling tools
|
|
Group: System/Servers
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
URL: http://software.calhariz.com/at/
|
|
Source0: http://software.calhariz.com/at/at_%{version}.orig.tar.gz
|
|
Source1: atd-initscript
|
|
Source2: at-pam.conf
|
|
# patches stolen from fedora
|
|
Patch0: %{name}-3.1.7-lockfile.patch
|
|
Patch1: %{name}-3.1.10-man-timespec-path.patch
|
|
Patch2: %{name}-3.1.7-sigchld.patch
|
|
Patch3: %{name}-3.1.10-typo.patch
|
|
Patch4: %{name}-3.1.10-lexer-parser.patch
|
|
Patch5: %{name}-3.1.8-test.patch
|
|
Patch6: %{name}-3.1.8-perr.patch
|
|
Patch7: %{name}-3.1.10-instinet.patch
|
|
Patch8: %{name}-3.1.12-shell.patch
|
|
Patch9: %{name}-3.1.10-pie.patch
|
|
Patch10: %{name}-3.1.8-t_option.patch
|
|
Patch11: %{name}-3.1.10-usage.patch
|
|
Patch12: %{name}-3.1.10-fix_no_export.patch
|
|
Patch13: %{name}-3.1.10-dont_fork.patch
|
|
Patch14: %{name}-3.1.13-pam.patch
|
|
Patch15: %{name}-3.1.13-makefile.patch
|
|
Patch16: %{name}-3.1.10-daylight.patch
|
|
Patch17: %{name}-3.1.10-perm.patch
|
|
Patch18: %{name}-3.1.12-opt_V.patch
|
|
Patch19: %{name}-3.1.12-selinux.patch
|
|
License: GPL
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: libfl-devel
|
|
BuildRequires: libpam-devel
|
|
BuildRequires: libselinux-devel
|
|
## AUTOBUILDREQ-END
|
|
%systemd_requires
|
|
|
|
%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 particular time (now or a specified time in the future).
|
|
Batch will execute commands when the system load levels drop to a particular level.
|
|
Both commands use /bin/sh to run the commands.
|
|
|
|
%debug_package
|
|
|
|
%prep
|
|
%setup -q
|
|
sed -i "s,| arm-\* |,| aarch64-\* | arm-\* |," config.sub
|
|
%patch2 -p1 -b .sigchld
|
|
%patch4 -p1 -b .lexer
|
|
#%patch5 -p1 -b .test
|
|
#%patch6 -p1 -b .perr
|
|
%patch8 -p1 -b .shell
|
|
#%patch14 -p1 -b .pam
|
|
%patch18 -p1 -b .opt_V
|
|
|
|
sed -i "s|-g root||g" Makefile.in
|
|
sed -i "s|-o root||g" Makefile.in
|
|
|
|
%build
|
|
# for patch2
|
|
rm -f lex.yy.* y.tab.*
|
|
sed -i "s|/var/run|/run|g" configure
|
|
|
|
%configure \
|
|
--with-atspool=%{_localstatedir}/spool/at/spool \
|
|
--with-jobdir=%{_localstatedir}/spool/at \
|
|
--with-daemon_username=atdaemon \
|
|
--with-daemon_groupname=atdaemon \
|
|
--with-systemdsystemunitdir=%{_unitdir}
|
|
|
|
%make -j1
|
|
#LANG=C make test >/dev/null
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%makeinstall \
|
|
IROOT=%{buildroot} \
|
|
DAEMON_USERNAME=`id -nu` \
|
|
DAEMON_GROUPNAME=`id -ng` \
|
|
INSTALL_ROOT_USER=`id -nu` \
|
|
INSTALL_ROOT_GROUP=`id -nu` \
|
|
docdir=%{_docdir}
|
|
|
|
# prefix=%{buildroot}%{_prefix} \
|
|
# bindir=%{buildroot}%{_bindir} \
|
|
# sbindir=%{buildroot}%{_sbindir} \
|
|
# etcdir=%{buildroot}%{_sysconfdir} \
|
|
# mandir=%{buildroot}%{_mandir} \
|
|
# ATJOB_DIR=%{buildroot}%{_localstatedir}/spool/at \
|
|
# ATSPOOL_DIR=%{buildroot}%{_localstatedir}/spool/at/spool \
|
|
#install -D -m 0755 %{S:1} %{buildroot}%{_initrddir}/atd
|
|
|
|
install -D -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/atd
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%pre
|
|
groupadd -g %{atdaemon_groupid} atdaemon 2>/dev/null
|
|
useradd -u %{atdaemon_userid} -g atdaemon -c "at daemon" \
|
|
-d /var/empty -s /bin/false atdaemon 2>/dev/null
|
|
:
|
|
|
|
%post
|
|
touch %{_localstatedir}/spool/at/.SEQ
|
|
chmod 600 %{_localstatedir}/spool/at/.SEQ
|
|
chown atdaemon:atdaemon %{_localstatedir}/spool/at/.SEQ
|
|
%systemd_post atd
|
|
:
|
|
|
|
%preun
|
|
%systemd_preun atd
|
|
:
|
|
|
|
%postun
|
|
%systemd_postun_with_restart atd
|
|
:
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%config(noreplace) %{_sysconfdir}/at.deny
|
|
%{_sysconfdir}/pam.d/atd
|
|
%attr(4755,root,root) %{_bindir}/at
|
|
%{_bindir}/batch
|
|
%{_bindir}/atrm
|
|
%{_bindir}/atq
|
|
%{_sbindir}/atrun
|
|
%{_sbindir}/atd
|
|
%{_unitdir}/atd.service
|
|
%dir %{_datadir}/at
|
|
%{_datadir}/at/batch-job
|
|
%attr(0700,atdaemon,atdaemon) %dir %{_localstatedir}/spool/at
|
|
%attr(0700,atdaemon,atdaemon) %dir %{_localstatedir}/spool/at/spool
|
|
%ghost %{_localstatedir}/spool/at/.SEQ
|
|
%{_mandir}/man1/*
|
|
%{_mandir}/man5/*
|
|
%{_mandir}/man8/*
|
|
%dir %{_docdir}/at
|
|
%{_docdir}/at
|
|
|
|
%changelog
|
|
* Tue Feb 01 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.4-1mamba
|
|
- update to 3.2.4
|
|
|
|
* Tue Apr 27 2021 Automatic Build System <autodist@mambasoft.it> 3.2.2-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Tue Dec 15 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.1-2mamba
|
|
- rebuilt with debug package and aarch64 build fix
|
|
|
|
* Sat Oct 26 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.1-1mamba
|
|
- update to 3.2.1
|
|
|
|
* Tue Oct 09 2018 Automatic Build System <autodist@mambasoft.it> 3.1.23-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Fri Aug 12 2016 Automatic Build System <autodist@mambasoft.it> 3.1.20-1mamba
|
|
- automatic update by autodist
|
|
|
|
* Sun Oct 12 2014 Automatic Build System <autodist@mambasoft.it> 3.1.16-1mamba
|
|
- automatic update by autodist
|
|
|
|
* Fri Aug 22 2014 Automatic Build System <autodist@mambasoft.it> 3.1.15-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Thu Oct 10 2013 Automatic Build System <autodist@mambasoft.it> 3.1.14-1mamba
|
|
- automatic update by autodist
|
|
|
|
* Sat Sep 10 2011 Automatic Build System <autodist@mambasoft.it> 3.1.13-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sun Dec 27 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.12-1mamba
|
|
- update to 3.1.12
|
|
|
|
* Mon Aug 25 2008 Aleph0 <aleph0@openmamba.org> 3.1.10-3mamba
|
|
- remove broken symlink to debian copyright
|
|
|
|
* Mon Jul 02 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.10-2mamba
|
|
- fix pam file for new release
|
|
|
|
* Wed Jan 17 2007 Davide Madrisan <davide.madrisan@qilinux.it> 3.1.10-1qilnx
|
|
- update to version 3.1.10 by autospec
|
|
- added missing build requirements
|
|
- fixed permissions of at binary
|
|
- enabled support for pam
|
|
- use the service script to start/restart/stop the atd service
|
|
- fixed owner and group for /var/spool/at/.SEQ
|
|
- modified homedir for atd daemon: now is /var/empty
|
|
|
|
* Thu Apr 29 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.8-1qilnx
|
|
- first build
|