diff options
author | Armin Kuster <akuster808@gmail.com> | 2017-11-03 12:54:49 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-11-07 13:25:31 +0000 |
commit | e2d49ce3c4fb7186de6589231193a18102b68447 (patch) | |
tree | 3a7b9f3d37ea2122dedec7595975b4277248005b /meta/recipes-connectivity/openssh/openssh_7.6p1.bb | |
parent | f5aa5aaa32ae14780ec35ecb13a2bbb244c5c207 (diff) | |
download | poky-e2d49ce3c4fb7186de6589231193a18102b68447.tar.gz |
openssh: update to 7.6
LICENSE changed do to name being added
removed patches included in some form
(From OE-Core rev: 88770be201678bf1906e27d72e840de2cd4c43f0)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/openssh/openssh_7.6p1.bb')
-rw-r--r-- | meta/recipes-connectivity/openssh/openssh_7.6p1.bb | 165 |
1 files changed, 165 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh_7.6p1.bb b/meta/recipes-connectivity/openssh/openssh_7.6p1.bb new file mode 100644 index 0000000000..ebb9a5734d --- /dev/null +++ b/meta/recipes-connectivity/openssh/openssh_7.6p1.bb | |||
@@ -0,0 +1,165 @@ | |||
1 | SUMMARY = "A suite of security-related network utilities based on \ | ||
2 | the SSH protocol including the ssh client and sshd server" | ||
3 | DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \ | ||
4 | Ssh (Secure Shell) is a program for logging into a remote machine \ | ||
5 | and for executing commands on a remote machine." | ||
6 | HOMEPAGE = "http://www.openssh.com/" | ||
7 | SECTION = "console/network" | ||
8 | LICENSE = "BSD" | ||
9 | LIC_FILES_CHKSUM = "file://LICENCE;md5=429658c6612f3a9b1293782366ab29d8" | ||
10 | |||
11 | # openssl 1.1 patches are proposed at https://github.com/openssh/openssh-portable/pull/48 | ||
12 | DEPENDS = "zlib openssl10" | ||
13 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
14 | |||
15 | SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \ | ||
16 | file://sshd_config \ | ||
17 | file://ssh_config \ | ||
18 | file://init \ | ||
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://run-ptest \ | ||
25 | file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \ | ||
26 | file://sshd_check_keys \ | ||
27 | file://add-test-support-for-busybox.patch \ | ||
28 | " | ||
29 | |||
30 | PAM_SRC_URI = "file://sshd" | ||
31 | |||
32 | SRC_URI[md5sum] = "06a88699018e5fef13d4655abfed1f63" | ||
33 | SRC_URI[sha256sum] = "a323caeeddfe145baaa0db16e98d784b1fbc7dd436a6bf1f479dfd5cd1d21723" | ||
34 | |||
35 | inherit useradd update-rc.d update-alternatives systemd | ||
36 | |||
37 | USERADD_PACKAGES = "${PN}-sshd" | ||
38 | USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd" | ||
39 | INITSCRIPT_PACKAGES = "${PN}-sshd" | ||
40 | INITSCRIPT_NAME_${PN}-sshd = "sshd" | ||
41 | INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9" | ||
42 | |||
43 | SYSTEMD_PACKAGES = "${PN}-sshd" | ||
44 | SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket" | ||
45 | |||
46 | inherit autotools-brokensep ptest | ||
47 | |||
48 | # LFS support: | ||
49 | CFLAGS += "-D__FILE_OFFSET_BITS=64" | ||
50 | |||
51 | # login path is hardcoded in sshd | ||
52 | EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \ | ||
53 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \ | ||
54 | --without-zlib-version-check \ | ||
55 | --with-privsep-path=/var/run/sshd \ | ||
56 | --sysconfdir=${sysconfdir}/ssh \ | ||
57 | --with-xauth=/usr/bin/xauth \ | ||
58 | --disable-strip \ | ||
59 | " | ||
60 | |||
61 | # Since we do not depend on libbsd, we do not want configure to use it | ||
62 | # just because it finds libutil.h. But, specifying --disable-libutil | ||
63 | # causes compile errors, so... | ||
64 | CACHED_CONFIGUREVARS += "ac_cv_header_bsd_libutil_h=no ac_cv_header_libutil_h=no" | ||
65 | |||
66 | # passwd path is hardcoded in sshd | ||
67 | CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd" | ||
68 | |||
69 | # We don't want to depend on libblockfile | ||
70 | CACHED_CONFIGUREVARS += "ac_cv_header_maillock_h=no" | ||
71 | |||
72 | do_configure_prepend () { | ||
73 | export LD="${CC}" | ||
74 | install -m 0644 ${WORKDIR}/sshd_config ${B}/ | ||
75 | install -m 0644 ${WORKDIR}/ssh_config ${B}/ | ||
76 | if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then | ||
77 | cp aclocal.m4 acinclude.m4 | ||
78 | fi | ||
79 | } | ||
80 | |||
81 | do_compile_ptest() { | ||
82 | # skip regress/unittests/ binaries: this will silently skip | ||
83 | # unittests in run-ptests which is good because they are so slow. | ||
84 | oe_runmake regress/modpipe regress/setuid-allowed regress/netcat | ||
85 | } | ||
86 | |||
87 | do_install_append () { | ||
88 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then | ||
89 | install -D -m 0644 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd | ||
90 | sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config | ||
91 | fi | ||
92 | |||
93 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then | ||
94 | sed -i -e 's:#X11Forwarding no:X11Forwarding yes:' ${D}${sysconfdir}/ssh/sshd_config | ||
95 | fi | ||
96 | |||
97 | install -d ${D}${sysconfdir}/init.d | ||
98 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd | ||
99 | rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin | ||
100 | rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir} | ||
101 | install -d ${D}/${sysconfdir}/default/volatiles | ||
102 | install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd | ||
103 | install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir} | ||
104 | |||
105 | # Create config files for read-only rootfs | ||
106 | install -d ${D}${sysconfdir}/ssh | ||
107 | install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly | ||
108 | sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly | ||
109 | echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly | ||
110 | echo "HostKey /var/run/ssh/ssh_host_dsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly | ||
111 | echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly | ||
112 | echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly | ||
113 | |||
114 | install -d ${D}${systemd_unitdir}/system | ||
115 | install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system | ||
116 | install -c -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_unitdir}/system | ||
117 | install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system | ||
118 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ | ||
119 | -e 's,@SBINDIR@,${sbindir},g' \ | ||
120 | -e 's,@BINDIR@,${bindir},g' \ | ||
121 | -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \ | ||
122 | ${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/*.service | ||
123 | |||
124 | sed -i -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \ | ||
125 | ${D}${sysconfdir}/init.d/sshd | ||
126 | |||
127 | install -D -m 0755 ${WORKDIR}/sshd_check_keys ${D}${libexecdir}/${BPN}/sshd_check_keys | ||
128 | } | ||
129 | |||
130 | do_install_ptest () { | ||
131 | sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libexecdir}/sftp-server|" regress/test-exec.sh | ||
132 | cp -r regress ${D}${PTEST_PATH} | ||
133 | } | ||
134 | |||
135 | ALLOW_EMPTY_${PN} = "1" | ||
136 | |||
137 | PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server" | ||
138 | FILES_${PN}-scp = "${bindir}/scp.${BPN}" | ||
139 | FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config" | ||
140 | FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system" | ||
141 | FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd" | ||
142 | FILES_${PN}-sshd += "${libexecdir}/${BPN}/sshd_check_keys" | ||
143 | FILES_${PN}-sftp = "${bindir}/sftp" | ||
144 | FILES_${PN}-sftp-server = "${libexecdir}/sftp-server" | ||
145 | FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*" | ||
146 | FILES_${PN}-keygen = "${bindir}/ssh-keygen" | ||
147 | |||
148 | RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen" | ||
149 | RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}" | ||
150 | RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make" | ||
151 | |||
152 | RPROVIDES_${PN}-ssh = "ssh" | ||
153 | RPROVIDES_${PN}-sshd = "sshd" | ||
154 | |||
155 | RCONFLICTS_${PN} = "dropbear" | ||
156 | RCONFLICTS_${PN}-sshd = "dropbear" | ||
157 | RCONFLICTS_${PN}-keygen = "ssh-keygen" | ||
158 | |||
159 | CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config" | ||
160 | CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config" | ||
161 | |||
162 | ALTERNATIVE_PRIORITY = "90" | ||
163 | ALTERNATIVE_${PN}-scp = "scp" | ||
164 | ALTERNATIVE_${PN}-ssh = "ssh" | ||
165 | |||