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

Revision 521, 14.0 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

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