source: projects/specs/trunk/a/at/at-vl.spec @ 7107

Revision 7107, 14.6 KB checked in by daisuke, 11 years ago (diff)

at:

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