Browse code

Clean the spec files for tftp.

Clean the spec files and removed the unused service and socket file.

Xiaolin Li authored on 2015/08/11 03:29:44
Showing 5 changed files
... ...
@@ -7,10 +7,8 @@ URL:		http://www.kernel.org
7 7
 Group:		Applications/Internet
8 8
 Vendor:		VMware, Inc.
9 9
 Distribution: Photon
10
-Source0:	http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{version}.tar.gz
10
+Source0:	https://www.kernel.org/pub/software/network/tftp/tftp-hpa/tftp-hpa-%{version}.tar.gz
11 11
 %define sha1 tftp=2fe37983ffeaf4063ffaba514c4848635c622d8b
12
-Source1:        tftpd-hpa.service
13
-Source2:        tftpd-hpa.socket
14 12
 
15 13
 %description
16 14
 The Trivial File Transfer Protocol (TFTP) is normally used only for
... ...
@@ -50,11 +48,7 @@ make INSTALLROOT=%{buildroot} \
50 50
     SBINDIR=%{_sbindir} MANDIR=%{_mandir} \
51 51
 	install
52 52
 install -m755 -d %{buildroot}%{_sysconfdir}/xinetd.d/ %{buildroot}/var/lib/tftpboot
53
-#pushd %{buildroot}
54
-mkdir -p %{buildroot}/lib/systemd/system
55
-cp %{SOURCE1} %{buildroot}/lib/systemd/system/tftpd-hpa.service
56
-cp %{SOURCE2} %{buildroot}/lib/systemd/system/tftpd-hpa.socket
57
-#popd
53
+
58 54
 cat << EOF >> %{buildroot}%{_sysconfdir}/xinetd.d/tftp
59 55
 # default: off
60 56
 # description: The tftp server serves files using the trivial file transfer \
... ...
@@ -79,16 +73,6 @@ EOF
79 79
 %clean
80 80
 rm -rf %{buildroot}
81 81
 
82
-%post server
83
-/sbin/ldconfig 
84
-%systemd_post tftpd-hpa.service tftpd-hpa.socket
85
-
86
-%preun server
87
-%systemd_preun tftpd-hpa.service tftpd-hpa.socket
88
-
89
-%postun server
90
-/sbin/ldconfig
91
-%systemd_postun_with_restart tftpd-hpa.service
92 82
 
93 83
 %files
94 84
 %defattr(-,root,root)
... ...
@@ -101,9 +85,161 @@ rm -rf %{buildroot}
101 101
 %dir %attr(0750,nobody,nobody) /var/lib/tftpboot
102 102
 %{_sbindir}/in.tftpd
