Skip to contentSkip to conversation

snort,proftpd,net-snmp: Deal with -ffile-prefix-map as well

PATCH New Khem Raj 1 participant 2 messages Apr 29, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 snort,proftpd,net-snmp: Deal with -ffile-prefix-map as well

this is another option for reproducibility which can be used by compilers, and here consider processing it as well

---
 meta-networking/recipes-connectivity/snort/snort_2.9.17.1.bb | 2 +-
 meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb     | 1 +
 meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.bb   | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)
meta-networking/recipes-connectivity/snort/snort_2.9.17.1.bb +1 -1
index 9c20be537c..b5ff430993 100644
@@ -74,7 +74,7 @@ do_install_append() {
     install -d ${D}${sysconfdir}/default/volatiles
     install -m 0644 ${WORKDIR}/volatiles.99_snort ${D}${sysconfdir}/default/volatiles/99_snort
 
-    sed -i -e 's|-fdebug-prefix-map[^ ]*||g; s|-fmacro-prefix-map[^ ]*||g; s|${STAGING_DIR_TARGET}||g' ${D}${libdir}/pkgconfig/*.pc
+    sed -i -e 's|-ffile-prefix-map[^ ]*||g; s|-fdebug-prefix-map[^ ]*||g; s|-fmacro-prefix-map[^ ]*||g; s|${STAGING_DIR_TARGET}||g' ${D}${libdir}/pkgconfig/*.pc
 }
 
 pkg_postinst_${PN}() {
meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb +1 -0
index 1e4697a633..483c22a0d4 100644
@@ -109,6 +109,7 @@ do_install () {
 
     sed -e 's|--sysroot=${STAGING_DIR_HOST}||g' \
         -e 's|${STAGING_DIR_NATIVE}||g' \
+        -e 's|-ffile-prefix-map=[^ ]*||g' \
         -e 's|-fdebug-prefix-map=[^ ]*||g' \
         -e 's|-fmacro-prefix-map=[^ ]*||g' \
         -i ${D}/${bindir}/prxs
meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.bb +2 -0
index d9040c1647..de0aeeec7c 100644
@@ -120,6 +120,7 @@ do_install_append() {
     sed    -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \
         -i ${D}${bindir}/net-snmp-create-v3-user
     sed -e 's@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g' \
+        -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \
         -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \
         -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \
         -e 's@[^ ]*--sysroot=[^ "]*@@g' \
@@ -172,6 +173,7 @@ net_snmp_sysroot_preprocess () {
             -e "s@^includedir=.*@includedir=${STAGING_INCDIR}@g" \
             -e "s@^libdir=.*@libdir=${STAGING_LIBDIR}@g" \
             -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=${S}@g" \
+            -e "s@-ffile-prefix-map=${SNMP_DBGDIR}@-ffile-prefix-map=${WORKDIR}=${SNMP_DBGDIR}@g" \
             -e "s@-fdebug-prefix-map=${SNMP_DBGDIR}@-fdebug-prefix-map=${WORKDIR}=${SNMP_DBGDIR}@g" \
             -e "s@-fdebug-prefix-map= -fdebug-prefix-map=@-fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
                   -fdebug-prefix-map=${STAGING_DIR_HOST}=@g" \
Signature · 1 line
2.31.1
author
#1 lore raw

PATCH 2/2 apache2: Deal with -ffile-prefix-map

Filter out -ffile-prefix-map as well along with other -f*-prefix-map options

---
 meta-webserver/recipes-httpd/apache2/apache2_2.4.46.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-webserver/recipes-httpd/apache2/apache2_2.4.46.bb +2 -2
index 197cb83e64..e84f7eaa2a 100644
@@ -115,7 +115,7 @@ do_install_append_class-target() {
 
     sed -i -e 's,${STAGING_DIR_TARGET},,g' \
            -e 's,${DEBUG_PREFIX_MAP},,g' \
-           -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g' \
+           -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-ffile-prefix-map[^ ]*,,g' \
            -e 's,${HOSTTOOLS_DIR}/,,g' \
            -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
            -e 's,APU_CONFIG = .*,APU_CONFIG = ,g' ${D}${datadir}/apache2/build/config_vars.mk
@@ -123,7 +123,7 @@ do_install_append_class-target() {
     sed -i -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
            -e 's,${DEBUG_PREFIX_MAP},,g' \
            -e 's,${RECIPE_SYSROOT},,g' \
-           -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g' \
+           -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g' \
            -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
            -e 's,".*/configure","configure",g' ${D}${datadir}/apache2/build/config.nice
 
Signature · 1 line
2.31.1