libgphoto2: Edit out sysroot from CC variable in configure
PATCH 1/7 libgphoto2: Edit out sysroot from CC variable in configure
Configure emits HAVE_CC variable to be used in sourcecode and its built from CC env var, CC in OE contains buildpaths in --sysroot option, therefore edit this option out in configure.ac itself and remove all other workarounds to fix this issue in recipe
--- ...figure-Filter-out-buildpaths-from-CC.patch | 48 +++++++++++++++++++ .../gphoto2/libgphoto2_2.5.30.bb | 7 +-- 2 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 meta-oe/recipes-graphics/gphoto2/libgphoto2/0001-configure-Filter-out-buildpaths-from-CC.patch
meta-oe/recipes-graphics/gphoto2/libgphoto2/0001-configure-Filter-out-buildpaths-from-CC.patch new file +48 -0
@@ -0,0 +1,48 @@ +From 06be633b8f4e2241bd37d4faf62b49606ad778e7 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 25 May 2023 19:01:36 -0700 +Subject: [PATCH] configure: Filter out buildpaths from CC + +Upstream-Status: Inappropriate [Cross-compile specific] + +Signed-off-by: Khem Raj <[email protected]> +--- + configure.ac | 4 +++- + libgphoto2_port/configure.ac | 6 ++++-- + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 17216b1..39c8cc4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -261,7 +261,9 @@ GP_CONFIG_MSG([Compiler],[${CC}]) + GP_CONFIG_MSG([libltdl includes],[$LTDLINCL]) + GP_CONFIG_MSG([libltdl library],[$LIBLTDL]) + +-AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC"], ++CC_NO_SYSROOT=`echo $CC | sed -e \ ++ 's|--sysroot=.*\b||g'` ++AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC_NO_SYSROOT"], + [The C compiler we are using]) + + +diff --git a/libgphoto2_port/configure.ac b/libgphoto2_port/configure.ac +index 1086b8e..59f3c34 100644 +--- a/libgphoto2_port/configure.ac ++++ b/libgphoto2_port/configure.ac +@@ -103,8 +103,10 @@ GP_CONFIG_MSG([Compiler],[${CC}]) + GP_CONFIG_MSG([libltdl includes],[$LTDLINCL]) + GP_CONFIG_MSG([libltdl library],[$LIBLTDL]) + +-AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC"], +- [The C compiler we're using]) ++CC_NO_SYSROOT=`echo $CC | sed -e \ ++ 's|--sysroot=.*\b||g'` ++AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC_NO_SYSROOT"], ++ [The C compiler we are using]) + + AM_CPPFLAGS="" + +-- +2.40.1 +
meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.30.bb +1 -6
@@ -12,6 +12,7 @@ DEPENDS = "libtool jpeg virtual/libusb0 libexif zlib libxml2" SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/libgphoto2-${PV}.tar.bz2;name=libgphoto2 \ file://40-libgphoto2.rules \ file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \ + file://0001-configure-Filter-out-buildpaths-from-CC.patch \ " SRC_URI[libgphoto2.sha256sum] = "ee61a1dac6ad5cf711d114e06b90a6d431961a6e7ec59f4b757a7cd77b1c0fb4"
@@ -32,12 +33,6 @@ do_configure:append() { cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/libgphoto2_port/po/ cd ${S}/libgphoto2_port/ autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths - - # remove WORKDIR information from config to improve reproducibility - # libgphoto2_port recheck config will set the WORKDIR info again, so dont do that - sed -i 's/'$(echo ${WORKDIR} | sed 's_/_\\/_g')'/../g' ${B}/config.h - sed -i 's/'$(echo ${WORKDIR} | sed 's_/_\\/_g')'/../g' ${B}/libgphoto2_port/config.status - sed -i '/config\.status/ s/\-\-recheck//' ${B}/libgphoto2_port/Makefile cd ${S} }
Signature · 1 line
2.40.1
PATCH 2/7 tracker: Point TOP_SRCDIR to target path
source_root uses absolute path to build time srcdir which results in buildpath errors
Fixes
File /usr/bin/tracker3 in package tracker contains reference to TMPDIR [buildpaths]
--- .../0001-meson-Do-not-define-TOP_SRCDIR.patch | 24 +++++++++++++++++++ .../recipes-gnome/tracker/tracker_3.5.1.bb | 1 + 2 files changed, 25 insertions(+) create mode 100644 meta-gnome/recipes-gnome/tracker/tracker/0001-meson-Do-not-define-TOP_SRCDIR.patch
meta-gnome/recipes-gnome/tracker/tracker/0001-meson-Do-not-define-TOP_SRCDIR.patch new file +24 -0
@@ -0,0 +1,24 @@ +From 3e262192ffebf5d6fec92d5b7ba08348a94df1ae Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 25 May 2023 20:54:47 -0700 +Subject: [PATCH] meson: Do not define TOP_SRCDIR + +This is passed from build env + +Upstream-Status: Inappropriate [Cross compile specific] +Signed-off-by: Khem Raj <[email protected]> +--- + meson.build | 1 - + 1 file changed, 1 deletion(-) + +--- a/meson.build ++++ b/meson.build +@@ -353,7 +353,7 @@ subdir('utils') + + test_c_args = tracker_c_args + [ + '-DTOP_BUILDDIR="@0@"'.format(build_root), +- '-DTOP_SRCDIR="@0@"'.format(source_root), ++ '-DTOP_SRCDIR="@0@"'.format('/usr/src/debug/tracker'), + ] + + tracker_uninstalled_cli_dir = join_paths(meson.current_build_dir(), 'src', 'tracker')
meta-gnome/recipes-gnome/tracker/tracker_3.5.1.bb +1 -0
@@ -22,6 +22,7 @@ GNOMEBASEBUILDCLASS = "meson" inherit gnomebase gsettings gobject-introspection vala gtk-doc manpages bash-completion features_check python3native +SRC_URI += "file://0001-meson-Do-not-define-TOP_SRCDIR.patch" SRC_URI[archive.sha256sum] = "f972d50ac7bafdccf113b1eb99dcae35404685a99e55bfef16f3ac83b4de974d" # gobject-introspection is mandatory and cannot be configured
Signature · 1 line
2.40.1
PATCH 3/7 vlan: Pass CFLAGS via CCFLAGS
In reply to Khem RajCCFLAGS is used in Make rules which will ensure file remapping options are used when compiling
Fixes
WARNING: vlan-1.9-r0 do_package_qa: QA Issue: File /usr/sbin/.debug/vconfig.vlan in package vlan-dbg contains reference to TMPDIR [buildpaths]
--- meta-networking/recipes-connectivity/vlan/vlan_1.9.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-connectivity/vlan/vlan_1.9.bb +1 -1
@@ -28,7 +28,7 @@ do_configure:append () { # ignore strip to avoid yocto errors in stripping do_compile () { - oe_runmake PLATFORM=ARM 'STRIP=echo' all + oe_runmake PLATFORM=ARM 'STRIP=echo' CCFLAGS="${CFLAGS}" all } do_install () {
Signature · 1 line
2.40.1
PATCH 4/7 sgpio: Pass CFLAGS to make
In reply to Khem RajEnsures all compiler options are passed to build
--- meta-oe/recipes-extended/sgpio/sgpio_1.2.0.10.bb | 1 + 1 file changed, 1 insertion(+)
meta-oe/recipes-extended/sgpio/sgpio_1.2.0.10.bb +1 -0
@@ -14,6 +14,7 @@ S = "${WORKDIR}/${BPN}" LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://LICENSE_GPL;md5=393a5ca445f6965873eca0259a17f833" +EXTRA_OEMAKE = "CFLAGS='${CFLAGS}'" do_compile:prepend() { oe_runmake clean }
Signature · 1 line
2.40.1
PATCH 5/7 x265: Pass --debug-prefix-map to nasm
In reply to Khem RajEnsures absolute source paths are not emitted into nasm assembled objects
Fixes
WARNING: x265-3.2.1-r0 do_package_qa: QA Issue: File /usr/lib/.debug/libx265.so.179 in package x265-dbg contains reference to TMPDIR [buildpaths]
--- meta-multimedia/recipes-multimedia/x265/x265_3.2.1.bb | 4 ++++ 1 file changed, 4 insertions(+)
meta-multimedia/recipes-multimedia/x265/x265_3.2.1.bb +4 -0
@@ -17,6 +17,10 @@ SRC_URI[sha256sum] = "fb9badcf92364fd3567f8b5aa0e5e952aeea7a39a2b864387cec31e3b5 inherit lib_package pkgconfig cmake +do_generate_toolchain_file:append() { + echo "set(CMAKE_ASM_NASM_FLAGS --debug-prefix-map ${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR})" >> ${WORKDIR}/toolchain.cmake +} + EXTRA_OECMAKE:append:x86 = " -DENABLE_ASSEMBLY=OFF" EXTRA_OECMAKE:append:aarch64 = " -DENABLE_PIC=ON"
Signature · 1 line
2.40.1
PATCH 6/7 ipmiutil: Upgrade to 3.1.9
In reply to Khem RajChanges
03/12/2020 ARCress ipmiutil-3.1.6 changes (iver 3.16)
util/iconfig.c - fix Fedora bug 1811462 [abrt] ipmiutil config -a
util/ipmiutil.c - show version with usage in -h case
scripts/ipmiutil.env.template - renamed env as template
(contributed by mwilliams<at>illuminate.solutions)
scripts/Makefile.am - renamed env as template
scripts/checksel - also rm -f $ddir/sel.idx after isel -d
(contributed by eguzovsky<at>gmail.com)
doc/Makefile.am - change gzip -f to gzip -nf for man pages
(SR#40 patch from Jeremy Puhlman)
08/31/2020 ARCress ipmiutil-3.1.7 changes (iver 3.17)
setup/* - added Win msi setup files
lib/lanplus/lanplus.c - revert WIN IPv6 changes, add os_assert routine
lib/lanplus/lanplus_crypt.c - switch assert to os_assert/return lib/lanplus/lanplus_crypt_implc.c - switch assert to os_assert
util/ipmidir.h - AMD_SMB_1_STATUS_* 1< to 1<< (SF_SR#41)
util/isel.c - fix compile warning
util/ilan.c - fix compile warning
configure.ac - add --enable-doc option to allow not building documentation
contributed by Fabrice Fontaine (ffontaine)
util/isensor.c - add SDR conflict 0xC5 handling retries with delay
contributed by albertlav
11/15/2021 ARCress ipmiutil-3.1.8 changes (iver 3.18)
libeay32.dll - updated for Windows 64 lanplus
ssleay32.dll - updated for Windows 64 lanplus
util/oem_supermicro.c - disable DIMM decoding from SMBIOS for SuperMicro (albertlav) util/ilan.c - new -W option to limit lan settings
util/ipmicmd.h - add VENDOR_MITAC
util/subs.c - add VENDOR_MITAC
util/ipmilanplus.c - print reason if no lan2
util/ipmilan2.c - print reason if no lan2
util/isensor.c - never skip free_sdr_cache() SR#45
configure.ac - fix --disable-lanplus option to avoid random disables,
recognize openssl-3.0 for SSL flags
03/03/2023 ARCress ipmiutil-3.1.9 changes (iver 3.19)
util/isensor.c - fix -i get_idx_range to show last idx in range util/igetevent.c - fix printf extra arg
util/memif.c - SR56: try UEFI address 6d5a7000 if F0000 error configure.ac - Clang 16 fixes, resolve -Wimplicit-function-declaration issues
(Sam James [email protected] 11/16/2022)
lib/lanplus/lanplus.h - resolve implicit os_assert declaration (Sam James) util/ireset.c - SR58: remove is_romley case for ireset -D scripts/ipmiutil_wdt - SR43: changed $prog to $progn for Debian scripts/uninstall.vbs - SR53: add ; to fix path
SR53 (Windows): install libeay32.dll, ssleay32.dll into ipmiutil path also util/ipmidir.c - ipmi_open_direct(char)
util/mem_if.c - UCHAR/int
doc/ipmiutil.spec - enumerate ipmiutil.env, ipmiutil.env.template configure.ac - add -Wlto-type-mismatch to cfwarn
---
...imes-from-changing-resulting-gzip-md.patch | 25 -------------------
.../ipmiutil/ipmiutil/fix_systemd_path.patch | 25 ++++++++-----------
.../{ipmiutil_3.1.5.bb => ipmiutil_3.1.9.bb} | 4 +--
3 files changed, 11 insertions(+), 43 deletions(-)
delete mode 100644 meta-oe/recipes-kernel/ipmiutil/ipmiutil/0001-Prevent-access-times-from-changing-resulting-gzip-md.patch
rename meta-oe/recipes-kernel/ipmiutil/{ipmiutil_3.1.5.bb => ipmiutil_3.1.9.bb} (89%)meta-oe/recipes-kernel/ipmiutil/ipmiutil/0001-Prevent-access-times-from-changing-resulting-gzip-md.patch deleted +0 -25
@@ -1,25 +0,0 @@ -From da668e5bf1a721797361ab866d09913ee8e157c4 Mon Sep 17 00:00:00 2001 -From: Jeremy Puhlman <[email protected]> -Date: Sat, 22 Feb 2020 04:37:04 +0000 -Subject: [PATCH] Prevent access times from changing resulting gzip md5sum - -Upstream-Status: Pending -https://github.com/ipmitool/ipmitool/pull/186 ---- - doc/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/doc/Makefile.am b/doc/Makefile.am -index b792762..2c52ce6 100644 ---- a/doc/Makefile.am -+++ b/doc/Makefile.am -@@ -59,5 +59,5 @@ install: - ${INSTALL_DATA_SH} iuser.8 ${manto} - ${INSTALL_DATA_SH} iseltime.8 ${manto} - ${INSTALL_DATA_SH} bmclanpet.mib ${datato} -- cd ${manto}; gzip -f *.8 -+ cd ${manto}; gzip -nf *.8 - --- -2.13.3 -
meta-oe/recipes-kernel/ipmiutil/ipmiutil/fix_systemd_path.patch +10 -15
@@ -6,11 +6,9 @@ Upstream-Status: Inappropriate [Embedded] Signed-off-by: Armin Kuster <[email protected]> -Index: ipmiutil-3.0.5/configure.ac -=================================================================== ---- ipmiutil-3.0.5.orig/configure.ac -+++ ipmiutil-3.0.5/configure.ac -@@ -149,7 +149,6 @@ CROSS_LFLAGS="" +--- a/configure.ac ++++ b/configure.ac +@@ -151,7 +151,6 @@ CROSS_LFLAGS="" CROSS_CFLAGS="" LIBSENSORS="" SAM2OBJ="isensor2.o ievents2.o"
@@ -18,7 +16,7 @@ Index: ipmiutil-3.0.5/configure.ac AC_ARG_ENABLE([useflags], [ --enable-useflags include environment CFLAGS and LDFLAGS.], -@@ -200,29 +199,42 @@ AC_ARG_ENABLE([gpl], +@@ -211,29 +210,42 @@ AC_ARG_ENABLE([gpl], dnl Does this Linux have systemd enabled? Otherwise use sysv init. AC_ARG_ENABLE([systemd],
@@ -83,7 +81,7 @@ Index: ipmiutil-3.0.5/configure.ac fi dnl start main logic -@@ -528,7 +540,7 @@ AC_SUBST(INS_LIB) +@@ -563,7 +575,7 @@ AC_SUBST(INS_LIB) AC_SUBST(SUBDIR_S) AC_SUBST(CROSS_CFLAGS) AC_SUBST(CROSS_LFLAGS)
@@ -92,10 +90,8 @@ Index: ipmiutil-3.0.5/configure.ac AC_SUBST(SHR_LINK) AC_SUBST(pkgconfigdir) -Index: ipmiutil-3.0.5/scripts/Makefile.am -=================================================================== ---- ipmiutil-3.0.5.orig/scripts/Makefile.am -+++ ipmiutil-3.0.5/scripts/Makefile.am +--- a/scripts/Makefile.am ++++ b/scripts/Makefile.am @@ -17,7 +17,8 @@ cronto = ${DESTDIR}${etcdir}/cron.daily sbinto = ${DESTDIR}${sbindir} varto = ${DESTDIR}/var/lib/ipmiutil
@@ -106,7 +102,7 @@ Index: ipmiutil-3.0.5/scripts/Makefile.am sysvinit = ${datato} sbinfls = ialarms ihealth ifru igetevent ireset icmd isol ilan isensor isel iserial iwdt iconfig ipicmg ifirewall ifwum ihpm iuser -@@ -47,10 +48,14 @@ install: +@@ -47,10 +48,13 @@ install: ${INSTALL_SCRIPT_SH} ipmi_port.sh ${sysvinit}/ipmi_port ${INSTALL_SCRIPT_SH} ipmi_info ${sysvinit}/ipmi_info ${INSTALL_SCRIPT_SH} checksel ${datato}
@@ -114,7 +110,6 @@ Index: ipmiutil-3.0.5/scripts/Makefile.am - ${INSTALL_DATA_SH} ipmiutil_asy.service ${sysdto} - ${INSTALL_DATA_SH} ipmiutil_evt.service ${sysdto} - ${INSTALL_DATA_SH} ipmi_port.service ${sysdto} -+ + if [ ! -z "${systemddir}" ]; then \ + $(MKDIR) ${sysdto}; \ + ${INSTALL_DATA_SH} ipmiutil_wdt.service ${sysdto}; \
@@ -122,6 +117,6 @@ Index: ipmiutil-3.0.5/scripts/Makefile.am + ${INSTALL_DATA_SH} ipmiutil_evt.service ${sysdto}; \ + ${INSTALL_DATA_SH} ipmi_port.service ${sysdto}; \ + fi - ${INSTALL_SCRIPT_SH} ipmiutil.env ${datato} + ${INSTALL_SCRIPT_SH} ipmiutil.env.template ${datato} + ${INSTALL_SCRIPT_SH} ipmiutil.env.template ${datato}/ipmiutil.env ${INSTALL_SCRIPT_SH} ipmiutil.pre ${datato} - ${INSTALL_SCRIPT_SH} ipmiutil.setup ${datato}
meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.1.9.bb renamed from meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.1.5.bb +1 -3
@@ -21,11 +21,9 @@ PARALLEL_MAKE = "" SRC_URI = "${SOURCEFORGE_MIRROR}/ipmiutil/ipmiutil-${PV}.tar.gz \ file://fix_systemd_path.patch \ - file://0001-Prevent-access-times-from-changing-resulting-gzip-md.patch \ file://0001-ihpm-Include-stdlib.h-for-malloc-free-atoi-functions.patch \ " -SRC_URI[md5sum] = "292d6df25cad678bb27e5c8cdc6748f9" -SRC_URI[sha256sum] = "58ccdbd5755d7dd72478756715af09e9c73330dfad2b91dbf03d2ac504b301a3" +SRC_URI[sha256sum] = "5ae99bdd1296a8e25cea839784ec39ebca57b0e3701b2d440b8e02e22dc4bc95" inherit autotools-brokensep pkgconfig systemd
Signature · 1 line
2.40.1
PATCH 7/7 ipmiutil: Pass --enable-useflags
In reply to Khem RajThis ensures CFLAGS and LDFLAGS from environment are passed to build
Fixes
File /usr/sbin/.debug/iseltime in package ipmiutil-dbg contains reference to TMPDIR [buildpaths]
--- meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.1.9.bb | 1 + 1 file changed, 1 insertion(+)
meta-oe/recipes-kernel/ipmiutil/ipmiutil_3.1.9.bb +1 -0
@@ -43,4 +43,5 @@ PACKAGECONFIG[standalone] = "--enable-standalone, --enable-standalone=no" CFLAGS += "-I${STAGING_INCDIR}" LDFLAGS += "-L${STAGING_LIBDIR}" +EXTRA_OECONF += "--enable-useflags" COMPATIBLE_HOST = '(x86_64|i.86).*-linux'
Signature · 1 line
2.40.1