103 103
 %{_mandir}/man8/*
104
-/lib/systemd/system/tftpd-hpa.service
105
-/lib/systemd/system/tftpd-hpa.socket
106 104
 
107 105
 %changelog
108 106
 *	Mon Jul 27 2015 Xiaolin Li <xiaolinl@vmware.com> 5.2-1
109
--	Initial build.	First version
107
+-	Add tftp library to photon.
108
+* Tue Sep 14 2004 H. Peter Anvin <hpa@zytor.com>
109
+- removed completely broken "Malta" patch.
110
+- integrated into build machinery so rpm -ta works.
111
+
112
+* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
113
+- rebuilt
114
+
115
+* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
116
+- rebuilt
117
+
118
+* Fri Apr 11 2003 Elliot Lee <sopwith@redhat.com>
119
+- 0.33
120
+- Add /tftpboot directory (#88204)
121
+
122
+* Mon Feb 24 2003 Elliot Lee <sopwith@redhat.com>
123
+- rebuilt
124
+
125
+* Sun Feb 23 2003 Tim Powers <timp@redhat.com>
126
+- add BuildPreReq on tcp_wrappers
127
+
128
+* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
129
+- rebuilt
130
+
131
+* Mon Nov 11 2002 Elliot Lee <sopwith@redhat.com> 0.32-1
132
+- Update to 0.32
133
+
134
+* Wed Oct 23 2002 Elliot Lee <sopwith@redhat.com> 0.30-1
135
+- Fix #55789
136
+- Update to 0.30
137
+
138
+* Thu Jun 27 2002 Elliot Lee <sopwith@redhat.com>
139
+- Try applying HJ's patch from #65476
140
+
141
+* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
142
+- automated rebuild
143
+
144
+* Mon Jun 17 2002 Elliot Lee <sopwith@redhat.com>
145
+- Update to 0.29
146
+
147
+* Thu May 23 2002 Tim Powers <timp@redhat.com>
148
+- automated rebuild
149
+
150
+* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
151
+- automated rebuild
152
+
153
+* Tue Dec 18 2001 Elliot Lee <sopwith@redhat.com> 0.17-15
154
+- Add patch4: netkit-tftp-0.17-defaultport.patch for bug #57562
155
+- Update to tftp-hpa-0.28 (bug #56131)
156
+- Remove include/arpa/tftp.h to fix #57259
157
+- Add resource limits in tftp-xinetd (#56722)
158
+
159
+* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
160
+- Bump release + rebuild.
161
+
162
+* Tue Jun 12 2001 Helge Deller <hdeller@redhat.de> (0.17-13)
163
+- updated tftp-hpa source to tftp-hpa-0.17
164
+- tweaked specfile with different defines for tftp-netkit and tftp-hpa version
165
+- use hpa's tftpd.8 man page instead of the netkits one
166
+
167
+* Mon May 07 2001 Helge Deller <hdeller@redhat.de>
168
+- rebuilt in 7.1.x
169
+
170
+* Wed Apr 18 2001 Helge Deller <hdeller@redhat.de>
171
+- fix tftp client's put problems (#29529)
172
+- update to tftp-hpa-0.16
173
+
174
+* Wed Apr  4 2001 Jakub Jelinek <jakub@redhat.com>
175
+- don't let configure to guess compiler, it can pick up egcs
176
+
177
+* Thu Feb 08 2001 Helge Deller <hdeller@redhat.de>
178
+- changed "wait" in xinetd file to "yes" (hpa-tftpd forks and exits) (#26467)
179
+- fixed hpa-tftpd to handle files greater than 32MB (#23725)
180
+- added "-l" flag to hpa-tftpd for file-logging (#26467)
181
+- added description for "-l" to the man-page 
182
+
183
+* Thu Feb 08 2001 Helge Deller <hdeller@redhat.de>
184
+- updated tftp client to 0.17 stable (#19640),
185
+- drop dependency on xinetd for tftp client (#25051),
186
+
187
+* Wed Jan 17 2001 Jeff Johnson <jbj@redhat.com>
188
+- xinetd shouldn't wait on tftp (which forks) (#23923).
189
+
190
+* Sat Jan  6 2001 Jeff Johnson <jbj@redhat.com>
191
+- fix to permit tftp put's (#18128).
192
+- startup as root with chroot to /tftpboot with early reversion to nobody
193
+  is preferable to starting as nobody w/o ability to chroot.
194
+- %%post is needed by server, not client. Add %%postun for erasure as well.
195
+
196
+* Wed Aug 23 2000 Nalin Dahyabhai <nalin@redhat.com>
197
+- default to being disabled
198
+
199
+* Thu Aug 17 2000 Jeff Johnson <jbj@redhat.com>
200
+- correct group.
201
+
202
+* Tue Jul 25 2000 Nalin Dahyabhai <nalin@redhat.com>
203
+- change user from root to nobody
204
+
205
+* Sat Jul 22 2000 Jeff Johnson <jbj@redhat.com>
206
+- update to tftp-hpa-0.14 (#14003).
207
+- add server_args (#14003).
208
+- remove -D_BSD_SOURCE (#14003).
209
+
210
+* Fri Jul 21 2000 Nalin Dahyabhai <nalin@redhat.com>
211
+- cook up an xinetd config file for tftpd
212
+
213
+* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
214
+- automatic rebuild
215
+
216
+* Sun Jun 18 2000 Jeff Johnson <jbj@redhat.com>
217
+- FHS packaging.
218
+- update to 0.17.
219
+
220
+* Fri May  5 2000 Matt Wilson <msw@redhat.com>
221
+- use _BSD_SOURCE for hpa's tftpd so we get BSD signal semantics.
222
+
223
+* Fri Feb 11 2000 Bill Nottingham <notting@redhat.com>
224
+- fix description
225
+
226
+* Wed Feb  9 2000 Jeff Johnson <jbj@redhat.com>
227
+- compress man pages (again).
228
+
229
+* Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
230
+- man pages are compressed
231
+- fix description and summary
232
+
233
+* Tue Jan  4 2000 Bill Nottingham <notting@redhat.com>
234
+- split client and server
235
+
236
+* Tue Dec 21 1999 Jeff Johnson <jbj@redhat.com>
237
+- update to 0.16.
238
+
239
+* Sat Aug 28 1999 Jeff Johnson <jbj@redhat.com>
240
+- update to 0.15.
241
+
242
+* Wed Apr  7 1999 Jeff Johnson <jbj@redhat.com>
243
+- tftpd should truncate file when overwriting (#412)
244
+
245
+* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
246
+- auto rebuild in the new build environment (release 22)
247
+
248
+* Mon Mar 15 1999 Jeff Johnson <jbj@redhat.com>
249
+- compile for 6.0.
250
+
251
+* Fri Aug  7 1998 Jeff Johnson <jbj@redhat.com>
252
+- build root
253
+
254
+* Mon Apr 27 1998 Prospector System <bugs@redhat.com>
255
+- translations modified for de, fr, tr
256
+
257
+* Mon Sep 22 1997 Erik Troan <ewt@redhat.com>
258
+- added check for getpwnam() failure
259
+
260
+* Tue Jul 15 1997 Erik Troan <ewt@redhat.com>
261
+- initial build
110 262
deleted file mode 100644
... ...
@@ -1,9 +0,0 @@
1
-[Unit]
2
-Description = HPA's tftp server
3
-Requires = tftpd-hpa.socket
4
-
5
-[Service]
6
-ExecStart = /usr/sbin/in.tftpd -v --secure /var/lib/tftpboot
7
-StandardInput = socket
8
-User = tftp
9
-Group = tftp
10 1
deleted file mode 100644
... ...
@@ -1,9 +0,0 @@
1
-[Unit]
2
-Description = Listen for tftp connections
3
-
4
-[Socket]
5
-ListenDatagram = 69
6
-BindToDevice = eth0
7
-
8
-[Install]
9
-WantedBy = sockets.target
... ...
@@ -1,3 +1,4 @@
1
+#copied from xinetd-2.3.15-15.fc22.x86_64.rpm
1 2
 [Unit]
2 3
 Description=Xinetd A Powerful Replacement For Inetd
3 4
 After=syslog.target network.target
... ...
@@ -3,7 +3,6 @@ Name:		xinetd
3 3
 Version:	2.3.15
4 4
 Release:	1%{?dist}
5 5
 License:	BSD
6
-URL:		http://www.xinetd.org/
7 6
 Group:		System Environment/Daemons
8 7
 Vendor:     	VMware, Inc.
9 8
 Distribution: 	Photon
... ...
@@ -27,7 +26,6 @@ mechanism to protect against port scanners, among other things.
27 27
 	--sbindir=%{buildroot}/%{_sbindir} 	\
28 28
 	--mandir=%{buildroot}/%{_datadir}/man 
29 29
   make
30
-  strip xinetd/xinetd
31 30
 
32 31
 %install
33 32
 rm -rf %{buildroot}
... ...
@@ -36,29 +34,25 @@ mkdir -p %{buildroot}/etc/rc.d/init.d
36 36
 mkdir -p %{buildroot}/etc/xinetd.d
37 37
 
38 38
 %makeinstall  
39
-#install -m 0755 xinetd6 %{buildroot}/%{_sbindir}
40 39
 install -m 0755 contrib/xinetd %{buildroot}/etc/rc.d/init.d/xinetd
41 40
 install -m 0600 contrib/xinetd.conf %{buildroot}/etc/
42 41
 cp contrib/xinetd.d/* %{buildroot}/etc/xinetd.d
43
-#pushd %{buildroot}
44 42
 mkdir -p %{buildroot}/lib/systemd/system
45 43
 cp %{SOURCE1} %{buildroot}/lib/systemd/system/xinetd.service
46
-#popd
47
-install -vdm755 %{buildroot}/etc/systemd/system/multi-user.target.wants
48
-ln -sfv ../../../../lib/systemd/system/xinetd.service  %{buildroot}/etc/systemd/system/multi-user.target.wants/xinetd.service
44
+
49 45
 %clean
50 46
 rm -rf %{buildroot}
51 47
 
52 48
 %post
53
-/sbin/ldconfig 
54
-%systemd_post xinetd.service
49
+%{_sbindir}/ldconfig 
50
+if [ $1 -eq 1 ] ; then
51
+    # Initial installation
52
+    # Enabled by default per "runs once then goes away" exception
53
+    /bin/systemctl enable xinetd.service     >/dev/null 2>&1 || :
54
+fi
55 55
 
56 56
 %preun
57
-%systemd_preun xinetd.service
58
-
59
-%postun
60
-/sbin/ldconfig
61
-%systemd_postun_with_restart xinetd.service
57
+/bin/systemctl disable xinetd.service
62 58
 
63 59
 %files
64 60
 %defattr(-, root, root)
... ...
@@ -69,9 +63,10 @@ rm -rf %{buildroot}
69 69
 %attr(0750, root, root) %config(noreplace) /etc/xinetd.conf
70 70
 %attr(0750, root, root) %config(noreplace) /etc/xinetd.d/*
71 71
 /lib/systemd/system/xinetd.service
72
-/etc/systemd/system/multi-user.target.wants/xinetd.service
73 72
 
74 73
 %changelog
75 74
 *   Fri Aug 07 2015 Xiaolin Li  <xiaolinl@vmware.com> 2.3.15-1
76
--   Initial build. First version
75
+-   Add xinetd library to photon
76
+*   Sun Sep 07 2003 Steve Grubb <linux_4ever@yahoo.com>
77
+-   Refined installation and added services.
77 78