All of lore.kernel.org
 help / color / mirror / Atom feed
From: Armin Kuster <akuster808@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [kirkstone 39/39] boinc-client: Make script install not depend on host install paths
Date: Sat, 30 Apr 2022 12:18:19 -0700	[thread overview]
Message-ID: <3b4da37a947c6ea244061929e7c457d02f34f748.1651346200.git.akuster808@gmail.com> (raw)
In-Reply-To: <cover.1651346200.git.akuster808@gmail.com>

From: Khem Raj <raj.khem@gmail.com>

The install target is checking for install paths on build host assuming
thats where it will run too, which breaks cross builds. Add a patch to
aide the install from recipe.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit bbc6fa72c378c792bdae35cae9b6ff165ee196c9)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 ...Do-not-check-for-files-on-build-host.patch | 52 +++++++++++++++++++
 .../boinc/boinc-client_7.18.1.bb              | 18 +++----
 2 files changed, 60 insertions(+), 10 deletions(-)
 create mode 100644 meta-oe/recipes-extended/boinc/boinc-client/0001-scripts-Do-not-check-for-files-on-build-host.patch

diff --git a/meta-oe/recipes-extended/boinc/boinc-client/0001-scripts-Do-not-check-for-files-on-build-host.patch b/meta-oe/recipes-extended/boinc/boinc-client/0001-scripts-Do-not-check-for-files-on-build-host.patch
new file mode 100644
index 0000000000..6d9e94cb8a
--- /dev/null
+++ b/meta-oe/recipes-extended/boinc/boinc-client/0001-scripts-Do-not-check-for-files-on-build-host.patch
@@ -0,0 +1,52 @@
+From 8a8305c78143438e2bd497d55188a0da3442db08 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 27 Apr 2022 09:11:38 -0700
+Subject: [PATCH] scripts: Do not check for files on build host
+
+This will result in varied behaviour depending upon what kind of host is
+used to build it. We dont want that. Instead check for these files and
+dirs in staging area and create these markers in recipe via a
+do_install_prepend to aide install piece a bit here ( systemd vs
+sysvinit ) etc.
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ client/scripts/Makefile.am | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/client/scripts/Makefile.am b/client/scripts/Makefile.am
+index 2a53203d84..62a0defa93 100644
+--- a/client/scripts/Makefile.am
++++ b/client/scripts/Makefile.am
+@@ -2,21 +2,21 @@
+ 
+ install-exec-hook:
+ 	chmod +x boinc-client
+-	if [ -d /etc/init.d ] ; then \
++	if [ -d $(DESTDIR)/etc/init.d ] ; then \
+ 		$(INSTALL) -d $(DESTDIR)$(sysconfdir)/init.d ; \
+ 		$(INSTALL) -b boinc-client $(DESTDIR)$(sysconfdir)/init.d/boinc-client ; \
+ 	fi
+-	if [ -d /usr/lib/systemd/system ] ; then \
++	if [ -d $(DESTDIR)/usr/lib/systemd/system ] ; then \
+ 		$(INSTALL) -d $(DESTDIR)/usr/lib/systemd/system/ ; \
+ 		$(INSTALL_DATA) boinc-client.service $(DESTDIR)/usr/lib/systemd/system/boinc-client.service ; \
+-	elif [ -d /lib/systemd/system ] ; then \
++	elif [ -d $(DESTDIR)/lib/systemd/system ] ; then \
+ 		$(INSTALL) -d $(DESTDIR)/lib/systemd/system/ ; \
+ 		$(INSTALL_DATA) boinc-client.service $(DESTDIR)/lib/systemd/system/boinc-client.service ; \
+ 	fi
+-	if [ -d /etc/sysconfig ] ; then \
++	if [ -d $(DESTDIR)/etc/sysconfig ] ; then \
+ 	  $(INSTALL) -d $(DESTDIR)$(sysconfdir)/sysconfig ; \
+ 	  $(INSTALL_DATA) $(srcdir)/boinc-client.conf $(DESTDIR)$(sysconfdir)/sysconfig/boinc-client ; \
+-	elif [ -d /etc/default ] ; then \
++	elif [ -d $(DESTDIR)/etc/default ] ; then \
+ 	  $(INSTALL) -d $(DESTDIR)$(sysconfdir)/default ; \
+ 	  $(INSTALL_DATA) $(srcdir)/boinc-client.conf $(DESTDIR)$(sysconfdir)/default/boinc-client ; \
+ 	else \
+-- 
+2.36.0
+
diff --git a/meta-oe/recipes-extended/boinc/boinc-client_7.18.1.bb b/meta-oe/recipes-extended/boinc/boinc-client_7.18.1.bb
index abcb304d30..8f85a508e7 100644
--- a/meta-oe/recipes-extended/boinc/boinc-client_7.18.1.bb
+++ b/meta-oe/recipes-extended/boinc/boinc-client_7.18.1.bb
@@ -35,6 +35,7 @@ SRC_URI = "git://github.com/BOINC/boinc;protocol=https;branch=${BRANCH} \
            file://boinc-AM_CONDITIONAL.patch \
            file://gtk-configure.patch \
            file://4563.patch \
+           file://0001-scripts-Do-not-check-for-files-on-build-host.patch \
 "
 
 inherit gettext autotools pkgconfig features_check systemd
@@ -75,17 +76,14 @@ do_compile:prepend () {
 	sed -i -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${B}/libtool
 }
 
-do_install:append() {
-	if ! ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)} -a \
-            -e ${D}${nonarch_libdir}/systemd/system/boinc-client.service; then
-		install -d ${D}${systemd_system_unitdir}
-		mv \
-		${D}${nonarch_libdir}/systemd/system/boinc-client.service \
-		${D}${systemd_system_unitdir}/boinc-client.service
-		rmdir --ignore-fail-on-non-empty ${D}${nonarch_libdir}/systemd/system \
-		${D}${nonarch_libdir}/systemd \
-		${D}${nonarch_libdir}
+do_install:prepend() {
+	# help script install a bit to do right thing for OE
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+		mkdir -p ${D}${systemd_system_unitdir}
+	else
+		mkdir -p ${D}${sysconfdir}/init.d
 	fi
+	mkdir -p ${D}${sysconfdir}/default
 }
 
 SYSTEMD_SERVICE:${PN} = "boinc-client.service"
-- 
2.25.1



  parent reply	other threads:[~2022-04-30 19:19 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-30 19:17 [kirkstone 00/39] Patch review Armin Kuster
2022-04-30 19:17 ` [kirkstone 01/39] crash: Upgrade to 8.0.0 Armin Kuster
2022-04-30 19:17 ` [kirkstone 02/39] crash: Fix build for mips target Armin Kuster
2022-04-30 19:17 ` [kirkstone 03/39] tcsh: Do not install symlinks into /bin with usrmerge Armin Kuster
2022-04-30 19:17 ` [kirkstone 04/39] arno-iptables-firewall: Do not use bitbake variable inside S Armin Kuster
2022-04-30 19:17 ` [kirkstone 05/39] fluentbit: Fix build with usrmerge distro feature Armin Kuster
2022-04-30 19:17 ` [kirkstone 06/39] tomoyo-tools: Define SBINDIR Armin Kuster
2022-04-30 19:17 ` [kirkstone 07/39] tomoyo-tools: Drop md5sum Armin Kuster
2022-04-30 19:17 ` [kirkstone 08/39] dietsplash: specify install rootdir Armin Kuster
2022-04-30 19:17 ` [kirkstone 09/39] linux-atm: Add knob to root prefix Armin Kuster
2022-04-30 19:17 ` [kirkstone 10/39] ufw: Fix build with usrmerge distro feature Armin Kuster
2022-04-30 19:17 ` [kirkstone 11/39] libldb: Fix installed-vs-shipped and rebuild error Armin Kuster
2022-04-30 19:17 ` [kirkstone 12/39] klibc: Recognise --dyld-prefix clang option Armin Kuster
2022-04-30 19:17 ` [kirkstone 13/39] mozjs: Use vendored icu on ppc/clang Armin Kuster
2022-04-30 19:17 ` [kirkstone 14/39] boinc-client: Do not overwrite same file when using usrmerge Armin Kuster
2022-04-30 19:17 ` [kirkstone 15/39] pam-ssh-agent-auth: Use specific versions of BSD licenses Armin Kuster
2022-04-30 19:17 ` [kirkstone 16/39] fwupd: Enable build with musl Armin Kuster
2022-04-30 19:17 ` [kirkstone 17/39] evince: upgrade 42.1 -> 42.2 Armin Kuster
2022-04-30 19:17 ` [kirkstone 18/39] gspell: upgrade 1.9.1 -> 1.10.0 Armin Kuster
2022-04-30 19:17 ` [kirkstone 19/39] gtksourceview5: upgrade 5.4.0 -> 5.4.1 Armin Kuster
2022-04-30 19:18 ` [kirkstone 20/39] libadwaita: upgrade 1.1.0 -> 1.1.1 Armin Kuster
2022-04-30 19:18 ` [kirkstone 21/39] nautilus: upgrade 42.0 -> 42.1.1 Armin Kuster
2022-04-30 19:18 ` [kirkstone 22/39] htpdate: upgrade 1.3.3 -> 1.3.4 Armin Kuster
2022-04-30 19:18 ` [kirkstone 23/39] hexedit: upgrade 1.5 -> 1.6 Armin Kuster
2022-04-30 19:18 ` [kirkstone 24/39] lsscsi: upgrade 0.31 -> 0.32 Armin Kuster
2022-04-30 19:18 ` [kirkstone 25/39] libencode-perl: upgrade 3.16 -> 3.17 Armin Kuster
2022-04-30 19:18 ` [kirkstone 26/39] libextutils-cppguess-perl: upgrade 0.23 -> 0.26 Armin Kuster
2022-04-30 19:18 ` [kirkstone 27/39] libtest-harness-perl: upgrade 3.42 -> 3.44 Armin Kuster
2022-04-30 19:18 ` [kirkstone 28/39] makedumpfile: Upgrade to 1.7.1 Armin Kuster
2022-04-30 19:18 ` [kirkstone 29/39] lirc: install systemd units only when using systemd distro feature Armin Kuster
2022-04-30 19:18 ` [kirkstone 30/39] fluentbit: Disable systemd support when systemd distro feature is disabled Armin Kuster
2022-04-30 19:18 ` [kirkstone 31/39] absil-cpp: Update SRC_URI to to the latest google internal sync Armin Kuster
2022-04-30 19:18 ` [kirkstone 35/39] lirc: Delete systemd unit files on non systemd distros Armin Kuster
2022-04-30 19:18 ` [kirkstone 38/39] pipewire: Upgrade to version 0.3.50 Armin Kuster
2022-04-30 19:18 ` Armin Kuster [this message]
2022-04-30 20:58 ` [oe] [kirkstone 00/39] Patch review Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3b4da37a947c6ea244061929e7c457d02f34f748.1651346200.git.akuster808@gmail.com \
    --to=akuster808@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.