summaryrefslogtreecommitdiff
path: root/contrib/suse/openssh.spec
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/suse/openssh.spec')
-rw-r--r--contrib/suse/openssh.spec244
1 files changed, 147 insertions, 97 deletions
diff --git a/contrib/suse/openssh.spec b/contrib/suse/openssh.spec
index 6ad862fad..b49e78c65 100644
--- a/contrib/suse/openssh.spec
+++ b/contrib/suse/openssh.spec
@@ -1,14 +1,29 @@
1Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation 1# Default values for additional components
2Name: openssh 2%define build_x11_askpass 1
3Version: 4.2p1 3
4URL: http://www.openssh.com/ 4# Define the UID/GID to use for privilege separation
5Release: 1 5%define sshd_gid 65
6Source0: openssh-%{version}.tar.gz 6%define sshd_uid 71
7Copyright: BSD 7
8Group: Applications/Internet 8# The version of x11-ssh-askpass to use
9BuildRoot: /tmp/openssh-%{version}-buildroot 9%define xversion 1.2.4.1
10PreReq: openssl 10
11Obsoletes: ssh 11# Allow the ability to override defaults with -D skip_xxx=1
12%{?skip_x11_askpass:%define build_x11_askpass 0}
13
14Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation
15Name: openssh
16Version: 4.3p2
17URL: http://www.openssh.com/
18Release: 1
19Source0: openssh-%{version}.tar.gz
20Source1: x11-ssh-askpass-%{xversion}.tar.gz
21License: BSD
22Group: Productivity/Networking/SSH
23BuildRoot: %{_tmppath}/openssh-%{version}-buildroot
24PreReq: openssl
25Obsoletes: ssh
26Provides: ssh
12# 27#
13# (Build[ing] Prereq[uisites] only work for RPM 2.95 and newer.) 28# (Build[ing] Prereq[uisites] only work for RPM 2.95 and newer.)
14# building prerequisites -- stuff for 29# building prerequisites -- stuff for
@@ -16,14 +31,25 @@ Obsoletes: ssh
16# TCP Wrappers (nkitb), 31# TCP Wrappers (nkitb),
17# and Gnome (glibdev, gtkdev, and gnlibsd) 32# and Gnome (glibdev, gtkdev, and gnlibsd)
18# 33#
19BuildPrereq: openssl 34BuildPrereq: openssl
20BuildPrereq: nkitb 35BuildPrereq: nkitb
21BuildPrereq: glibdev 36#BuildPrereq: glibdev
22BuildPrereq: gtkdev 37#BuildPrereq: gtkdev
23BuildPrereq: gnlibsd 38#BuildPrereq: gnlibsd
39
40%package askpass
41Summary: A passphrase dialog for OpenSSH and the X window System.
42Group: Productivity/Networking/SSH
43Requires: openssh = %{version}
44Obsoletes: ssh-extras
45Provides: openssh:${_libdir}/ssh/ssh-askpass
46
47%if %{build_x11_askpass}
48BuildPrereq: XFree86-devel
49%endif
24 50
25%description 51%description
26Ssh (Secure Shell) a program for logging into a remote machine and for 52Ssh (Secure Shell) is a program for logging into a remote machine and for
27executing commands in a remote machine. It is intended to replace 53executing commands in a remote machine. It is intended to replace
28rlogin and rsh, and provide secure encrypted communications between 54rlogin and rsh, and provide secure encrypted communications between
29two untrusted hosts over an insecure network. X11 connections and 55two untrusted hosts over an insecure network. X11 connections and
@@ -34,10 +60,26 @@ up to date in terms of security and features, as well as removing all
34patented algorithms to seperate libraries (OpenSSL). 60patented algorithms to seperate libraries (OpenSSL).
35 61
36This package includes all files necessary for both the OpenSSH 62This package includes all files necessary for both the OpenSSH
37client and server. Additionally, this package contains the GNOME 63client and server.
38passphrase dialog. 64
65%description askpass
66Ssh (Secure Shell) is a program for logging into a remote machine and for
67executing commands in a remote machine. It is intended to replace
68rlogin and rsh, and provide secure encrypted communications between
69two untrusted hosts over an insecure network. X11 connections and
70arbitrary TCP/IP ports can also be forwarded over the secure channel.
71
72OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
73up to date in terms of security and features, as well as removing all
74patented algorithms to seperate libraries (OpenSSL).
75
76This package contains an X Window System passphrase dialog for OpenSSH.
39 77
40%changelog 78%changelog
79* Wed Oct 26 2005 Iain Morgan <imorgan@nas.nasa.gov>
80- Removed accidental inclusion of --without-zlib-version-check
81* Tue Oct 25 2005 Iain Morgan <imorgan@nas.nasa.gov>
82- Overhaul to deal with newer versions of SuSE and OpenSSH
41* Mon Jun 12 2000 Damien Miller <djm@mindrot.org> 83* Mon Jun 12 2000 Damien Miller <djm@mindrot.org>
42- Glob manpages to catch compressed files 84- Glob manpages to catch compressed files
43* Wed Mar 15 2000 Damien Miller <djm@ibs.com.au> 85* Wed Mar 15 2000 Damien Miller <djm@ibs.com.au>
@@ -84,116 +126,124 @@ passphrase dialog.
84 126
85%prep 127%prep
86 128
129%if %{build_x11_askpass}
130%setup -q -a 1
131%else
87%setup -q 132%setup -q
133%endif
88 134
89%build 135%build
90CFLAGS="$RPM_OPT_FLAGS" \ 136CFLAGS="$RPM_OPT_FLAGS" \
91./configure --prefix=/usr \ 137%configure --prefix=/usr \
92 --sysconfdir=/etc/ssh \ 138 --sysconfdir=%{_sysconfdir}/ssh \
93 --datadir=/usr/share/openssh \ 139 --mandir=%{_mandir} \
140 --with-privsep-path=/var/lib/empty \
94 --with-pam \ 141 --with-pam \
95 --with-gnome-askpass \
96 --with-tcp-wrappers \ 142 --with-tcp-wrappers \
97 --with-ipv4-default \ 143 --libexecdir=%{_libdir}/ssh
98 --libexecdir=/usr/lib/ssh
99make 144make
100 145
101cd contrib 146%if %{build_x11_askpass}
102gcc -O -g `gnome-config --cflags gnome gnomeui` \ 147cd x11-ssh-askpass-%{xversion}
103 gnome-ssh-askpass.c -o gnome-ssh-askpass \ 148%configure --mandir=/usr/X11R6/man \
104 `gnome-config --libs gnome gnomeui` 149 --libexecdir=%{_libdir}/ssh
150xmkmf -a
151make
105cd .. 152cd ..
153%endif
106 154
107%install 155%install
108rm -rf $RPM_BUILD_ROOT 156rm -rf $RPM_BUILD_ROOT
109make install DESTDIR=$RPM_BUILD_ROOT/ 157make install DESTDIR=$RPM_BUILD_ROOT/
110install -d $RPM_BUILD_ROOT/etc/ssh/
111install -d $RPM_BUILD_ROOT/etc/pam.d/ 158install -d $RPM_BUILD_ROOT/etc/pam.d/
112install -d $RPM_BUILD_ROOT/sbin/init.d/ 159install -d $RPM_BUILD_ROOT/etc/init.d/
113install -d $RPM_BUILD_ROOT/var/adm/fillup-templates 160install -d $RPM_BUILD_ROOT/var/adm/fillup-templates
114install -d $RPM_BUILD_ROOT/usr/lib/ssh
115install -m644 contrib/sshd.pam.generic $RPM_BUILD_ROOT/etc/pam.d/sshd 161install -m644 contrib/sshd.pam.generic $RPM_BUILD_ROOT/etc/pam.d/sshd
116install -m744 contrib/suse/rc.sshd $RPM_BUILD_ROOT/sbin/init.d/sshd 162install -m744 contrib/suse/rc.sshd $RPM_BUILD_ROOT/etc/init.d/sshd
117ln -s ../../sbin/init.d/sshd $RPM_BUILD_ROOT/usr/sbin/rcsshd 163install -m744 contrib/suse/sysconfig.ssh \
118install -s contrib/gnome-ssh-askpass $RPM_BUILD_ROOT/usr/lib/ssh/gnome-ssh-askpass
119ln -s gnome-ssh-askpass $RPM_BUILD_ROOT/usr/lib/ssh/ssh-askpass
120install -m744 contrib/suse/rc.config.sshd \
121 $RPM_BUILD_ROOT/var/adm/fillup-templates 164 $RPM_BUILD_ROOT/var/adm/fillup-templates
122 165
166%if %{build_x11_askpass}
167cd x11-ssh-askpass-%{xversion}
168make install install.man BINDIR=%{_libdir}/ssh DESTDIR=$RPM_BUILD_ROOT/
169rm -f $RPM_BUILD_ROOT/usr/share/Ssh.bin
170%endif
171
123%clean 172%clean
124rm -rf $RPM_BUILD_ROOT 173rm -rf $RPM_BUILD_ROOT
125 174
175%pre
176/usr/sbin/groupadd -g %{sshd_gid} -o -r sshd 2> /dev/null || :
177/usr/sbin/useradd -r -o -g sshd -u %{sshd_uid} -s /bin/false -c "SSH Privilege Separation User" -d /var/lib/sshd sshd 2> /dev/null || :
178
126%post 179%post
127if [ "$1" = 1 ]; then
128 echo "Creating SSH stop/start scripts in the rc directories..."
129 ln -s ../sshd /sbin/init.d/rc2.d/K20sshd
130 ln -s ../sshd /sbin/init.d/rc2.d/S20sshd
131 ln -s ../sshd /sbin/init.d/rc3.d/K20sshd
132 ln -s ../sshd /sbin/init.d/rc3.d/S20sshd
133fi
134echo "Updating /etc/rc.config..."
135if [ -x /bin/fillup ] ; then
136 /bin/fillup -q -d = etc/rc.config var/adm/fillup-templates/rc.config.sshd
137else
138 echo "ERROR: fillup not found. This should NOT happen in SuSE Linux."
139 echo "Update /etc/rc.config by hand from the following template file:"
140 echo " /var/adm/fillup-templates/rc.config.sshd"
141fi
142if [ ! -f /etc/ssh/ssh_host_key -o ! -s /etc/ssh/ssh_host_key ]; then 180if [ ! -f /etc/ssh/ssh_host_key -o ! -s /etc/ssh/ssh_host_key ]; then
143 echo "Generating SSH host key..." 181 echo "Generating SSH RSA host key..."
144 /usr/bin/ssh-keygen -b 1024 -f /etc/ssh/ssh_host_key -N '' >&2 182 /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' >&2
145fi 183fi
146if [ ! -f /etc/ssh/ssh_host_dsa_key -o ! -s /etc/ssh/ssh_host_dsa_key ]; then 184if [ ! -f /etc/ssh/ssh_host_dsa_key -o ! -s /etc/ssh/ssh_host_dsa_key ]; then
147 echo "Generating SSH DSA host key..." 185 echo "Generating SSH DSA host key..."
148 /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' >&2 186 /usr/bin/ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N '' >&2
149fi
150if test -r /var/run/sshd.pid
151then
152 echo "Restarting the running SSH daemon..."
153 /usr/sbin/rcsshd restart >&2
154fi 187fi
188%{fillup_and_insserv -n -s -y ssh sshd START_SSHD}
189%run_permissions
190
191%verifyscript
192%verify_permissions -e /etc/ssh/sshd_config -e /etc/ssh/ssh_config -e /usr/bin/ssh
155 193
156%preun 194%preun
157if [ "$1" = 0 ] 195%stop_on_removal sshd
158then 196
159 echo "Stopping the SSH daemon..." 197%postun
160 /usr/sbin/rcsshd stop >&2 198%restart_on_update sshd
161 echo "Removing SSH stop/start scripts from the rc directories..." 199%{insserv_cleanup}
162 rm /sbin/init.d/rc2.d/K20sshd
163 rm /sbin/init.d/rc2.d/S20sshd
164 rm /sbin/init.d/rc3.d/K20sshd
165 rm /sbin/init.d/rc3.d/S20sshd
166fi
167 200
168%files 201%files
169%defattr(-,root,root) 202%defattr(-,root,root)
170%doc ChangeLog OVERVIEW README* 203%doc ChangeLog OVERVIEW README*
171%doc RFC.nroff TODO CREDITS LICENCE 204%doc RFC.nroff TODO CREDITS LICENCE
172%attr(0755,root,root) %dir /etc/ssh 205%attr(0755,root,root) %dir %{_sysconfdir}/ssh
173%attr(0644,root,root) %config /etc/ssh/ssh_config 206%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ssh_config
174%attr(0600,root,root) %config /etc/ssh/sshd_config 207%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config
175%attr(0600,root,root) %config /etc/ssh/moduli 208%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/moduli
176%attr(0644,root,root) %config /etc/pam.d/sshd 209%attr(0644,root,root) %config(noreplace) /etc/pam.d/sshd
177%attr(0755,root,root) %config /sbin/init.d/sshd 210%attr(0755,root,root) %config /etc/init.d/sshd
178%attr(0755,root,root) /usr/bin/ssh-keygen 211%attr(0755,root,root) %{_bindir}/ssh-keygen
179%attr(0755,root,root) /usr/bin/scp 212%attr(0755,root,root) %{_bindir}/scp
180%attr(4755,root,root) /usr/bin/ssh 213%attr(0755,root,root) %{_bindir}/ssh
181%attr(-,root,root) /usr/bin/slogin 214%attr(-,root,root) %{_bindir}/slogin
182%attr(0755,root,root) /usr/bin/ssh-agent 215%attr(0755,root,root) %{_bindir}/ssh-agent
183%attr(0755,root,root) /usr/bin/ssh-add 216%attr(0755,root,root) %{_bindir}/ssh-add
184%attr(0755,root,root) /usr/bin/ssh-keyscan 217%attr(0755,root,root) %{_bindir}/ssh-keyscan
185%attr(0755,root,root) /usr/bin/sftp 218%attr(0755,root,root) %{_bindir}/sftp
186%attr(0755,root,root) /usr/sbin/sshd 219%attr(0755,root,root) %{_sbindir}/sshd
187%attr(-,root,root) /usr/sbin/rcsshd 220%attr(0755,root,root) %dir %{_libdir}/ssh
188%attr(0755,root,root) %dir /usr/lib/ssh 221%attr(0755,root,root) %{_libdir}/ssh/sftp-server
189%attr(0755,root,root) /usr/lib/ssh/ssh-askpass 222%attr(4711,root,root) %{_libdir}/ssh/ssh-keysign
190%attr(0755,root,root) /usr/lib/ssh/gnome-ssh-askpass 223%attr(0644,root,root) %doc %{_mandir}/man1/scp.1*
191%attr(0644,root,root) %doc /usr/man/man1/scp.1* 224%attr(0644,root,root) %doc %{_mandir}/man1/sftp.1*
192%attr(0644,root,root) %doc /usr/man/man1/ssh.1* 225%attr(-,root,root) %doc %{_mandir}/man1/slogin.1*
193%attr(-,root,root) %doc /usr/man/man1/slogin.1* 226%attr(0644,root,root) %doc %{_mandir}/man1/ssh.1*
194%attr(0644,root,root) %doc /usr/man/man1/ssh-agent.1* 227%attr(0644,root,root) %doc %{_mandir}/man1/ssh-add.1*
195%attr(0644,root,root) %doc /usr/man/man1/ssh-add.1* 228%attr(0644,root,root) %doc %{_mandir}/man1/ssh-agent.1*
196%attr(0644,root,root) %doc /usr/man/man1/ssh-keygen.1* 229%attr(0644,root,root) %doc %{_mandir}/man1/ssh-keygen.1*
197%attr(0644,root,root) %doc /usr/man/man8/sshd.8* 230%attr(0644,root,root) %doc %{_mandir}/man1/ssh-keyscan.1*
198%attr(0644,root,root) /var/adm/fillup-templates/rc.config.sshd 231%attr(0644,root,root) %doc %{_mandir}/man5/ssh_config.5*
232%attr(0644,root,root) %doc %{_mandir}/man5/sshd_config.5*
233%attr(0644,root,root) %doc %{_mandir}/man8/sftp-server.8*
234%attr(0644,root,root) %doc %{_mandir}/man8/ssh-keysign.8*
235%attr(0644,root,root) %doc %{_mandir}/man8/sshd.8*
236%attr(0644,root,root) /var/adm/fillup-templates/sysconfig.ssh
199 237
238%if %{build_x11_askpass}
239%files askpass
240%defattr(-,root,root)
241%doc x11-ssh-askpass-%{xversion}/README
242%doc x11-ssh-askpass-%{xversion}/ChangeLog
243%doc x11-ssh-askpass-%{xversion}/SshAskpass*.ad
244%attr(0755,root,root) %{_libdir}/ssh/ssh-askpass
245%attr(0755,root,root) %{_libdir}/ssh/x11-ssh-askpass
246%attr(0644,root,root) %doc /usr/X11R6/man/man1/ssh-askpass.1x*
247%attr(0644,root,root) %doc /usr/X11R6/man/man1/x11-ssh-askpass.1x*
248%attr(0644,root,root) %config /usr/X11R6/lib/X11/app-defaults/SshAskpass
249%endif