summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssh/openssh_6.6p1.bb
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2014-05-01 12:22:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-15 23:24:43 +0100
commit944e261839bc342f19f8ced58bd7bc73e6f33e11 (patch)
tree1fe2927d1f6fd3e2930058c2a6aaac1237b65745 /meta/recipes-connectivity/openssh/openssh_6.6p1.bb
parent5c89748f5a1fce4e529a410b3c0a612274b5d9cd (diff)
downloadpoky-944e261839bc342f19f8ced58bd7bc73e6f33e11.tar.gz
openssh: update to 6.6p1
(From OE-Core rev: f091dbd6324a89682d29cac0bd0ba40899c8bdd5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/openssh/openssh_6.6p1.bb')
-rw-r--r--meta/recipes-connectivity/openssh/openssh_6.6p1.bb152
1 files changed, 152 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh_6.6p1.bb b/meta/recipes-connectivity/openssh/openssh_6.6p1.bb
new file mode 100644
index 0000000000..d3bab3eea1
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh_6.6p1.bb
@@ -0,0 +1,152 @@
1SUMMARY = "Secure rlogin/rsh/rcp/telnet replacement"
2DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
3Ssh (Secure Shell) is a program for logging into a remote machine \
4and for executing commands on a remote machine."
5HOMEPAGE = "http://openssh.org"
6SECTION = "console/network"
7LICENSE = "BSD"
8LIC_FILES_CHKSUM = "file://LICENCE;md5=e326045657e842541d3f35aada442507"
9
10DEPENDS = "zlib openssl"
11DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
12
13RPROVIDES_${PN}-ssh = "ssh"
14RPROVIDES_${PN}-sshd = "sshd"
15
16RCONFLICTS_${PN} = "dropbear"
17RCONFLICTS_${PN}-sshd = "dropbear"
18RCONFLICTS_${PN}-keygen = "ssh-keygen"
19
20SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
21 file://nostrip.patch \
22 file://sshd_config \
23 file://ssh_config \
24 file://init \
25 file://openssh-CVE-2011-4327.patch \
26 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
27 file://sshd.socket \
28 file://sshd@.service \
29 file://sshdgenkeys.service \
30 file://volatiles.99_sshd \
31 file://add-test-support-for-busybox.patch \
32 file://run-ptest \
33 file://openssh-CVE-2014-2532.patch \
34 file://openssh-CVE-2014-2653.patch"
35
36PAM_SRC_URI = "file://sshd"
37
38SRC_URI[md5sum] = "3e9800e6bca1fbac0eea4d41baa7f239"
39SRC_URI[sha256sum] = "48c1f0664b4534875038004cc4f3555b8329c2a81c1df48db5c517800de203bb"
40
41inherit useradd update-rc.d update-alternatives systemd
42
43USERADD_PACKAGES = "${PN}-sshd"
44USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
45INITSCRIPT_PACKAGES = "${PN}-sshd"
46INITSCRIPT_NAME_${PN}-sshd = "sshd"
47INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"
48
49SYSTEMD_PACKAGES = "${PN}-sshd"
50SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
51
52PACKAGECONFIG ??= "tcp-wrappers"
53PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,,tcp-wrappers"
54
55inherit autotools-brokensep ptest
56
57# LFS support:
58CFLAGS += "-D__FILE_OFFSET_BITS=64"
59export LD = "${CC}"
60
61# login path is hardcoded in sshd
62EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
63 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
64 --without-zlib-version-check \
65 --with-privsep-path=/var/run/sshd \
66 --sysconfdir=${sysconfdir}/ssh \
67 --with-xauth=/usr/bin/xauth"
68
69# Since we do not depend on libbsd, we do not want configure to use it
70# just because it finds libutil.h. But, specifying --disable-libutil
71# causes compile errors, so...
72CACHED_CONFIGUREVARS += "ac_cv_header_bsd_libutil_h=no ac_cv_header_libutil_h=no"
73
74# passwd path is hardcoded in sshd
75CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd"
76
77# This is a workaround for uclibc because including stdio.h
78# pulls in pthreads.h and causes conflicts in function prototypes.
79# This results in compilation failure, so unless this is fixed,
80# disable pam for uclibc.
81EXTRA_OECONF_append_libc-uclibc=" --without-pam"
82
83do_configure_prepend () {
84 if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
85 cp aclocal.m4 acinclude.m4
86 fi
87}
88
89do_compile_append () {
90 install -m 0644 ${WORKDIR}/sshd_config ${S}/
91 install -m 0644 ${WORKDIR}/ssh_config ${S}/
92}
93
94do_install_append () {
95 if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
96 install -D -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
97 sed -i -e 's:#UsePAM no:UsePAM yes:' ${WORKDIR}/sshd_config ${D}${sysconfdir}/ssh/sshd_config
98 fi
99
100 install -d ${D}${sysconfdir}/init.d
101 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
102 rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
103 rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir}
104 install -d ${D}/${sysconfdir}/default/volatiles
105 install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd
106
107 # Create config files for read-only rootfs
108 install -d ${D}${sysconfdir}/ssh
109 install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly
110 sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly
111 echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
112 echo "HostKey /var/run/ssh/ssh_host_dsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
113 echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
114
115 install -d ${D}${systemd_unitdir}/system
116 install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system
117 install -c -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_unitdir}/system
118 install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system
119 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
120 -e 's,@SBINDIR@,${sbindir},g' \
121 -e 's,@BINDIR@,${bindir},g' \
122 ${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/*.service
123}
124
125do_install_ptest () {
126 sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libdir}/${PN}/sftp-server|" regress/test-exec.sh
127 cp -r regress ${D}${PTEST_PATH}
128}
129
130ALLOW_EMPTY_${PN} = "1"
131
132PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server"
133FILES_${PN}-scp = "${bindir}/scp.${BPN}"
134FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config"
135FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system"
136FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd"
137FILES_${PN}-sftp = "${bindir}/sftp"
138FILES_${PN}-sftp-server = "${libexecdir}/sftp-server"
139FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
140FILES_${PN}-keygen = "${bindir}/ssh-keygen"
141
142RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
143RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}"
144RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make"
145
146CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
147CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"
148
149ALTERNATIVE_PRIORITY = "90"
150ALTERNATIVE_${PN}-scp = "scp"
151ALTERNATIVE_${PN}-ssh = "ssh"
152