diff mbox series

bash: improve reproducibility

Message ID 20240228150201.224875-1-omatiush@cisco.com
State New
Headers show
Series bash: improve reproducibility | expand

Commit Message

Nativesdk package contains host references in output packages.
Remove them.

Signed-off-by: Oleh Matiusha <omatiush@cisco.com>
---
 meta/recipes-extended/bash/bash.inc | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Comments

Alexander Kanavin Feb. 28, 2024, 3:04 p.m. UTC | #1
Don’t copy paste from target install. Make a function.

Alex

On Wed 28. Feb 2024 at 16.02, Oleh Matiusha via lists.openembedded.org
<omatiush=cisco.com@lists.openembedded.org> wrote:

> Nativesdk package contains host references in output packages.
> Remove them.
>
> Signed-off-by: Oleh Matiusha <omatiush@cisco.com>
> ---
>  meta/recipes-extended/bash/bash.inc | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/meta/recipes-extended/bash/bash.inc
> b/meta/recipes-extended/bash/bash.inc
> index 2c3e605511..c8275c0443 100644
> --- a/meta/recipes-extended/bash/bash.inc
> +++ b/meta/recipes-extended/bash/bash.inc
> @@ -74,6 +74,7 @@ do_install:append () {
>                 mv ${D}${bindir}/bash ${D}${base_bindir}
>         fi
>  }
> +
>  do_install:append:class-target () {
>         # Clean buildhost references in bashbug
>         sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
> @@ -93,6 +94,26 @@ do_install:append:class-target () {
>                 ${D}${libdir}/bash/Makefile.inc
>  }
>
> +
> +do_install:append:class-nativesdk () {
> +       # Clean buildhost references in bashbug
> +       sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
> +               -e "s,-I${WORKDIR}/\S* ,,g" \
> +               -e 's|${DEBUG_PREFIX_MAP}||g' \
> +               ${D}${bindir}/bashbug
> +
> +       # Clean buildhost references in bash.pc
> +       sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
> +            ${D}${libdir}/pkgconfig/bash.pc
> +
> +       # Clean buildhost references in Makefile.inc
> +       sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
> +               -e 's|${DEBUG_PREFIX_MAP}||g' \
> +               -e 's:${HOSTTOOLS_DIR}/::g' \
> +               -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
> +               ${D}${libdir}/bash/Makefile.inc
> +}
> +
>  do_install_ptest () {
>         make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
>         cp ${B}/Makefile ${D}${PTEST_PATH}
> --
> 2.33.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#196387):
> https://lists.openembedded.org/g/openembedded-core/message/196387
> Mute This Topic: https://lists.openembedded.org/mt/104624288/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
diff mbox series

Patch

diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index 2c3e605511..c8275c0443 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -74,6 +74,7 @@  do_install:append () {
 		mv ${D}${bindir}/bash ${D}${base_bindir}
 	fi
 }
+
 do_install:append:class-target () {
 	# Clean buildhost references in bashbug
 	sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
@@ -93,6 +94,26 @@  do_install:append:class-target () {
 		${D}${libdir}/bash/Makefile.inc
 }
 
+
+do_install:append:class-nativesdk () {
+	# Clean buildhost references in bashbug
+	sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+		-e "s,-I${WORKDIR}/\S* ,,g" \
+		-e 's|${DEBUG_PREFIX_MAP}||g' \
+		${D}${bindir}/bashbug
+
+	# Clean buildhost references in bash.pc
+	sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+	     ${D}${libdir}/pkgconfig/bash.pc
+
+	# Clean buildhost references in Makefile.inc
+	sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+		-e 's|${DEBUG_PREFIX_MAP}||g' \
+		-e 's:${HOSTTOOLS_DIR}/::g' \
+		-e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+		${D}${libdir}/bash/Makefile.inc
+}
+
 do_install_ptest () {
 	make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
 	cp ${B}/Makefile ${D}${PTEST_PATH}