]> git.pld-linux.org Git - packages/openssh.git/blob - openssh.spec
- Requires for rc-scripts changed to Prereq.
[packages/openssh.git] / openssh.spec
1 #
2 # Conditional build:
3 # bcond_off_gnome - without gnome-askpass utility
4 Summary:        OpenSSH free Secure Shell (SSH) implementation
5 Summary(pl):    Publicznie dostêpna implementacja bezpiecznego shella (SSH)
6 Name:           openssh
7 Version:        2.3.0p1
8 Release:        8
9 License:        BSD
10 Group:          Applications/Networking
11 Group(de):      Applikationen/Netzwerkwesen
12 Group(pl):      Aplikacje/Sieciowe
13 Source0:        ftp://ftp.ca.openbsd.org/pub/OpenBSD/OpenSSH/portable/%{name}-%{version}.tar.gz
14 Source1:        %{name}d.conf
15 Source2:        %{name}.conf
16 Source3:        %{name}d.init
17 Source4:        %{name}d.pamd
18 Source5:        %{name}.sysconfig
19 Source6:        passwd.pamd
20 Patch0:         %{name}-libwrap.patch
21 Patch1:         %{name}-LIBS.patch
22 Patch2:         %{name}-no_libnsl.patch
23 Patch3:         %{name}-securityfix.patch
24 Patch4:         %{name}-pam-session.patch
25 URL:            http://www.openssh.com/
26 BuildRequires:  XFree86-devel
27 BuildRequires:  autoconf
28 %{!?bcond_off_gnome:BuildRequires: gnome-libs-devel}
29 BuildRequires:  gtk+-devel
30 BuildRequires:  openssl-devel >= 0.9.5a
31 BuildRequires:  pam-devel
32 BuildRequires:  zlib-devel
33 BuildRequires:  libwrap-devel
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Prereq:         openssl >= 0.9.5a
36 Obsoletes:      ssh < %{version}, ssh > %{version}
37
38 %define         _sysconfdir     /etc/ssh
39
40 %description
41 Ssh (Secure Shell) a program for logging into a remote machine and for
42 executing commands in a remote machine. It is intended to replace
43 rlogin and rsh, and provide secure encrypted communications between
44 two untrusted hosts over an insecure network. X11 connections and
45 arbitrary TCP/IP ports can also be forwarded over the secure channel.
46
47 OpenSSH is OpenBSD's rework of the last free version of SSH, bringing
48 it up to date in terms of security and features, as well as removing
49 all patented algorithms to seperate libraries (OpenSSL).
50
51 This package includes the core files necessary for both the OpenSSH
52 client and server. To make this package useful, you should also
53 install openssh-clients, openssh-server, or both.
54
55 %description -l pl
56 Ssh (Secure Shell) to program s³u¿±cy do logowania siê na zdaln±
57 maszynê i uruchamiania na niej aplikacji. W zamierzeniu openssh ma
58 zast±piæ rlogin, rsh i dostarczyæ bezpieczne, szyfrowane po³±czenie
59 pomiedzy dwoma hostami.
60
61 %package clients
62 Summary:        OpenSSH Secure Shell protocol clients
63 Summary(pl):    Klienci protoko³u Secure Shell
64 Requires:       openssh
65 Group:          Applications/Networking
66 Group(de):      Applikationen/Netzwerkwesen
67 Group(pl):      Aplikacje/Sieciowe
68 Obsoletes:      ssh-clients < %{version}, ssh-clients > %{version}
69 Requires:       %{name} = %{version}
70
71 %description clients
72 Ssh (Secure Shell) a program for logging into a remote machine and for
73 executing commands in a remote machine. It is intended to replace
74 rlogin and rsh, and provide secure encrypted communications between
75 two untrusted hosts over an insecure network. X11 connections and
76 arbitrary TCP/IP ports can also be forwarded over the secure channel.
77
78 OpenSSH is OpenBSD's rework of the last free version of SSH, bringing
79 it up to date in terms of security and features, as well as removing
80 all patented algorithms to seperate libraries (OpenSSL).
81
82 This package includes the clients necessary to make encrypted
83 connections to SSH servers.
84
85 %description -l pl clients
86 Ssh (Secure Shell) to program s³u¿±cy do logowania siê na zdaln±
87 maszynê i uruchamiania na niej aplikacji. W zamierzeniu openssh ma
88 zast±piæ rlogin, rsh i dostarczyæ bezpieczne, szyfrowane po³±czenie
89 pomiedzy dwoma hostami.
90
91 Ten pakiet zawiera klientów s³u¿±cych do ³±czenia siê z serwerami SSH.
92
93 %package server
94 Summary:        OpenSSH Secure Shell protocol server (sshd)
95 Summary(pl):    Serwer protoko³u Secure Shell (sshd)
96 Requires:       openssh chkconfig >= 0.9
97 Group:          Networking/Daemons
98 Group(de):      Netzwerkwesen/Server
99 Group(pl):      Sieciowe/Serwery
100 Obsoletes:      ssh-server < %{version}, ssh-server > %{version}
101 Requires:       /bin/login
102 Requires:       util-linux
103 Prereq:         rc-scripts
104 Prereq:         chkconfig
105 Prereq:         %{name} = %{version}
106
107 %description server
108 Ssh (Secure Shell) a program for logging into a remote machine and for
109 executing commands in a remote machine. It is intended to replace
110 rlogin and rsh, and provide secure encrypted communications between
111 two untrusted hosts over an insecure network. X11 connections and
112 arbitrary TCP/IP ports can also be forwarded over the secure channel.
113
114 OpenSSH is OpenBSD's rework of the last free version of SSH, bringing
115 it up to date in terms of security and features, as well as removing
116 all patented algorithms to seperate libraries (OpenSSL).
117
118 This package contains the secure shell daemon. The sshd is the server
119 part of the secure shell protocol and allows ssh clients to connect to
120 your host.
121
122 %description -l pl server
123 Ssh (Secure Shell) to program s³u¿±cy do logowania siê na zdaln±
124 maszynê i uruchamiania na niej aplikacji. W zamierzeniu openssh ma
125 zast±piæ rlogin, rsh i dostarczyæ bezpieczne, szyfrowane po³±czenie
126 pomiedzy dwoma hostami.
127
128 Ten pakiet zawiera serwer sshd (do którego mog± ³±czyæ siê klienci
129 ssh).
130
131 %package gnome-askpass
132 Summary:        OpenSSH GNOME passphrase dialog
133 Summary(pl):    Odpytywacz has³a OpenSSH dla GNOME
134 Group:          Applications/Networking
135 Group(de):      Applikationen/Netzwerkwesen
136 Group(pl):      Aplikacje/Sieciowe
137 Requires:       %{name} = %{version}
138 Obsoletes:      ssh-extras < %{version}, ssh-extras > %{version}
139 Obsoletes:      ssh-askpass < %{version}, ssh-askpass > %{version}
140 Obsoletes:      openssh-askpass < %{version}, openssh-askpass > %{version}
141
142 %description gnome-askpass
143 Ssh (Secure Shell) a program for logging into a remote machine and for
144 executing commands in a remote machine. It is intended to replace
145 rlogin and rsh, and provide secure encrypted communications between
146 two untrusted hosts over an insecure network. X11 connections and
147 arbitrary TCP/IP ports can also be forwarded over the secure channel.
148
149 OpenSSH is OpenBSD's rework of the last free version of SSH, bringing
150 it up to date in terms of security and features, as well as removing
151 all patented algorithms to seperate libraries (OpenSSL).
152
153 This package contains the GNOME passphrase dialog.
154
155 %description -l pl gnome-askpass
156 Ssh (Secure Shell) to program s³u¿±cy do logowania siê na zdaln±
157 maszynê i uruchamiania na niej aplikacji. W zamierzeniu openssh ma
158 zast±piæ rlogin, rsh i dostarczyæ bezpieczne, szyfrowane po³±czenie
159 pomiedzy dwoma hostami.
160
161 Ten pakiet zawiera ,,odpytywacz has³a'' dla GNOME.
162
163 %prep
164 %setup  -q
165 %patch0 -p1
166 %patch1 -p1
167 %patch2 -p1
168 %patch3 -p1
169 %patch4 -p1
170
171 %build
172 autoconf
173 %configure \
174         %{!?bcond_off_gnome:--with-gnome-askpass} \
175         --with-tcp-wrappers \
176         --with-md5-passwords \
177         --with-ipaddr-display \
178         --enable-ipv6 \
179         --with-4in6 \
180         --enable-log-auth 
181
182 echo '#define LOGIN_PROGRAM           "/bin/login"' >>config.h
183
184 %{__make}
185
186 %{!?bcond_off_gnome: cd contrib && gcc $RPM_OPT_FLAGS `gnome-config --cflags gnome gnomeui` } \
187 %{!?bcond_off_gnome:    gnome-ssh-askpass.c -o gnome-ssh-askpass } \
188 %{!?bcond_off_gnome:    `gnome-config --libs gnome gnomeui` }
189
190 %install
191 rm -rf $RPM_BUILD_ROOT
192
193 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{pam.d,rc.d/init.d,sysconfig,security}}
194
195 %{__make} install DESTDIR="$RPM_BUILD_ROOT"
196
197 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/sshd
198 install %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/passwdssh
199 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/sshd
200 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
201 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/ssh_config
202 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sshd_config
203 install -d $RPM_BUILD_ROOT%{_libexecdir}/ssh
204 %{!?bcond_off_gnome:install contrib/gnome-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/ssh/ssh-askpass}
205
206 gzip -9nf ChangeLog OVERVIEW COPYING.Ylonen README README.Ylonen
207
208 touch $RPM_BUILD_ROOT/etc/security/blacklist.sshd
209         
210 %clean
211 rm -rf $RPM_BUILD_ROOT
212
213 %post server
214 /sbin/chkconfig --add sshd
215 if [ ! -f %{_sysconfdir}/ssh_host_key -o ! -s %{_sysconfdir}/ssh_host_key ]; then
216         %{_bindir}/ssh-keygen -b 1024 -f %{_sysconfdir}/ssh_host_key -N '' 1>&2
217         chmod 600 %{_sysconfdir}/ssh_host_key
218 fi
219 if [ ! -f %{_sysconfdir}/ssh_host_dsa_key -o ! -s %{_sysconfdir}/ssh_host_dsa_key ]; then
220         %{_bindir}/ssh-keygen -d -f %{_sysconfdir}/ssh_host_dsa_key -N '' 1>&2
221         chmod 600 %{_sysconfdir}/ssh_host_dsa_key
222 fi
223 if [ -f /var/lock/subsys/sshd ]; then
224         /etc/rc.d/init.d/sshd restart 1>&2
225 else
226         echo "Run \"/etc/rc.d/init.d/sshd start\" to start openssh daemon."
227 fi
228 if ! grep ssh /etc/security/passwd.conf >/dev/null 2>&1 ; then
229         echo "ssh" >> /etc/security/passwd.conf
230 fi
231
232 %preun server
233 if [ "$1" = "0" ]; then
234         if [ -f /var/lock/subsys/sshd ]; then
235                 /etc/rc.d/init.d/sshd stop 1>&2
236         fi
237         /sbin/chkconfig --del sshd
238 fi
239
240 %files
241 %defattr(644,root,root,755)
242 %doc {ChangeLog,OVERVIEW,COPYING.Ylonen,README,README.Ylonen}.gz
243 %attr(755,root,root) %{_bindir}/ssh-keygen
244 %{_mandir}/man1/ssh-keygen.1*
245 %dir %{_sysconfdir}
246
247 %files clients
248 %defattr(644,root,root,755)
249 %attr(0755,root,root) %{_bindir}/ssh
250 %attr(0755,root,root) %{_bindir}/ssh-agent
251 %attr(0755,root,root) %{_bindir}/ssh-add
252 %attr(755,root,root) %{_bindir}/scp
253 %{_mandir}/man1/scp.1*
254 %{_mandir}/man1/ssh.1*
255 %{_mandir}/man1/ssh-agent.1*
256 %{_mandir}/man1/ssh-add.1*
257 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/ssh_config
258
259 %files server
260 %defattr(644,root,root,755)
261 %attr(755,root,root) %{_sbindir}/sshd
262 %{_mandir}/man8/sshd.8*
263 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sshd_config
264 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/sshd
265 %attr(754,root,root) /etc/rc.d/init.d/sshd
266 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/sshd
267 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.sshd
268
269 %{!?bcond_off_gnome:%files gnome-askpass}
270 %{!?bcond_off_gnome:%defattr(644,root,root,755)}
271 %{!?bcond_off_gnome:%dir %{_libexecdir}/ssh}
272 %{!?bcond_off_gnome:%attr(755,root,root) %{_libexecdir}/ssh/ssh-askpass}
This page took 0.038568 seconds and 3 git commands to generate.