diff mbox series

[meta-oe,mickledore,08/29] fwupd: Do not emit build time paths into generated headers

Message ID 20230507163305.3261044-8-akuster808@gmail.com
State New
Headers show
Series [meta-oe,mickledore,01/29] pointercal: Add native & nativestdk package support | expand

Commit Message

akuster808 May 7, 2023, 4:32 p.m. UTC
From: Khem Raj <raj.khem@gmail.com>

Fixes
WARNING: fwupd-1.8.9-r0 do_package_qa: QA Issue: File /usr/src/debug/fwupd/1.8.9-r0/src/fu-plugin-builtin.h in package fwupd-src contains reference to TMPDIR [buildpaths]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 62a3fa25e4b685a51acba19da62b2387346c8abe)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 ...lute-buildtime-paths-in-generated-he.patch | 41 +++++++++++++++++++
 meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb      |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 meta-oe/recipes-bsp/fwupd/fwupd/0001-meson-Avoid-absolute-buildtime-paths-in-generated-he.patch

Comments

Richard Hughes Oct. 30, 2023, 11:31 a.m. UTC | #1
On Sun, 7 May 2023 at 17:33, Armin Kuster <akuster808@gmail.com> wrote:
> Fixes
> WARNING: fwupd-1.8.9-r0 do_package_qa: QA Issue: File /usr/src/debug/fwupd/1.8.9-r0/src/fu-plugin-builtin.h in package fwupd-src contains reference to TMPDIR [buildpaths]
> +Upstream-Status: Pending

Pending? Did anyone send this to upstream, either as a pull request or
as a fire-and-forget email? Someone pointed me to this patch today and
it's the first time I've even seen it. I've created a PR here:
https://github.com/fwupd/fwupd/pull/6297

Richard
Khem Raj Oct. 30, 2023, 4:15 p.m. UTC | #2
On Mon, Oct 30, 2023 at 4:31 AM Richard Hughes <hughsient@gmail.com> wrote:

> On Sun, 7 May 2023 at 17:33, Armin Kuster <akuster808@gmail.com> wrote:
> > Fixes
> > WARNING: fwupd-1.8.9-r0 do_package_qa: QA Issue: File
> /usr/src/debug/fwupd/1.8.9-r0/src/fu-plugin-builtin.h in package fwupd-src
> contains reference to TMPDIR [buildpaths]
> > +Upstream-Status: Pending
>
> Pending?



Pending is a tracking status for OE it does not mean that we are expecting
someone for
 Package community to take action that will be of it was in Submitted state
which means someone from OE community or others have submitted it for
review upstream

Did anyone send this to upstream, either as a pull request or
> as a fire-and-forget email?


Understand that this is a downstream distro and we will have a small delta
always to support use cases we encounter which may not be of importance for
upstream. While some are fire and forget some are not

Someone pointed me to this patch today and
> it's the first time I've even seen it. I've created a PR here:
> https://github.com/fwupd/fwupd/pull/6297


Thanks for doing it

<https://github.com/fwupd/fwupd/pull/6297>
>
> Richard
>
diff mbox series

Patch

diff --git a/meta-oe/recipes-bsp/fwupd/fwupd/0001-meson-Avoid-absolute-buildtime-paths-in-generated-he.patch b/meta-oe/recipes-bsp/fwupd/fwupd/0001-meson-Avoid-absolute-buildtime-paths-in-generated-he.patch
new file mode 100644
index 0000000000..2273bdf105
--- /dev/null
+++ b/meta-oe/recipes-bsp/fwupd/fwupd/0001-meson-Avoid-absolute-buildtime-paths-in-generated-he.patch
@@ -0,0 +1,41 @@ 
+From b1df1ed3a21b8ef0244102043a8fb88b0ccc3f91 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 17 Apr 2023 11:30:21 -0700
+Subject: [PATCH] meson: Avoid absolute buildtime paths in generated headers
+
+using meson.project_source_root() means the path emitted to include .h
+files is absolute and it makes its way into PN-src as well, which infact
+is not going to work if the -src package was used to re-build this in a
+different build path. Therefore use relative path which is '.' and
+relative to ${S}
+
+Changes
+include "<abspath>/plugins/acpi-dmar/fu-acpi-dmar-plugin.h"
+to
+include "./plugins/acpi-dmar/fu-acpi-dmar-plugin.h"
+
+in generated build/src/fu-plugin-builtin.h
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/meson.build b/src/meson.build
+index b9f6736..bb856ea 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -188,7 +188,7 @@ plugins_hdr = custom_target('fwupd-generate-plugins-header',
+   command : [
+     join_paths(meson.project_source_root(), 'contrib', 'generate-plugins-header.py'),
+     '@OUTPUT@',
+-    meson.project_source_root(),
++    '.',
+     ','.join(plugin_names),
+   ],
+ )
+-- 
+2.40.0
+
diff --git a/meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb b/meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb
index 14d83ec521..1f95dee1be 100644
--- a/meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb
+++ b/meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb
@@ -5,6 +5,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 DEPENDS = "glib-2.0 libxmlb json-glib libjcat gcab vala-native"
 
 SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \
+           file://0001-meson-Avoid-absolute-buildtime-paths-in-generated-he.patch \
            file://run-ptest"
 SRC_URI[sha256sum] = "719a791ac4ba5988aeb93ec42778bd65d33cb075d0c093b5c04e5e1682be528a"