* [Buildroot] [PATCH 0/4] package/pkg-golang: simplify installing multiple binaries
@ 2025-06-20 8:10 yann.morin
2025-06-20 8:10 ` [Buildroot] [PATCH 1/4] " yann.morin
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: yann.morin @ 2025-06-20 8:10 UTC (permalink / raw)
To: buildroot
Cc: Angelo Compagnucci, Christian Stewart, James Hilliard,
Yann E . MORIN
From: "Yann E. MORIN" <yann.morin@orange.com>
Hello All!
This small series aims at simplifying the golang-package infra when a
package builds multiple targets and thus installs multiple binaries.
Regards,
Yann E. MORIN.
The following changes since commit 0233c854b1845e0070179439a74b3b5245a4b01b
package/libblockdev: security bump to version 3.3.1 (2025-06-20 01:22:53 +0200)
are available as patches in this mail series,
for you to apply patches up to 424c15b5c3a2341e06b32f5481d391542c9437f8
package/pkg-golang: catch use of legacy FOO_INSTALL_BINS (2025-06-20 10:07:09 +0200)
----------------------------------------------------------------
Yann E. MORIN (4):
package/pkg-golang: simplify installing multiple binaries
package: drop default _INSTALL_BINS in golang-package
package/cni-plugin: simplify installation
package/pkg-golang: catch use of legacy FOO_INSTALL_BINS
docs/manual/adding-packages-golang.adoc | 26 +++++++++++-----------
docs/manual/migrating.adoc | 5 +++++
.../amazon-ecr-credential-helper.mk | 1 -
package/cni-plugins/cni-plugins.mk | 7 +++---
package/containerd/containerd.mk | 1 -
package/delve/delve.mk | 2 --
package/docker-cli/docker-cli.mk | 2 --
package/docker-engine/docker-engine.mk | 2 --
package/mender-artifact/mender-artifact.mk | 3 ---
package/moby-buildkit/moby-buildkit.mk | 4 ----
package/pkg-golang.mk | 17 ++++++++++++--
package/tailscale/tailscale.mk | 1 -
12 files changed, 36 insertions(+), 35 deletions(-)
--
____________
.-----------------.--------------------: _ :------------------.
| 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.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/4] package/pkg-golang: simplify installing multiple binaries
2025-06-20 8:10 [Buildroot] [PATCH 0/4] package/pkg-golang: simplify installing multiple binaries yann.morin
@ 2025-06-20 8:10 ` yann.morin
2025-06-20 8:10 ` [Buildroot] [PATCH 2/4] package: drop default _INSTALL_BINS in golang-package yann.morin
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: yann.morin @ 2025-06-20 8:10 UTC (permalink / raw)
To: buildroot; +Cc: yann.morin, Christian Stewart
From: "Yann E. MORIN" <yann.morin@orange.com>
Currently, when a golang package defines multiple _BUILD_TARGETS, it has
to basically repeat the same list in its _INSTALL_BINS.
When a golang package defines multiple _BUILD_TARGETS, the pkg-golang
infra will forcibly use the basename (the notdir) of each target as the
name of the generated binary; there is no option to set a per-target
binary name.
However, the pkg-golang infra by default tries to install a binary named
after the package rawname. This forces packages to basically repeat the
same list as their _BUILD_TARGETS to override _INSTALL_BINS, when the
list of generated binaries is already known to the infra.
We change the pkg-golang infra to better cover such a case:
- if _BUILD_TARGET is '.' (the default), keep the current scheme:
install a single binary named after the package rwaname;
- if _BUILD_TARGET is not '.', and contains a single word, use the
notdir of the built target, but allow the user to override it with
_BIN_NAME (the current behaviour);
- otherwise (_BUILD_TARGETS is set to more than one word), do not
allow the user to set _BIN_NAME (it does not make sense), but set
_INSTALL_BINS by default to the notdir of _BUILD_TARGETS.
We still allow the user to set _INSTALL_BINS in the last case, to cover
the case for existing packages; those are going to be "fixed" in the
following commits.
We now consider that _INSTALL_BINS is an internal implementation details
that should no longer be exposed to the users, so we drop it from the
documentation; we rephrase the corresponding part for _BUILD_TARGETS.
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Christian Stewart <christian@aperture.us>
---
docs/manual/adding-packages-golang.adoc | 26 ++++++++++++-------------
package/pkg-golang.mk | 11 +++++++++--
2 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/docs/manual/adding-packages-golang.adoc b/docs/manual/adding-packages-golang.adoc
index 6de0916a83..21b6a122a9 100644
--- a/docs/manual/adding-packages-golang.adoc
+++ b/docs/manual/adding-packages-golang.adoc
@@ -94,20 +94,20 @@ therefore only use a few of them, or none.
defaults to +.+. We then have two cases:
** +FOO_BUILD_TARGETS+ is +.+. In this case, we assume only one binary
- will be produced, and that by default we name it after the package
- name. If that is not appropriate, the name of the produced binary
- can be overridden using +FOO_BIN_NAME+.
+ will be built and installed, and by default we name it after the
+ package name; if that is not appropriate, the name of the binary can
+ be overridden using +FOO_BIN_NAME+.
-** +FOO_BUILD_TARGETS+ is not +.+. In this case, we iterate over the
- values to build each target, and for each produced a binary that is
- the non-directory component of the target. For example if
- +FOO_BUILD_TARGETS = cmd/docker cmd/dockerd+ the binaries produced
- are +docker+ and +dockerd+.
-
-* +FOO_INSTALL_BINS+ can be used to pass the list of binaries that
- should be installed in +/usr/bin+ on the target. If
- +FOO_INSTALL_BINS+ is not specified, it defaults to the lower-case
- name of package.
+** +FOO_BUILD_TARGETS+ is not +.+. In this case, it is interpreted as a
+ space-separated list, and we iterate over the targets to build and
+ install a binary named after the non-directory component of the
+ target. For example if +FOO_BUILD_TARGETS = cmd/docker cmd/dockerd+,
+ the binaries built and installed are +docker+ and +dockerd+. If
+ +FOO_BUILD_TARGETS+ contains only one target, then it is possible to
+ override the built and installed binary by setting +FOO_BIN_NAME+,
+ as above; if +FOO_BUILD_TARGETS+ contains two or more targets, then
+ it is not possible to override the names of the installed binaries
+ (use a post-install hook for that).
With the Go infrastructure, all the steps required to build and
install the packages are already defined, and they generally work well
diff --git a/package/pkg-golang.mk b/package/pkg-golang.mk
index a4e8bd30cc..ff8d28aa7e 100644
--- a/package/pkg-golang.mk
+++ b/package/pkg-golang.mk
@@ -61,9 +61,16 @@ $(2)_BUILD_TARGETS ?= .
# after each build target building them (below in <pkg>_BUILD_CMDS).
ifeq ($$($(2)_BUILD_TARGETS),.)
$(2)_BIN_NAME ?= $$($(2)_RAWNAME)
+$(2)_INSTALL_BINS ?= $$($(2)_BIN_NAME)
+else ifeq ($$(words $$($(2)_BUILD_TARGETS)),1)
+$(2)_BIN_NAME ?= $$(notdir $$($(2)_BUILD_TARGETS))
+$(2)_INSTALL_BINS ?= $$($(2)_BIN_NAME)
+else
+ifneq ($$($(2)_BIN_NAME),)
+$$(error $(1) sets $(2)_BIN_NAME while there are multiple targets in $(2)_BUILD_TARGETS)
+endif
+$(2)_INSTALL_BINS ?= $$(notdir $$($(2)_BUILD_TARGETS))
endif
-
-$(2)_INSTALL_BINS ?= $$($(2)_RAWNAME)
# Source files in Go usually use an import path resolved around
# domain/vendor/software. We infer domain/vendor/software from the upstream URL
--
2.34.1
____________________________________________________________________________________________________________
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.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/4] package: drop default _INSTALL_BINS in golang-package
2025-06-20 8:10 [Buildroot] [PATCH 0/4] package/pkg-golang: simplify installing multiple binaries yann.morin
2025-06-20 8:10 ` [Buildroot] [PATCH 1/4] " yann.morin
@ 2025-06-20 8:10 ` yann.morin
2025-06-20 8:10 ` [Buildroot] [PATCH 3/4] package/cni-plugin: simplify installation yann.morin
2025-06-20 8:10 ` [Buildroot] [PATCH 4/4] package/pkg-golang: catch use of legacy FOO_INSTALL_BINS yann.morin
3 siblings, 0 replies; 5+ messages in thread
From: yann.morin @ 2025-06-20 8:10 UTC (permalink / raw)
To: buildroot
Cc: yann.morin, Angelo Compagnucci, Christian Stewart, James Hilliard
From: "Yann E. MORIN" <yann.morin@orange.com>
Now that the pkg-golang infra automatically sets _INSTALL_BINS by
default to the list of notdir of _BUILD_TARGETS, there is no need to do
that in packages anymore.
Most packages were already using the notdir construct, so those are
trivially fixed; a few had a hard-coded list that matched the built
targets list, so they too are trivially fixed.
host-mender-artifact was slightly different, in that it explicitly set
the _BIN_NAME to mender-artifact, which happens to be the default; it
also set _INSTALL_BINS to _BIN_NAME, so again using the default. This
package can also be fixed easily.
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Cc: Christian Stewart <christian@aperture.us>
Cc: James Hilliard <james.hilliard1@gmail.com>
---
.../amazon-ecr-credential-helper.mk | 1 -
package/containerd/containerd.mk | 1 -
package/delve/delve.mk | 2 --
package/docker-cli/docker-cli.mk | 2 --
package/docker-engine/docker-engine.mk | 2 --
package/mender-artifact/mender-artifact.mk | 3 ---
package/moby-buildkit/moby-buildkit.mk | 4 ----
package/tailscale/tailscale.mk | 1 -
8 files changed, 16 deletions(-)
diff --git a/package/amazon-ecr-credential-helper/amazon-ecr-credential-helper.mk b/package/amazon-ecr-credential-helper/amazon-ecr-credential-helper.mk
index acfeea16fb..ad75ed3360 100644
--- a/package/amazon-ecr-credential-helper/amazon-ecr-credential-helper.mk
+++ b/package/amazon-ecr-credential-helper/amazon-ecr-credential-helper.mk
@@ -15,6 +15,5 @@ AMAZON_ECR_CREDENTIAL_HELPER_SUBDIR = ecr-login
AMAZON_ECR_CREDENTIAL_HELPER_GOMOD = ./cli
AMAZON_ECR_CREDENTIAL_HELPER_BUILD_TARGETS = docker-credential-ecr-login
-AMAZON_ECR_CREDENTIAL_HELPER_INSTALL_BINS = docker-credential-ecr-login
$(eval $(golang-package))
diff --git a/package/containerd/containerd.mk b/package/containerd/containerd.mk
index 1f70a26ebf..2ef70ab5d7 100644
--- a/package/containerd/containerd.mk
+++ b/package/containerd/containerd.mk
@@ -20,7 +20,6 @@ CONTAINERD_BUILD_TARGETS = \
cmd/containerd-shim-runc-v2 \
cmd/ctr
-CONTAINERD_INSTALL_BINS = $(notdir $(CONTAINERD_BUILD_TARGETS))
CONTAINERD_TAGS = no_aufs
ifeq ($(BR2_PACKAGE_LIBAPPARMOR),y)
diff --git a/package/delve/delve.mk b/package/delve/delve.mk
index 408286e3b4..8206721fe2 100644
--- a/package/delve/delve.mk
+++ b/package/delve/delve.mk
@@ -12,11 +12,9 @@ DELVE_DEPENDENCIES = host-pkgconf
DELVE_TAGS = cgo
DELVE_BUILD_TARGETS = cmd/dlv
-DELVE_INSTALL_BINS = $(notdir $(DELVE_BUILD_TARGETS))
HOST_DELVE_TAGS = cgo
HOST_DELVE_BUILD_TARGETS = cmd/dlv
-HOST_DELVE_INSTALL_BINS = $(notdir $(HOST_DELVE_BUILD_TARGETS))
$(eval $(golang-package))
$(eval $(host-golang-package))
diff --git a/package/docker-cli/docker-cli.mk b/package/docker-cli/docker-cli.mk
index e118481838..7386b007cd 100644
--- a/package/docker-cli/docker-cli.mk
+++ b/package/docker-cli/docker-cli.mk
@@ -38,6 +38,4 @@ define DOCKER_CLI_FIX_VENDORING
endef
DOCKER_CLI_POST_EXTRACT_HOOKS += DOCKER_CLI_FIX_VENDORING
-DOCKER_CLI_INSTALL_BINS = $(notdir $(DOCKER_CLI_BUILD_TARGETS))
-
$(eval $(golang-package))
diff --git a/package/docker-engine/docker-engine.mk b/package/docker-engine/docker-engine.mk
index c39dc2b440..181975b26b 100644
--- a/package/docker-engine/docker-engine.mk
+++ b/package/docker-engine/docker-engine.mk
@@ -70,8 +70,6 @@ define DOCKER_ENGINE_FIX_VENDORING
endef
DOCKER_ENGINE_POST_EXTRACT_HOOKS += DOCKER_ENGINE_FIX_VENDORING
-DOCKER_ENGINE_INSTALL_BINS = $(notdir $(DOCKER_ENGINE_BUILD_TARGETS))
-
define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.service \
$(TARGET_DIR)/usr/lib/systemd/system/docker.service
diff --git a/package/mender-artifact/mender-artifact.mk b/package/mender-artifact/mender-artifact.mk
index bcab91890a..7d6f0929e2 100644
--- a/package/mender-artifact/mender-artifact.mk
+++ b/package/mender-artifact/mender-artifact.mk
@@ -115,7 +115,4 @@ HOST_MENDER_ARTIFACT_GO_ENV += \
HOST_MENDER_ARTIFACT_LDFLAGS = -X github.com/mendersoftware/mender-artifact/cli.Version=$(HOST_MENDER_ARTIFACT_VERSION)
-HOST_MENDER_ARTIFACT_BIN_NAME = mender-artifact
-HOST_MENDER_ARTIFACT_INSTALL_BINS = $(HOST_MENDER_ARTIFACT_BIN_NAME)
-
$(eval $(host-golang-package))
diff --git a/package/moby-buildkit/moby-buildkit.mk b/package/moby-buildkit/moby-buildkit.mk
index 91560c1ed1..4ae1abde3a 100644
--- a/package/moby-buildkit/moby-buildkit.mk
+++ b/package/moby-buildkit/moby-buildkit.mk
@@ -17,12 +17,8 @@ MOBY_BUILDKIT_BUILD_TARGETS = cmd/buildctl cmd/buildkitd
MOBY_BUILDKIT_LDFLAGS = \
-X $(MOBY_BUILDKIT_GOMOD)/version.Version="$(MOBY_BUILDKIT_VERSION)"
-MOBY_BUILDKIT_INSTALL_BINS = $(notdir $(MOBY_BUILDKIT_BUILD_TARGETS))
-
HOST_MOBY_BUILDKIT_TAGS = cgo
HOST_MOBY_BUILDKIT_BUILD_TARGETS = cmd/buildctl cmd/buildkitd
-HOST_MOBY_BUILDKIT_INSTALL_BINS = $(notdir $(HOST_MOBY_BUILDKIT_BUILD_TARGETS))
-
$(eval $(golang-package))
$(eval $(host-golang-package))
diff --git a/package/tailscale/tailscale.mk b/package/tailscale/tailscale.mk
index 7019b9afc9..8f25b0cbd1 100644
--- a/package/tailscale/tailscale.mk
+++ b/package/tailscale/tailscale.mk
@@ -10,7 +10,6 @@ TAILSCALE_LICENSE = BSD-3-Clause
TAILSCALE_LICENSE_FILES = LICENSE
TAILSCALE_GOMOD = tailscale.com
TAILSCALE_BUILD_TARGETS = cmd/tailscale cmd/tailscaled
-TAILSCALE_INSTALL_BINS = tailscale tailscaled
TAILSCALE_LDFLAGS = \
-X tailscale.com/version.longStamp=$(TAILSCALE_VERSION) \
-X tailscale.com/version.shortStamp=$(TAILSCALE_VERSION)
--
2.34.1
____________________________________________________________________________________________________________
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.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 3/4] package/cni-plugin: simplify installation
2025-06-20 8:10 [Buildroot] [PATCH 0/4] package/pkg-golang: simplify installing multiple binaries yann.morin
2025-06-20 8:10 ` [Buildroot] [PATCH 1/4] " yann.morin
2025-06-20 8:10 ` [Buildroot] [PATCH 2/4] package: drop default _INSTALL_BINS in golang-package yann.morin
@ 2025-06-20 8:10 ` yann.morin
2025-06-20 8:10 ` [Buildroot] [PATCH 4/4] package/pkg-golang: catch use of legacy FOO_INSTALL_BINS yann.morin
3 siblings, 0 replies; 5+ messages in thread
From: yann.morin @ 2025-06-20 8:10 UTC (permalink / raw)
To: buildroot; +Cc: yann.morin, Christian Stewart
From: "Yann E. MORIN" <yann.morin@orange.com>
In all theory, we could iterate over CNI_PLUGINS_INSTALL_BINS, which
already contains the basenames $(notdir) of the binaries to install,
but *_INSTALL_BINS is now an internal implementation detail, and
can't be guaranteed to be stable.
Hence, iterate over the list of targets, and somewhat duplicate the
install commands from the infra, using make's $(notdir) rather than
calling to the shell's to call basename.
Note: we need to stop setting _INSTALL_BINS, as a following commit will
check that it is not explicitly set, and fail otherwise.
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Christian Stewart <christian@aperture.us>
---
package/cni-plugins/cni-plugins.mk | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/package/cni-plugins/cni-plugins.mk b/package/cni-plugins/cni-plugins.mk
index bccc1674aa..9a9ecf103b 100644
--- a/package/cni-plugins/cni-plugins.mk
+++ b/package/cni-plugins/cni-plugins.mk
@@ -27,7 +27,6 @@ CNI_PLUGINS_BUILD_TARGETS = \
plugins/meta/portmap \
plugins/meta/tuning \
plugins/meta/vrf
-CNI_PLUGINS_INSTALL_BINS = $(CNI_PLUGINS_BUILD_TARGETS)
ifeq ($(BR2_PACKAGE_LIBAPPARMOR),y)
CNI_PLUGINS_DEPENDENCIES += libapparmor
@@ -46,9 +45,9 @@ endif
define CNI_PLUGINS_INSTALL_TARGET_CMDS
$(INSTALL) -d -m 0755 $(TARGET_DIR)/opt/cni/bin
- $(foreach d,$(CNI_PLUGINS_INSTALL_BINS),\
- $(INSTALL) -D -m 0755 $(@D)/bin/$$(basename $(d)) \
- $(TARGET_DIR)/opt/cni/bin
+ $(foreach d,$(CNI_PLUGINS_BUILD_TARGETS),\
+ $(INSTALL) -D -m 0755 $(@D)/bin/$(notdir $(d)) \
+ $(TARGET_DIR)/opt/cni/bin/$(notdir $(d))
)
endef
--
2.34.1
____________________________________________________________________________________________________________
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.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 4/4] package/pkg-golang: catch use of legacy FOO_INSTALL_BINS
2025-06-20 8:10 [Buildroot] [PATCH 0/4] package/pkg-golang: simplify installing multiple binaries yann.morin
` (2 preceding siblings ...)
2025-06-20 8:10 ` [Buildroot] [PATCH 3/4] package/cni-plugin: simplify installation yann.morin
@ 2025-06-20 8:10 ` yann.morin
3 siblings, 0 replies; 5+ messages in thread
From: yann.morin @ 2025-06-20 8:10 UTC (permalink / raw)
To: buildroot; +Cc: yann.morin, Christian Stewart
From: "Yann E. MORIN" <yann.morin@orange.com>
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Christian Stewart <christian@aperture.us>
---
docs/manual/migrating.adoc | 5 +++++
package/pkg-golang.mk | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/docs/manual/migrating.adoc b/docs/manual/migrating.adoc
index 4e6225a987..6ecc992502 100644
--- a/docs/manual/migrating.adoc
+++ b/docs/manual/migrating.adoc
@@ -222,3 +222,8 @@ from +-cargo2+ to +-cargo4+.
In 2025.08, starting with systemd version 257, systemd-networkd requires kernel
5.4 or later. If you are still using a kernel older than 5.4, please update
your kernel or use an alternative network manager.
+
+[[migrating-golang-packages]]
+In 2025.08, the +FOO_INSTALL_BINS+ variable for golang packages is no longer
+supported; the list of binaries to install is automatically derived from
+the +FOO_BULD_TARGETS+ variable.
diff --git a/package/pkg-golang.mk b/package/pkg-golang.mk
index ff8d28aa7e..ffd50adecc 100644
--- a/package/pkg-golang.mk
+++ b/package/pkg-golang.mk
@@ -40,6 +40,12 @@ GO_BIN = $(HOST_DIR)/bin/go
define inner-golang-package
+# Legacy
+ifneq ($$($(2)_INSTALL_BINS),)
+$$(error Package $(1) sets $(2)_INSTALL_BINS, which is no longer supported; \
+see the manual: https://buildroot.org/manual.html#migrating-golang-package )
+endif
+
$(2)_BUILD_OPTS += \
-ldflags "$$($(2)_LDFLAGS)" \
-modcacherw \
--
2.34.1
____________________________________________________________________________________________________________
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.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-06-20 8:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-20 8:10 [Buildroot] [PATCH 0/4] package/pkg-golang: simplify installing multiple binaries yann.morin
2025-06-20 8:10 ` [Buildroot] [PATCH 1/4] " yann.morin
2025-06-20 8:10 ` [Buildroot] [PATCH 2/4] package: drop default _INSTALL_BINS in golang-package yann.morin
2025-06-20 8:10 ` [Buildroot] [PATCH 3/4] package/cni-plugin: simplify installation yann.morin
2025-06-20 8:10 ` [Buildroot] [PATCH 4/4] package/pkg-golang: catch use of legacy FOO_INSTALL_BINS yann.morin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox