Skip to contentSkip to conversation

bash: improve reproducibility

PATCH Superseded Oleh Matiusha 2 participants 2 messages Feb 28, 2024

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bash: improve reproducibility

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

---
 meta/recipes-extended/bash/bash.inc | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
meta/recipes-extended/bash/bash.inc +21 -0
index 2c3e605511..c8275c0443 100644
@@ -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}
Signature · 1 line
2.33.0
#1 lore raw

Don’t copy paste from target install. Make a function.

Alex

Quoted 63 lines · Oleh Matiusha via lists.openembedded.org

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

---
 meta/recipes-extended/bash/bash.inc | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
meta/recipes-extended/bash/bash.inc +21 -1
index 2c3e605511..c8275c0443 100644
@@ -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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-