[oe] [meta-networking][PATCH 02/10] netcat-openbsd: Fix build and whitelist

Martin Jansa martin.jansa at gmail.com
Thu Mar 30 09:41:00 UTC 2017


On Wed, Mar 22, 2017 at 11:45:25AM -0700, Khem Raj wrote:
> pkgconfig is used so we need to inherit pkgconfig
> secondly, base64 support is added for it to work
> with musl
> 
> Signed-off-by: Khem Raj <raj.khem at gmail.com>
> ---
>  ...bundle-own-base64-encode-decode-functions.patch | 379 +++++++++++++++++++++
>  .../recipes-support/netcat/netcat-openbsd_1.105.bb |  22 +-
>  meta-networking/recipes-support/netcat/netcat.inc  |   2 +-
>  3 files changed, 395 insertions(+), 8 deletions(-)
>  create mode 100644 meta-networking/recipes-support/netcat/netcat-openbsd/0001-bundle-own-base64-encode-decode-functions.patch
> 
> diff --git a/meta-networking/recipes-support/netcat/netcat-openbsd/0001-bundle-own-base64-encode-decode-functions.patch b/meta-networking/recipes-support/netcat/netcat-openbsd/0001-bundle-own-base64-encode-decode-functions.patch
> new file mode 100644
> index 000000000..0966b6580
> --- /dev/null
> +++ b/meta-networking/recipes-support/netcat/netcat-openbsd/0001-bundle-own-base64-encode-decode-functions.patch
> @@ -0,0 +1,379 @@
> +From ccd166b73eaae4dd1e1785c63ceb9b303568ed46 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem at gmail.com>

...

> diff --git a/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb b/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
> index bb21e0cfe..bb4e36c0a 100644
> --- a/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
> +++ b/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
> @@ -2,20 +2,21 @@ require netcat.inc
>  SUMMARY = "OpenBSD Netcat"
>  HOMEPAGE = "http://ftp.debian.org"
>  LICENSE = "BSD-3-Clause"
> -LIC_FILES_CHKSUM = "file://../debian/copyright;md5=ee6bbaacb5db5f2973818f0902c3ae6f"
> +LIC_FILES_CHKSUM = "file://debian/copyright;md5=ee6bbaacb5db5f2973818f0902c3ae6f"
>  
>  DEPENDS += "glib-2.0 libbsd"
> +do_patch[depends] = "quilt-native:do_populate_sysroot"
>  
>  SRC_URI = "${DEBIAN_MIRROR}/main/n/netcat-openbsd/netcat-openbsd_${PV}.orig.tar.gz;name=netcat \
> -           ${DEBIAN_MIRROR}/main/n/netcat-openbsd/netcat-openbsd_${PV}-7.debian.tar.gz;name=netcat-patch"
> +           ${DEBIAN_MIRROR}/main/n/netcat-openbsd/netcat-openbsd_${PV}-7.debian.tar.gz;name=netcat-patch;subdir=${PN}-${PV} \
> +           file://0001-bundle-own-base64-encode-decode-functions.patch \
> +           "
>  
>  SRC_URI[netcat.md5sum] = "7e67b22f1ad41a1b7effbb59ff28fca1"
>  SRC_URI[netcat.sha256sum] = "40653fe66c1516876b61b07e093d826e2a5463c5d994f1b7e6ce328f3edb211e"
>  SRC_URI[netcat-patch.md5sum] = "e914f8eb7eda5c75c679dd77787ac76b"
>  SRC_URI[netcat-patch.sha256sum] = "eee759327ffea293e81d0dde67921b7fcfcad279ffd7a2c9d037bbc8f882b363"
>  
> -S = "${WORKDIR}/${BPN}-${PV}"
> -
>  EXTRA_OEMAKE += "'LDFLAGS=${LDFLAGS}'"
>  
>  do_configure[noexec] = "1"
> @@ -23,9 +24,18 @@ do_configure[noexec] = "1"
>  netcat_do_patch() {
>      cd ${S}
>      quilt pop -a || true
> -    QUILT_PATCHES=${WORKDIR}/debian/patches QUILT_SERIES=${WORKDIR}/debian/patches/series quilt push -a
> +    if [ -d ${S}/.pc-netcat ]; then
> +            rm -rf ${S}/.pc
> +            mv ${S}/.pc-netcat ${S}/.pc
> +            QUILT_PATCHES=${S}/debian/patches quilt pop -a
> +            rm -rf ${S}/.pc ${S}/debian
> +    fi
> +    QUILT_PATCHES=${S}/debian/patches quilt push -a
> +    mv ${S}/.pc ${S}/.pc-netcat

Doesn't work here:
http://errors.yoctoproject.org/Errors/Details/138495/

>  }
>  
> +do_unpack[cleandirs] += "${S}"
> +
>  python do_patch() {
>      bb.build.exec_func('netcat_do_patch', d)
>      bb.build.exec_func('patch_do_patch', d)
> @@ -42,5 +52,3 @@ do_install() {
>      install -m 755 ${S}/nc ${D}${bindir}/nc.${BPN}
>  }
>  ALTERNATIVE_PRIORITY = "60"
> -
> -PNBLACKLIST[netcat-openbsd] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130673/"
> diff --git a/meta-networking/recipes-support/netcat/netcat.inc b/meta-networking/recipes-support/netcat/netcat.inc
> index 91a24a106..15441645b 100644
> --- a/meta-networking/recipes-support/netcat/netcat.inc
> +++ b/meta-networking/recipes-support/netcat/netcat.inc
> @@ -9,7 +9,7 @@ connection you would need and has several interesting built-in \
>  capabilities."
>  
>  SECTION = "net"
> -inherit update-alternatives gettext
> +inherit update-alternatives gettext pkgconfig
>  
>  ALTERNATIVE_${PN} = "nc"
>  
> -- 
> 2.12.0
> 
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20170330/19816f25/attachment-0002.sig>


More information about the Openembedded-devel mailing list