* [Buildroot] [PATCH v3] package/systemd: fixup RPATH for more systemd host binaries
@ 2020-06-15 22:28 Norbert Lange
2020-06-17 20:39 ` Yann E. MORIN
2020-07-15 19:49 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Norbert Lange @ 2020-06-15 22:28 UTC (permalink / raw)
To: buildroot
All systemd binaries depend on libsystemd-shared and need their
RPATH fixed. Use a glob to catch them all
Signed-off-by: Norbert Lange <nolange79@gmail.com>
---
v1->v2:
- dont ignore failure from patchelf
v2->v3:
- change back to shell loop, the wildcard gets expanded before
the install step and is empty the first time
- add busctl
---
package/systemd/systemd.mk | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index 2cc71ee667..b04391da9e 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -659,6 +659,8 @@ HOST_SYSTEMD_DEPENDENCIES = \
host-libcap \
host-gperf
+HOST_SYSTEMD_NINJA_ENV = DESTDIR=$(HOST_DIR)
+
# Fix RPATH After installation
# * systemd provides a install_rpath instruction to meson because the binaries
# need to link with libsystemd which is not in a standard path
@@ -667,20 +669,13 @@ HOST_SYSTEMD_DEPENDENCIES = \
# * the original path had been tweaked by buildroot via LDFLAGS to add
# $(HOST_DIR)/lib
# * thus re-tweak rpath after the installation for all binaries that need it
-HOST_SYSTEMD_HOST_TOOLS = \
- systemd-analyze \
- systemd-machine-id-setup \
- systemd-mount \
- systemd-nspawn \
- systemctl \
- udevadm
-
-HOST_SYSTEMD_NINJA_ENV = DESTDIR=$(HOST_DIR)
+HOST_SYSTEMD_HOST_TOOLS = busctl journalctl systemctl udevadm systemd-*
define HOST_SYSTEMD_FIX_RPATH
- $(foreach f,$(HOST_SYSTEMD_HOST_TOOLS), \
- $(HOST_DIR)/bin/patchelf --set-rpath $(HOST_DIR)/lib:$(HOST_DIR)/lib/systemd $(HOST_DIR)/bin/$(f)
- )
+ cd $(HOST_DIR)/bin && for f in $(HOST_SYSTEMD_HOST_TOOLS); do \
+ set -e; \
+ [ ! -x $$f ] || $(HOST_DIR)/bin/patchelf --set-rpath $(HOST_DIR)/lib:$(HOST_DIR)/lib/systemd $$f; \
+ done
endef
HOST_SYSTEMD_POST_INSTALL_HOOKS += HOST_SYSTEMD_FIX_RPATH
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v3] package/systemd: fixup RPATH for more systemd host binaries
2020-06-15 22:28 [Buildroot] [PATCH v3] package/systemd: fixup RPATH for more systemd host binaries Norbert Lange
@ 2020-06-17 20:39 ` Yann E. MORIN
2020-07-15 19:49 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2020-06-17 20:39 UTC (permalink / raw)
To: buildroot
Norbert, All,
On 2020-06-16 00:28 +0200, Norbert Lange spake thusly:
> All systemd binaries depend on libsystemd-shared and need their
> RPATH fixed. Use a glob to catch them all
>
> Signed-off-by: Norbert Lange <nolange79@gmail.com>
Applied to master, with the following changes:
- don't use 'set -e', use the more traditional '|| eixt 1'
- don't cd into HOST_DIR/bin, but use $(addprefix ...)
- use positive logic in the test
- expand commit log
... which makes it more in-line with how we're doing similar tweaks in
other packages.
Thanks!
Regards,
Yann E. MORIN.
> ---
> v1->v2:
> - dont ignore failure from patchelf
> v2->v3:
> - change back to shell loop, the wildcard gets expanded before
> the install step and is empty the first time
> - add busctl
> ---
> package/systemd/systemd.mk | 19 +++++++------------
> 1 file changed, 7 insertions(+), 12 deletions(-)
>
> diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
> index 2cc71ee667..b04391da9e 100644
> --- a/package/systemd/systemd.mk
> +++ b/package/systemd/systemd.mk
> @@ -659,6 +659,8 @@ HOST_SYSTEMD_DEPENDENCIES = \
> host-libcap \
> host-gperf
>
> +HOST_SYSTEMD_NINJA_ENV = DESTDIR=$(HOST_DIR)
> +
> # Fix RPATH After installation
> # * systemd provides a install_rpath instruction to meson because the binaries
> # need to link with libsystemd which is not in a standard path
> @@ -667,20 +669,13 @@ HOST_SYSTEMD_DEPENDENCIES = \
> # * the original path had been tweaked by buildroot via LDFLAGS to add
> # $(HOST_DIR)/lib
> # * thus re-tweak rpath after the installation for all binaries that need it
> -HOST_SYSTEMD_HOST_TOOLS = \
> - systemd-analyze \
> - systemd-machine-id-setup \
> - systemd-mount \
> - systemd-nspawn \
> - systemctl \
> - udevadm
> -
> -HOST_SYSTEMD_NINJA_ENV = DESTDIR=$(HOST_DIR)
> +HOST_SYSTEMD_HOST_TOOLS = busctl journalctl systemctl udevadm systemd-*
>
> define HOST_SYSTEMD_FIX_RPATH
> - $(foreach f,$(HOST_SYSTEMD_HOST_TOOLS), \
> - $(HOST_DIR)/bin/patchelf --set-rpath $(HOST_DIR)/lib:$(HOST_DIR)/lib/systemd $(HOST_DIR)/bin/$(f)
> - )
> + cd $(HOST_DIR)/bin && for f in $(HOST_SYSTEMD_HOST_TOOLS); do \
> + set -e; \
> + [ ! -x $$f ] || $(HOST_DIR)/bin/patchelf --set-rpath $(HOST_DIR)/lib:$(HOST_DIR)/lib/systemd $$f; \
> + done
> endef
> HOST_SYSTEMD_POST_INSTALL_HOOKS += HOST_SYSTEMD_FIX_RPATH
>
> --
> 2.27.0
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v3] package/systemd: fixup RPATH for more systemd host binaries
2020-06-15 22:28 [Buildroot] [PATCH v3] package/systemd: fixup RPATH for more systemd host binaries Norbert Lange
2020-06-17 20:39 ` Yann E. MORIN
@ 2020-07-15 19:49 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-07-15 19:49 UTC (permalink / raw)
To: buildroot
>>>>> "Norbert" == Norbert Lange <nolange79@gmail.com> writes:
> All systemd binaries depend on libsystemd-shared and need their
> RPATH fixed. Use a glob to catch them all
> Signed-off-by: Norbert Lange <nolange79@gmail.com>
> ---
v1-> v2:
> - dont ignore failure from patchelf
v2-> v3:
> - change back to shell loop, the wildcard gets expanded before
> the install step and is empty the first time
> - add busctl
Committed to 2020.02.x and 2020.05.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-15 19:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 22:28 [Buildroot] [PATCH v3] package/systemd: fixup RPATH for more systemd host binaries Norbert Lange
2020-06-17 20:39 ` Yann E. MORIN
2020-07-15 19:49 ` Peter Korsgaard
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.