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