[Buildroot] [PATCH v2 1/1] package/tailscale: install systemd service files
yann.morin at orange.com
yann.morin at orange.com
Wed Apr 16 13:37:46 UTC 2025
Yuanhao, All,
On 2025-04-14 08:07 -0700, TIAN Yuanhao spake thusly:
> Signed-off-by: TIAN Yuanhao <tianyuanhao3 at 163.com>
> Cc: James Hilliard <james.hilliard1 at gmail.com>
> Cc: Yann E. MORIN <yann.morin at orange.com>
>
> ---
> Changes v1 -> v2:
> - Remove untested TAILSCALE_INSTALL_INIT_OPENRC
> - Change default service files to use /bin instead of /sbin
That's an option, too. I find it not very nice to sed the file; I think
it would be better to carry a patch that patches the service file, as it
is provided in the source tree and not generated at build.
Yet, I think it's better to do the symlink in sbin... As I said in my
earlier reply today, the location of the executable is an artifact of
the limitations of the Buildroot golang-package infrastructure, so it
is only fitting that we do workaround this with a symlink.
Note: it should be relatively easy in Buildroot to add support for
providing the location of individual binaries installed by a golang
package. Indeed, golang package usually install very few executables,
usually just one; when they install multiple, it's just a handful of
them, and they mostly always go into /usr/bin/. For the very few that
need to go in /usr/sbin, then this can be overridden in the package .mk;
maybe something like:
TAILSCALE_BINDIR_tailscaled = /usr/sbin
and then in the golang-package infra:
164 define $(2)_INSTALL_TARGET_CMDS
165 » $$(foreach d,$$($(2)_INSTALL_BINS),\
166 » » $$(INSTALL) -D -m 0755 $$(@D)/bin/$$(d) $$(TARGET_DIR)$(or $$($(2)_BINDIR_$$(d)),/usr/bin)/$$(d)
167 » )
168 endef
(I don't think a similar feature would be needed for host packages,
because we don't care about bin vs. sbin for those.)
Regards,
Yann E. MORIN.
--
____________
.-----------------.--------------------: _ :------------------.
| Yann E. MORIN | Real-Time Embedded | __/ ) | /"\ ASCII RIBBON |
| | Software Designer | _/ - /' | \ / CAMPAIGN |
| +33 638.411.245 '--------------------: (_ `--, | X AGAINST |
| yann.morin (at) orange.com |_=" ,--' | / \ HTML MAIL |
'--------------------------------------:______/_____:------------------'
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
More information about the buildroot
mailing list