at-vl.spec 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. %bcond_with systemd
  2. %bcond_without pam
  3. Summary: Job spooling tools.
  4. Summary(ja): ジョブスプーリングツール
  5. Name: at
  6. Version: 3.1.23
  7. Release: 1%{?_dist_release}
  8. License: GPLv3+ and GPLv2+ and ISC and MIT and Public Domain
  9. URL: http://ftp.debian.org/debian/pool/main/a/at
  10. Source: http://ftp.debian.org/debian/pool/main/a/at/at_%{version}.orig.tar.gz
  11. Source1: pam_atd
  12. Source2: atd.init
  13. Source3: atd.sysconf
  14. Source5: atd.systemd
  15. Patch0: at-aarch64.patch
  16. Patch1: at-3.1.18-make.patch
  17. Patch2: at-3.1.20-pam.patch
  18. Patch4: at-3.1.14-opt_V.patch
  19. Patch5: at-3.1.20-shell.patch
  20. Patch6: at-3.1.18-nitpicks.patch
  21. Patch8: at-3.1.14-fix_no_export.patch
  22. Patch9: at-3.1.14-mailwithhostname.patch
  23. Patch10: at-3.1.14-usePOSIXtimers.patch
  24. Patch12: at-3.1.20-aborted-jobs.patch
  25. Patch13: at-3.1.18-noabort.patch
  26. Patch14: at-3.1.16-fclose-error.patch
  27. Patch15: at-3.1.16-clear-nonjobs.patch
  28. Patch16: at-3.1.18-utc-dst.patch
  29. Patch17: at-3.1.20-lock-locks.patch
  30. Patch18: at-3.1.23-document-n.patch
  31. Patch19: at-3.1.20-log-jobs.patch
  32. # http://mantis.vinelinux.org/view.php?id=2483
  33. Patch20: at-3.1.23-usePOSIXtimers-fix.patch
  34. BuildRequires: fileutils
  35. BuildRequires: flex
  36. BuildRequires: bison
  37. BuildRequires: autoconf
  38. %if %{with systemd}
  39. Requires(post): systemd-units
  40. Requires(preun): systemd-units
  41. Requires(postun): systemd-units
  42. %else
  43. BuildRequires: chkconfig
  44. Requires(post): chkconfig
  45. Requires(preun): chkconfig
  46. Requires(postun): chkconfig
  47. %endif
  48. %if %{with pam}
  49. BuildRequires: pam-devel
  50. %endif
  51. Conflicts: crontabs <= 1.5
  52. # No, I'm not kidding
  53. BuildRequires: postfix
  54. Buildroot: %{_tmppath}/%{name}-%{version}-root
  55. %description
  56. At and batch read commands from standard input or from a specified
  57. file. At allows you to specify that a command will be run at a
  58. particular time. Batch will execute commands when the system load
  59. levels drop to a particular level. Both commands use /bin/sh.
  60. You should install the at package if you need a utility for
  61. time-oriented job control. Note: If it is a recurring job that will
  62. need to be repeated at the same time every day/week, etc. you should
  63. use crontab instead.
  64. %description -l ja
  65. at と batch は標準入力や指定されたファイルからコマンドを読み取ります。
  66. at を使用して特定の時間にコマンドを実行するように指定することが可能です。
  67. batch はシステムの負荷レベルが特定のレベルを下回るとコマンドを実行します。
  68. 両コマンドとも /bin/sh を使います。
  69. あなたが時間志向のジョブ管理のためのユーティリティを必要とするならば、at
  70. パッケージをインストールしてください。
  71. メモ: もし毎日/週などの同じ時間にくり返される必要があるジョブであれば、
  72. 代わりに crontab を使うべきでしょう。
  73. %prep
  74. %setup -q
  75. cp %{SOURCE1} .
  76. %autopatch -p1
  77. # patch10 touches configure.in
  78. autoconf
  79. # for patch11
  80. rm -f lex.yy.* y.tab.*
  81. %build
  82. %configure --with-atspool=%{_localstatedir}/spool/at/spool \
  83. --with-jobdir=%{_localstatedir}/spool/at \
  84. --with-daemon_username=root \
  85. --with-daemon_groupname=root \
  86. %if %{with pam}
  87. --with-pam
  88. %endif
  89. make
  90. %check
  91. # don't run "make test" by default
  92. %{?_without_check: %define _without_check 1}
  93. %{!?_without_check: %define _without_check 1}
  94. %if ! %{_without_check}
  95. LANG=C make test > /dev/null
  96. %endif
  97. %install
  98. rm -rf %{buildroot}
  99. make install \
  100. DAEMON_USERNAME=`id -nu`\
  101. DAEMON_GROUPNAME=`id -ng` \
  102. DESTDIR=%{buildroot}\
  103. sbindir=%{buildroot}%{_prefix}/sbin\
  104. bindir=%{buildroot}%{_bindir}\
  105. prefix=%{buildroot}%{_prefix}\
  106. exec_prefix=%{buildroot}%{_prefix}\
  107. docdir=%{buildroot}/usr/doc\
  108. mandir=%{buildroot}%{_mandir}\
  109. etcdir=%{buildroot}%{_sysconfdir} \
  110. ATJOB_DIR=%{buildroot}%{_localstatedir}/spool/at \
  111. ATSPOOL_DIR=%{buildroot}%{_localstatedir}/spool/at/spool \
  112. INSTALL_ROOT_USER=`id -nu` \
  113. INSTALL_ROOT_GROUP=`id -nu`;
  114. echo > %{buildroot}%{_sysconfdir}/at.deny
  115. mkdir docs
  116. cp $RPM_BUILD_ROOT/%{_prefix}/doc/at/* docs/
  117. mkdir -p %{buildroot}%{_sysconfdir}/pam.d
  118. install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/atd
  119. %if %{with systemd}
  120. # install systemd initscript
  121. mkdir -p %{buildroot}/%{_unitdir}/
  122. install -m 644 %{SOURCE5} %{buildroot}/%{_unitdir}/atd.service
  123. %else
  124. mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
  125. install -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/rc.d/init.d/atd
  126. %endif
  127. mkdir -p %{buildroot}/etc/sysconfig
  128. install -m 755 %{SOURCE3} %{buildroot}/etc/sysconfig/atd
  129. # remove unpackaged files from the buildroot
  130. rm -r %{buildroot}%{_prefix}/doc
  131. %clean
  132. rm -rf %{buildroot}
  133. %post
  134. touch %{_localstatedir}/spool/at/.SEQ
  135. chmod 600 %{_localstatedir}/spool/at/.SEQ
  136. chown daemon.daemon %{_localstatedir}/spool/at/.SEQ
  137. %if %{with systemd}
  138. %systemd_post atd.service
  139. %else
  140. # must be in chkconfig on
  141. /sbin/chkconfig --add atd
  142. %endif
  143. %preun
  144. %if %{with systemd}
  145. %systemd_preun atd.service
  146. %else
  147. if [ "$1" = 0 ] ; then
  148. /sbin/service atd stop
  149. /sbin/chkconfig --del atd
  150. fi
  151. %endif
  152. %postun
  153. %if %{with systemd}
  154. %systemd_postun_with_restart atd.service
  155. %else
  156. if [ "$1" -ge "1" ]; then
  157. /sbin/service atd condrestart
  158. fi
  159. %endif
  160. %files
  161. %defattr(-,root,root)
  162. %doc docs/*
  163. %config %{_sysconfdir}/at.deny
  164. %if %{with systemd}
  165. %attr(0644,root,root) %{_unitdir}/atd.service
  166. %else
  167. %attr(0700,root,root) %{_sysconfdir}/rc.d/init.d/atd
  168. %endif
  169. %attr(0700,root,root) %{_sysconfdir}/sysconfig/atd
  170. %attr(0700,daemon,daemon) %dir %{_localstatedir}/spool/at
  171. %attr(0600,daemon,daemon) %verify(not md5 size mtime) %ghost %{_localstatedir}/spool/at/.SEQ
  172. %attr(0700,daemon,daemon) %dir %{_localstatedir}/spool/at/spool
  173. %attr(0640,root,daemon) %config(noreplace) /etc/pam.d/atd
  174. %{_sbindir}/atrun
  175. %attr(0755,root,root) %{_sbindir}/atd
  176. %{_mandir}/man*/*
  177. %{_bindir}/batch
  178. %{_bindir}/atrm
  179. %{_bindir}/atq
  180. %attr(4755,root,root) %{_bindir}/at
  181. %changelog
  182. * Sat Apr 04 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.23-1
  183. - new upstream release.
  184. - imported Patch12-19 from rawhide.
  185. - updated Patch20.
  186. * Sun Jun 15 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.14-1
  187. - new upstream release.
  188. - updated Patch1.
  189. - removed Patch11 (no longer needed).
  190. * Sat Nov 10 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1.13-4
  191. - re-add Patch10 and Patch12 to use posix timer
  192. - http://mantis.vinelinux.org/view.php?id=2483
  193. * Sat Nov 10 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1.13-3
  194. - remove Patch10
  195. - atd doesn't execute queued job until the next jobs is queued.
  196. * Thu Nov 08 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1.13-2
  197. - fix pam_atd to use system-auth instead of password-auth
  198. * Tue Nov 06 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1.13-1
  199. - update to 3.1.13
  200. - update patches to sync with fedora 3.1.13-10.
  201. * Mon Sep 27 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.10.1-17
  202. - rebuild with rpm-4.8.1
  203. * Tue Mar 31 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1.10.1-16
  204. - spec in utf-8
  205. * Tue May 27 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 3.1.10.1-15
  206. - new upstream release
  207. - apply new versioning policy
  208. * Thu Jul 12 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 3.1.10-14vl1
  209. - update based on fedora development 3.1.10-14.
  210. - build with new toolchains.
  211. * Tue Jul 9 2007 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-14
  212. - feature: add configuration file
  213. - fix -V option
  214. - fix init script
  215. * Tue Jul 3 2007 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-13
  216. - Resolves: rhbz#243064
  217. * Tue Jul 3 2007 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-12
  218. - crashing atd
  219. - work only for root, still broken some functions
  220. - Resolves: rhbz#243064
  221. * Tue Mar 27 2007 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-11
  222. - mistake in pam_atd
  223. - rhbz#234120
  224. * Tue Mar 05 2007 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-10
  225. - rhbz#224597
  226. * Mon Mar 03 2007 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-9
  227. - review
  228. * Wed Feb 20 2007 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-8
  229. - review
  230. - rhbz#225288
  231. * Tue Jan 30 2007 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-7
  232. - no debug file - useless
  233. - new pam configuration
  234. - rhbz#224597
  235. * Tue Oct 27 2006 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-6
  236. - fix daylight-saving again
  237. - fix #214759 - problem with seteuid
  238. * Wed Oct 25 2006 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-5
  239. - daylight-saving
  240. * Tue Oct 24 2006 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-3
  241. - new version from upstream 3.1.10
  242. * Thu Aug 23 2006 Marcela Maslanova <mmaslano@redhat.com> - 3.1.8-82.fc6
  243. - #176486 don't fork option added (patch from Enrico Scholz)
  244. * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 3.1.8-81.2
  245. - rebuild
  246. * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 3.1.8-81.1
  247. - bump again for double-long bug on ppc(64)
  248. * Tue Feb 07 2006 Jason Vas Dias <jvdias@redhat.com> - 3.1.8-81
  249. - rebuild for new gcc, glibc, glibc-kernheaders
  250. - workaround new refusal of /usr/bin/install to chown
  251. * Fri Dec 18 2005 Jason Vas Dias<jvdias@redhat.com> - 3.1.8-80.2
  252. - rebuild for new flex
  253. * Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
  254. - rebuilt for new gcj
  255. * Fri Oct 14 2005 Dan Walsh <dwalsh@redhat.com> - 3.1.8-80
  256. - Add seuserbyname support
  257. * Fri Sep 30 2005 Tomas Mraz <tmraz@redhat.com> - 3.1.8-79
  258. - use include instead of pam_stack in pam config
  259. * Fri Jun 03 2005 Jason Vas Dias <jvdias@redhat.com> 3.1.8-78
  260. - fix bug 159220: add pam_loginuid to pam session stack in /etc/pam.d/atd
  261. - fix bug 102341: add '-r' synonym for '-d' / atrm for POSIX / SuS conformance
  262. * Fri Apr 08 2005 Jason Vas Dias <jvdias@redhat.com> 3.1.8-77
  263. - always call pam_setcred(pamh, PAM_DELETE_CRED) before session
  264. - close
  265. * Tue Apr 05 2005 Jason Vas Dias <jvdias@redhat.com> 3.1.8-70
  266. - always call pam_close_session on PAM_FAIL or pam_end
  267. * Tue Mar 08 2005 Jason Vas Dias <jvdias@redhat.com> 3.1.8-68
  268. - Put PAM authentication check in 'check_permissions()', so
  269. - user can know when using at(1) if PAM permission is denied.
  270. * Tue Mar 08 2005 Jason Vas Dias <jvdias@redhat.com> 3.1.8-67
  271. - better fix for bug 150131: change DAEMON_USERNAME and
  272. - DAEMON_GROUPNAME to 'root' .
  273. * Mon Mar 07 2005 Jason Vas Dias <jvdias@redhat.com> 3.1.8-66
  274. - fix bug 150131: atd should not relinquish root privilege if
  275. - doing su(1) equivalent with PAM .
  276. * Tue Jan 25 2005 Jason Vas Dias <jvdias@redhat.com> 3.1.8-64
  277. - bugs 5160/146132: add PAM authentication control to atd
  278. * Tue Nov 23 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.1.8-60vl1
  279. - based on Fedora development 3.1.8-60
  280. * Tue Oct 05 2004 Jason Vas Dias <jvdias@redhat.com> 3.1.8-60
  281. - fix bug 131510: no_export env. var. blacklisting should not
  282. - remove 'SHELL' when only 'SHELLOPTS' is blacklisted.
  283. - at(1) man-page should not say 'commands are run with /bin/sh'
  284. - and should explain usage of SHELL environement variable and
  285. - details of blacklisted variables.
  286. * Tue Sep 28 2004 Rik van Riel <riel@redhat.com> 3.1.8-58
  287. - fix typo in man page, bug 112303
  288. - (regenerated at-3.1.8-man-timespec-path.patch with fix)
  289. * Tue Aug 03 2004 Jason Vas Dias <jvdias@redhat.com>
  290. - fixed bug 125634 - made usage() agree with manpage
  291. * Thu Jul 29 2004 Jason Vas Dias <jvdias@redhat.com>
  292. - Added POSIX.2 -t option for RFE 127485
  293. * Fri Jun 20 2003 Jens Petersen <petersen@redhat.com> - 3.1.8-46
  294. - add at-3.1.8-atrun.8-typo-97697.patch to fix typo in atrun.8 (#97697)
  295. - update at.1 description of shell behaviour (#91233)
  296. * Tue Jun 17 2003 Jens Petersen <petersen@redhat.com> - 3.1.8-45
  297. - make the job shell default to SHELL instead of "/bin/sh" (#91233)
  298. * Tue Jun 3 2003 Jens Petersen <petersen@redhat.com> - 3.1.8-43
  299. - Replace redundant at-3.1.7-paths.patch by at-3.1.8-man-timespec-path.patch
  300. to fix timespec path
  301. * Tue Jun 3 2003 Jens Petersen <petersen@redhat.com> - 3.1.8-41
  302. - update source to at_3.1.8-11 from debian upstream
  303. - update source url
  304. - at-debian.patch no longer needed
  305. - at-3.1.7-paths.patch: the patch to "at.1.in" no longer needed
  306. - replace at-3.1.8-lexer.patch with at-3.1.8-11-lexer-parser.diff
  307. - at-3.1.8-dst.patch no longer needed
  308. - at-3.1.8-lsbdoc.patch no longer needed
  309. - at-3.1.8-o_excl.patch no longer needed
  310. - bump release number
  311. - added Japanese summary and description from vinedocs.sf.jp :)
  312. - rebuild with new toolchains
  313. * Wed Jan 23 2002 Toru Sagami <sagami@vinelinux.org> 3.1.8-23vl1
  314. - follow 3.1.8-23 (RHSA-2002:015-13)
  315. - apply docpath patch instead of patch16 (due to brute-force patch2 unrevised)
  316. - Replace sendmail with /usr/sbin/sendmail (postfix) for BuildPreReq
  317. * Sat Jun 09 2001 <sagami@vinelinux.org>
  318. - 3.1.8-12vl3: rebuilt for %%{_mandir}
  319. * Tue Dec 12 2000 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1.8-12vl2
  320. - remove /etc/init.d from PreReq
  321. * Sun Nov 19 2000 Satoshi MACHINO <machino@vinelinux.org> 3.1.8-12vl1
  322. - build on Vine Linux with gcc-2.95.3
  323. * Wed Aug 23 2000 Crutcher Dunnavant <crutcher@redhat.com>
  324. - Well, we will likely never really close the UTC issues,
  325. - because of 1) fractional timezones, and 2) daylight savigns time.
  326. - but there is a slight tweak to the handling of dst in the UTC patch.
  327. * Wed Aug 23 2000 Crutcher Dunnavant <crutcher@redhat.com>
  328. - fixed bug #15685
  329. - which had at miscaluclating UTC times.
  330. * Sat Jul 15 2000 Bill Nottingham <notting@redhat.com>
  331. - move initscript back
  332. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  333. - automatic rebuild
  334. * Thu Jul 6 2000 Bill Nottingham <notting@redhat.com>
  335. - prereq /etc/init.d
  336. * Sat Jul 1 2000 Nalin Dahyabhai <nalin@redhat.com>
  337. - fix syntax error in init script
  338. * Tue Jun 27 2000 Preston Brown <pbrown@redhat.com>
  339. - don't prereq, only require initscripts
  340. * Mon Jun 26 2000 Preston Brown <pbrown@redhat.com>
  341. - move init script
  342. - add condrestart directive
  343. - fix post/preun/postun scripts
  344. - prereq initscripts >= 5.20
  345. * Sat Jun 17 2000 Bill Nottingham <notting@redhat.com>
  346. - fix verify of /var/spool/at/.SEQ (#12262)
  347. * Mon Jun 12 2000 Nalin Dahyabhai <nalin@redhat.com>
  348. - fix status checking and syntax error in init script
  349. * Fri Jun 9 2000 Bill Nottingham <notting@redhat.com>
  350. - fix for long usernames (#11321)
  351. - add some bugfixes from debian
  352. * Mon May 8 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  353. - 3.1.8
  354. * Wed Mar 1 2000 Bill Nottingham <notting@redhat.com>
  355. - fix a couple of more typos, null-terminate some strings
  356. * Thu Feb 10 2000 Bill Nottingham <notting@redhat.com>
  357. - fix many-years-old typo in atd.c
  358. * Thu Feb 3 2000 Bill Nottingham <notting@redhat.com>
  359. - handle compressed man pages
  360. * Mon Aug 16 1999 Bill Nottingham <notting@redhat.com>
  361. - initscript munging, build as non-root user
  362. * Sun Jun 13 1999 Jeff Johnson <jbj@redhat.com>
  363. - correct perms for /var/spool/at after defattr.
  364. * Mon May 24 1999 Jeff Johnson <jbj@redhat.com>
  365. - reset SIGCHLD before exec (#3016).
  366. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  367. - auto rebuild in the new build environment (release 8)
  368. * Thu Mar 18 1999 Cristian Gafton <gafton@redhat.com>
  369. - fix handling the 12:00 time
  370. * Wed Jan 13 1999 Bill Nottingham <notting@redhat.com>
  371. - configure fix for arm
  372. * Wed Jan 06 1999 Cristian Gafton <gafton@redhat.com>
  373. - build for glibc 2.1
  374. * Tue May 05 1998 Prospector System <bugs@redhat.com>
  375. - translations modified for de, fr, tr
  376. * Wed Apr 22 1998 Michael K. Johnson <johnsonm@redhat.com>
  377. - enhanced initscript
  378. * Sun Nov 09 1997 Michael K. Johnson <johnsonm@redhat.com>
  379. - learned to spell
  380. * Wed Oct 22 1997 Michael K. Johnson <johnsonm@redhat.com>
  381. - updated to at version 3.1.7
  382. - updated lock and sequence file handling with %ghost
  383. - Use chkconfig and atd, now conflicts with old crontabs packages
  384. * Thu Jun 19 1997 Erik Troan <ewt@redhat.com>
  385. - built against glibc