openssh.inc: cleanup
PATCH 1/1 openssh.inc: cleanup
Because of leading slashes in FILES_*, some files were being installed
twice: e.g. /etc/ssh/moduli was in both openssh and openssh-sshd. Now openssh is an empty metapackage, which I think was the plan.
Other cleanups:
* switch to INC_PR
* remove dangling slogin symlink to ssh to fix warning
* remove FILES_openssh-dbg line, which had a syntax error and doesn't appear necessary to keep debug out of the openssh-misc package anymore.
* rename package ssh-keygen to openssh-keygen for consistency
* use ${PN} in variable names
Tested with 5.2p1.
--- recipes/openssh/openssh.inc | 57 ++++++++++++++++++++------------------ recipes/openssh/openssh_4.6p1.bb | 2 +- recipes/openssh/openssh_5.2p1.bb | 3 ++ 3 files changed, 34 insertions(+), 28 deletions(-)
recipes/openssh/openssh.inc +30 -27
@@ -1,7 +1,7 @@ DEPENDS = "zlib openssl" -RCONFLICTS_openssh = "dropbear" -RCONFLICTS_openssh-sshd = "dropbear" +RCONFLICTS_${PN} = "dropbear" +RCONFLICTS_${PN}-sshd = "dropbear" SECTION = "console/network" DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
@@ -15,6 +15,8 @@ used to provide applications with a secure communication channel." HOMEPAGE = "http://www.openssh.org/" LICENSE = "BSD" +INC_PR = "r7" + inherit autotools export ASKPASS_PROGRAM = "${bindir}/ssh-askpass"
@@ -45,27 +47,27 @@ do_compile_append () { do_install_append() { install -d ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd - mv ${D}${bindir}/scp ${D}${bindir}/scp.openssh - mv ${D}${bindir}/ssh ${D}${bindir}/ssh.openssh + mv ${D}${bindir}/scp ${D}${bindir}/scp.${PN} + mv ${D}${bindir}/ssh ${D}${bindir}/ssh.${PN} + rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin rmdir ${D}/var/run/sshd ${D}/var/run ${D}/var } -PACKAGES =+ " ssh-keygen openssh-scp openssh-ssh openssh-sshd openssh-sftp openssh-misc openssh-sftp-server" -FILES_openssh-dbg +=${bindir}/.debug ${libdir}exec/.debug" -FILES_openssh-scp = "${bindir}/scp.${PN}" -FILES_openssh-ssh = "${bindir}/ssh.${PN} ${bindir}/slogin /${sysconfdir}/ssh/ssh_config" -FILES_openssh-sshd = "${sbindir}/sshd /${sysconfdir}/init.d/sshd" -FILES_openssh-sshd += " /${sysconfdir}/ssh/moduli /${sysconfdir}/ssh/sshd_config" -FILES_openssh-sftp = "${bindir}/sftp" -FILES_openssh-sftp-server = "${libdir}exec/sftp-server" -FILES_openssh-misc = "${bindir}/ssh* ${libdir}exec/ssh*" -FILES_ssh-keygen = "${bindir}/ssh-keygen" - -RDEPENDS_openssh += " openssh-scp openssh-ssh openssh-sshd ssh-keygen " -DEPENDS_openssh-sshd += " update-rc.d" -RDEPENDS_openssh-sshd += " update-rc.d ssh-keygen " - -pkg_postinst_openssh-sshd() { +PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server" +FILES_${PN}-scp = "${bindir}/scp.${PN}" +FILES_${PN}-ssh = "${bindir}/ssh.${PN} ${sysconfdir}/ssh/ssh_config" +FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd" +FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config" +FILES_${PN}-sftp = "${bindir}/sftp" +FILES_${PN}-sftp-server = "${libdir}exec/sftp-server" +FILES_${PN}-misc = "${bindir}/ssh* ${libdir}exec/ssh*" +FILES_${PN}-keygen = "${bindir}/ssh-keygen" + +RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen" +DEPENDS_${PN}-sshd += "update-rc.d" +RDEPENDS_${PN}-sshd += "update-rc.d ${PN}-keygen" + +pkg_postinst_${PN}-sshd() { if test "x$D" != "x"; then exit 1 else
@@ -75,23 +77,23 @@ else fi } -pkg_postinst_openssh-scp() { +pkg_postinst_${PN}-scp() { update-alternatives --install ${bindir}/scp scp scp.${PN} 90 } -pkg_postinst_openssh-ssh() { +pkg_postinst_${PN}-ssh() { update-alternatives --install ${bindir}/ssh ssh ssh.${PN} 90 } -pkg_postrm_openssh-ssh() { +pkg_postrm_${PN}-ssh() { update-alternatives --remove ${bindir}/ssh ssh.${PN} } -pkg_postrm_openssh-scp() { +pkg_postrm_${PN}-scp() { update-alternatives --remove ${bindir}/scp scp.${PN} } -pkg_postrm_openssh-sshd() { +pkg_postrm_${PN}-sshd() { if test "x$D" != "x"; then exit 1 else
@@ -102,5 +104,6 @@ else fi } -CONFFILES_openssh-sshd = "${sysconfdir}/ssh/sshd_config" -CONFFILES_openssh-ssh = "${sysconfdir}/ssh/ssh_config" +ALLOW_EMPTY_${PN} = "1" +CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config" +CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"
recipes/openssh/openssh_4.6p1.bb +1 -1
@@ -5,4 +5,4 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar. file://ssh_config \ file://init \ " -PR = "r6" +PR = "${INC_PR}.0"
recipes/openssh/openssh_5.2p1.bb +3 -0
@@ -1,4 +1,7 @@ require openssh.inc + +PR = "${INC_PR}.0" + DEFAULT_PREFERENCE = "-1" #not tested extensively(I tested only ssh) and it's an important recipe I'm afraid to broke SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
Signature · 1 line
1.6.3
Quoted 12 lines · Michael Smith
Because of leading slashes in FILES_*, some files were being installed
twice: e.g./etc/ssh/moduliwas in both openssh and openssh-sshd. Now openssh is an empty metapackage, which I think was the plan.Other cleanups:
* switch toINC_PR
* remove dangling slogin symlink to ssh to fix warning
* remove FILES_openssh-dbg line, which had a syntax error and doesn't appear necessary to keep debug out of the openssh-misc package anymore.
* rename package ssh-keygen to openssh-keygen for consistency
* use ${PN} in variable names
Quoted 1 line
Tested with 5.2p1.
Did you test it at runtime?
if so maybe we should remove that line(that was added because I didn't have time to test it extensively I only tested the ssh client...):DEFAULT_PREFERENCE = "-1"
in 5.2p1
Quoted 9 lines · GNUtoo
Quoted 1 line · Michael Smith
Tested with 5.2p1.
Did you test it at runtime?
if so maybe we should remove that line(that was added because I didn't have time to test it extensively I only tested the ssh client...):DEFAULT_PREFERENCE= "-1"
in 5.2p1
Yes, I've been using the client, server, keygen and scp on x86.
I needed the second patch from here to remove some whining about setlogin() from syslog.
http://patchwork.openembedded.org/bundle/msmith%40cbnco.com/glibc_tweaks/
Mike