CROS_GO_BINARIES should support installing to alternate location |
|||
Issue descriptionPer email discussion: I'd like to be able to install Go binaries to locations other than /usr/bin. CROS_GO_BINARIES already supports appending ":binary_name" to install a binary using a different name. Rahul suggested that it could also accept ":/some/other/path/binary_name" to install to a different location. I'm not sure about the black magic that we use to install test-only packages under /usr/local instead of /usr (do we override $DESTTREE?), but it'd be nice if this also respected that if possible, so that ":/usr/share/foo/bar" would end up as ":/usr/local/share/foo/bar" for test packages. Maybe it'd be good to support a relative-path version that uses similar logic to dobin? Then ":share/foo/bar" would install to /usr/share/foo/bar for a regular package and /usr/local/share/foo/bar for a test package.
,
Jan 9 2018
> I'm not sure how test-only packages end up under /usr/local instead of /usr. Mike probably knows.
,
Jan 10 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/cd924d8a104640bc3cf8e93933a9825f64c4326a commit cd924d8a104640bc3cf8e93933a9825f64c4326a Author: Rahul Chaudhry <rahulchaudhry@chromium.org> Date: Wed Jan 10 08:10:49 2018 cros-go.eclass: support alternate install locations for CROS_GO_BINARIES. CROS_GO_BINARIES already supports appending ":binary_name" to install a binary using a different name. This change adds support for providing a full install path for the binary by appending ":/install/path/binary_name". BUG= chromium:796837 TEST=Added "golang.org/x/tools/cmd/stringer:/usr/local/bin/gostringer" to CROS_GO_BINARIES in dev-go/go-tools, emerged the package, and verified that "gostringer" is installed in "/usr/local/bin". Change-Id: I4e2f363295040a0562fe3276dfa85efd22ba6b08 Reviewed-on: https://chromium-review.googlesource.com/858229 Commit-Ready: Rahul Chaudhry <rahulchaudhry@chromium.org> Tested-by: Rahul Chaudhry <rahulchaudhry@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [modify] https://crrev.com/cd924d8a104640bc3cf8e93933a9825f64c4326a/eclass/cros-go.eclass
,
Jan 10 2018
I'm still not sure of the magic that makes test-only packages get installed under /usr/local -- https://www.chromium.org/chromium-os/how-tos-and-troubleshooting/install-software-on-base-images might have some clues, but I think it may be outdated at this point. I can confirm that when I use "...:/usr/libexec/foo" for an executable in a test-only package, the file ends up in /usr/local/libexec/foo in the system image, though, so that part seems like it still works. Thanks! |
|||
►
Sign in to add a comment |
|||
Comment 1 by rahulchaudhry@chromium.org
, Jan 9 2018