package/tailscale: don't overwrite tailscaled when using merged bin
PATCH 1/1 package/tailscale: don't overwrite tailscaled when using merged bin
When merged bin was enabled in systemd in buildroot commit a530492cd3e6de7ed5f9406f7573fe7b9061b3d5 the tailscaled package started overwriting the tailscaled binary with a broken symlink as it assumed /usr/bin and /usr/sbin were not merged.
To ensure this doesn't happen only apply the symlink when BR2_ROOTFS_MERGED_BIN is not selected.
--- package/tailscale/tailscale.mk | 2 ++ 1 file changed, 2 insertions(+)
package/tailscale/tailscale.mk +2 -0
@@ -22,10 +22,12 @@ define TAILSCALE_INSTALL_INIT_SYSTEMD $(TARGET_DIR)/usr/lib/systemd/system/tailscaled.service endef +ifeq ($(BR2_ROOTFS_MERGED_BIN),) define TAILSCALE_INSTALL_SYMLINK ln -f -s ../bin/tailscaled $(TARGET_DIR)/usr/sbin/tailscaled endef TAILSCALE_POST_INSTALL_TARGET_HOOKS += TAILSCALE_INSTALL_SYMLINK +endif define TAILSCALE_LINUX_CONFIG_FIXUPS $(call KCONFIG_ENABLE_OPT,CONFIG_IPV6)
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 23 lines · James Hilliard
When merged bin was enabled in systemd in buildroot commit
a530492cd3e6de7ed5f9406f7573fe7b9061b3d5the tailscaled package started overwriting the tailscaled binary with a broken symlink as it assumed/usr/binand/usr/sbinwere not merged.To ensure this doesn't happen only apply the symlink when
BR2_ROOTFS_MERGED_BINis not selected.Signed-off-by James Hilliard <[email protected]>---
package/tailscale/tailscale.mk| 2 ++1 file changed, 2 insertions(+)package/tailscale/tailscale.mk +0
-0@@ -22,10 +22,12 @@ define TAILSCALE_INSTALL_INIT_SYSTEMD $(TARGET_DIR)/usr/lib/systemd/system/tailscaled.serviceendef
+ifeq ($(BR2_ROOTFS_MERGED_BIN),)
defineTAILSCALE_INSTALL_SYMLINK
Quoted 10 lines
ln -f -s ../bin/tailscaled $(TARGET_DIR)/usr/sbin/tailscaledendef
TAILSCALE_POST_INSTALL_TARGET_HOOKS+=TAILSCALE_INSTALL_SYMLINK+endifdefine
TAILSCALE_LINUX_CONFIG_FIXUPS$(call KCONFIG_ENABLE_OPT,CONFIG_IPV6)Signature · 1 line
2.43.0
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hello,
Can someone review this patch?
Quoted 31 lines · TIAN Yuanhao
Tested-by TIAN Yuanhao <[email protected]>Quoted 28 lines · James Hilliard
When merged bin was enabled in systemd in buildroot commit
a530492cd3e6de7ed5f9406f7573fe7b9061b3d5the tailscaled package started overwriting the tailscaled binary with a broken symlink as it assumed/usr/binand/usr/sbinwere not merged.To ensure this doesn't happen only apply the symlink when
BR2_ROOTFS_MERGED_BINis not selected.Signed-off-by James Hilliard <[email protected]>---
package/tailscale/tailscale.mk| 2 ++1 file changed, 2 insertions(+)package/tailscale/tailscale.mk +0
-0@@ -22,10 +22,12 @@ define TAILSCALE_INSTALL_INIT_SYSTEMD $(TARGET_DIR)/usr/lib/systemd/system/tailscaled.serviceendef
+ifeq ($(BR2_ROOTFS_MERGED_BIN),)
defineTAILSCALE_INSTALL_SYMLINKln -f -s ../bin/tailscaled $(TARGET_DIR)/usr/sbin/tailscaledendef
TAILSCALE_POST_INSTALL_TARGET_HOOKS+=TAILSCALE_INSTALL_SYMLINK+endif
Quoted 9 lines
Quoted 5 lines
define
TAILSCALE_LINUX_CONFIG_FIXUPS$(call KCONFIG_ENABLE_OPT,CONFIG_IPV6)Signature · 1 line
2.43.0_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 2 lines · James Hilliard
When merged bin was enabled in systemd in buildroot commit
a530492cd3e6de7ed5f9406f7573fe7b9061b3d5the tailscaled package
This isn't correct: it has nothing to do with
systemd. BR2_ROOTFS_MERGED_BIN can be enabled independently of systemd. So the problem started occurring when BR2_ROOTFS_MERGED_BIN support was merged.
I've updated the commit message, and applied. Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot