Skip to contentSkip to conversation

Patch review

PATCH New Armin Kuster 1 participant 13 messages Aug 8, 2022

lore
Share & tools
lore
#0 lore raw

cover Patch review

Please have comments back by Wednesday.

The following changes since commit 8f2dc1023482863e2630d1b94052c41ce748b38f:

tracker: upgrade 3.3.1 -> 3.3.2 (2022-07-26 07:27:26 -0700)

are available in the Git repository at:

git://git.openembedded.org/meta-openembedded-contrib stable/kirkstone-nut
http://cgit.openembedded.org/meta-openembedded-contrib/log/?h=stable/kirkstone-nut

Akash Hadke (1):
polkit: Add --shell /bin/nologin to polkitd user

Anuj Mittal (1):
yasm: fix buildpaths warning

Khem Raj (1):
ibus: Swith to use main branch instead of master

Marta Rybczynska (1):
polkit: update patches for musl compilation

Martin Jansa (1):
glmark2: fix compatibility with python-3.11

Mingli Yu (6):
net-snmp: set ac_cv_path_PSPROG
postgresql: Fix the buildpaths issue
freeradius: Fix buildpaths issue
openipmi: Fix buildpaths issue
apache2: Fix the buildpaths issue
frr: fix buildpaths issue

Vyacheslav Yurkov (1):
polkit: add udisks2 rule

Yi Zhao (1):
polkit-group-rule-udisks2: fix override syntax in RDEPENDS

 meta-gnome/recipes-support/ibus/ibus.inc      |   2 +-
 ...01-version.c-don-t-print-build-flags.patch |  41 +++++++
 .../freeradius/freeradius_3.0.21.bb           |   1 +
 .../recipes-protocols/frr/frr_8.2.2.bb        |   5 +
 .../net-snmp/net-snmp_5.9.1.bb                |   1 +
 .../openipmi/openipmi_2.0.32.bb               |   4 +
 ...b-fix-compatibility-with-python-3.11.patch |  76 ++++++++++++
 .../recipes-benchmark/glmark2/glmark2_git.bb  |   3 +-
 ...-config_info.c-not-expose-build-info.patch | 110 ++++++++++++++++++
 meta-oe/recipes-dbs/postgresql/postgresql.inc |   8 ++
 .../recipes-dbs/postgresql/postgresql_14.4.bb |   1 +
 meta-oe/recipes-devtools/yasm/yasm_git.bb     |   5 +
 .../files/50-org.freedesktop.udiskie.rules    |  24 ++++
 .../polkit/polkit-group-rule-udisks2.bb       |  17 +++
 ...ded-support-for-duktape-as-JS-engine.patch |  20 ++--
 ...0004-Make-netgroup-support-optional.patch} | 103 ++++++++--------
 ...ke-netgroup-support-optional-duktape.patch |  34 ++++++
 .../recipes-extended/polkit/polkit_0.119.bb   |   4 +-
 ...make_exports.awk-not-expose-the-path.patch |  32 +++++
 .../recipes-httpd/apache2/apache2_2.4.54.bb   |   1 +
 20 files changed, 426 insertions(+), 66 deletions(-)
 create mode 100644 meta-networking/recipes-connectivity/freeradius/files/0001-version.c-don-t-print-build-flags.patch
 create mode 100644 meta-oe/recipes-benchmark/glmark2/files/0001-waflib-fix-compatibility-with-python-3.11.patch
 create mode 100644 meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch
 create mode 100644 meta-oe/recipes-extended/polkit/files/50-org.freedesktop.udiskie.rules
 create mode 100644 meta-oe/recipes-extended/polkit/polkit-group-rule-udisks2.bb
 rename meta-oe/recipes-extended/polkit/polkit/{0003-make-netgroup-support-optional.patch => 0004-Make-netgroup-support-optional.patch} (74%)
 create mode 100644 meta-oe/recipes-extended/polkit/polkit/0005-Make-netgroup-support-optional-duktape.patch
 create mode 100644 meta-webserver/recipes-httpd/apache2/apache2/0001-make_exports.awk-not-expose-the-path.patch
Signature · 1 line
2.25.1
#4 lore raw

PATCH 5/13 polkit: update patches for musl compilation

From: Marta Rybczynska <[email protected]>

Update the patch to make netgroup support optional to fit the commit merged upstream [1], update the other patch depending on one of the changes.

Without this update, a compilation using duktape with musl fails with:

| ../../../polkit-0.119/src/polkitbackend/polkitbackendduktapeauthority.c: In function 'js_polkit_user_is_in_netgroup':
| ../../../polkit-0.119/src/polkitbackend/polkitbackendduktapeauthority.c:1039:7: warning: implicit declaration of function 'innetgr' [-Wimplicit-function-declaration]
|  1039 |   if (innetgr (netgroup,
|       |       ^~~~~~~

The main patch has been split in two, to apply the duktape part only when duktape is applied.

[1] https://gitlab.freedesktop.org/polkit/polkit/-/commit/b57deee8178190a7ecc75290fa13cf7daabc2c66

(cherry picked from commit 271282b1a5579179241748d5f0bdb8d2ea013dd6)

{Fixup for kirkstone content; exlude Ducktape chages]

---
 ...ded-support-for-duktape-as-JS-engine.patch |  20 ++--
 ...0004-Make-netgroup-support-optional.patch} | 103 +++++++++---------
 ...ke-netgroup-support-optional-duktape.patch |  34 ++++++
 .../recipes-extended/polkit/polkit_0.119.bb   |   2 +-
 4 files changed, 96 insertions(+), 63 deletions(-)
 rename meta-oe/recipes-extended/polkit/polkit/{0003-make-netgroup-support-optional.patch => 0004-Make-netgroup-support-optional.patch} (74%)
 create mode 100644 meta-oe/recipes-extended/polkit/polkit/0005-Make-netgroup-support-optional-duktape.patch
meta-oe/recipes-extended/polkit/polkit/0003-Added-support-for-duktape-as-JS-engine.patch +8 -12
index e44e4f6e4a..b8562f8ce2 100644
@@ -1,15 +1,18 @@
-From eaecfb21e1bca42e99321cc731e21dbfc1ea0d0c Mon Sep 17 00:00:00 2001
+From 4af72493cb380ab5ce0dd7c5bcd25a8b5457d770 Mon Sep 17 00:00:00 2001
 From: Gustavo Lima Chaves <[email protected]>
 Date: Tue, 25 Jan 2022 09:43:21 +0000
-Subject: [PATCH 3/3] Added support for duktape as JS engine
+Subject: [PATCH] Added support for duktape as JS engine
 
 Original author: Wu Xiaotian (@yetist)
 Resurrection author, runaway-killer author: Gustavo Lima Chaves (@limachaves)
 
 Signed-off-by: Mikko Rapeli <[email protected]>
 
+Upstream-Status: Backport [c7fc4e1b61f0fd82fc697c19c604af7e9fb291a2]
+Dropped change to .gitlab-ci.yml and adapted configure.ac due to other
+patches in meta-oe.
+
 ---
- .gitlab-ci.yml                                |    1 +
  buildutil/ax_pthread.m4                       |  522 ++++++++
  configure.ac                                  |   34 +-
  docs/man/polkit.xml                           |    4 +-
@@ -23,16 +26,12 @@ Signed-off-by: Mikko Rapeli <[email protected]>
  .../polkitbackendjsauthority.cpp              |  721 +----------
  .../etc/polkit-1/rules.d/10-testing.rules     |    6 +-
  .../test-polkitbackendjsauthority.c           |    2 +-
- 14 files changed, 2399 insertions(+), 678 deletions(-)
+ 13 files changed, 2398 insertions(+), 678 deletions(-)
  create mode 100644 buildutil/ax_pthread.m4
  create mode 100644 src/polkitbackend/polkitbackendcommon.c
  create mode 100644 src/polkitbackend/polkitbackendcommon.h
  create mode 100644 src/polkitbackend/polkitbackendduktapeauthority.c
 
-Upstream-Status: Backport [c7fc4e1b61f0fd82fc697c19c604af7e9fb291a2]
-Dropped change to .gitlab-ci.yml and adapted configure.ac due to other
-patches in meta-oe.
-
 diff --git a/buildutil/ax_pthread.m4 b/buildutil/ax_pthread.m4
 new file mode 100644
 index 0000000..9f35d13
@@ -603,7 +602,7 @@ index b625743..bbf4768 100644
 +CC="$PTHREAD_CC"
 +AC_CHECK_FUNCS([pthread_condattr_setclock])
 +
- AC_CHECK_FUNCS(clearenv fdatasync setnetgrent)
+ AC_CHECK_FUNCS(clearenv fdatasync)
  
  if test "x$GCC" = "xyes"; then
 @@ -581,6 +598,13 @@ echo "
@@ -3458,6 +3457,3 @@ index f97e0e0..2103b17 100644
    },
  
    {
--- 
-2.20.1
-
meta-oe/recipes-extended/polkit/polkit/0004-Make-netgroup-support-optional.patch renamed from meta-oe/recipes-extended/polkit/polkit/0003-make-netgroup-support-optional.patch +53 -50

177 lines not on this page · raw message

meta-oe/recipes-extended/polkit/polkit/0005-Make-netgroup-support-optional-duktape.patch new file +34 -0
new file mode 100644
index 0000000000..12988ad94f
@@ -0,0 +1,34 @@
+From 792f8e2151c120ec51b50a4098e4f9642409cbec Mon Sep 17 00:00:00 2001
+From: Marta Rybczynska <[email protected]>
+Date: Fri, 29 Jul 2022 11:52:59 +0200
+Subject: [PATCH] Make netgroup support optional
+
+This patch adds a fragment of the netgroup patch to apply on the duktape-related
+code. This change is needed to compile with duktape+musl.
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/polkit/polkit/-/commit/b57deee8178190a7ecc75290fa13cf7daabc2c66]
+Signed-off-by: Marta Rybczynska <[email protected]>
+---
+ src/polkitbackend/polkitbackendduktapeauthority.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
+index c89dbcf..58a5936 100644
+--- a/src/polkitbackend/polkitbackendduktapeauthority.c
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -1036,6 +1036,7 @@ js_polkit_user_is_in_netgroup (duk_context *cx)
+   user = duk_require_string (cx, 0);
+   netgroup = duk_require_string (cx, 1);
+ 
++#ifdef HAVE_SETNETGRENT
+   if (innetgr (netgroup,
+                NULL,  /* host */
+                user,
+@@ -1043,6 +1044,7 @@ js_polkit_user_is_in_netgroup (duk_context *cx)
+     {
+       is_in_netgroup = TRUE;
+     }
++#endif
+ 
+   duk_push_boolean (cx, is_in_netgroup);
+   return 1;
meta-oe/recipes-extended/polkit/polkit_0.119.bb +1 -1
index 9444cb9f2d..eff80cd43d 100644
@@ -24,10 +24,10 @@ PACKAGECONFIG[consolekit] = ",,,consolekit"
 PAM_SRC_URI = "file://polkit-1_pam.patch"
 SRC_URI = "http://www.freedesktop.org/software/polkit/releases/polkit-${PV}.tar.gz \
            ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
-           file://0003-make-netgroup-support-optional.patch \
            file://0001-pkexec-local-privilege-escalation-CVE-2021-4034.patch \
            file://0002-CVE-2021-4115-GHSL-2021-077-fix.patch \
            file://0003-Added-support-for-duktape-as-JS-engine.patch \
+           file://0004-Make-netgroup-support-optional.patch \
            "
 SRC_URI[sha256sum] = "c8579fdb86e94295404211285fee0722ad04893f0213e571bd75c00972fd1f5c"
 
Signature · 1 line
2.25.1
#5 lore raw

PATCH 6/13 ibus: Swith to use main branch instead of master

In reply to Armin Kuster

From: Khem Raj <[email protected]>

Upstream has switched to using main for tip of trunk, therefore follow it here in SRC_URI as well.

(cherry picked from commit ca5f1dde541689f6a479a914ec742a3bf46dfbe1)
---
 meta-gnome/recipes-support/ibus/ibus.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-gnome/recipes-support/ibus/ibus.inc +1 -1
index 37a490abe0..bb662f2ec9 100644
@@ -10,7 +10,7 @@ PV = "1.5.26"
 DEPENDS = "unicode-ucd"
 
 SRC_URI = " \
-    git://github.com/ibus/ibus.git;branch=master;protocol=https \
+    git://github.com/ibus/ibus.git;branch=main;protocol=https \
     file://0001-Do-not-try-to-start-dbus-we-do-not-have-dbus-lauch.patch \
 "
 SRCREV = "6a70ab0338206bd1c7d01a4e1874ea0ee5b3a9d3"
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/13 polkit: add udisks2 rule

In reply to Armin Kuster

From: Vyacheslav Yurkov <[email protected]>

The rule allows non-priviledged users from plugdev group to mount/unmount block devices

(cherry picked from commit d7ff4a77241fc79fc704a0d9d6b414b52f025531)
---
 .../files/50-org.freedesktop.udiskie.rules    | 24 +++++++++++++++++++
 .../polkit/polkit-group-rule-udisks2.bb       | 17 +++++++++++++
 2 files changed, 41 insertions(+)
 create mode 100644 meta-oe/recipes-extended/polkit/files/50-org.freedesktop.udiskie.rules
 create mode 100644 meta-oe/recipes-extended/polkit/polkit-group-rule-udisks2.bb
meta-oe/recipes-extended/polkit/files/50-org.freedesktop.udiskie.rules new file +24 -0
new file mode 100644
index 0000000000..2ffa4087a8
@@ -0,0 +1,24 @@
+polkit.addRule(function(action, subject) {
+  var YES = polkit.Result.YES;
+  var permission = {
+    // required for udisks1:
+    "org.freedesktop.udisks.filesystem-mount": YES,
+    "org.freedesktop.udisks.luks-unlock": YES,
+    "org.freedesktop.udisks.drive-eject": YES,
+    "org.freedesktop.udisks.drive-detach": YES,
+    // required for udisks2:
+    "org.freedesktop.udisks2.filesystem-mount": YES,
+    "org.freedesktop.udisks2.encrypted-unlock": YES,
+    "org.freedesktop.udisks2.eject-media": YES,
+    "org.freedesktop.udisks2.power-off-drive": YES,
+    // required for udisks2 if using udiskie from another seat (e.g. systemd):
+    "org.freedesktop.udisks2.filesystem-mount-other-seat": YES,
+    "org.freedesktop.udisks2.filesystem-unmount-others": YES,
+    "org.freedesktop.udisks2.encrypted-unlock-other-seat": YES,
+    "org.freedesktop.udisks2.eject-media-other-seat": YES,
+    "org.freedesktop.udisks2.power-off-drive-other-seat": YES
+  };
+  if (subject.isInGroup("plugdev")) {
+    return permission[action.id];
+  }
+});
meta-oe/recipes-extended/polkit/polkit-group-rule-udisks2.bb new file +17 -0
new file mode 100644
index 0000000000..ae024d0328
@@ -0,0 +1,17 @@
+DESCRIPTION = "Polkit rule to allow non-priviledged users mount/umount block devices via udisks2"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+require polkit-group-rule.inc
+
+# The file originates from https://github.com/coldfix/udiskie/wiki/Permissions
+SRC_URI = "file://50-org.freedesktop.udiskie.rules"
+
+RDEPENDS_${PN} += "udisks2"
+
+do_install() {
+    install -m 0755 ${WORKDIR}/50-org.freedesktop.udiskie.rules ${D}${sysconfdir}/polkit-1/rules.d
+}
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "--system plugdev"
Signature · 1 line
2.25.1
#2 lore raw

PATCH 3/13 polkit-group-rule-udisks2: fix override syntax in RDEPENDS

In reply to Armin Kuster

From: Yi Zhao <[email protected]>

RDEPENDS_${PN} -> RDEPENDS:${PN}

(cherry picked from commit 10b508deacd8ff588b1511d077fcdd708deb653a)
---
 meta-oe/recipes-extended/polkit/polkit-group-rule-udisks2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-extended/polkit/polkit-group-rule-udisks2.bb +1 -1
index ae024d0328..db2ed015b4 100644
@@ -7,7 +7,7 @@ require polkit-group-rule.inc
 # The file originates from https://github.com/coldfix/udiskie/wiki/Permissions
 SRC_URI = "file://50-org.freedesktop.udiskie.rules"
 
-RDEPENDS_${PN} += "udisks2"
+RDEPENDS:${PN} += "udisks2"
 
 do_install() {
     install -m 0755 ${WORKDIR}/50-org.freedesktop.udiskie.rules ${D}${sysconfdir}/polkit-1/rules.d
Signature · 1 line
2.25.1
#3 lore raw

PATCH 4/13 polkit: Add --shell /bin/nologin to polkitd user

In reply to Armin Kuster

From: Akash Hadke <[email protected]>

polkitd user has default access to /bin/sh, add --shell /bin/nologin to remove default access to /bin/sh and avoid login through it.

(cherry picked from commit 7ca63e5454bd7cbdb5ac58f6b5913e3387b64201)
---
 meta-oe/recipes-extended/polkit/polkit_0.119.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-extended/polkit/polkit_0.119.bb +1 -1
index 66bbf735f0..9444cb9f2d 100644
@@ -58,7 +58,7 @@ FILES:${PN}:append = " \
 FILES:${PN}-examples = "${bindir}/*example*"
 
 USERADD_PACKAGES = "${PN}"
-USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 polkitd"
+USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd"
 
 SYSTEMD_SERVICE:${PN} = "${BPN}.service"
 SYSTEMD_AUTO_ENABLE = "disable"
Signature · 1 line
2.25.1
#6 lore raw

PATCH 7/13 net-snmp: set ac_cv_path_PSPROG

In reply to Armin Kuster

From: Mingli Yu <[email protected]>

Fixes:
WARNING: net-snmp-5.9.1-r0 do_package_qa: QA Issue: File /usr/include/net-snmp/net-snmp-config-64.h in package net-snmp-dev contains reference to TMPDIR File /usr/bin/net-snmp-create-v3-user in package net-snmp-dev contains reference to TMPDIR [buildpaths]
WARNING: net-snmp-5.9.1-r0 do_package_qa: QA Issue: File /usr/lib/net-snmp/ptest/include/net-snmp/net-snmp-config.h in package net-snmp-ptest contains reference to TMPDIR [buildpaths]

(cherry picked from commit 1bf83255aee9850bf5ce5138c4bdefbe9eeb120c)
---
 meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.1.bb | 1 +
 1 file changed, 1 insertion(+)
meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.1.bb +1 -0
index 5f887b8868..30c0ce74cb 100644
@@ -72,6 +72,7 @@ CACHED_CONFIGUREVARS = " \
     ac_cv_ETC_MNTTAB=/etc/mtab \
     lt_cv_shlibpath_overrides_runpath=yes \
     ac_cv_path_UNAMEPROG=${base_bindir}/uname \
+    ac_cv_path_PSPROG=${base_bindir}/ps \
     ac_cv_file__etc_printcap=no \
     NETSNMP_CONFIGURE_OPTIONS= \
 "
Signature · 1 line
2.25.1
#7 lore raw

PATCH 8/13 postgresql: Fix the buildpaths issue

In reply to Armin Kuster

From: Mingli Yu <[email protected]>

Fixes:
WARNING: postgresql-14.4-r0 do_package_qa: QA Issue: File /usr/bin/postgres in package postgresql contains reference to TMPDIR
File /usr/bin/pg_config in package postgresql contains reference to TMPDIR [buildpaths]
WARNING: postgresql-14.4-r0 do_package_qa: QA Issue: File /usr/include/pg_config.h in package libpq-dev contains reference to TMPDIR [buildpaths]
WARNING: postgresql-14.4-r0 do_package_qa: QA Issue: File /usr/include/postgresql/server/pg_config.h in package postgresql-server-dev contains reference to TMPDIR File /usr/lib/postgresql/pgxs/src/Makefile.global in package postgresql-server-dev contains reference to TMPDIR [buildpaths]
WARNING: postgresql-14.4-r0 do_package_qa: QA Issue: File /usr/lib/libpgcommon.a in package postgresql-staticdev contains reference to TMPDIR File /usr/lib/libpgcommon_shlib.a in package postgresql-staticdev contains reference to TMPDIR [buildpaths]

(cherry picked from commit 59eff6269c4f4c150d976054d585872c92f20207)
---
 ...-config_info.c-not-expose-build-info.patch | 110 ++++++++++++++++++
 meta-oe/recipes-dbs/postgresql/postgresql.inc |   8 ++
 .../recipes-dbs/postgresql/postgresql_14.4.bb |   1 +
 3 files changed, 119 insertions(+)
 create mode 100644 meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch
meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch new file +110 -0
new file mode 100644
index 0000000000..101a748776
@@ -0,0 +1,110 @@
+From b92eebe8b0760fee7bd55c6c22318620c2c07579 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <[email protected]>
+Date: Mon, 1 Aug 2022 15:44:38 +0800
+Subject: [PATCH] config_info.c: not expose build info
+
+Don't collect the build information to fix the buildpaths issue.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Mingli Yu <[email protected]>
+---
+ configure.ac             |  2 +-
+ src/common/config_info.c | 68 ----------------------------------------
+ 2 files changed, 1 insertion(+), 69 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0eb595b..508487b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 1996-2021, PostgreSQL Global Development Group])
+ AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
+ AC_CONFIG_AUX_DIR(config)
+ AC_PREFIX_DEFAULT(/usr/local/pgsql)
+-AC_DEFINE_UNQUOTED(CONFIGURE_ARGS, ["$ac_configure_args"], [Saved arguments from configure])
++AC_DEFINE_UNQUOTED(CONFIGURE_ARGS, ["ac_configure_args"], [Saved arguments from configure])
+ 
+ [PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`]
+ [PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`]
+diff --git a/src/common/config_info.c b/src/common/config_info.c
+index e72e729..b482c20 100644
+--- a/src/common/config_info.c
++++ b/src/common/config_info.c
+@@ -123,74 +123,6 @@ get_configdata(const char *my_exec_path, size_t *configdata_len)
+ 	configdata[i].setting = pstrdup(path);
+ 	i++;
+ 
+-	configdata[i].name = pstrdup("CONFIGURE");
+-	configdata[i].setting = pstrdup(CONFIGURE_ARGS);
+-	i++;
+-
+-	configdata[i].name = pstrdup("CC");
+-#ifdef VAL_CC
+-	configdata[i].setting = pstrdup(VAL_CC);
+-#else
+-	configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+-	i++;
+-
+-	configdata[i].name = pstrdup("CPPFLAGS");
+-#ifdef VAL_CPPFLAGS
+-	configdata[i].setting = pstrdup(VAL_CPPFLAGS);
+-#else
+-	configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+-	i++;
+-
+-	configdata[i].name = pstrdup("CFLAGS");
+-#ifdef VAL_CFLAGS
+-	configdata[i].setting = pstrdup(VAL_CFLAGS);
+-#else
+-	configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+-	i++;
+-
+-	configdata[i].name = pstrdup("CFLAGS_SL");
+-#ifdef VAL_CFLAGS_SL
+-	configdata[i].setting = pstrdup(VAL_CFLAGS_SL);
+-#else
+-	configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+-	i++;
+-
+-	configdata[i].name = pstrdup("LDFLAGS");
+-#ifdef VAL_LDFLAGS
+-	configdata[i].setting = pstrdup(VAL_LDFLAGS);
+-#else
+-	configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+-	i++;
+-
+-	configdata[i].name = pstrdup("LDFLAGS_EX");
+-#ifdef VAL_LDFLAGS_EX
+-	configdata[i].setting = pstrdup(VAL_LDFLAGS_EX);
+-#else
+-	configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+-	i++;
+-
+-	configdata[i].name = pstrdup("LDFLAGS_SL");
+-#ifdef VAL_LDFLAGS_SL
+-	configdata[i].setting = pstrdup(VAL_LDFLAGS_SL);
+-#else
+-	configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+-	i++;
+-
+-	configdata[i].name = pstrdup("LIBS");
+-#ifdef VAL_LIBS
+-	configdata[i].setting = pstrdup(VAL_LIBS);
+-#else
+-	configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+-	i++;
+-
+ 	configdata[i].name = pstrdup("VERSION");
+ 	configdata[i].setting = pstrdup("PostgreSQL " PG_VERSION);
+ 	i++;
+-- 
+2.25.1
+
meta-oe/recipes-dbs/postgresql/postgresql.inc +8 -0
index 00c0107469..bef33e6bb4 100644
@@ -215,6 +215,14 @@ do_install:append() {
     install -m 0644 ${WORKDIR}/postgresql.service ${D}${systemd_unitdir}/system
     sed -i -e 's,@BINDIR@,${bindir},g' \
         ${D}${systemd_unitdir}/system/postgresql.service
+    # Remove the build path
+    if [ -f ${D}${libdir}/${BPN}/pgxs/src/Makefile.global ]; then
+        sed -i -e 's#${RECIPE_SYSROOT}##g' \
+               -e 's#${RECIPE_SYSROOT_NATIVE}##g' \
+               -e 's#${WORKDIR}##g' \
+               -e 's#${TMPDIR}##g' \
+             ${D}${libdir}/${BPN}/pgxs/src/Makefile.global
+    fi
 }
 
 SSTATE_SCAN_FILES += "Makefile.global"
meta-oe/recipes-dbs/postgresql/postgresql_14.4.bb +1 -0
index 64e83b2cde..1daab22f92 100644
@@ -8,6 +8,7 @@ SRC_URI += "\
    file://0001-Improve-reproducibility.patch \
    file://0001-configure.ac-bypass-autoconf-2.69-version-check.patch \
    file://remove_duplicate.patch \
+   file://0001-config_info.c-not-expose-build-info.patch \
 "
 
 SRC_URI[sha256sum] = "c23b6237c5231c791511bdc79098617d6852e9e3bdf360efd8b5d15a1a3d8f6a"
Signature · 1 line
2.25.1
#8 lore raw

PATCH 9/13 freeradius: Fix buildpaths issue

In reply to Armin Kuster

From: Mingli Yu <[email protected]>

Fixes:
WARNING: freeradius-3.0.21-r0 do_package_qa: QA Issue: File /usr/bin/radeapclient in package freeradius-utils contains reference to TMPDIR [buildpaths]
WARNING: freeradius-3.0.21-r0 do_package_qa: QA Issue: File /usr/lib/libfreeradius-server.so.0.0.0 in package freeradius contains reference to TMPDIR [buildpaths]

(cherry picked from commit 1c91de67b4981f62ddc7308bf88c1a6f4a844fdb)
---
 ...01-version.c-don-t-print-build-flags.patch | 41 +++++++++++++++++++
 .../freeradius/freeradius_3.0.21.bb           |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/freeradius/files/0001-version.c-don-t-print-build-flags.patch
meta-networking/recipes-connectivity/freeradius/files/0001-version.c-don-t-print-build-flags.patch new file +41 -0
new file mode 100644
index 0000000000..697205efe0
@@ -0,0 +1,41 @@
+From cbc64dcf6aa2a1be63f45ea6dd7d2c49b70a0bee Mon Sep 17 00:00:00 2001
+From: Mingli Yu <[email protected]>
+Date: Wed, 3 Aug 2022 16:44:29 +0800
+Subject: [PATCH] version.c: don't print build flags
+
+Don't print the build flags to avoid collecting the build environment info.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Mingli Yu <[email protected]>
+---
+ src/main/version.c | 13 -------------
+ 1 file changed, 13 deletions(-)
+
+diff --git a/src/main/version.c b/src/main/version.c
+index 62972d9f53..cf81de72c9 100644
+--- a/src/main/version.c
++++ b/src/main/version.c
+@@ -589,19 +589,6 @@ void version_print(void)
+ 		DEBUG2("  unknown");
+ #endif
+ 
+-		DEBUG2("Compilation flags:");
+-#ifdef BUILT_WITH_CPPFLAGS
+-		DEBUG2("  cppflags : " BUILT_WITH_CPPFLAGS);
+-#endif
+-#ifdef BUILT_WITH_CFLAGS
+-		DEBUG2("  cflags   : " BUILT_WITH_CFLAGS);
+-#endif
+-#ifdef BUILT_WITH_LDFLAGS
+-		DEBUG2("  ldflags  : " BUILT_WITH_LDFLAGS);
+-#endif
+-#ifdef BUILT_WITH_LIBS
+-		DEBUG2("  libs     : " BUILT_WITH_LIBS);
+-#endif
+ 		DEBUG2("  ");
+ 	}
+ 	INFO("FreeRADIUS Version " RADIUSD_VERSION_STRING);
+-- 
+2.25.1
+
meta-networking/recipes-connectivity/freeradius/freeradius_3.0.21.bb +1 -0
index d6477e340e..1407b798b5 100644
@@ -32,6 +32,7 @@ SRC_URI = "git://github.com/FreeRADIUS/freeradius-server.git;branch=v3.0.x;lfs=0
     file://radiusd.service \
     file://radiusd-volatiles.conf \
     file://check-openssl-cmds-in-script-bootstrap.patch \
+    file://0001-version.c-don-t-print-build-flags.patch \
 "
 
 raddbdir="${sysconfdir}/${MLPREFIX}raddb"
Signature · 1 line
2.25.1
#9 lore raw

PATCH 10/13 openipmi: Fix buildpaths issue

In reply to Armin Kuster

From: Mingli Yu <[email protected]>

Fixes:
WARNING: openipmi-2.0.32-r0 do_package_qa: QA Issue: File /usr/src/debug/openipmi/2.0.32-r0/OpenIPMI-2.0.32/swig/perl/OpenIPMI_wrap.c in package openipmi-src contains reference to TMPDIR [buildpaths]

(cherry picked from commit 5abd81567d5ed091ed870abf24e51f260747d593)
---
 meta-networking/recipes-support/openipmi/openipmi_2.0.32.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta-networking/recipes-support/openipmi/openipmi_2.0.32.bb +4 -0
index c61303b81e..8625afaa74 100644
@@ -85,6 +85,10 @@ do_configure () {
     done
 }
 
+do_compile:append () {
+    sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' ${S}/swig/perl/OpenIPMI_wrap.c
+}
+
 do_install:append () {
     echo "SAL: D = $D"
     echo "SAL: libdir = $libdir"
Signature · 1 line
2.25.1
#10 lore raw

PATCH 11/13 apache2: Fix the buildpaths issue

In reply to Armin Kuster

From: Mingli Yu <[email protected]>

Fixes:
WARNING: apache2-2.4.54-r0 do_package_qa: QA Issue: File /usr/src/debug/apache2/2.4.54-r0/build/server/exports.c in package apache2-src contains reference to TMPDIR [buildpaths]

Before the patch:

  # cat ./build/server/exports.c
  [snip]
  #include "mpm_fdqueue.h"
  const void *ap_ugly_hack = NULL;

/*
* /buildarea/build/tmp-glibc/work/core2-32-wrs-linux/apache2/2.4.54-r0/httpd-2.4.54/include/ap_expr.h */
const void *ap_hack_ap_expr_exec = (const void *)ap_expr_exec;
[snip]

After the patch:

  # cat ./build/server/exports.c
  [snip]
  #include "mpm_fdqueue.h"
  const void *ap_ugly_hack = NULL;

/*
* ap_expr.h
*/
const void *ap_hack_ap_expr_exec = (const void *)ap_expr_exec; [snip]

(cherry picked from commit 4f2025e8d2f1626e97f7e9e675ce3c7d45477807)
---
 ...make_exports.awk-not-expose-the-path.patch | 32 +++++++++++++++++++
 .../recipes-httpd/apache2/apache2_2.4.54.bb   |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta-webserver/recipes-httpd/apache2/apache2/0001-make_exports.awk-not-expose-the-path.patch
meta-webserver/recipes-httpd/apache2/apache2/0001-make_exports.awk-not-expose-the-path.patch new file +32 -0
new file mode 100644
index 0000000000..78f23f0f2d
@@ -0,0 +1,32 @@
+From 5b5eae9cdf3bae91756c717349f2f33a31888f24 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <[email protected]>
+Date: Wed, 3 Aug 2022 12:35:16 +0800
+Subject: [PATCH] make_exports.awk: not expose the path
+
+Don't print the full path in the comment line.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Mingli Yu <[email protected]>
+---
+ build/make_exports.awk | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/build/make_exports.awk b/build/make_exports.awk
+index 1cf0568..44d93c5 100644
+--- a/build/make_exports.awk
++++ b/build/make_exports.awk
+@@ -47,7 +47,9 @@ function push(line) {
+ 
+ function do_output() {
+     printf("/*\n")
+-    printf(" * %s\n", FILENAME)
++    file = FILENAME
++    sub("([^/]*[/])*", "", file)
++    printf(" * %s\n", file)
+     printf(" */\n")
+     
+     for (i = 0; i < stackptr; i++) {
+-- 
+2.25.1
+
meta-webserver/recipes-httpd/apache2/apache2_2.4.54.bb +1 -0
index 4b0ed2f622..37d498f52e 100644
@@ -15,6 +15,7 @@ SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \
            file://0007-apache2-allow-to-disable-selinux-support.patch \
            file://0008-Fix-perl-install-directory-to-usr-bin.patch \
            file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
+           file://0001-make_exports.awk-not-expose-the-path.patch \
           "
 
 SRC_URI:append:class-target = " \
Signature · 1 line
2.25.1
#11 lore raw

PATCH 12/13 frr: fix buildpaths issue

In reply to Armin Kuster

From: Mingli Yu <[email protected]>

Fixes:
WARNING: frr-8.2.2-r0 do_package_qa: QA Issue: File /usr/lib/libfrr.a in package frr-staticdev contains reference to TMPDIR [buildpaths]
WARNING: frr-8.2.2-r0 do_package_qa: QA Issue: File /usr/src/debug/frr/8.2.2-r0/git/lib/version.h in package frr-src contains reference to TMPDIR [buildpaths]
WARNING: frr-8.2.2-r0 do_package_qa: QA Issue: File /usr/include/frr/version.h in package frr-dev contains reference to TMPDIR [buildpaths]
WARNING: frr-8.2.2-r0 do_package_qa: QA Issue: File /usr/bin/vtysh in package frr contains reference to TMPDIR
File /usr/lib/libfrr.so.0.0.0 in package frr contains reference to TMPDIR [buildpaths]

(cherry picked from commit 8b76b6c8e3ffdb30da839408084289c57e292752)
---
 meta-networking/recipes-protocols/frr/frr_8.2.2.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta-networking/recipes-protocols/frr/frr_8.2.2.bb +5 -0
index ceb94109de..96be49b53f 100644
@@ -73,6 +73,11 @@ SYSTEMD_PACKAGES = "${PN}"
 SYSTEMD_SERVICE:${PN} = "frr.service"
 SYSTEMD_AUTO_ENABLE = "disable"
 
+do_compile:prepend () {
+   sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' \
+          -e 's#${RECIPE_SYSROOT}##g' ${S}/lib/version.h
+}
+
 do_compile:class-native () {
     oe_runmake clippy-only
 }
Signature · 1 line
2.25.1
#12 lore raw

PATCH 13/13 yasm: fix buildpaths warning

In reply to Armin Kuster

From: Anuj Mittal <[email protected]>

ax_create_stdint_h.m4 includes $CC as a comment in the generated header which leads to buildpaths warning:

| WARNING: yasm-1.3.0+gitAUTOINC+ba463d3c26-r0 do_package_qa: QA Issue: File /usr/include/libyasm-stdint.h in package yasm-dev contains reference to TMPDIR [buildpaths]

(cherry picked from commit a7346d2bb1a60289225cce78d760e4d264d1b2a2)
---
 meta-oe/recipes-devtools/yasm/yasm_git.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta-oe/recipes-devtools/yasm/yasm_git.bb +5 -0
index b5cd35ab3a..044fcbea74 100644
@@ -22,3 +22,8 @@ CACHED_CONFIGUREVARS = "CCLD_FOR_BUILD='${CC_FOR_BUILD}'"
 BBCLASSEXTEND = "native"
 
 PARALLEL_MAKE = ""
+
+do_configure:prepend() {
+     # Don't include $CC (which includes path to sysroot) in generated header.
+     sed -i -e "s/^echo \"\/\* generated \$ac_cv_stdint_message \*\/\" >>\$ac_stdint$"// ${S}/m4/ax_create_stdint_h.m4
+}
Signature · 1 line
2.25.1