diff options
Diffstat (limited to 'contrib/suse/openssh.spec')
-rw-r--r-- | contrib/suse/openssh.spec | 244 |
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 @@ | |||
1 | Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation | 1 | # Default values for additional components |
2 | Name: openssh | 2 | %define build_x11_askpass 1 |
3 | Version: 4.2p1 | 3 | |
4 | URL: http://www.openssh.com/ | 4 | # Define the UID/GID to use for privilege separation |
5 | Release: 1 | 5 | %define sshd_gid 65 |
6 | Source0: openssh-%{version}.tar.gz | 6 | %define sshd_uid 71 |
7 | Copyright: BSD | 7 | |
8 | Group: Applications/Internet | 8 | # The version of x11-ssh-askpass to use |
9 | BuildRoot: /tmp/openssh-%{version}-buildroot | 9 | %define xversion 1.2.4.1 |
10 | PreReq: openssl | 10 | |
11 | Obsoletes: ssh | 11 | # Allow the ability to override defaults with -D skip_xxx=1 |
12 | %{?skip_x11_askpass:%define build_x11_askpass 0} | ||
13 | |||
14 | Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation | ||
15 | Name: openssh | ||
16 | Version: 4.3p2 | ||
17 | URL: http://www.openssh.com/ | ||
18 | Release: 1 | ||
19 | Source0: openssh-%{version}.tar.gz | ||
20 | Source1: x11-ssh-askpass-%{xversion}.tar.gz | ||
21 | License: BSD | ||
22 | Group: Productivity/Networking/SSH | ||
23 | BuildRoot: %{_tmppath}/openssh-%{version}-buildroot | ||
24 | PreReq: openssl | ||
25 | Obsoletes: ssh | ||
26 | Provides: 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 | # |
19 | BuildPrereq: openssl | 34 | BuildPrereq: openssl |
20 | BuildPrereq: nkitb | 35 | BuildPrereq: nkitb |
21 | BuildPrereq: glibdev | 36 | #BuildPrereq: glibdev |
22 | BuildPrereq: gtkdev | 37 | #BuildPrereq: gtkdev |
23 | BuildPrereq: gnlibsd | 38 | #BuildPrereq: gnlibsd |
39 | |||
40 | %package askpass | ||
41 | Summary: A passphrase dialog for OpenSSH and the X window System. | ||
42 | Group: Productivity/Networking/SSH | ||
43 | Requires: openssh = %{version} | ||
44 | Obsoletes: ssh-extras | ||
45 | Provides: openssh:${_libdir}/ssh/ssh-askpass | ||
46 | |||
47 | %if %{build_x11_askpass} | ||
48 | BuildPrereq: XFree86-devel | ||
49 | %endif | ||
24 | 50 | ||
25 | %description | 51 | %description |
26 | Ssh (Secure Shell) a program for logging into a remote machine and for | 52 | Ssh (Secure Shell) is a program for logging into a remote machine and for |
27 | executing commands in a remote machine. It is intended to replace | 53 | executing commands in a remote machine. It is intended to replace |
28 | rlogin and rsh, and provide secure encrypted communications between | 54 | rlogin and rsh, and provide secure encrypted communications between |
29 | two untrusted hosts over an insecure network. X11 connections and | 55 | two 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 | |||
34 | patented algorithms to seperate libraries (OpenSSL). | 60 | patented algorithms to seperate libraries (OpenSSL). |
35 | 61 | ||
36 | This package includes all files necessary for both the OpenSSH | 62 | This package includes all files necessary for both the OpenSSH |
37 | client and server. Additionally, this package contains the GNOME | 63 | client and server. |
38 | passphrase dialog. | 64 | |
65 | %description askpass | ||
66 | Ssh (Secure Shell) is a program for logging into a remote machine and for | ||
67 | executing commands in a remote machine. It is intended to replace | ||
68 | rlogin and rsh, and provide secure encrypted communications between | ||
69 | two untrusted hosts over an insecure network. X11 connections and | ||
70 | arbitrary TCP/IP ports can also be forwarded over the secure channel. | ||
71 | |||
72 | OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it | ||
73 | up to date in terms of security and features, as well as removing all | ||
74 | patented algorithms to seperate libraries (OpenSSL). | ||
75 | |||
76 | This 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 |
90 | CFLAGS="$RPM_OPT_FLAGS" \ | 136 | CFLAGS="$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 | ||
99 | make | 144 | make |
100 | 145 | ||
101 | cd contrib | 146 | %if %{build_x11_askpass} |
102 | gcc -O -g `gnome-config --cflags gnome gnomeui` \ | 147 | cd 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 |
150 | xmkmf -a | ||
151 | make | ||
105 | cd .. | 152 | cd .. |
153 | %endif | ||
106 | 154 | ||
107 | %install | 155 | %install |
108 | rm -rf $RPM_BUILD_ROOT | 156 | rm -rf $RPM_BUILD_ROOT |
109 | make install DESTDIR=$RPM_BUILD_ROOT/ | 157 | make install DESTDIR=$RPM_BUILD_ROOT/ |
110 | install -d $RPM_BUILD_ROOT/etc/ssh/ | ||
111 | install -d $RPM_BUILD_ROOT/etc/pam.d/ | 158 | install -d $RPM_BUILD_ROOT/etc/pam.d/ |
112 | install -d $RPM_BUILD_ROOT/sbin/init.d/ | 159 | install -d $RPM_BUILD_ROOT/etc/init.d/ |
113 | install -d $RPM_BUILD_ROOT/var/adm/fillup-templates | 160 | install -d $RPM_BUILD_ROOT/var/adm/fillup-templates |
114 | install -d $RPM_BUILD_ROOT/usr/lib/ssh | ||
115 | install -m644 contrib/sshd.pam.generic $RPM_BUILD_ROOT/etc/pam.d/sshd | 161 | install -m644 contrib/sshd.pam.generic $RPM_BUILD_ROOT/etc/pam.d/sshd |
116 | install -m744 contrib/suse/rc.sshd $RPM_BUILD_ROOT/sbin/init.d/sshd | 162 | install -m744 contrib/suse/rc.sshd $RPM_BUILD_ROOT/etc/init.d/sshd |
117 | ln -s ../../sbin/init.d/sshd $RPM_BUILD_ROOT/usr/sbin/rcsshd | 163 | install -m744 contrib/suse/sysconfig.ssh \ |
118 | install -s contrib/gnome-ssh-askpass $RPM_BUILD_ROOT/usr/lib/ssh/gnome-ssh-askpass | ||
119 | ln -s gnome-ssh-askpass $RPM_BUILD_ROOT/usr/lib/ssh/ssh-askpass | ||
120 | install -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} | ||
167 | cd x11-ssh-askpass-%{xversion} | ||
168 | make install install.man BINDIR=%{_libdir}/ssh DESTDIR=$RPM_BUILD_ROOT/ | ||
169 | rm -f $RPM_BUILD_ROOT/usr/share/Ssh.bin | ||
170 | %endif | ||
171 | |||
123 | %clean | 172 | %clean |
124 | rm -rf $RPM_BUILD_ROOT | 173 | rm -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 |
127 | if [ "$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 | ||
133 | fi | ||
134 | echo "Updating /etc/rc.config..." | ||
135 | if [ -x /bin/fillup ] ; then | ||
136 | /bin/fillup -q -d = etc/rc.config var/adm/fillup-templates/rc.config.sshd | ||
137 | else | ||
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" | ||
141 | fi | ||
142 | if [ ! -f /etc/ssh/ssh_host_key -o ! -s /etc/ssh/ssh_host_key ]; then | 180 | if [ ! -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 |
145 | fi | 183 | fi |
146 | if [ ! -f /etc/ssh/ssh_host_dsa_key -o ! -s /etc/ssh/ssh_host_dsa_key ]; then | 184 | if [ ! -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 |
149 | fi | ||
150 | if test -r /var/run/sshd.pid | ||
151 | then | ||
152 | echo "Restarting the running SSH daemon..." | ||
153 | /usr/sbin/rcsshd restart >&2 | ||
154 | fi | 187 | fi |
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 |
157 | if [ "$1" = 0 ] | 195 | %stop_on_removal sshd |
158 | then | 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 | ||
166 | fi | ||
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 | ||