]> andersk Git - openssh.git/blame - contrib/redhat/openssh.spec
- (djm) Update RPM spec version
[openssh.git] / contrib / redhat / openssh.spec
CommitLineData
bc7ea646 1# Version of OpenSSH
ea44783f 2%define oversion 2.5.2p1
bc7ea646 3
4# Version of ssh-askpass
0b16bb01 5%define aversion 1.2.0
bc7ea646 6
1e970014 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
94dd09e3 13# Do we want to link against a static libcrypto? (1=yes 0=no)
14%define static_libcrypto 0
15
894a4851 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
94dd09e3 28# Options for static OpenSSL link:
29# rpm -ba|--rebuild --define "static_openssl 1"
30%{?static_openssl:%define static_libcrypto 1}
31
cb291102 32%define exact_openssl_version %(rpm -q openssl | cut -d - -f 2)
33
8efc0c15 34Summary: OpenSSH free Secure Shell (SSH) implementation
35Name: openssh
bc7ea646 36Version: %{oversion}
8efc0c15 37Release: 1
71d43804 38Packager: Damien Miller <djm@mindrot.org>
177813fe 39URL: http://www.openssh.com/
71d43804 40Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{oversion}.tar.gz
73bd30fe 41%if ! %{no_x11_askpass}
986a22ec 42Source1: http://www.jmknoble.cx/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.gz
73bd30fe 43%endif
8efc0c15 44Copyright: BSD
45Group: Applications/Internet
8fd97cc4 46BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
e9c75a39 47Obsoletes: ssh
73bd30fe 48BuildPreReq: perl, openssl-devel, tcp_wrappers
94dd09e3 49BuildPreReq: /bin/login, /usr/include/security/pam_appl.h
894a4851 50BuildPreReq: rpm >= 3.0.5
71d43804 51%if ! %{no_gnome_askpass}
bc7ea646 52BuildPreReq: gnome-libs-devel
1e970014 53%endif
94dd09e3 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
8c119fd0 60
61%package clients
62Summary: OpenSSH Secure Shell protocol clients
aa0289fe 63Requires: openssh = %{version}-%{release}
71d43804 64Group: Applications/Internet
e9c75a39 65Obsoletes: ssh-clients
8efc0c15 66
d397b172 67%package server
8c119fd0 68Summary: OpenSSH Secure Shell protocol server (sshd)
d397b172 69Group: System Environment/Daemons
e9c75a39 70Obsoletes: ssh-server
aa0289fe 71PreReq: openssh = %{version}-%{release}, chkconfig >= 0.9
8fd97cc4 72%if %{redhat7}
73Requires: /etc/pam.d/system-auth
74%endif
d397b172 75
76%package askpass
bc7ea646 77Summary: OpenSSH X11 passphrase dialog
78Group: Applications/Internet
aa0289fe 79Requires: openssh = %{version}-%{release}
bc7ea646 80Obsoletes: ssh-extras
bc7ea646 81
bc7ea646 82%package askpass-gnome
8c119fd0 83Summary: OpenSSH GNOME passphrase dialog
d397b172 84Group: Applications/Internet
aa0289fe 85Requires: openssh = %{version}-%{release}
8c119fd0 86Obsoletes: ssh-extras
d397b172 87
8efc0c15 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
aa0289fe 97patented algorithms to separate libraries (OpenSSL).
8efc0c15 98
8c119fd0 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
aa0289fe 112patented algorithms to separate libraries (OpenSSL).
8c119fd0 113
d397b172 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
aa0289fe 126patented algorithms to separate libraries (OpenSSL).
d397b172 127
8c119fd0 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.
d397b172 131
bc7ea646 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
aa0289fe 141patented algorithms to separate libraries (OpenSSL).
bc7ea646 142
986a22ec 143This package contains Jim Knoble's <jmknoble@jmknoble.cx> X11 passphrase
bc7ea646 144dialog.
bc7ea646 145
8a4958eb 146%description askpass-gnome
d397b172 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
aa0289fe 155patented algorithms to separate libraries (OpenSSL).
d397b172 156
157This package contains the GNOME passphrase dialog.
158
8efc0c15 159%prep
160
73bd30fe 161%if ! %{no_x11_askpass}
feab8600 162%setup -q -a 1
73bd30fe 163%else
164%setup -q
165%endif
8efc0c15 166
167%build
168
e3291159 169%define _sysconfdir /etc/ssh
170
aa0289fe 171%configure \
aa0289fe 172 --libexecdir=%{_libexecdir}/openssh \
d748039d 173 --with-pam \
aa0289fe 174 --with-tcp-wrappers \
175 --with-ipv4-default \
176 --with-rsh=/usr/bin/rsh \
d748039d 177 --with-default-path=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
bc7ea646 178
94dd09e3 179%if %{static_libcrypto}
180perl -pi -e "s|-lcrypto|/usr/lib/libcrypto.a|g" Makefile
181%endif
182
bc7ea646 183make
8efc0c15 184
1e970014 185%if ! %{no_x11_askpass}
aa0289fe 186pushd x11-ssh-askpass-%{aversion}
bc7ea646 187xmkmf -a
df16c1f2 188make
aa0289fe 189popd
1e970014 190%endif
df16c1f2 191
1e970014 192%if ! %{no_gnome_askpass}
aa0289fe 193pushd contrib
720da3f6 194gcc -O -g `gnome-config --cflags gnome gnomeui` \
5cc53885 195 gnome-ssh-askpass.c -o gnome-ssh-askpass \
196 `gnome-config --libs gnome gnomeui`
aa0289fe 197popd
1e970014 198%endif
5cc53885 199
8efc0c15 200%install
201rm -rf $RPM_BUILD_ROOT
aa0289fe 202%{makeinstall} \
aa0289fe 203 libexecdir=$RPM_BUILD_ROOT%{_libexecdir}/openssh \
204 DESTDIR=/ # Hack to disable key generation
205
8efc0c15 206
22574738 207install -d $RPM_BUILD_ROOT/etc/pam.d/
208install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
aa0289fe 209install -d $RPM_BUILD_ROOT%{_libexecdir}/openssh
894a4851 210%if %{redhat7}
894a4851 211install -m644 contrib/redhat/sshd.pam-7.x $RPM_BUILD_ROOT/etc/pam.d/sshd
14a49e44 212%else
213install -m644 contrib/redhat/sshd.pam $RPM_BUILD_ROOT/etc/pam.d/sshd
894a4851 214%endif
5cc53885 215install -m755 contrib/redhat/sshd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
f1bcacf9 216
1e970014 217%if ! %{no_x11_askpass}
1eb4ec64 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
1e970014 220%endif
bc7ea646 221
1e970014 222%if ! %{no_gnome_askpass}
1eb4ec64 223install -s contrib/gnome-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/gnome-ssh-askpass
1e970014 224%endif
5cc53885 225
aa0289fe 226perl -pi -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT%{_mandir}/man*/*
227
8efc0c15 228%clean
229rm -rf $RPM_BUILD_ROOT
230
d397b172 231%post server
f1bcacf9 232/sbin/chkconfig --add sshd
71d43804 233if test -r /var/run/sshd.pid ; then
f1bcacf9 234 /etc/rc.d/init.d/sshd restart >&2
8efc0c15 235fi
236
d397b172 237%preun server
71d43804 238if [ "$1" = 0 ] ; then
f1bcacf9 239 /etc/rc.d/init.d/sshd stop >&2
240 /sbin/chkconfig --del sshd
8efc0c15 241fi
242
243%files
244%defattr(-,root,root)
3bdf55b1 245%doc ChangeLog OVERVIEW README* INSTALL
8d25eab8 246%doc CREDITS LICENCE
aa0289fe 247%attr(0755,root,root) %{_bindir}/ssh-keygen
248%attr(0755,root,root) %{_bindir}/scp
367d1840 249%attr(0755,root,root) %{_bindir}/ssh-keyscan
777319db 250%attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1*
367d1840 251%attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1*
777319db 252%attr(0644,root,root) %{_mandir}/man1/scp.1*
5733a41a 253%attr(0755,root,root) %dir %{_sysconfdir}
254%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/primes
aa0289fe 255%attr(0755,root,root) %dir %{_libexecdir}/openssh
8c119fd0 256
257%files clients
258%defattr(-,root,root)
aa0289fe 259%attr(4755,root,root) %{_bindir}/ssh
260%attr(0755,root,root) %{_bindir}/ssh-agent
261%attr(0755,root,root) %{_bindir}/ssh-add
61e96248 262%attr(0755,root,root) %{_bindir}/ssh-keyscan
263%attr(0755,root,root) %{_bindir}/sftp
777319db 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*
61e96248 267%attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1*
268%attr(0644,root,root) %{_mandir}/man1/sftp.1*
5733a41a 269%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh_config
aa0289fe 270%attr(-,root,root) %{_bindir}/slogin
777319db 271%attr(-,root,root) %{_mandir}/man1/slogin.1*
f1bcacf9 272
d397b172 273%files server
274%defattr(-,root,root)
aa0289fe 275%attr(0755,root,root) %{_sbindir}/sshd
276%attr(0755,root,root) %{_libexecdir}/openssh/sftp-server
777319db 277%attr(0644,root,root) %{_mandir}/man8/sshd.8*
278%attr(0644,root,root) %{_mandir}/man8/sftp-server.8*
4236bde4 279#%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sshd_config
280%attr(0600,root,root) %config %{_sysconfdir}/sshd_config
4655fe80 281%attr(0600,root,root) %config(noreplace) /etc/pam.d/sshd
f1bcacf9 282%attr(0755,root,root) %config /etc/rc.d/init.d/sshd
8efc0c15 283
1e970014 284%if ! %{no_x11_askpass}
d397b172 285%files askpass
286%defattr(-,root,root)
f28583d0 287%doc x11-ssh-askpass-%{aversion}/README
288%doc x11-ssh-askpass-%{aversion}/ChangeLog
289%doc x11-ssh-askpass-%{aversion}/SshAskpass*.ad
aa0289fe 290%attr(0755,root,root) %{_libexecdir}/openssh/ssh-askpass
291%attr(0755,root,root) %{_libexecdir}/openssh/x11-ssh-askpass
1e970014 292%endif
8c119fd0 293
1e970014 294%if ! %{no_gnome_askpass}
bc7ea646 295%files askpass-gnome
296%defattr(-,root,root)
aa0289fe 297%attr(0755,root,root) %{_libexecdir}/openssh/gnome-ssh-askpass
1e970014 298%endif
aa0289fe 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.810177 seconds and 5 git commands to generate.