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