swupd-client: do out-of-tree builds
PATCH 1/1 swupd-client: do out-of-tree builds
From: André Draszik <[email protected]>
Backport a patch that fixes out-of-tree builds, and at the same time switch to using autotools.bbclass rather than autotools-brokensep.bbclass
--- .../0001-build-allow-out-of-tree-builds.patch | 57 ++++++++++++++++++++++ recipes-core/swupd-client/swupd-client_git.bb | 5 +- 2 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 recipes-core/swupd-client/swupd-client/0001-build-allow-out-of-tree-builds.patch
recipes-core/swupd-client/swupd-client/0001-build-allow-out-of-tree-builds.patch new file +57 -0
@@ -0,0 +1,57 @@ +From aab90416caac1c581f0de6814b5e43491407bce4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <[email protected]> +Date: Wed, 16 Nov 2016 10:55:23 +0000 +Subject: [PATCH] build: allow out of tree builds +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When doing out-of-tree builds, the distributed +scripts are in different directory than where +the build is happening. This doesn't work: + + make install-exec-hook + make[2]: Entering directory '<builddir>' + perl scripts/findstatic.pl */*.o | grep -v Checking ||: + Can't open perl script "scripts/findstatic.pl": No such file or directory + make[2]: Leaving directory '<builddir>' + +We therefore need to give perl the full path +of the perl-script to run using the standard +automake variable top_srcdir: + + make install-exec-hook + make[2]: Entering directory '<builddir>' + perl ../../../../../../../../tmp/swupd-client.git/scripts/findstatic.pl */*.o | grep -v Checking ||: + 'bin_paths' is unique to src/search.o, should be static? (initialised variable) + 'do_search' is unique to src/search.o, should be static? (function) + 'download_manifests' is unique to src/search.o, should be static? (function) + 'file_search' is unique to src/search.o, should be static? (function) + 'lib_paths' is unique to src/search.o, should be static? (initialised variable) + 'report_find' is unique to src/search.o, should be static? (function) + 'scope' is unique to src/search.o, should be static? (initialised variable) + 'search_type' is unique to src/search.o, should be static? (initialised variable) + make[2]: Leaving directory '<builddir>' + +Signed-off-by: André Draszik <[email protected]> +--- +Upstream-Status: Backport [https://github.com/clearlinux/swupd-client/commit/b89d002a7d0f168354d9138207943b62138aa70a] + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index d485e00..f1a5b72 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -126,7 +126,7 @@ distclean-local: + rm -rf aclocal.m4 ar-lib autom4te.cache config.guess config.h.in config.h.in~ config.sub configure depcomp install-sh ltmain.sh m4 Makefile.in missing compile + + install-exec-hook: +- perl scripts/findstatic.pl */*.o | grep -v Checking ||: ++ perl $(top_srcdir)/scripts/findstatic.pl */*.o | grep -v Checking ||: + + + TEST_EXTENSIONS = .bats +-- +2.10.2 +
recipes-core/swupd-client/swupd-client_git.bb +2 -3
@@ -11,6 +11,7 @@ SRC_URI = "\ file://Change-systemctl-path-to-OE-systemctl-path.patch \ file://0001-Add-configure-option-to-re-enable-updating-of-config.patch \ file://Make-pinned-pubkey-configurable.patch \ + file://0001-build-allow-out-of-tree-builds.patch \ " SRCREV = "f4000c5b22be47ec1af2f8748fd71a36148b5dc4"
@@ -20,9 +21,7 @@ RDEPENDS_${PN}_append_class-target = " oe-swupd-helpers bsdtar" # We check /etc/os-release for the current OS version number RRECOMMENDS_${PN}_class-target = "os-release" -# TODO: we inherit autotools-brokensep because the Makefile calls a perl script -# in ${S} during one of its steps. -inherit pkgconfig autotools-brokensep systemd +inherit pkgconfig autotools systemd EXTRA_OECONF = "\ --with-systemdsystemunitdir=${systemd_system_unitdir} \
Signature · 1 line
2.10.2
Quoted 5 lines · André Draszik
From: André Draszik <[email protected]>
Backport a patch that fixes out-of-tree builds, and at the same time switch to using autotools.bbclass rather than autotools-brokensep.bbclass
I'll update swupd-client to the latest version soon and merging this change would just lead to conflicts with my development branch. Is it okay to wait for this version update?
Thanks for fixing this problem also upstream!
Signature · 6 lines
Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter.
Quoted 2 lines · Patrick Ohly
change would just lead to conflicts with my development branch. Is it okay to wait for this version update?
Sure, no worries.
A.