Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] libidn2: improve reproducibility
@ 2018-09-29  3:06 Hongxu Jia
  2018-09-29 12:30 ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Hongxu Jia @ 2018-09-29  3:06 UTC (permalink / raw)
  To: openembedded-core, ross.burton

Remoe prefix ${RECIPE_SYSROOT} in libidn2.pc

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/recipes-extended/libidn/libidn2_2.0.5.bb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/recipes-extended/libidn/libidn2_2.0.5.bb b/meta/recipes-extended/libidn/libidn2_2.0.5.bb
index 0daf7a6..7a06ed3 100644
--- a/meta/recipes-extended/libidn/libidn2_2.0.5.bb
+++ b/meta/recipes-extended/libidn/libidn2_2.0.5.bb
@@ -27,3 +27,9 @@ LICENSE_${PN} = "(GPLv2+ | LGPLv3)"
 LICENSE_${PN}-bin = "GPLv3+"
 
 BBCLASSEXTEND = "native nativesdk"
+
+PACKAGE_PREPROCESS_FUNCS += "libidn2_package_preprocess"
+libidn2_package_preprocess () {
+    sed -e 's@${RECIPE_SYSROOT}@@g' \
+       -i ${PKGD}${libdir}/pkgconfig/libidn2.pc
+}
-- 
2.7.4



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

* Re: [PATCH] libidn2: improve reproducibility
  2018-09-29  3:06 [PATCH] libidn2: improve reproducibility Hongxu Jia
@ 2018-09-29 12:30 ` Richard Purdie
  2018-09-29 15:21   ` [PATCH V2] " Hongxu Jia
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2018-09-29 12:30 UTC (permalink / raw)
  To: Hongxu Jia, openembedded-core, ross.burton

On Sat, 2018-09-29 at 11:06 +0800, Hongxu Jia wrote:
> Remoe prefix ${RECIPE_SYSROOT} in libidn2.pc
> 
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
>  meta/recipes-extended/libidn/libidn2_2.0.5.bb | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/meta/recipes-extended/libidn/libidn2_2.0.5.bb
> b/meta/recipes-extended/libidn/libidn2_2.0.5.bb
> index 0daf7a6..7a06ed3 100644
> --- a/meta/recipes-extended/libidn/libidn2_2.0.5.bb
> +++ b/meta/recipes-extended/libidn/libidn2_2.0.5.bb
> @@ -27,3 +27,9 @@ LICENSE_${PN} = "(GPLv2+ | LGPLv3)"
>  LICENSE_${PN}-bin = "GPLv3+"
>  
>  BBCLASSEXTEND = "native nativesdk"
> +
> +PACKAGE_PREPROCESS_FUNCS += "libidn2_package_preprocess"
> +libidn2_package_preprocess () {
> +    sed -e 's@${RECIPE_SYSROOT}@@g' \
> +       -i ${PKGD}${libdir}/pkgconfig/libidn2.pc
> +}

Why is RECIPE_SYSROOT in here in the first place? Can you include the
exact issue in the commit message?

I suspect there is probably a better fix than this.

On reason I hate sed expressions like this is that the sed expression
will sit there forever as its very hard to tell if it still applies
anymore. So more detail needed and it really probably should be a patch
 of some sort.

Cheers,

Richard




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

* [PATCH V2] libidn2: improve reproducibility
  2018-09-29 12:30 ` Richard Purdie
@ 2018-09-29 15:21   ` Hongxu Jia
  0 siblings, 0 replies; 3+ messages in thread
From: Hongxu Jia @ 2018-09-29 15:21 UTC (permalink / raw)
  To: openembedded-core, richard.purdie

Since option `--with-libunistring-prefix' is used, it is not necessary
to explicitly add `-L*** -lunistring' to Libs.private in libidn2.pc
which breaks binary reproducibility.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 ...de-lib-name-to-replace-variable-detecting.patch | 33 ++++++++++++++++++++++
 meta/recipes-extended/libidn/libidn2_2.0.5.bb      |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-extended/libidn/libidn2/0001-use-hardcode-lib-name-to-replace-variable-detecting.patch

diff --git a/meta/recipes-extended/libidn/libidn2/0001-use-hardcode-lib-name-to-replace-variable-detecting.patch b/meta/recipes-extended/libidn/libidn2/0001-use-hardcode-lib-name-to-replace-variable-detecting.patch
new file mode 100644
index 0000000..0186ee2
--- /dev/null
+++ b/meta/recipes-extended/libidn/libidn2/0001-use-hardcode-lib-name-to-replace-variable-detecting.patch
@@ -0,0 +1,33 @@
+From 9c8370695042303a13cbed914ea9ae89040ed19c Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 29 Sep 2018 22:36:45 +0800
+Subject: [PATCH] use hardcode lib name to replace variable detecting
+
+As pkgconfig menual introduced:
+`Libs.private: The link flags for private libraries required by this
+package but not exposed to applications.'
+
+Since option `--with-libunistring-prefix' is used, it is not necessary
+to explicitly add `-L*** -lunistring' to Libs.private in libidn2.pc
+which breaks binary reproducibility.
+
+Upstream-Status: Inappropriate[OE specific]]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ libidn2.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libidn2.pc.in b/libidn2.pc.in
+index 0dade23..66f8d1a 100644
+--- a/libidn2.pc.in
++++ b/libidn2.pc.in
+@@ -8,4 +8,4 @@ Description: Library implementing IDNA2008 and TR46
+ Version: @PACKAGE_VERSION@
+ Cflags: -I${includedir}
+ Libs: -L${libdir} -lidn2
+-Libs.private: @LTLIBICONV@ @LTLIBUNISTRING@
++Libs.private: -lunistring
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/libidn/libidn2_2.0.5.bb b/meta/recipes-extended/libidn/libidn2_2.0.5.bb
index 0daf7a6..6064e52 100644
--- a/meta/recipes-extended/libidn/libidn2_2.0.5.bb
+++ b/meta/recipes-extended/libidn/libidn2_2.0.5.bb
@@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ab90e75ef97cc6318ce4f2fbda62fe4d \
 
 SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \
            file://Unset-need_charset_alias-when-building-for-musl.patch \
+           file://0001-use-hardcode-lib-name-to-replace-variable-detecting.patch \
           "
 SRC_URI[md5sum] = "eaf9a5b9d03b0cce3760f34b3124eb36"
 SRC_URI[sha256sum] = "53f69170886f1fa6fa5b332439c7a77a7d22626a82ef17e2c1224858bb4ca2b8"
-- 
2.7.4



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

end of thread, other threads:[~2018-09-29 15:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-29  3:06 [PATCH] libidn2: improve reproducibility Hongxu Jia
2018-09-29 12:30 ` Richard Purdie
2018-09-29 15:21   ` [PATCH V2] " Hongxu Jia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox