summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssh/openssh_5.9p1.bb
diff options
context:
space:
mode:
authorScott Garman <scott.a.garman@intel.com>2011-10-24 19:17:27 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-10-27 08:29:51 +0100
commit8eb10106116170aae3cea8be3611b8b8608b3b08 (patch)
tree01a871bce472f21c1d223ba587be6057da0f51b9 /meta/recipes-connectivity/openssh/openssh_5.9p1.bb
parentc9ec9d441cbce30e1f9ed07a66c125827cec659d (diff)
downloadpoky-8eb10106116170aae3cea8be3611b8b8608b3b08.tar.gz
openssh: upgrade to 5.9p1
(From OE-Core rev: 47c7f5a6f022dca10ae63851c7d9c14ee06f0c0b) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/openssh/openssh_5.9p1.bb')
-rw-r--r--meta/recipes-connectivity/openssh/openssh_5.9p1.bb119
1 files changed, 119 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh_5.9p1.bb b/meta/recipes-connectivity/openssh/openssh_5.9p1.bb
new file mode 100644
index 0000000000..f9493d7224
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh_5.9p1.bb
@@ -0,0 +1,119 @@
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=bae9a689be41581503bcf95d8fb42c4e"
9
10PR = "r2"
11
12DEPENDS = "zlib openssl"
13DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
14
15RPROVIDES = "ssh sshd"
16
17CONFLICTS_${PN} = "dropbear"
18RCONFLICTS_${PN}-sshd = "dropbear"
19RCONFLICTS_${PN}-keygen = "ssh-keygen"
20
21SRC_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 ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
27
28PAM_SRC_URI = "file://sshd"
29SRC_URI[md5sum] = "afe17eee7e98d3b8550cc349834a85d0"
30SRC_URI[sha256sum] = "8d3e8b6b6ff04b525a6dfa6fdeb6a99043ccf6c3310cc32eba84c939b07777d5"
31
32inherit useradd update-rc.d
33
34USERADD_PACKAGES = "${PN}-sshd"
35USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
36INITSCRIPT_PACKAGES = "${PN}-sshd"
37INITSCRIPT_NAME_${PN}-sshd = "sshd"
38INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"
39
40inherit autotools
41
42# LFS support:
43CFLAGS += "-D__FILE_OFFSET_BITS=64"
44export LD = "${CC}"
45
46EXTRA_OECONF = "--with-rand-helper=no \
47 ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
48 --without-zlib-version-check \
49 --with-privsep-path=/var/run/sshd \
50 --sysconfdir=${sysconfdir}/ssh \
51 --with-xauth=/usr/bin/xauth"
52
53# This is a workaround for uclibc because including stdio.h
54# pulls in pthreads.h and causes conflicts in function prototypes.
55# This results in compilation failure, so unless this is fixed,
56# disable pam for uclibc.
57EXTRA_OECONF_append_libc-uclibc=" --without-pam"
58
59do_configure_prepend () {
60 if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
61 cp aclocal.m4 acinclude.m4
62 fi
63}
64
65do_compile_append () {
66 install -m 0644 ${WORKDIR}/sshd_config ${S}/
67 install -m 0644 ${WORKDIR}/ssh_config ${S}/
68}
69
70do_install_append () {
71 for i in ${DISTRO_FEATURES};
72 do
73 if [ ${i} = "pam" ]; then
74 install -d ${D}${sysconfdir}/pam.d
75 install -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
76 fi
77 done
78 install -d ${D}${sysconfdir}/init.d
79 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
80 mv ${D}${bindir}/scp ${D}${bindir}/scp.${PN}
81 mv ${D}${bindir}/ssh ${D}${bindir}/ssh.${PN}
82 rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
83 rmdir ${D}/var/run/sshd ${D}/var/run ${D}/var
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.${PN}"
90FILES_${PN}-ssh = "${bindir}/ssh.${PN} ${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"
99DEPENDS_${PN}-sshd += "update-rc.d"
100RDEPENDS_${PN}-sshd += "update-rc.d ${PN}-keygen"
101
102pkg_postinst_${PN}-scp () {
103 update-alternatives --install ${bindir}/scp scp scp.${PN} 90
104}
105
106pkg_postinst_${PN}-ssh () {
107 update-alternatives --install ${bindir}/ssh ssh ssh.${PN} 90
108}
109
110pkg_postrm_${PN}-ssh () {
111 update-alternatives --remove ${bindir}/ssh ssh.${PN}
112}
113
114pkg_postrm_${PN}-scp () {
115 update-alternatives --remove ${bindir}/scp scp.${PN}
116}
117
118CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
119CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"