Skip to contentSkip to conversation

fvwm: Fix buildpaths QA Errors

PATCH New Khem Raj 1 participant 6 messages Aug 16, 2024

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/6 fvwm: Fix buildpaths QA Errors

---
 meta-oe/recipes-graphics/fvwm/fvwm_2.7.0.bb | 3 +++
 1 file changed, 3 insertions(+)
meta-oe/recipes-graphics/fvwm/fvwm_2.7.0.bb +3 -0
index df349494aa..fcf1bd9cae 100644
@@ -72,6 +72,8 @@ EXTRA_OECONF = " \
     --without-xpm-library \
     ac_cv_func_mkstemp=no \
     has_safety_mkstemp=yes \
+    ac_cv_path_FVWM_CPP=cpp \
+    ac_cv_path_PERL=perl \
 "
 
 # show the exact commands in the log file
@@ -90,6 +92,7 @@ do_install:append() {
     sed -i -e 's:${STAGING_BINDIR_NATIVE}/perl-native/perl:${USRBINPATH}/env perl:g' ${D}${bindir}/fvwm-*
     sed -i -e 's:${STAGING_BINDIR_NATIVE}/perl-native/perl:${USRBINPATH}/env perl:g' ${D}${libexecdir}/fvwm/*/Fvwm*
     sed -i -e 's:${STAGING_BINDIR_NATIVE}/python3-native/python3:${USRBINPATH}/env python3:g' ${D}${bindir}/fvwm-menu-desktop
+    sed -i -e 's:${WORKDIR}::g' ${D}${bindir}/fvwm-bug
 }
 
 # the only needed packages (note: locale packages are automatically generated
author
#1 lore raw

PATCH 2/6 proftpd: Upgrade to 1.3.8b

Fix buildpaths QA Errors while here

---
 .../{proftpd_1.3.7c.bb => proftpd_1.3.8b.bb}       | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
 rename meta-networking/recipes-daemons/proftpd/{proftpd_1.3.7c.bb => proftpd_1.3.8b.bb} (92%)
meta-networking/recipes-daemons/proftpd/proftpd_1.3.8b.bb renamed from meta-networking/recipes-daemons/proftpd/proftpd_1.3.7c.bb +10 -4
similarity index 92%
rename from meta-networking/recipes-daemons/proftpd/proftpd_1.3.7c.bb
rename to meta-networking/recipes-daemons/proftpd/proftpd_1.3.8b.bb
index aa8d5fabd6..33480bff2c 100644
@@ -4,8 +4,8 @@ HOMEPAGE = "http://www.proftpd.org"
 LICENSE = "GPL-2.0-or-later"
 LIC_FILES_CHKSUM = "file://COPYING;md5=fb0d1484d11915fa88a6a7702f1dc184"
 
-SRCREV = "75aa739805a6e05eeb31189934a3d324e7862962"
-BRANCH = "1.3.7"
+SRCREV = "0a7ea9b0ba9fcdf368374a226370d08f10397d99"
+BRANCH = "1.3.8"
 
 SRC_URI = "git://github.com/proftpd/proftpd.git;branch=${BRANCH};protocol=https \
            file://basic.conf.patch \
@@ -21,7 +21,7 @@ S = "${WORKDIR}/git"
 
 inherit autotools-brokensep useradd update-rc.d systemd multilib_script
 
-EXTRA_OECONF += "--enable-largefile"
+EXTRA_OECONF += "--enable-largefile INSTALL=install"
 
 PACKAGECONFIG ??= "shadow \
                    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \
@@ -70,6 +70,12 @@ do_configure () {
     install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
     install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
     oe_runconf
+    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 ${B}/config.h
 }
 
 FTPUSER = "ftp"
@@ -116,7 +122,7 @@ do_install () {
         -e 's|-ffile-prefix-map=[^ ]*||g' \
         -e 's|-fdebug-prefix-map=[^ ]*||g' \
         -e 's|-fmacro-prefix-map=[^ ]*||g' \
-        -i ${D}/${bindir}/prxs
+        -i ${D}/${bindir}/prxs ${D}${includedir}/proftpd/Make.rules ${D}${includedir}/proftpd/config.h 
 
     # ftpmail perl script, which reads the proftpd log file and sends
     # automatic email notifications once an upload finishs,
author
#2 lore raw

PATCH 3/6 botan: Make it reproducible

In reply to Khem Raj
---
 meta-oe/recipes-crypto/botan/botan_3.5.0.bb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
meta-oe/recipes-crypto/botan/botan_3.5.0.bb +4 -4
index d0e9d3e109..3a40680a45 100644
@@ -18,8 +18,8 @@ CPU:armv7ve = "armv7"
 
 do_configure() {
 	python3 ${S}/configure.py \
-	--prefix="${D}${exec_prefix}" \
-	--libdir="${D}${libdir}" \
+	--prefix="${exec_prefix}" \
+	--libdir="${libdir}" \
 	--cpu="${CPU}" \
 	--cc-bin="${CXX}" \
 	--cxxflags="${CXXFLAGS}" \
@@ -39,8 +39,8 @@ do_compile() {
 	oe_runmake
 }
 do_install() {
-	oe_runmake install
-	sed -i -e "s|${D}||g" ${D}${libdir}/pkgconfig/botan-3.pc
+	oe_runmake DESTDIR=${D} install
+	sed -i -e 's|${WORKDIR}|<scrubbed>|g' ${D}${includedir}/botan-3/botan/build.h
 }
 
 PACKAGES += "${PN}-python3"
author
#3 lore raw

PATCH 4/6 ndisc: Remove buildpaths from binaries

In reply to Khem Raj

configure emits its arguments into binaries via PACKAGE_CONFIGURE_INVOCATION therefore edit the paths from this in generated config.h before it gets into binaries.

---
 meta-networking/recipes-support/ndisc6/ndisc6_1.0.8.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta-networking/recipes-support/ndisc6/ndisc6_1.0.8.bb +4 -0
index a827e7f42a..fb00b83516 100644
@@ -27,6 +27,10 @@ do_configure:prepend() {
     ${S}/autogen.sh
 }
 
+do_configure:append() {
+    sed -i -e 's|${WORKDIR}|<scrubbed>|g' ${B}/config.h
+}
+
 do_install:append () {
     rm -rf ${D}${localstatedir}
     # Enable SUID bit for applications that need it
author
#4 lore raw

PATCH 5/6 python3-kivy: Remove buildpaths from comments in generated C sources

In reply to Khem Raj

Cython does not provide a direct option to disable or customize the metadata written in the generated C files. The metadata includes information like the Cython version and absolute paths to the original Cython files, which can be problematic for doing reproducible builds

Therefore edit out these comments from the cython generated C files they are nicely tucked between two known tags at the top of file.

---
 meta-python/recipes-devtools/python/python3-kivy_2.3.0.bb | 7 +++++++
 1 file changed, 7 insertions(+)
meta-python/recipes-devtools/python/python3-kivy_2.3.0.bb +7 -0
index 6bd7ce8ba3..045ac23106 100644
@@ -75,3 +75,10 @@ RDEPENDS:${PN} = " \
 # python3-kivy/2.3.0/git/kivy/graphics/cgl_backend/cgl_gl.c:4568:52: error: assignment to 'void (*)(GLuint,  GLsizei,  const GLchar **, const GLint *)' {aka 'void (*)(unsigned int,  int,  const char **, const int *)'} from incompatible pointer type 'void (*)(GLuint,  GLsizei,  const GLchar * const*, const GLint *)' {aka 'void (*)(unsigned int,  int,  const char * const*, const int *)'} [-Wincompatible-pointer-types]
 # python3-kivy/2.3.0/git/kivy/core/window/_window_sdl2.c:8781:23: error: passing argument 1 of 'SDL_SetEventFilter' from incompatible pointer type [-Wincompatible-pointer-types]
 CFLAGS += "-Wno-error=incompatible-pointer-types"
+
+do_compile:append() {
+    for f in `find ${B} -name *.c`
+    do
+        sed -i -e "/BEGIN: Cython Metadata/,/END: Cython Metadata/d" $f
+    done
+}
author
#5 lore raw

PATCH 6/6 keepalived: Make build reproducible

In reply to Khem Raj
---
 ...not-emit-compiler-flags-into-object-.patch | 29 +++++++++++++++++++
 .../keepalived/keepalived_2.2.8.bb            |  5 ++++
 2 files changed, 34 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/keepalived/keepalived/0001-configure.ac-Do-not-emit-compiler-flags-into-object-.patch
meta-networking/recipes-daemons/keepalived/keepalived/0001-configure.ac-Do-not-emit-compiler-flags-into-object-.patch new file +29 -0
new file mode 100644
index 0000000000..1f9f8b30b1
@@ -0,0 +1,29 @@
+From 5b1b04356f3efc08ae279cafc6ee86df11f10c9a Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 15 Aug 2024 23:13:02 -0700
+Subject: [PATCH] configure.ac: Do not emit compiler flags into object files
+
+They contain options which have absolute paths in them e.g. --sysroot
+therefore do not record them and make build reproducible
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ configure.ac | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index fae16f1..677b94a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -904,8 +904,7 @@ if test "$enable_hardening" != no; then
+ 	  "-Wp,-D_FORTIFY_SOURCE=2" \
+ 	  "-fexceptions" \
+ 	  "-fstack-protector-strong" \
+-	  "--param=ssp-buffer-size=4" \
+-	  "-grecord-gcc-switches"
++	  "--param=ssp-buffer-size=4"
+   do
+     AC_MSG_CHECKING([for $FLAG support])
+     CFLAGS="$CFLAGS $FLAG"
meta-networking/recipes-daemons/keepalived/keepalived_2.2.8.bb +5 -0
index 85f4a6aa59..c4d59d3caa 100644
@@ -11,6 +11,7 @@ LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 SRC_URI = "http://www.keepalived.org/software/${BP}.tar.gz \
+           file://0001-configure.ac-Do-not-emit-compiler-flags-into-object-.patch \
            "
 SRC_URI[sha256sum] = "85882eb62974f395d4c631be990a41a839594a7e62fbfebcb5649a937a7a1bb6"
 UPSTREAM_CHECK_URI = "https://github.com/acassen/keepalived/releases"
@@ -30,6 +31,10 @@ EXTRA_OEMAKE = "initdir=${sysconfdir}/init.d"
 
 export EXTRA_CFLAGS = "${CFLAGS}"
 
+do_configure:append() {
+    sed -i -e 's|${WORKDIR}|<scrubbed>|g' ${B}/lib/config.h
+}
+
 do_install:append() {
     if [ -f ${D}${sysconfdir}/init.d/${BPN} ]; then
         chmod 0755 ${D}${sysconfdir}/init.d/${BPN}