summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssh/openssh_6.2p1.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/openssh/openssh_6.2p1.bb')
-rw-r--r--meta/recipes-connectivity/openssh/openssh_6.2p1.bb107
1 files changed, 107 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh_6.2p1.bb b/meta/recipes-connectivity/openssh/openssh_6.2p1.bb
new file mode 100644
index 0000000000..20502c45df
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh_6.2p1.bb
@@ -0,0 +1,107 @@
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
10PR = "r0"
11
12DEPENDS = "zlib openssl"
13DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
14
15RPROVIDES_${PN}-ssh = "ssh"
16RPROVIDES_${PN}-sshd = "sshd"
17
18RCONFLICTS_${PN} = "dropbear"
19RCONFLICTS_${PN}-sshd = "dropbear"
20RCONFLICTS_${PN}-keygen = "ssh-keygen"
21
22SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
23 file://nostrip.patch \
24 file://sshd_config \
25 file://ssh_config \
26 file://init \
27 file://openssh-CVE-2011-4327.patch \
28 ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
29
30PAM_SRC_URI = "file://sshd"
31
32SRC_URI[md5sum] = "7b2d9dd75b5cf267ea1737ec75500316"
33SRC_URI[sha256sum] = "58690267d7455f444e87c2f8cd9be91fc686ffc0c02d1ebd0be2ab68149f7160"
34inherit useradd update-rc.d update-alternatives
35
36USERADD_PACKAGES = "${PN}-sshd"
37USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
38INITSCRIPT_PACKAGES = "${PN}-sshd"
39INITSCRIPT_NAME_${PN}-sshd = "sshd"
40INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"
41
42inherit autotools
43
44# LFS support:
45CFLAGS += "-D__FILE_OFFSET_BITS=64"
46export LD = "${CC}"
47
48EXTRA_OECONF = "--with-rand-helper=no \
49 ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
50 --without-zlib-version-check \
51 --with-privsep-path=/var/run/sshd \
52 --sysconfdir=${sysconfdir}/ssh \
53 --with-xauth=/usr/bin/xauth"
54
55# This is a workaround for uclibc because including stdio.h
56# pulls in pthreads.h and causes conflicts in function prototypes.
57# This results in compilation failure, so unless this is fixed,
58# disable pam for uclibc.
59EXTRA_OECONF_append_libc-uclibc=" --without-pam"
60
61do_configure_prepend () {
62 if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
63 cp aclocal.m4 acinclude.m4
64 fi
65}
66
67do_compile_append () {
68 install -m 0644 ${WORKDIR}/sshd_config ${S}/
69 install -m 0644 ${WORKDIR}/ssh_config ${S}/
70}
71
72do_install_append () {
73 for i in ${DISTRO_FEATURES};
74 do
75 if [ ${i} = "pam" ]; then
76 install -d ${D}${sysconfdir}/pam.d
77 install -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
78 fi
79 done
80 install -d ${D}${sysconfdir}/init.d
81 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
82 rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
83 rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir}
84}
85
86ALLOW_EMPTY_${PN} = "1"
87
88PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server"
89FILES_${PN}-scp = "${bindir}/scp.${BPN}"
90FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config"
91FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd"
92FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config"
93FILES_${PN}-sftp = "${bindir}/sftp"
94FILES_${PN}-sftp-server = "${libexecdir}/sftp-server"
95FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
96FILES_${PN}-keygen = "${bindir}/ssh-keygen"
97
98RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
99RDEPENDS_${PN}-sshd += "${PN}-keygen"
100
101CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
102CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"
103
104ALTERNATIVE_PRIORITY = "90"
105ALTERNATIVE_${PN}-scp = "scp"
106ALTERNATIVE_${PN}-ssh = "ssh"
107