[OE-core] [PATCH 11/13] dropbear: don't create invalid symlinks if ssh, scp, etc are disabled
Khem Raj
raj.khem at gmail.com
Sat Aug 24 16:55:17 UTC 2019
On Fri, Aug 23, 2019 at 1:54 PM Andre McCurdy <armccurdy at gmail.com> wrote:
>
> Signed-off-by: Andre McCurdy <armccurdy at gmail.com>
> ---
> meta/recipes-core/dropbear/dropbear.inc | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
> index dcbda74..7269888 100644
> --- a/meta/recipes-core/dropbear/dropbear.inc
> +++ b/meta/recipes-core/dropbear/dropbear.inc
> @@ -70,8 +70,13 @@ do_install() {
> install -m 0644 ${WORKDIR}/dropbear.default ${D}${sysconfdir}/default/dropbear
>
> install -m 0755 dropbearmulti ${D}${sbindir}/
> - ln -s ${sbindir}/dropbearmulti ${D}${bindir}/dbclient
>
> + for i in ${BINCOMMANDS}
> + do
> + # ssh and scp symlinks are created by update-alternatives
> + if [ $i = ssh ] || [ $i = scp ]; then continue; fi
> + ln -s ${sbindir}/dropbearmulti ${D}${bindir}/$i
> + done
> for i in ${SBINCOMMANDS}
> do
> ln -s ./dropbearmulti ${D}${sbindir}/$i
> @@ -101,7 +106,7 @@ do_install() {
> inherit update-alternatives
>
> ALTERNATIVE_PRIORITY = "20"
> -ALTERNATIVE_${PN} = "scp ssh"
> +ALTERNATIVE_${PN} = "${@bb.utils.filter('BINCOMMANDS', 'scp ssh', d)}"
This perhaps is better done via packageconfig maybe. {S}BINCOMMANDS
could be turned into packageconfig logic and
>
> ALTERNATIVE_TARGET = "${sbindir}/dropbearmulti"
>
> @@ -113,3 +118,5 @@ pkg_postrm_append_${PN} () {
> rm ${sysconfdir}/dropbear/dropbear_dss_host_key
> fi
> }
> +
> +FILES_${PN} += "${bindir}"
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
More information about the Openembedded-core
mailing list