All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] file: add PACKAGECONFIG for auto options
@ 2020-05-09 21:08 Konrad Weihmann
  2020-05-10 10:40 ` [OE-core] " Peter Kjellerstedt
  2020-05-10 19:42 ` Andre McCurdy
  0 siblings, 2 replies; 3+ messages in thread
From: Konrad Weihmann @ 2020-05-09 21:08 UTC (permalink / raw)
  To: openembedded-core; +Cc: Konrad Weihmann

A few options of file configure are set to auto, which can lead to
unpredictable effect when something in the sysroot does provide
things that satisfy the autotools checks.
In the worst case this will lead to package-qa failure as libraries are
not set in RDEPENDS but configured for the tool.

To mitigate changes of accidental configure set explicit options via
newly introduced PACKAGECONFIG variables for bzip, lzma and zlib
support, where the default is just zlib, as it was before

changes v2:

- add explicit enable options

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
---
 meta/recipes-devtools/file/file_5.38.bb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/file/file_5.38.bb b/meta/recipes-devtools/file/file_5.38.bb
index b8f09107e8..e528d84cdd 100644
--- a/meta/recipes-devtools/file/file_5.38.bb
+++ b/meta/recipes-devtools/file/file_5.38.bb
@@ -8,7 +8,7 @@ SECTION = "console/utils"
 LICENSE = "BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=0251eaec1188b20d9a72c502ecfdda1b"
 
-DEPENDS = "zlib file-replacement-native"
+DEPENDS = "file-replacement-native"
 DEPENDS_class-native = "zlib-native"
 
 SRC_URI = "git://github.com/file/file.git"
@@ -18,6 +18,11 @@ S = "${WORKDIR}/git"
 
 inherit autotools update-alternatives
 
+PACKAGECONFIG ??= "zlib"
+PACKAGECONFIG[bz2] = "--enable-bzlib,--disable-bzlib,bzip2"
+PACKAGECONFIG[lzma] = "--enable-xzlib,--disable-xzlib,xz"
+PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
+
 EXTRA_OECONF += "--disable-libseccomp"
 
 ALTERNATIVE_${PN} = "file"
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH v2] file: add PACKAGECONFIG for auto options
  2020-05-09 21:08 [PATCH v2] file: add PACKAGECONFIG for auto options Konrad Weihmann
@ 2020-05-10 10:40 ` Peter Kjellerstedt
  2020-05-10 19:42 ` Andre McCurdy
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Kjellerstedt @ 2020-05-10 10:40 UTC (permalink / raw)
  To: Konrad Weihmann, openembedded-core

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Konrad Weihmann
> Sent: den 9 maj 2020 23:08
> To: openembedded-core@lists.openembedded.org
> Cc: Konrad Weihmann <kweihmann@outlook.com>
> Subject: [OE-core] [PATCH v2] file: add PACKAGECONFIG for auto options
> 
> A few options of file configure are set to auto, which can lead to
> unpredictable effect when something in the sysroot does provide
> things that satisfy the autotools checks.
> In the worst case this will lead to package-qa failure as libraries are
> not set in RDEPENDS but configured for the tool.
> 
> To mitigate changes of accidental configure set explicit options via
> newly introduced PACKAGECONFIG variables for bzip, lzma and zlib
> support, where the default is just zlib, as it was before
> 
> changes v2:
> 
> - add explicit enable options

The v2 information belongs after the --- below as it relates to the 
review process.

//Peter

