* [PATCH] LSB 4.1: lsb_release script incompatible with busybox head and find
@ 2017-02-17 16:50 Athanasios Oikonomou
2017-02-17 17:28 ` Burton, Ross
0 siblings, 1 reply; 3+ messages in thread
From: Athanasios Oikonomou @ 2017-02-17 16:50 UTC (permalink / raw)
To: openembedded-core
Busybox implementation only supports head -1 option if ENABLE_INCLUDE_SUSv2
or ENABLE_FEATURE_FANCY_HEAD configuration options are enabled. Also the -and
option for find is only supported if ENABLE_DESKTOP configuration option is
enabled. These configuration options are not enabled in several builds, which is
why this patch is needed.
[YOCTO #11041]
Signed-off-by: Athanasios Oikonomou <athoik@gmail.com>
---
...elease-to-work-with-busybox-head-and-find.patch | 34 ++++++++++++++++++++++
meta/recipes-extended/lsb/lsb_4.1.bb | 3 +-
2 files changed, 36 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-extended/lsb/lsb/fix-lsb_release-to-work-with-busybox-head-and-find.patch
diff --git a/meta/recipes-extended/lsb/lsb/fix-lsb_release-to-work-with-busybox-head-and-find.patch b/meta/recipes-extended/lsb/lsb/fix-lsb_release-to-work-with-busybox-head-and-find.patch
new file mode 100644
index 0000000..0bfdaaf
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/fix-lsb_release-to-work-with-busybox-head-and-find.patch
@@ -0,0 +1,34 @@
+# Copyright (c) 2013 LG Electronics, Inc.
+
+# Busybox implementation only supports head -1 option if ENABLE_INCLUDE_SUSv2
+# or ENABLE_FEATURE_FANCY_HEAD configuration options are enabled. Also the -and
+# option for find is only supported if ENABLE_DESKTOP configuration option is
+# enabled. These configuration options are not enabled in build-webos, which is
+# why this patch is needed.
+
+diff -ru orig-lsb-release-1.4/lsb_release lsb-release-1.4/lsb_release
+--- orig-lsb-release-1.4/lsb_release 2013-03-13 09:13:56.518509117 +0200
++++ lsb-release-1.4/lsb_release 2013-03-13 11:50:03.765119076 +0200
+@@ -209,7 +209,7 @@
+ || [ -n "$(echo $DISTRIB_DESCRIPTION | \
+ sed -e "s/.*$DESCSTR_DELI.*//")" ]
+ then
+- TMP_DISTRIB_DESC=$(head -1 $FILENAME 2>/dev/null)
++ TMP_DISTRIB_DESC=$(head -n 1 $FILENAME 2>/dev/null)
+ [ -z "$DISTRIB_DESCRIPTION" ] \
+ && DISTRIB_DESCRIPTION=$TMP_DISTRIB_DESC
+ else
+@@ -249,10 +249,10 @@
+ then
+ CHECKFIRST=$(find $INFO_ROOT/ -maxdepth 1 \
+ -name \*$INFO_DISTRIB_SUFFIX \
+- -and ! -name $INFO_LSB_FILE \
+- -and -type f \
++ -type f \
+ 2>/dev/null \
+- | head -1 ) # keep one of the files found (if many)
++ | grep -v $INFO_LSB_FILE \
++ | head -n 1 ) # keep one of the files found (if many)
+ fi
+ InitDistribInfo $CHECKFIRST
+ fi
diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb
index ece0eab..bc9048b 100644
--- a/meta/recipes-extended/lsb/lsb_4.1.bb
+++ b/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -2,7 +2,7 @@ SUMMARY = "LSB support for OpenEmbedded"
SECTION = "console/utils"
HOMEPAGE = "http://prdownloads.sourceforge.net/lsb"
LICENSE = "GPLv2+"
-PR = "r2"
+PR = "r3"
LSB_CORE = "lsb-core-${TARGET_ARCH}"
LSB_CORE_x86 = "lsb-core-ia32"
@@ -15,6 +15,7 @@ RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_getopt} lsbinitscripts"
LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \
+ file://fix-lsb_release-to-work-with-busybox-head-and-find.patch \
file://init-functions \
file://lsb_killproc \
file://lsb_log_message \
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] LSB 4.1: lsb_release script incompatible with busybox head and find
2017-02-17 16:50 [PATCH] LSB 4.1: lsb_release script incompatible with busybox head and find Athanasios Oikonomou
@ 2017-02-17 17:28 ` Burton, Ross
2017-02-17 18:40 ` Αθανάσιος Οικονόμου
0 siblings, 1 reply; 3+ messages in thread
From: Burton, Ross @ 2017-02-17 17:28 UTC (permalink / raw)
To: Athanasios Oikonomou; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]
On 17 February 2017 at 16:50, Athanasios Oikonomou <athoik@gmail.com> wrote:
> +# Copyright (c) 2013 LG Electronics, Inc.
>
By submitting the patch this becomes MIT licensed, so this copyright
statement is pretty meaningless.
> +# Busybox implementation only supports head -1 option if
> ENABLE_INCLUDE_SUSv2
> +# or ENABLE_FEATURE_FANCY_HEAD configuration options are enabled. Also
> the -and
> +# option for find is only supported if ENABLE_DESKTOP configuration
> option is
> +# enabled. These configuration options are not enabled in build-webos,
> which is
> +# why this patch is needed.
>
Patch comments don't need to be on # lines. Also this patch needs a
Signed-off-by and Upstream-Status in the header. I can't see a reason why
the fixes don't go upstream, so please try submitting it there too.
--- a/meta/recipes-extended/lsb/lsb_4.1.bb
> +++ b/meta/recipes-extended/lsb/lsb_4.1.bb
> @@ -2,7 +2,7 @@ SUMMARY = "LSB support for OpenEmbedded"
> SECTION = "console/utils"
> HOMEPAGE = "http://prdownloads.sourceforge.net/lsb"
> LICENSE = "GPLv2+"
> -PR = "r2"
> +PR = "r3"
>
No need to bump PR, leave it at r2.
Ross
[-- Attachment #2: Type: text/html, Size: 2116 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] LSB 4.1: lsb_release script incompatible with busybox head and find
2017-02-17 17:28 ` Burton, Ross
@ 2017-02-17 18:40 ` Αθανάσιος Οικονόμου
0 siblings, 0 replies; 3+ messages in thread
From: Αθανάσιος Οικονόμου @ 2017-02-17 18:40 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 321 bytes --]
>
> Patch comments don't need to be on # lines. Also this patch needs a
Signed-off-by and Upstream-Status in the header. I can't see a reason why
the fixes don't go upstream, so please try submitting it there too.
>
I don't believe they accept patches for lsb-release-1.4. I don't know why
we call it lsb 4.1.
[-- Attachment #2: Type: text/html, Size: 416 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-17 18:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-17 16:50 [PATCH] LSB 4.1: lsb_release script incompatible with busybox head and find Athanasios Oikonomou
2017-02-17 17:28 ` Burton, Ross
2017-02-17 18:40 ` Αθανάσιος Οικονόμου
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox