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