]>
Commit | Line | Data |
---|---|---|
1877dc0c | 1 | # Version of OpenSSH |
922e6493 | 2 | %define oversion 2.3.1p1 |
1877dc0c | 3 | |
4 | # Version of ssh-askpass | |
5 | %define aversion 1.1.1 | |
6 | ||
7 | # Do we want to disable building of x11-askpass? (1=yes 0=no) | |
8 | %define no_x11_askpass 0 | |
9 | ||
10 | # Do we want to disable building of gnome-askpass? (1=yes 0=no) | |
11 | %define no_gnome_askpass 1 | |
12 | ||
13 | # Do we want to include contributed programs? (1=yes 0=no) | |
14 | %define contrib_programs 1 | |
15 | ||
16 | Summary: OpenSSH free Secure Shell (SSH) implementation | |
17 | Name: openssh | |
18 | Version: %{oversion} | |
19 | Release: 1 | |
20 | Packager: Damien Miller <djm@mindrot.org> | |
21 | URL: http://www.openssh.com/ | |
22 | Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{oversion}.tar.gz | |
23 | Source1: http://www.ntrnet.net/~jmknoble/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.gz | |
24 | Copyright: BSD | |
25 | Group: Applications/Internet | |
26 | BuildRoot: /var/tmp/openssh-%{Version}-buildroot | |
27 | #BuildRoot: /tmp/openssh-%{Version}-buildroot | |
28 | Obsoletes: ssh | |
29 | PreReq: openssl >= 0.9.5a | |
30 | Requires: openssl >= 0.9.5a | |
31 | BuildPreReq: perl, openssl-devel, tcp_wrappers | |
32 | BuildPreReq: /bin/login, /usr/bin/rsh, /usr/include/security/pam_appl.h | |
33 | %if ! %{no_gnome_askpass} | |
34 | BuildPreReq: gnome-libs-devel | |
35 | %endif | |
36 | ||
37 | %package clients | |
38 | Summary: OpenSSH Secure Shell protocol clients | |
39 | Requires: openssh = %{Version}-%{release} | |
40 | Group: Applications/Internet | |
41 | Obsoletes: ssh-clients | |
42 | ||
43 | %package server | |
44 | Summary: OpenSSH Secure Shell protocol server (sshd) | |
45 | Group: System Environment/Daemons | |
46 | Obsoletes: ssh-server | |
47 | #PreReq: openssh chkconfig >= 0.9 | |
48 | ||
49 | %package askpass | |
50 | Summary: OpenSSH X11 passphrase dialog | |
51 | Group: Applications/Internet | |
52 | Requires: openssh = %{Version}-%{release} | |
53 | Obsoletes: ssh-extras | |
54 | ||
55 | %package askpass-gnome | |
56 | Summary: OpenSSH GNOME passphrase dialog | |
57 | Group: Applications/Internet | |
58 | Requires: openssh = %{Version}-%{release} | |
59 | Obsoletes: ssh-extras | |
60 | ||
61 | %description | |
62 | Ssh (Secure Shell) a program for logging into a remote machine and for | |
63 | executing commands in a remote machine. It is intended to replace | |
64 | rlogin and rsh, and provide secure encrypted communications between | |
65 | two untrusted hosts over an insecure network. X11 connections and | |
66 | arbitrary TCP/IP ports can also be forwarded over the secure channel. | |
67 | ||
68 | OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it | |
69 | up to date in terms of security and features, as well as removing all | |
70 | patented algorithms to separate libraries (OpenSSL). | |
71 | ||
72 | This package includes the core files necessary for both the OpenSSH | |
73 | client and server. To make this package useful, you should also | |
74 | install openssh-clients, openssh-server, or both. | |
75 | ||
76 | %description clients | |
77 | Ssh (Secure Shell) a program for logging into a remote machine and for | |
78 | executing commands in a remote machine. It is intended to replace | |
79 | rlogin and rsh, and provide secure encrypted communications between | |
80 | two untrusted hosts over an insecure network. X11 connections and | |
81 | arbitrary TCP/IP ports can also be forwarded over the secure channel. | |
82 | ||
83 | OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it | |
84 | up to date in terms of security and features, as well as removing all | |
85 | patented algorithms to separate libraries (OpenSSL). | |
86 | ||
87 | This package includes the clients necessary to make encrypted connections | |
88 | to SSH servers. | |
89 | ||
90 | %description server | |
91 | Ssh (Secure Shell) a program for logging into a remote machine and for | |
92 | executing commands in a remote machine. It is intended to replace | |
93 | rlogin and rsh, and provide secure encrypted communications between | |
94 | two untrusted hosts over an insecure network. X11 connections and | |
95 | arbitrary TCP/IP ports can also be forwarded over the secure channel. | |
96 | ||
97 | OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it | |
98 | up to date in terms of security and features, as well as removing all | |
99 | patented algorithms to separate libraries (OpenSSL). | |
100 | ||
101 | This package contains the secure shell daemon. The sshd is the server | |
102 | part of the secure shell protocol and allows ssh clients to connect to | |
103 | your host. | |
104 | ||
105 | %description askpass | |
106 | Ssh (Secure Shell) a program for logging into a remote machine and for | |
107 | executing commands in a remote machine. It is intended to replace | |
108 | rlogin and rsh, and provide secure encrypted communications between | |
109 | two untrusted hosts over an insecure network. X11 connections and | |
110 | arbitrary TCP/IP ports can also be forwarded over the secure channel. | |
111 | ||
112 | OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it | |
113 | up to date in terms of security and features, as well as removing all | |
114 | patented algorithms to separate libraries (OpenSSL). | |
115 | ||
116 | This package contains Jim Knoble's <jmknoble@pobox.com> X11 passphrase | |
117 | dialog. | |
118 | ||
119 | %description askpass-gnome | |
120 | Ssh (Secure Shell) a program for logging into a remote machine and for | |
121 | executing commands in a remote machine. It is intended to replace | |
122 | rlogin and rsh, and provide secure encrypted communications between | |
123 | two untrusted hosts over an insecure network. X11 connections and | |
124 | arbitrary TCP/IP ports can also be forwarded over the secure channel. | |
125 | ||
126 | OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it | |
127 | up to date in terms of security and features, as well as removing all | |
128 | patented algorithms to separate libraries (OpenSSL). | |
129 | ||
130 | This package contains the GNOME passphrase dialog. | |
131 | ||
132 | %prep | |
133 | ||
134 | %setup -a 1 | |
135 | ||
136 | %build | |
137 | ||
138 | %define _sysconfdir /etc/ssh | |
139 | ||
140 | CFLAGS="$RPM_OPT_FLAGS" \ | |
141 | ./configure \ | |
142 | --prefix=/usr \ | |
143 | --sysconfdir=/etc/ssh \ | |
144 | --libexecdir=%{_libexecdir}/openssh \ | |
d748039d | 145 | --with-pam \ |
1877dc0c | 146 | --with-tcp-wrappers \ |
147 | --with-ipv4-default \ | |
148 | --with-rsh=/usr/bin/rsh | |
149 | ||
150 | make | |
151 | ||
152 | %if ! %{no_x11_askpass} | |
153 | cd x11-ssh-askpass-%{aversion} | |
154 | xmkmf -a | |
155 | make | |
156 | cd .. | |
157 | %endif | |
158 | ||
159 | %if ! %{no_gnome_askpass} | |
160 | cd contrib | |
161 | gcc -O -g `gnome-config --cflags gnome gnomeui` \ | |
162 | gnome-ssh-askpass.c -o gnome-ssh-askpass \ | |
163 | `gnome-config --libs gnome gnomeui` | |
164 | cd .. | |
165 | %endif | |
166 | ||
167 | %install | |
168 | rm -rf $RPM_BUILD_ROOT | |
169 | make install DESTDIR=$RPM_BUILD_ROOT/ | |
170 | ||
171 | # setup the environment we want | |
172 | perl -pi -e "s,PermitRootLogin yes,PermitRootLogin no,;" \ | |
173 | -e "s,X11Forwarding no,X11Forwarding yes,;" \ | |
174 | -e "s,CheckMail no,CheckMail yes,;" \ | |
175 | -e "s,^#Subsystem sftp,Subsystem sftp,;" \ | |
176 | $RPM_BUILD_ROOT/etc/ssh/sshd_config | |
177 | ||
178 | install -d $RPM_BUILD_ROOT/etc/pam.d/ | |
179 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d | |
180 | install -d $RPM_BUILD_ROOT/etc/sysconfig/daemons | |
181 | install -d $RPM_BUILD_ROOT%{_libexecdir}/openssh | |
182 | install -d $RPM_BUILD_ROOT/usr/local/bin | |
183 | install -d $RPM_BUILD_ROOT/usr/local/man/man1 | |
184 | install -m644 contrib/caldera/sshd.pam $RPM_BUILD_ROOT/etc/pam.d/sshd | |
185 | install -m755 contrib/caldera/sshd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd | |
186 | install -m755 contrib/caldera/sshd.daemons $RPM_BUILD_ROOT/etc/sysconfig/daemons/sshd | |
187 | perl -pi -e "s,\@OPENSSH_VERSION\@,%{Name}-%{Version},g" \ | |
188 | $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd | |
189 | perl -pi -e "s,\@OPENSSH_VERSION\@,%{Name}-%{Version},g" \ | |
190 | $RPM_BUILD_ROOT/etc/sysconfig/daemons/sshd | |
191 | %if %{contrib_programs} | |
192 | install -m755 contrib/make-ssh-known-hosts.pl $RPM_BUILD_ROOT/usr/local/bin | |
193 | install -m644 contrib/make-ssh-known-hosts.1 $RPM_BUILD_ROOT/usr/local/man/man1 | |
194 | install -m755 contrib/ssh-copy-id $RPM_BUILD_ROOT/usr/local/bin | |
195 | install -m644 contrib/ssh-copy-id.1 $RPM_BUILD_ROOT/usr/local/man/man1 | |
196 | %endif | |
197 | ||
198 | %if ! %{no_x11_askpass} | |
199 | install -s x11-ssh-askpass-%{aversion}/x11-ssh-askpass $RPM_BUILD_ROOT/usr/libexec/openssh/x11-ssh-askpass | |
200 | ln -s /usr/libexec/openssh/x11-ssh-askpass $RPM_BUILD_ROOT/usr/libexec/openssh/ssh-askpass | |
201 | install -d $RPM_BUILD_ROOT/usr/X11R6/man/man1 | |
202 | install -c -m 0444 x11-ssh-askpass-%{aversion}/x11-ssh-askpass.man $RPM_BUILD_ROOT/usr/X11R6/man/man1/x11-ssh-askpass.1x | |
203 | ln -s /usr/X11R6/man/man1/x11-ssh-askpass.1x $RPM_BUILD_ROOT/usr/X11R6/man/man1/ssh-askpass.1x | |
204 | %endif | |
205 | ||
206 | %if ! %{no_gnome_askpass} | |
207 | install -s contrib/gnome-ssh-askpass $RPM_BUILD_ROOT/usr/libexec/openssh/gnome-ssh-askpass | |
208 | %endif | |
209 | ||
210 | %clean | |
211 | ##rm -rf $RPM_BUILD_ROOT | |
212 | ||
213 | %post server | |
214 | if [ "$1" = 1 ]; then | |
215 | echo "Creating SSH stop/start scripts in the rc directories..." | |
216 | # /sbin/chkconfig --add sshd | |
217 | lisa --SysV-init install sshd S90 2:3:4:5 K05 0:1:6 | |
218 | fi | |
219 | if test -r /var/run/sshd.pid | |
220 | then | |
221 | echo "Restarting the running SSH daemon..." | |
222 | /etc/rc.d/init.d/sshd restart >&2 | |
223 | else | |
224 | echo "Starting the SSH daemon..." | |
225 | /etc/rc.d/init.d/sshd start >&2 | |
226 | fi | |
227 | ||
228 | %preun server | |
229 | if [ "$1" = 0 ] ; then | |
230 | echo "Stopping the SSH daemon..." | |
231 | /etc/rc.d/init.d/sshd stop >&2 | |
232 | echo "Removing SSH stop/start scripts from the rc directories..." | |
233 | # /sbin/chkconfig --del sshd | |
234 | lisa --SysV-init remove sshd $1 | |
235 | fi | |
236 | ||
237 | %files | |
238 | %defattr(-,root,root) | |
239 | %doc ChangeLog OVERVIEW README* INSTALL | |
240 | %doc CREDITS LICENCE | |
241 | %attr(0755,root,root) %{_bindir}/ssh-keygen | |
242 | %attr(0755,root,root) %{_bindir}/scp | |
243 | %attr(0755,root,root) %{_bindir}/ssh-keyscan | |
244 | %attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1* | |
245 | %attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1* | |
246 | %attr(0644,root,root) %{_mandir}/man1/scp.1* | |
247 | %attr(0755,root,root) %dir %{_sysconfdir} | |
248 | %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/primes | |
249 | %attr(0755,root,root) %dir %{_libexecdir}/openssh | |
250 | ||
251 | %files clients | |
252 | %defattr(-,root,root) | |
253 | %attr(4755,root,root) %{_bindir}/ssh | |
254 | %attr(0755,root,root) %{_bindir}/ssh-agent | |
255 | %attr(0755,root,root) %{_bindir}/ssh-add | |
61e96248 | 256 | %attr(0755,root,root) %{_bindir}/ssh-keyscan |
257 | %attr(0755,root,root) %{_bindir}/sftp | |
1877dc0c | 258 | %attr(0644,root,root) %{_mandir}/man1/ssh.1* |
259 | %attr(0644,root,root) %{_mandir}/man1/ssh-agent.1* | |
260 | %attr(0644,root,root) %{_mandir}/man1/ssh-add.1* | |
61e96248 | 261 | %attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1* |
262 | %attr(0644,root,root) %{_mandir}/man1/sftp.1* | |
1877dc0c | 263 | %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh_config |
264 | %attr(-,root,root) %{_bindir}/slogin | |
265 | %attr(-,root,root) %{_mandir}/man1/slogin.1* | |
266 | %if %{contrib_programs} | |
267 | %attr(0755,root,root) /usr/local/bin/make-ssh-known-hosts.pl | |
268 | %attr(0644,root,root) /usr/local/man/man1/make-ssh-known-hosts.1 | |
269 | %attr(0755,root,root) /usr/local/bin/ssh-copy-id | |
270 | %attr(0644,root,root) /usr/local/man/man1/ssh-copy-id.1 | |
271 | %endif | |
272 | ||
273 | %files server | |
274 | %defattr(-,root,root) | |
275 | %attr(0751,root,root) %{_sbindir}/sshd | |
276 | %attr(0755,root,root) %{_libexecdir}/openssh/sftp-server | |
277 | %attr(0644,root,root) %{_mandir}/man8/sshd.8* | |
278 | %attr(0644,root,root) %{_mandir}/man8/sftp-server.8* | |
279 | %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sshd_config | |
280 | %attr(0600,root,root) %config(noreplace) /etc/pam.d/sshd | |
281 | %attr(0755,root,root) %config /etc/rc.d/init.d/sshd | |
282 | %attr(0755,root,root) %config /etc/sysconfig/daemons/sshd | |
283 | ||
284 | %if ! %{no_x11_askpass} | |
285 | %files askpass | |
286 | %defattr(-,root,root) | |
287 | %doc x11-ssh-askpass-%{aversion}/README | |
288 | %doc x11-ssh-askpass-%{aversion}/ChangeLog | |
289 | %doc x11-ssh-askpass-%{aversion}/SshAskpass*.ad | |
290 | %attr(0755,root,root) %{_libexecdir}/openssh/ssh-askpass | |
291 | %attr(0755,root,root) %{_libexecdir}/openssh/x11-ssh-askpass | |
292 | %attr(0644,root,root) /usr/X11R6/man/man1/x11-ssh-askpass.1x | |
293 | %attr(-,root,root) /usr/X11R6/man/man1/ssh-askpass.1x | |
294 | %endif | |
295 | ||
296 | %if ! %{no_gnome_askpass} | |
297 | %files askpass-gnome | |
298 | %defattr(-,root,root) | |
299 | %attr(0755,root,root) %{_libexecdir}/openssh/gnome-ssh-askpass | |
300 | %endif | |
301 | ||
302 | %changelog | |
303 | * Mon Oct 18 2000 Damien Miller <djm@mindrot.org> | |
304 | - Merge some of Nalin Dahyabhai <nalin@redhat.com> changes from the | |
305 | Redhat 7.0 spec file | |
306 | * Tue Sep 05 2000 Damien Miller <djm@mindrot.org> | |
307 | - Use RPM configure macro | |
308 | * Tue Aug 08 2000 Damien Miller <djm@mindrot.org> | |
309 | - Some surgery to sshd.init (generate keys at runtime) | |
310 | - Cleanup of groups and removal of keygen calls | |
311 | * Wed Jul 12 2000 Damien Miller <djm@mindrot.org> | |
312 | - Make building of X11-askpass and gnome-askpass optional | |
313 | * Mon Jun 12 2000 Damien Miller <djm@mindrot.org> | |
314 | - Glob manpages to catch compressed files | |
315 | * Wed Mar 15 2000 Damien Miller <djm@ibs.com.au> | |
316 | - Updated for new location | |
317 | - Updated for new gnome-ssh-askpass build | |
318 | * Sun Dec 26 1999 Damien Miller <djm@mindrot.org> | |
319 | - Added Jim Knoble's <jmknoble@pobox.com> askpass | |
320 | * Mon Nov 15 1999 Damien Miller <djm@mindrot.org> | |
321 | - Split subpackages further based on patch from jim knoble <jmknoble@pobox.com> | |
322 | * Sat Nov 13 1999 Damien Miller <djm@mindrot.org> | |
323 | - Added 'Obsoletes' directives | |
324 | * Tue Nov 09 1999 Damien Miller <djm@ibs.com.au> | |
325 | - Use make install | |
326 | - Subpackages | |
327 | * Mon Nov 08 1999 Damien Miller <djm@ibs.com.au> | |
328 | - Added links for slogin | |
329 | - Fixed perms on manpages | |
330 | * Sat Oct 30 1999 Damien Miller <djm@ibs.com.au> | |
331 | - Renamed init script | |
332 | * Fri Oct 29 1999 Damien Miller <djm@ibs.com.au> | |
333 | - Back to old binary names | |
334 | * Thu Oct 28 1999 Damien Miller <djm@ibs.com.au> | |
335 | - Use autoconf | |
336 | - New binary names | |
337 | * Wed Oct 27 1999 Damien Miller <djm@ibs.com.au> | |
338 | - Initial RPMification, based on Jan "Yenya" Kasprzak's <kas@fi.muni.cz> spec. | |
339 |