]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/blob - openssh/openssh.nm
Merge remote-tracking branch 'stevee/openssh-update'
[people/pmueller/ipfire-3.x.git] / openssh / openssh.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = openssh
7 version = 6.8p1
8 release = 1
9
10 groups = Application/Internet
11 url = http://www.openssh.com/portable.html
12 license = MIT
13 summary = An open source implementation of SSH protocol versions 1 and 2.
14
15 description
16 SSH (Secure SHell) is a program for logging into and executing
17 commands on a remote machine. SSH is intended to replace rlogin and
18 rsh, and to provide secure encrypted communications between two
19 untrusted hosts over an insecure network.
20 end
21
22 source_dl = http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/
23
24 build
25 requires
26 audit-devel
27 autoconf
28 automake
29 groff
30 libedit-devel
31 libselinux-devel
32 ncurses-devel
33 openldap-devel
34 openssl-devel >= 1.0.0d-2
35 pam-devel
36 util-linux
37 zlib-devel
38 end
39
40 configure_options += \
41 --sysconfdir=%{sysconfdir}/ssh \
42 --datadir=%{datadir}/sshd \
43 --libexecdir=%{libdir}/openssh \
44 --with-default-path=/usr/local/bin:/bin:/usr/bin \
45 --with-superuser-path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin \
46 --with-privsep-path=/var/empty/sshd \
47 --enable-vendor-patchlevel="%{DISTRO_NAME} %{thisver}" \
48 --disable-strip \
49 --with-ssl-engine \
50 --with-authorized-keys-command \
51 --with-ipaddr-display \
52 --with-pam \
53 --with-libedit \
54 --with-selinux \
55 --with-audit=linux
56
57 prepare_cmds
58 autoreconf -vfi
59 end
60
61 install_cmds
62 # Disable GSS API authentication because KRB5 is required for that.
63 sed -e "s/^.*GSSAPIAuthentication/#&/" -i %{BUILDROOT}/etc/ssh/ssh_config
64
65 # Enable PAM usage, disable ChallengeResponseAuthentication and disable Motd.
66 sed \
67 -e '/^#ChallengeResponseAuthentication yes$/c ChallengeResponseAuthentication no' \
68 -e '/^#PrintMotd yes$/c PrintMotd no' \
69 -e '/^#UsePAM no$/c UsePAM yes' \
70 -i %{BUILDROOT}/etc/ssh/sshd_config
71
72 # Install scriptfile for key generation
73 mkdir -pv %{BUILDROOT}%{sbindir}
74 install -m 754 %{DIR_SOURCE}/sshd-keygen %{BUILDROOT}%{sbindir}
75
76 # Install ssh-copy-id.
77 install -m755 contrib/ssh-copy-id %{BUILDROOT}%{bindir}
78 install contrib/ssh-copy-id.1 %{BUILDROOT}%{mandir}/man1/
79 end
80 end
81
82 packages
83 package openssh
84 prerequires
85 shadow-utils
86 end
87
88 configfiles
89 %{sysconfdir}/ssh/moduli
90 end
91
92 script prein
93 getent group ssh_keys >/dev/null || groupadd -r ssh_keys
94 end
95 end
96
97 package openssh-clients
98 summary = OpenSSH client applications.
99 description = %{summary}
100
101 requires = openssh = %{thisver}
102
103 files
104 %{sysconfdir}/ssh/ssh_config
105 %{bindir}/scp
106 %{bindir}/sftp
107 %{bindir}/slogin
108 %{bindir}/ssh
109 %{bindir}/ssh-add
110 %{bindir}/ssh-agent
111 %{bindir}/ssh-copy-id
112 %{bindir}/ssh-keyscan
113 %{libdir}/openssh/ssh-pkcs11-helper
114 %{mandir}/man1/scp.1*
115 %{mandir}/man1/sftp.1*
116 %{mandir}/man1/slogin.1*
117 %{mandir}/man1/ssh-add.1*
118 %{mandir}/man1/ssh-agent.1*
119 %{mandir}/man1/ssh-copy-id.1*
120 %{mandir}/man1/ssh-keyscan.1*
121 %{mandir}/man1/ssh.1*
122 %{mandir}/man5/ssh_config.5*
123 %{mandir}/man8/ssh-pkcs11-helper.8*
124 end
125
126 configfiles
127 %{sysconfdir}/ssh/ssh_config
128 end
129 end
130
131 package openssh-server
132 summary = OpenSSH server applications.
133 description = %{summary}
134
135 requires
136 audit
137 openssh = %{thisver}
138 end
139
140 files
141 %{sysconfdir}/pam.d/sshd
142 %{sysconfdir}/ssh/sshd_config
143 %{unitdir}/sshd.service
144 %{unitdir}/sshd-keygen.service
145 %{libdir}/openssh/sftp-server
146 %{sbindir}/sshd-keygen
147 %{sbindir}/sshd
148 %{mandir}/man5/sshd_config.5*
149 %{mandir}/man5/moduli.5*
150 %{mandir}/man8/sshd.8*
151 %{mandir}/man8/sftp-server.8*
152 /var/empty/sshd
153 end
154
155 configfiles
156 %{sysconfdir}/ssh/sshd_config
157 end
158
159 prerequires
160 shadow-utils
161 systemd-units
162 end
163
164 script prein
165 # Create unprivileged user and group.
166 getent group sshd >/dev/null || groupadd -r sshd
167 getent passwd sshd >/dev/null || useradd -r -g sshd \
168 -c "Privilege-separated SSH" \
169 -d /var/empty/sshd -s /sbin/nologin sshd
170 end
171
172 script postin
173 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
174 end
175
176 script preun
177 /bin/systemctl --no-reload disable sshd.service >/dev/null 2>&1 || :
178 /bin/systemctl stop sshd.service >/dev/null 2>&1 || :
179 end
180
181 script postun
182 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
183 end
184
185 script postup
186 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
187
188 /bin/systemctl try-restart sshd.service >/dev/null 2>&1 || :
189 /bin/systemctl try-restart sshd-keygen.service >/dev/null 2>&1 || :
190 end
191 end
192
193 package %{name}-debuginfo
194 template DEBUGINFO
195 end
196 end