]> git.pld-linux.org Git - packages/openssh.git/blob - openssh.spec
d2a0483f0d4538c2efb6074ee5d2e7088f51b731
[packages/openssh.git] / openssh.spec
1 #
2 # Conditional build:    
3 # _without_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.9p2
8 Release:        1
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}-no_libnsl.patch
22 URL:            http://www.openssh.com/
23 BuildRequires:  XFree86-devel
24 BuildRequires:  autoconf
25 %{!?_without_gnome:BuildRequires: gnome-libs-devel}
26 BuildRequires:  gtk+-devel
27 BuildRequires:  openssl-devel >= 0.9.6a
28 BuildRequires:  pam-devel
29 BuildRequires:  zlib-devel
30 BuildRequires:  libwrap-devel
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 Prereq:         openssl >= 0.9.6
33 Obsoletes:      ssh < %{version}
34 Obsoletes:      ssh > %{version}
35
36 %define         _sysconfdir     /etc/ssh
37 %define         _libexecdir     %{_libdir}/%{name}
38
39 %description
40 Ssh (Secure Shell) a program for logging into a remote machine and for
41 executing commands in a remote machine. It is intended to replace
42 rlogin and rsh, and provide secure encrypted communications between
43 two untrusted hosts over an insecure network. X11 connections and
44 arbitrary TCP/IP ports can also be forwarded over the secure channel.
45
46 OpenSSH is OpenBSD's rework of the last free version of SSH, bringing
47 it up to date in terms of security and features, as well as removing
48 all patented algorithms to seperate libraries (OpenSSL).
49
50 This package includes the core files necessary for both the OpenSSH
51 client and server. To make this package useful, you should also
52 install openssh-clients, openssh-server, or both.
53
54 %description -l pl
55 Ssh (Secure Shell) to program s³u¿±cy do logowania siê na zdaln±
56 maszynê i uruchamiania na niej aplikacji. W zamierzeniu openssh ma
57 zast±piæ rlogin, rsh i dostarczyæ bezpieczne, szyfrowane po³±czenie
58 pomiedzy dwoma hostami.
59
60 %package clients
61 Summary:        OpenSSH Secure Shell protocol clients
62 Summary(pl):    Klienci protoko³u Secure Shell
63 Requires:       openssh
64 Group:          Applications/Networking
65 Group(de):      Applikationen/Netzwerkwesen
66 Group(pl):      Aplikacje/Sieciowe
67 Obsoletes:      ssh-clients < %{version}
68 Obsoletes:      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
97 Requires:       chkconfig >= 0.9
98 Group:          Networking/Daemons
99 Group(de):      Netzwerkwesen/Server
100 Group(pl):      Sieciowe/Serwery
101 Obsoletes:      ssh-server < %{version}, ssh-server > %{version}
102 Requires:       /bin/login
103 Requires:       util-linux
104 Prereq:         rc-scripts
105 Prereq:         chkconfig
106 Prereq:         %{name} = %{version}
107
108 %description server
109 Ssh (Secure Shell) a program for logging into a remote machine and for
110 executing commands in a remote machine. It is intended to replace
111 rlogin and rsh, and provide secure encrypted communications between
112 two untrusted hosts over an insecure network. X11 connections and
113 arbitrary TCP/IP ports can also be forwarded over the secure channel.
114
115 OpenSSH is OpenBSD's rework of the last free version of SSH, bringing
116 it up to date in terms of security and features, as well as removing
117 all patented algorithms to seperate libraries (OpenSSL).
118
119 This package contains the secure shell daemon. The sshd is the server
120 part of the secure shell protocol and allows ssh clients to connect to
121 your host.
122
123 %description -l pl server
124 Ssh (Secure Shell) to program s³u¿±cy do logowania siê na zdaln±
125 maszynê i uruchamiania na niej aplikacji. W zamierzeniu openssh ma
126 zast±piæ rlogin, rsh i dostarczyæ bezpieczne, szyfrowane po³±czenie
127 pomiedzy dwoma hostami.
128
129 Ten pakiet zawiera serwer sshd (do którego mog± ³±czyæ siê klienci
130 ssh).
131
132 %package gnome-askpass
133 Summary:        OpenSSH GNOME passphrase dialog
134 Summary(pl):    Odpytywacz has³a OpenSSH dla GNOME
135 Group:          Applications/Networking
136 Group(de):      Applikationen/Netzwerkwesen
137 Group(pl):      Aplikacje/Sieciowe
138 Requires:       %{name} = %{version}
139 Obsoletes:      ssh-extras < %{version}, ssh-extras > %{version}
140 Obsoletes:      ssh-askpass < %{version}, ssh-askpass > %{version}
141 Obsoletes:      openssh-askpass < %{version}, openssh-askpass > %{version}
142
143 %description gnome-askpass
144 Ssh (Secure Shell) a program for logging into a remote machine and for
145 executing commands in a remote machine. It is intended to replace
146 rlogin and rsh, and provide secure encrypted communications between
147 two untrusted hosts over an insecure network. X11 connections and
148 arbitrary TCP/IP ports can also be forwarded over the secure channel.
149
150 OpenSSH is OpenBSD's rework of the last free version of SSH, bringing
151 it up to date in terms of security and features, as well as removing
152 all patented algorithms to seperate libraries (OpenSSL).
153
154 This package contains the GNOME passphrase dialog.
155
156 %description -l pl gnome-askpass
157 Ssh (Secure Shell) to program s³u¿±cy do logowania siê na zdaln±
158 maszynê i uruchamiania na niej aplikacji. W zamierzeniu openssh ma
159 zast±piæ rlogin, rsh i dostarczyæ bezpieczne, szyfrowane po³±czenie
160 pomiedzy dwoma hostami.
161
162 Ten pakiet zawiera ,,odpytywacz has³a'' dla GNOME.
163
164 %prep
165 %setup  -q
166 %patch0 -p1
167 %patch1 -p1
168
169 %build
170 autoconf
171 %configure \
172         %{!?_without_gnome:--with-gnome-askpass} \
173         --with-tcp-wrappers \
174         --with-pam \
175         --with-mantype=man \
176         --with-md5-passwords \
177         --with-ipaddr-display \
178         --with-4in6 \
179         --disable-suid-ssh \
180         --with-pid-dir=%{_localstatedir}/run
181
182 echo '#define LOGIN_PROGRAM           "/bin/login"' >>config.h
183
184 %{__make}
185
186 %{!?_without_gnome: cd contrib && %{__cc} %{rpmcflags} `gnome-config --cflags gnome gnomeui gtk` } \
187 %{!?_without_gnome:     gnome-ssh-askpass.c -o gnome-ssh-askpass } \
188 %{!?_without_gnome:     `gnome-config --libs gnome gnomeui gtk` }
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 %{!?_without_gnome:install contrib/gnome-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/ssh/ssh-askpass}
205
206 rm -f   $RPM_BUILD_ROOT%{_mandir}/man1/slogin.1
207 echo ".so man1/ssh.1" > $RPM_BUILD_ROOT%{_mandir}/man1/slogin.1
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 -t rsa1 -f %{_sysconfdir}/ssh_host_key -N '' 1>&2
220         chmod 600 %{_sysconfdir}/ssh_host_key
221 fi
222 if [ ! -f %{_sysconfdir}/ssh_host_rsa_key -o ! -s %{_sysconfdir}/ssh_host_rsa_key ]; then
223         %{_bindir}/ssh-keygen -t rsa -f %{_sysconfdir}/ssh_host_rsa_key -N '' 1>&2
224         chmod 600 %{_sysconfdir}/ssh_host_rsa_key
225 fi
226
227 if [ ! -f %{_sysconfdir}/ssh_host_dsa_key -o ! -s %{_sysconfdir}/ssh_host_dsa_key ]; then
228         %{_bindir}/ssh-keygen -t dsa -f %{_sysconfdir}/ssh_host_dsa_key -N '' 1>&2
229         chmod 600 %{_sysconfdir}/ssh_host_dsa_key
230 fi
231 if [ -f /var/lock/subsys/sshd ]; then
232         /etc/rc.d/init.d/sshd restart 1>&2
233 else
234         echo "Run \"/etc/rc.d/init.d/sshd start\" to start openssh daemon."
235 fi
236 if ! grep ssh /etc/security/passwd.conf >/dev/null 2>&1 ; then
237         echo "ssh" >> /etc/security/passwd.conf
238 fi
239
240 %preun server
241 if [ "$1" = "0" ]; then
242         if [ -f /var/lock/subsys/sshd ]; then
243                 /etc/rc.d/init.d/sshd stop 1>&2
244         fi
245         /sbin/chkconfig --del sshd
246 fi
247
248 %files
249 %defattr(644,root,root,755)
250 %doc *.gz
251 %attr(755,root,root) %{_bindir}/ssh-key*
252 %{_mandir}/man1/ssh-key*.1*
253 %dir %{_sysconfdir}
254
255 %files clients
256 %defattr(644,root,root,755)
257 %attr(0755,root,root) %{_bindir}/ssh
258 %attr(0755,root,root) %{_bindir}/slogin
259 %attr(0755,root,root) %{_bindir}/sftp
260 %attr(0755,root,root) %{_bindir}/ssh-agent
261 %attr(0755,root,root) %{_bindir}/ssh-add
262 %attr(755,root,root) %{_bindir}/scp
263 %{_mandir}/man1/scp.1*
264 %{_mandir}/man1/ssh.1*
265 %{_mandir}/man1/slogin.1*
266 %{_mandir}/man1/sftp.1*
267 %{_mandir}/man1/ssh-agent.1*
268 %{_mandir}/man1/ssh-add.1*
269 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/ssh_config
270
271 %files server
272 %defattr(644,root,root,755)
273 %attr(755,root,root) %{_sbindir}/sshd
274 %attr(755,root,root) %{_libexecdir}/sftp-server
275 %dir %{_libexecdir}
276 %{_mandir}/man8/sshd.8*
277 %{_mandir}/man8/sftp-server.8*
278 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sshd_config
279 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/sshd
280 %attr(640,root,root) %{_sysconfdir}/primes
281 %attr(754,root,root) /etc/rc.d/init.d/sshd
282 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/sshd
283 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.sshd
284
285 %{!?_without_gnome:%files gnome-askpass}
286 %{!?_without_gnome:%defattr(644,root,root,755)}
287 %{!?_without_gnome:%dir %{_libexecdir}/ssh}
288 %{!?_without_gnome:%attr(755,root,root) %{_libexecdir}/ssh/ssh-askpass}
This page took 0.100145 seconds and 3 git commands to generate.