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