package/sentry-cli: new package
PATCH 1/1 package/sentry-cli: new package
--- DEVELOPERS | 1 + package/Config.in.host | 1 + package/sentry-cli/Config.in.host | 10 ++++++++ package/sentry-cli/sentry-cli.hash | 3 +++ package/sentry-cli/sentry-cli.mk | 39 ++++++++++++++++++++++++++++++ 5 files changed, 54 insertions(+) create mode 100644 package/sentry-cli/Config.in.host create mode 100644 package/sentry-cli/sentry-cli.hash create mode 100644 package/sentry-cli/sentry-cli.mk
DEVELOPERS +1 -0
@@ -1422,6 +1422,7 @@ F: package/python-schedule/ F: package/python-sentry-sdk/ F: package/python-websockets/ F: package/python-xlib/ +F: package/sentry-cli/ F: package/unclutter-xfixes/ N: Joshua Henderson <[email protected]>
package/Config.in.host +1 -0
@@ -74,6 +74,7 @@ menu "Host utilities" source "package/s6-rc/Config.in.host" source "package/sam-ba/Config.in.host" source "package/sdbusplus/Config.in.host" + source "package/sentry-cli/Config.in.host" source "package/squashfs/Config.in.host" source "package/sunxi-tools/Config.in.host" source "package/swig/Config.in.host"
package/sentry-cli/Config.in.host new file +10 -0
@@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_SENTRY_CLI + bool "sentry-cli" + depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS + select BR2_PACKAGE_HOST_RUSTC + help + Official Sentry command line interface + + For managing debug information files and source maps. + + https://docs.sentry.io/cli/
package/sentry-cli/sentry-cli.hash new file +3 -0
@@ -0,0 +1,3 @@ +# locally calculated +sha256 5d0f7acf6a139d1c1716b9a8ff76c8bfaab09104ba663c957bb9a5dba2ffbabd sentry-cli-1.57.0.tar.gz +sha256 9503def7b54ceb6e3cd182fd59bc05d3a30d7eae481e65aaba4b495133c83c14 LICENSE
package/sentry-cli/sentry-cli.mk new file +39 -0
@@ -0,0 +1,39 @@ +################################################################################ +# +# sentry-cli +# +################################################################################ + +SENTRY_CLI_VERSION = 1.57.0 +SENTRY_CLI_SITE = $(call github,getsentry,sentry-cli,$(SENTRY_CLI_VERSION)) +SENTRY_CLI_LICENSE = BSD-3-clause +SENTRY_CLI_LICENSE_FILES = LICENSE + +SENTRY_CLI_DEPENDENCIES = host-rustc + +HOST_SENTRY_CLI_CARGO_ENV = CARGO_HOME=$(HOST_DIR)/share/cargo + +HOST_SENTRY_CLI_BIN_DIR = target/$(SENTRY_CLI_CARGO_BIN_SUBDIR)/ + +HOST_SENTRY_CLI_CARGO_OPTS = \ + $(if $(BR2_ENABLE_DEBUG),,--release) \ + --manifest-path=$(@D)/Cargo.toml + +ifeq ($(BR2_ENABLE_DEBUG),y) +SENTRY_CLI_CARGO_BIN_SUBDIR = debug +else +SENTRY_CLI_CARGO_OPTS += --release +SENTRY_CLI_CARGO_BIN_SUBDIR = release +endif + +define HOST_SENTRY_CLI_BUILD_CMDS + $(TARGET_MAKE_ENV) $(HOST_SENTRY_CLI_CARGO_ENV) \ + cargo build $(HOST_SENTRY_CLI_CARGO_OPTS) +endef + +define HOST_SENTRY_CLI_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/$(HOST_SENTRY_CLI_BIN_DIR)/sentry-cli \ + $(HOST_DIR)/bin +endef + +$(eval $(host-generic-package))
Signature · 1 line
2.28.0
PATCH 1/1 package/sentry-cli: new package
Hello Joseph and all,
Quoted 11 lines · Joseph Kogut
Signed-off-by Joseph Kogut <[email protected]>--- DEVELOPERS | 1 + package/Config.in.host | 1 + package/sentry-cli/Config.in.host | 10 ++++++++ package/sentry-cli/sentry-cli.hash | 3 +++ package/sentry-cli/sentry-cli.mk | 39 ++++++++++++++++++++++++++++++ 5 files changed, 54 insertions(+)create mode 100644 package/sentry-cli/Config.in.host create mode 100644 package/sentry-cli/sentry-cli.hash create mode 100644
package/sentry-cli/sentry-cli.mk
[...]
package/sentry-cli/Config.in.host line 2
Quoted 8 lines
package/sentry-cli/Config.in.host new file +2
-0@@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_SENTRY_CLI + bool "sentry-cli"
Should be "host sentry-cli"
Apart from this small comment,
Cheers,
Titouan
PATCH 1/1 package/sentry-cli: new package
In reply to Joseph KogutHello,
Quoted 1 line · On Tue, 15 Sep 2020 13:57:38 -0700 Joseph Kogut <[email protected]> wrote:
Signed-off-by Joseph Kogut <[email protected]>
Thanks, I have applied, after doing a number of changes. See below.
package/sentry-cli/Config.in.host line 2
Quoted 8 lines
package/sentry-cli/Config.in.host new file +2
-0@@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_SENTRY_CLI + bool "sentry-cli"
Changed to:
bool "host sentry-cli"
as pointed by Titouan.
Quoted 12 lines
package/sentry-cli/sentry-cli.mk new file +6
-0@@ -0,0 +1,39 @@ +################################################################################ +# +# sentry-cli +# +################################################################################ +
package/sentry-cli/sentry-cli.mk line 16
Quoted 10 lines
package/sentry-cli/sentry-cli.mk new file +10
-0+SENTRY_CLI_VERSION = 1.57.0 +SENTRY_CLI_SITE = $(call github,getsentry,sentry-cli,$(SENTRY_CLI_VERSION)) +SENTRY_CLI_LICENSE = BSD-3-clause +SENTRY_CLI_LICENSE_FILES = LICENSE + +SENTRY_CLI_DEPENDENCIES = host-rustc + +HOST_SENTRY_CLI_CARGO_ENV = CARGO_HOME=$(HOST_DIR)/share/cargo + +HOST_SENTRY_CLI_BIN_DIR = target/$(SENTRY_CLI_CARGO_BIN_SUBDIR)/
This was not needed, I'll explain below why.
package/sentry-cli/sentry-cli.mk line 19
Quoted 3 lines
package/sentry-cli/sentry-cli.mk new file +3
-0+ +HOST_SENTRY_CLI_CARGO_OPTS = \ + $(if $(BR2_ENABLE_DEBUG),,--release) \
BR2_ENABLE_DEBUG affects target packages, but not host packages. We build host packages in release mode only, so I've made this an unconditional --release.
And this explains why HOST_SENTRY_CLI_BIN_DIR was not needed: it is always target/release/.
package/sentry-cli/sentry-cli.mk line 27
Quoted 8 lines
package/sentry-cli/sentry-cli.mk new file +8
-0+ --manifest-path=$(@D)/Cargo.toml + +ifeq ($(BR2_ENABLE_DEBUG),y) +SENTRY_CLI_CARGO_BIN_SUBDIR = debug +else +SENTRY_CLI_CARGO_OPTS += --release +SENTRY_CLI_CARGO_BIN_SUBDIR = release +endif
This was not needed, and was anyway setting variables that were not used anywhere.
package/sentry-cli/sentry-cli.mk line 30
Quoted 3 lines
package/sentry-cli/sentry-cli.mk new file +3
-0+ +define HOST_SENTRY_CLI_BUILD_CMDS + $(TARGET_MAKE_ENV) $(HOST_SENTRY_CLI_CARGO_ENV) \
When building a host package, HOST_MAKE_ENV should be used, not TARGET_MAKE_ENV.
package/sentry-cli/sentry-cli.mk line 35
Quoted 5 lines
package/sentry-cli/sentry-cli.mk new file +5
-0+ cargo build $(HOST_SENTRY_CLI_CARGO_OPTS) +endef + +define HOST_SENTRY_CLI_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/$(HOST_SENTRY_CLI_BIN_DIR)/sentry-cli \
So I've used target/release/ instead of $(HOST_SENTRY_CLI_BIN_DIR)
package/sentry-cli/sentry-cli.mk line 36
Quoted 1 line
package/sentry-cli/sentry-cli.mk new file +1
-0+ $(HOST_DIR)/bin
You need a full destination path, i.e $(HOST_DIR)/bin/sentry-cli
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/sentry-cli: new package
In reply to Joseph KogutHello,
Quoted 1 line · On Tue, 15 Sep 2020 13:57:38 -0700 Joseph Kogut <[email protected]> wrote:
Signed-off-by Joseph Kogut <[email protected]>
I did some more testing, and after building zlib for the host, the build fails with:
*** ERROR: package host-libzlib installs executables without proper RPATH:
*** /home/thomas/projets/buildroot/output/host/bin/sentry-cli
Indeed, sentry-cli is linked with libz.so.1:
0x0000000000000001 (NEEDED) Shared library: [libz.so.1] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x0000000000000001 (NEEDED) Shared library: [ld-linux-x86-64.so.2] 0x0000000000000001 (NEEDED) Shared library: [libdl.so.2] 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
I've seen that sentry-cli bundles OpenSSL (it seems), which is perhaps why it links against libz.so.1.
However, this means that sentry-cli should depend on host-zlib and should have a RPATH to $(HOST_DIR)/lib.
Could you have a look into this ? I've added in Cc some folks working on Cargo integration in Buildroot, to see if they can help.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/sentry-cli: new package
Hi Thomas,
Quoted 24 lines · Thomas Petazzoni
Hello,
Quoted 1 line · On Tue, 15 Sep 2020 13:57:38 -0700 Joseph Kogut <[email protected]> wrote:
Signed-off-by Joseph Kogut <[email protected]>I did some more testing, and after building zlib for the host, the build fails with:
*** ERROR: package host-libzlib installs executables without proper RPATH:
***/home/thomas/projets/buildroot/output/host/bin/sentry-cliIndeed, sentry-cli is linked with libz.so.1:
0x0000000000000001 (NEEDED) Shared library: [libz.so.1] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x0000000000000001 (NEEDED) Shared library: [ld-linux-x86-64.so.2] 0x0000000000000001 (NEEDED) Shared library: [libdl.so.2] 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
Quoted 9 lines
I've seen that sentry-cli bundles OpenSSL (it seems), which is perhaps why it links against libz.so.1.
However, this means that sentry-cli should depend on host-zlib and should have a RPATH to $(HOST_DIR)/lib.
Could you have a look into this ? I've added in Cc some folks working on Cargo integration in Buildroot, to see if they can help.
Definitely, thanks for making those changes and testing. I'll look into this and follow up with a patch.
Best,
Joseph