at-vl.spec 14 KB

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