> 
> Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
> ---
>  meta/recipes-devtools/file/file_5.38.bb | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/file/file_5.38.bb b/meta/recipes-
> devtools/file/file_5.38.bb
> index b8f09107e8..e528d84cdd 100644
> --- a/meta/recipes-devtools/file/file_5.38.bb
> +++ b/meta/recipes-devtools/file/file_5.38.bb
> @@ -8,7 +8,7 @@ SECTION = "console/utils"
>  LICENSE = "BSD-2-Clause"
>  LIC_FILES_CHKSUM =
> "file://COPYING;beginline=2;md5=0251eaec1188b20d9a72c502ecfdda1b"
> 
> -DEPENDS = "zlib file-replacement-native"
> +DEPENDS = "file-replacement-native"
>  DEPENDS_class-native = "zlib-native"
> 
>  SRC_URI = "git://github.com/file/file.git"
> @@ -18,6 +18,11 @@ S = "${WORKDIR}/git"
> 
>  inherit autotools update-alternatives
> 
> +PACKAGECONFIG ??= "zlib"
> +PACKAGECONFIG[bz2] = "--enable-bzlib,--disable-bzlib,bzip2"
> +PACKAGECONFIG[lzma] = "--enable-xzlib,--disable-xzlib,xz"
> +PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
> +
>  EXTRA_OECONF += "--disable-libseccomp"
> 
>  ALTERNATIVE_${PN} = "file"
> --
> 2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH v2] file: add PACKAGECONFIG for auto options
  2020-05-09 21:08 [PATCH v2] file: add PACKAGECONFIG for auto options Konrad Weihmann
  2020-05-10 10:40 ` [OE-core] " Peter Kjellerstedt
@ 2020-05-10 19:42 ` Andre McCurdy
  1 sibling, 0 replies; 3+ messages in thread
From: Andre McCurdy @ 2020-05-10 19:42 UTC (permalink / raw)
  To: Konrad Weihmann; +Cc: OE Core mailing list

On Sat, May 9, 2020 at 2:08 PM Konrad Weihmann <kweihmann@outlook.com> wrote:
>
> A few options of file configure are set to auto, which can lead to
> unpredictable effect when something in the sysroot does provide
> things that satisfy the autotools checks.
> In the worst case this will lead to package-qa failure as libraries are
> not set in RDEPENDS but configured for the tool.
>
> To mitigate changes of accidental configure set explicit options via
> newly introduced PACKAGECONFIG variables for bzip, lzma and zlib
> support, where the default is just zlib, as it was before
>
> changes v2:
>
> - add explicit enable options
>
> Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
> ---
>  meta/recipes-devtools/file/file_5.38.bb | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-devtools/file/file_5.38.bb b/meta/recipes-devtools/file/file_5.38.bb
> index b8f09107e8..e528d84cdd 100644
> --- a/meta/recipes-devtools/file/file_5.38.bb
> +++ b/meta/recipes-devtools/file/file_5.38.bb
> @@ -8,7 +8,7 @@ SECTION = "console/utils"
>  LICENSE = "BSD-2-Clause"
>  LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=0251eaec1188b20d9a72c502ecfdda1b"
>
> -DEPENDS = "zlib file-replacement-native"
> +DEPENDS = "file-replacement-native"
>  DEPENDS_class-native = "zlib-native"

If you use PACKAGECONFIG to express the dependency on zlib then you
should do so consistently for both target and native. ie remove the
DEPENDS_class-native above and then add PACKAGECONFIG_class-native =
"zlib" below.

>  SRC_URI = "git://github.com/file/file.git"
> @@ -18,6 +18,11 @@ S = "${WORKDIR}/git"
>
>  inherit autotools update-alternatives
>
> +PACKAGECONFIG ??= "zlib"
> +PACKAGECONFIG[bz2] = "--enable-bzlib,--disable-bzlib,bzip2"
> +PACKAGECONFIG[lzma] = "--enable-xzlib,--disable-xzlib,xz"
> +PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
> +
>  EXTRA_OECONF += "--disable-libseccomp"
>
>  ALTERNATIVE_${PN} = "file"
> --
> 2.20.1
>
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-10 19:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09 21:08 [PATCH v2] file: add PACKAGECONFIG for auto options Konrad Weihmann
2020-05-10 10:40 ` [OE-core] " Peter Kjellerstedt
2020-05-10 19:42 ` Andre McCurdy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.