From 9600c36407c6d2de983e1ee2a488d2fd131c4ead Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Tue, 23 Jul 2024 16:33:02 +0530 Subject: [PATCH 01/43] build hab on aarch64-linux Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 4ec543b2af..24ced66b28 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -657,6 +657,20 @@ steps: automatic: limit: 1 + - label: "[build] :linux: aarch64 hab" + env: + HAB_LICENSE: "accept-no-persist" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - .expeditor/scripts/verify/build_package.sh components/hab + expeditor: + executor: + docker: + privileged: true + retry: + automatic: + limit: 1 + - label: "[build] :linux: launcher" env: HAB_LICENSE: "accept-no-persist" From e350fd77b08aca6ec0a534f190e2edf23997aa03 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Tue, 23 Jul 2024 18:53:43 +0530 Subject: [PATCH 02/43] try with arm64-linux Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 24ced66b28..c1a1238537 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -660,7 +660,7 @@ steps: - label: "[build] :linux: aarch64 hab" env: HAB_LICENSE: "accept-no-persist" - BUILD_PKG_TARGET: "aarch64-linux" + BUILD_PKG_TARGET: "arm64-linux" command: - .expeditor/scripts/verify/build_package.sh components/hab expeditor: From 59f4bfbfeb6ed03bbb0236c9788577fec5a218b5 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Tue, 23 Jul 2024 18:55:31 +0530 Subject: [PATCH 03/43] try with arm-linux Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index c1a1238537..ad1c3770fc 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -660,7 +660,7 @@ steps: - label: "[build] :linux: aarch64 hab" env: HAB_LICENSE: "accept-no-persist" - BUILD_PKG_TARGET: "arm64-linux" + BUILD_PKG_TARGET: "arm-linux" command: - .expeditor/scripts/verify/build_package.sh components/hab expeditor: From 3e96c31edba57dc039090384e472da70ecc95587 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Tue, 23 Jul 2024 20:17:37 +0530 Subject: [PATCH 04/43] with docker-linux-arm64 agent Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index ad1c3770fc..6d1ef182e8 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -658,6 +658,8 @@ steps: limit: 1 - label: "[build] :linux: aarch64 hab" + agents: + queue: docker-linux-arm64 env: HAB_LICENSE: "accept-no-persist" BUILD_PKG_TARGET: "arm-linux" From bb7bba487b1954c31b6563bdd2e80a7bcd64506a Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Tue, 23 Jul 2024 21:27:28 +0530 Subject: [PATCH 05/43] another try Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 6d1ef182e8..01dd8df4d2 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -665,13 +665,6 @@ steps: BUILD_PKG_TARGET: "arm-linux" command: - .expeditor/scripts/verify/build_package.sh components/hab - expeditor: - executor: - docker: - privileged: true - retry: - automatic: - limit: 1 - label: "[build] :linux: launcher" env: From e54284a001971dce49a78321d38c0c7c0f99664c Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Tue, 23 Jul 2024 21:35:00 +0530 Subject: [PATCH 06/43] fix target Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 01dd8df4d2..d8135dc394 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -662,7 +662,7 @@ steps: queue: docker-linux-arm64 env: HAB_LICENSE: "accept-no-persist" - BUILD_PKG_TARGET: "arm-linux" + BUILD_PKG_TARGET: "aarch64-linux" command: - .expeditor/scripts/verify/build_package.sh components/hab From ba752f11d97d6393c4851c3d032445d9e00b53e9 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Fri, 6 Sep 2024 11:08:42 +0530 Subject: [PATCH 07/43] temporary channel for arm64 Signed-off-by: Phani Sajja --- .expeditor/scripts/shared.sh | 11 +++++++++-- .expeditor/scripts/verify/build_package.sh | 5 +++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.expeditor/scripts/shared.sh b/.expeditor/scripts/shared.sh index 73af9f96cd..02fd1127c8 100755 --- a/.expeditor/scripts/shared.sh +++ b/.expeditor/scripts/shared.sh @@ -20,9 +20,16 @@ curlbash_hab() { sudo rm -rf /hab/pkgs/core/hab/0.82.0 || \ rm -rf /hab/pkgs/core/hab/0.82.0 fi - curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- -t "$pkg_target" + + # Use the temporarily uploaded Habitat package from the 'aarch64-linux' channel for aarch64. + # Once hab is released in the LTS channel, we can use either HAB_BLDR_CHANNEL or HAB_REFRESH_CHANNEL to install hab. + install_args="-t $pkg_target" + if [ "$pkg_target" = "aarch64-linux" ]; then + install_args="$install_args -c aarch64-linux -v 1.6.706" + fi + curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- $install_args case "${pkg_target}" in - x86_64-linux | x86_64-linux-kernel2) + x86_64-linux | aarch64-linux | x86_64-linux-kernel2) hab_binary="/bin/hab" ;; x86_64-darwin) diff --git a/.expeditor/scripts/verify/build_package.sh b/.expeditor/scripts/verify/build_package.sh index 61e81d6cd2..c37e3a4d2d 100755 --- a/.expeditor/scripts/verify/build_package.sh +++ b/.expeditor/scripts/verify/build_package.sh @@ -21,5 +21,10 @@ HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" echo "--- :key: Generating fake origin key" ${hab_binary} origin key generate +# Install the hab-studio from the 'aarch64-linux' channel. +# Once hab is released in the LTS channel, we can use either HAB_BLDR_CHANNEL or HAB_REFRESH_CHANNEL to install the studio. +if [ "$BUILD_PKG_TARGET" = "aarch64-linux" ]; then + ${hab_binary} pkg install core/hab-studio/1.6.706 --channel aarch64-linux +fi echo "--- :hab: Running hab pkg build for $package_path" ${hab_binary} pkg build "$package_path" From c84339e500a8ba1449550a1f32033d96e01a7179 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Fri, 6 Sep 2024 17:09:53 +0530 Subject: [PATCH 08/43] adjust rustc_target from pkg_target Signed-off-by: Phani Sajja --- components/hab/habitat/plan.sh | 10 +++- components/launcher/habitat/plan.sh | 2 +- .../pkg-export-container/habitat/plan.sh | 2 +- components/pkg-export-tar/habitat/plan.sh | 2 +- components/sup/habitat/plan.sh | 2 +- components/sup/static/plan.sh | 2 +- .../habitat/aarch64-linux/config/config.toml | 3 ++ .../aarch64-linux/config/render_context.json | 7 +++ .../habitat/aarch64-linux/default.toml | 3 ++ .../habitat/aarch64-linux/health_exit | 1 + .../habitat/aarch64-linux/hooks/health-check | 6 +++ .../habitat/aarch64-linux/hooks/init | 15 ++++++ .../habitat/aarch64-linux/hooks/post-run | 4 ++ .../habitat/aarch64-linux/hooks/post-stop | 14 ++++++ .../habitat/aarch64-linux/hooks/run | 20 ++++++++ .../test-probe/habitat/aarch64-linux/plan.sh | 47 +++++++++++++++++++ 16 files changed, 134 insertions(+), 6 deletions(-) create mode 100755 test-services/test-probe/habitat/aarch64-linux/config/config.toml create mode 100755 test-services/test-probe/habitat/aarch64-linux/config/render_context.json create mode 100755 test-services/test-probe/habitat/aarch64-linux/default.toml create mode 100644 test-services/test-probe/habitat/aarch64-linux/health_exit create mode 100644 test-services/test-probe/habitat/aarch64-linux/hooks/health-check create mode 100644 test-services/test-probe/habitat/aarch64-linux/hooks/init create mode 100644 test-services/test-probe/habitat/aarch64-linux/hooks/post-run create mode 100644 test-services/test-probe/habitat/aarch64-linux/hooks/post-stop create mode 100644 test-services/test-probe/habitat/aarch64-linux/hooks/run create mode 100644 test-services/test-probe/habitat/aarch64-linux/plan.sh diff --git a/components/hab/habitat/plan.sh b/components/hab/habitat/plan.sh index daa15efe6e..1c36321f71 100644 --- a/components/hab/habitat/plan.sh +++ b/components/hab/habitat/plan.sh @@ -53,7 +53,15 @@ do_before() { do_prepare() { _common_prepare - export rustc_target="x86_64-unknown-linux-musl" + # With the musl target, the ring crate is looking for aarch64-linux-musl-gcc, + # but the core/musl package provides musl-gcc. This workaround is necessary until the appropriate changes are made to core/musl for aarch64. + if [[ "${pkg_target%%-*}" == "aarch64" ]]; then + if [[ ! -r "$(pkg_path_for musl)/bin/musl-gcc" ]]; then + ln -sv "$(pkg_path_for musl)/bin/musl-gcc" "$(pkg_path_for musl)/bin/aarch64-linux-musl-gcc" + fi + fi + + export rustc_target="${pkg_target%%-*}-unknown-linux-musl" build_line "Setting rustc_target=$rustc_target" # Used to find libgcc_s.so.1 when compiling `build.rs` in dependencies. Since diff --git a/components/launcher/habitat/plan.sh b/components/launcher/habitat/plan.sh index 8d0582a673..0a1d672d41 100644 --- a/components/launcher/habitat/plan.sh +++ b/components/launcher/habitat/plan.sh @@ -30,7 +30,7 @@ do_prepare() { # Can be either `--release` or `--debug` to determine cargo build strategy build_line "Building artifacts with \`${cargo_build_mode#--}' mode" - export rustc_target="x86_64-unknown-linux-gnu" + export rustc_target="${pkg_target%%-*}-unknown-linux-gnu" build_line "Setting rustc_target=$rustc_target" # Used by Cargo to use a pristine, isolated directory for all compilation diff --git a/components/pkg-export-container/habitat/plan.sh b/components/pkg-export-container/habitat/plan.sh index 805bcfe311..f1efbce790 100644 --- a/components/pkg-export-container/habitat/plan.sh +++ b/components/pkg-export-container/habitat/plan.sh @@ -58,7 +58,7 @@ do_before() { do_prepare() { _common_prepare - export rustc_target="x86_64-unknown-linux-musl" + export rustc_target="${pkg_target%%-*}-unknown-linux-musl" build_line "Setting rustc_target=$rustc_target" # Used to find libgcc_s.so.1 when compiling `build.rs` in dependencies. Since diff --git a/components/pkg-export-tar/habitat/plan.sh b/components/pkg-export-tar/habitat/plan.sh index 41ab3b9da1..6518e15c93 100644 --- a/components/pkg-export-tar/habitat/plan.sh +++ b/components/pkg-export-tar/habitat/plan.sh @@ -52,7 +52,7 @@ do_before() { do_prepare() { _common_prepare - export rustc_target="x86_64-unknown-linux-musl" + export rustc_target="${pkg_target%%-*}-unknown-linux-musl" build_line "Setting rustc_target=$rustc_target" # Used to find libgcc_s.so.1 when compiling `build.rs` in dependencies. Since diff --git a/components/sup/habitat/plan.sh b/components/sup/habitat/plan.sh index adaf585d89..fb19b016bd 100644 --- a/components/sup/habitat/plan.sh +++ b/components/sup/habitat/plan.sh @@ -57,7 +57,7 @@ do_before() { do_prepare() { _common_prepare - export rustc_target="x86_64-unknown-linux-gnu" + export rustc_target="${pkg_target%%-*}-unknown-linux-gnu" build_line "Setting rustc_target=$rustc_target" export LIBZMQ_PREFIX=$(pkg_path_for zeromq) diff --git a/components/sup/static/plan.sh b/components/sup/static/plan.sh index 5248d5642a..2330aa2a39 100644 --- a/components/sup/static/plan.sh +++ b/components/sup/static/plan.sh @@ -17,7 +17,7 @@ do_begin() { do_prepare() { _common_prepare - export rustc_target="x86_64-unknown-linux-musl" + export rustc_target="${pkg_target%%-*}-unknown-linux-musl" build_line "Setting rustc_target=$rustc_target" # Used to find libgcc_s.so.1 when compiling `build.rs` in dependencies. Since diff --git a/test-services/test-probe/habitat/aarch64-linux/config/config.toml b/test-services/test-probe/habitat/aarch64-linux/config/config.toml new file mode 100755 index 0000000000..4dd3616399 --- /dev/null +++ b/test-services/test-probe/habitat/aarch64-linux/config/config.toml @@ -0,0 +1,3 @@ +host = "{{cfg.host}}" +port = {{cfg.port}} +render_context_file = "{{cfg.render_context_file}}" diff --git a/test-services/test-probe/habitat/aarch64-linux/config/render_context.json b/test-services/test-probe/habitat/aarch64-linux/config/render_context.json new file mode 100755 index 0000000000..92cf97f92f --- /dev/null +++ b/test-services/test-probe/habitat/aarch64-linux/config/render_context.json @@ -0,0 +1,7 @@ +{ + "sys": {{toJson sys}}, + "pkg": {{toJson pkg}}, + "cfg": {{toJson cfg}}, + "svc": {{toJson svc}}, + "bind": {{toJson bind}} +} diff --git a/test-services/test-probe/habitat/aarch64-linux/default.toml b/test-services/test-probe/habitat/aarch64-linux/default.toml new file mode 100755 index 0000000000..39442ac6a2 --- /dev/null +++ b/test-services/test-probe/habitat/aarch64-linux/default.toml @@ -0,0 +1,3 @@ +host = "0.0.0.0" +port = 8000 +render_context_file = "/hab/svc/test-probe/config/render_context.json" diff --git a/test-services/test-probe/habitat/aarch64-linux/health_exit b/test-services/test-probe/habitat/aarch64-linux/health_exit new file mode 100644 index 0000000000..c227083464 --- /dev/null +++ b/test-services/test-probe/habitat/aarch64-linux/health_exit @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/test-services/test-probe/habitat/aarch64-linux/hooks/health-check b/test-services/test-probe/habitat/aarch64-linux/hooks/health-check new file mode 100644 index 0000000000..b1a02df9e9 --- /dev/null +++ b/test-services/test-probe/habitat/aarch64-linux/hooks/health-check @@ -0,0 +1,6 @@ +#!{{pkgPathFor "core/bash"}}/bin/bash + +echo "Running health_check hook: {{pkg.ident}} (PID: $$, PPID: $PPID, PGID: $(ps h -o pgid -p $$))" +sleep 2 +echo "health_check finished!" +exit $(cat {{pkg.path}}/health_exit) diff --git a/test-services/test-probe/habitat/aarch64-linux/hooks/init b/test-services/test-probe/habitat/aarch64-linux/hooks/init new file mode 100644 index 0000000000..3122e1580f --- /dev/null +++ b/test-services/test-probe/habitat/aarch64-linux/hooks/init @@ -0,0 +1,15 @@ +#!{{pkgPathFor "core/bash"}}/bin/bash + +echo "Initializing package {{pkg.ident}} (PID: $$, PPID: $PPID, PGID: $(ps h -o pgid -p $$))" +sleep 1 +echo "... reticulating splines ..." +echo "... integrating curves ..." +echo "... relaxing splines ..." +echo "... calculating inverse probability matrices ..." +sleep 1 +echo "Deliberately taking a long time in the init hook" +for i in {1..10}; do + sleep 1 + echo "Sleeping ($i)/10..." +done +echo "init hook DONE" diff --git a/test-services/test-probe/habitat/aarch64-linux/hooks/post-run b/test-services/test-probe/habitat/aarch64-linux/hooks/post-run new file mode 100644 index 0000000000..4f3f72ca5c --- /dev/null +++ b/test-services/test-probe/habitat/aarch64-linux/hooks/post-run @@ -0,0 +1,4 @@ +#!{{pkgPathFor "core/bash"}}/bin/bash + +echo "Running post-run script: {{pkg.ident}} (PID: $$, PPID: $PPID, PGID: $(ps h -o pgid -p $$))" +echo "Done" diff --git a/test-services/test-probe/habitat/aarch64-linux/hooks/post-stop b/test-services/test-probe/habitat/aarch64-linux/hooks/post-stop new file mode 100644 index 0000000000..84411ed399 --- /dev/null +++ b/test-services/test-probe/habitat/aarch64-linux/hooks/post-stop @@ -0,0 +1,14 @@ +#!{{pkgPathFor "core/bash"}}/bin/bash + +byebye(){ + echo "Got a signal!" +} +trap byebye INT TERM + + +echo "Deliberately long post-stop hook executing: {{pkg.ident}} (PID: $$, PPID: $PPID, PGID: $(ps h -o pgid -p $$))" +for i in {1..15}; do + sleep 1 + echo "Sleeping ($i)/15..." +done +echo "post-stop hook DONE" diff --git a/test-services/test-probe/habitat/aarch64-linux/hooks/run b/test-services/test-probe/habitat/aarch64-linux/hooks/run new file mode 100644 index 0000000000..1005340ca9 --- /dev/null +++ b/test-services/test-probe/habitat/aarch64-linux/hooks/run @@ -0,0 +1,20 @@ +#!{{pkgPathFor "core/bash"}}/bin/bash + + +exec 2>&1 + +echo "Running {{pkg.ident}}" # (PID: $$, PPID: $PPID, PGID: $(ps h -o pgid -p $$))" +{{ #if bind.thing_with_a_port }} +echo "*************************************************************" +echo "Running with a bound service group for 'thing_with_a_port'" +{{ #each bind.thing_with_a_port.members as |m| ~}} +echo "- {{m.sys.hostname}}" +{{/each ~}} +echo "*************************************************************" +{{ else }} +echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" +echo "Running WITHOUT a bound service group for 'thing_with_a_port'" +echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" +{{ /if }} + +exec test-probe -c "{{pkg.svc_config_path}}/config.toml" diff --git a/test-services/test-probe/habitat/aarch64-linux/plan.sh b/test-services/test-probe/habitat/aarch64-linux/plan.sh new file mode 100644 index 0000000000..cfb9f84a0a --- /dev/null +++ b/test-services/test-probe/habitat/aarch64-linux/plan.sh @@ -0,0 +1,47 @@ +# shellcheck disable=2034,2154 +pkg_name=test-probe +pkg_origin=habitat-testing +pkg_version="0.1.0" +pkg_maintainer="The Habitat Maintainers " +pkg_license=("Apache-2.0") +pkg_bin_dirs=(bin) +pkg_deps=(core/glibc + core/gcc-libs + core/procps-ng + core/bash) +pkg_build_deps=(core/coreutils + core/rust + core/gcc + core/git + core/make) +pkg_binds_optional=( + [thing_with_a_port]="port" +) + +bin="test-probe" + +do_prepare() { + export rustc_target="aarch64-unknown-linux-gnu" + build_line "Setting rustc_target=$rustc_target" + + # Used by Cargo to use a pristine, isolated directory for all compilation + export CARGO_TARGET_DIR="$HAB_CACHE_SRC_PATH/$pkg_dirname" + build_line "Setting CARGO_TARGET_DIR=$CARGO_TARGET_DIR" +} + +do_build() { + ( + cd "$PLAN_CONTEXT"/.. || exit + cargo build --target="$rustc_target" --verbose + ) +} + +do_install() { + install -v -D "$CARGO_TARGET_DIR/$rustc_target/debug/$bin" \ + "$pkg_prefix/bin/$bin" + install -v -D "$PLAN_CONTEXT/health_exit" "$pkg_prefix" +} + +do_strip() { + return 0 +} From fcaa748eabd33004796ec847448f07a534aa3984 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Mon, 9 Sep 2024 12:10:21 +0530 Subject: [PATCH 09/43] build pkgs on aarch64 in ci Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 174 ++++++++++++++++++++++ components/hab/habitat/plan.sh | 2 +- components/pkg-export-tar/habitat/plan.sh | 8 + 3 files changed, 183 insertions(+), 1 deletion(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index d8135dc394..834fbdadd9 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -626,6 +626,23 @@ steps: automatic: limit: 1 + - label: "[build] :linux: aarch64 test-probe" + agents: + queue: docker-linux-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - .expeditor/scripts/verify/build_package.sh test-services/test-probe + expeditor: + executor: + docker: + privileged: true + retry: + automatic: + limit: 1 + # SHOULD BE UNCOMMENTED WHEN NEWER VERSION OF HAB IS RELEASED # - label: "[build] :linux: backline" @@ -643,6 +660,24 @@ steps: # automatic: # limit: 1 + # This build currently fails due to a circular dependency in 'LTS-2024' and needs investigation. + - label: "[build] :linux: aarch64 backline" + agents: + queue: docker-linux-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - .expeditor/scripts/verify/build_package.sh components/backline + expeditor: + executor: + docker: + privileged: true + retry: + automatic: + limit: 1 + - label: "[build] :linux: hab" env: HAB_LICENSE: "accept-no-persist" @@ -662,6 +697,7 @@ steps: queue: docker-linux-arm64 env: HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - .expeditor/scripts/verify/build_package.sh components/hab @@ -680,6 +716,23 @@ steps: automatic: limit: 1 + - label: "[build] :linux: aarch64 launcher" + agents: + queue: docker-linux-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - .expeditor/scripts/verify/build_package.sh components/launcher + expeditor: + executor: + docker: + privileged: true + retry: + automatic: + limit: 1 + # SHOULD BE UNCOMMENTED WHEN NEWER VERSION OF HAB IS RELEASED # - label: "[build] :linux: pkg-cfize" @@ -697,6 +750,24 @@ steps: # automatic: # limit: 1 + # This build currently fails due to a dependency on 'pkg-export-container' + - label: "[build] :linux: aarch64 pkg-cfize" + agents: + queue: docker-linux-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - .expeditor/scripts/verify/build_package.sh components/pkg-cfize + expeditor: + executor: + docker: + privileged: true + retry: + automatic: + limit: 1 + - label: "[build] :linux: pkg-export-container" env: HAB_LICENSE: "accept-no-persist" @@ -711,6 +782,24 @@ steps: automatic: limit: 1 + # This build currently fails due to a dependency on 'core/buildah', which is not available in 'LTS-2024'. + - label: "[build] :linux: aarch64 pkg-export-containe" + agents: + queue: docker-linux-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - .expeditor/scripts/verify/build_package.sh components/pkg-export-containe + expeditor: + executor: + docker: + privileged: true + retry: + automatic: + limit: 1 + - label: "[build] :linux: pkg-export-tar" env: HAB_LICENSE: "accept-no-persist" @@ -725,6 +814,23 @@ steps: automatic: limit: 1 + - label: "[build] :linux: aarch64 pkg-export-tar" + agents: + queue: docker-linux-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - .expeditor/scripts/verify/build_package.sh components/pkg-export-tar + expeditor: + executor: + docker: + privileged: true + retry: + automatic: + limit: 1 + - label: "[build] :linux: pkg-mesosize" env: HAB_LICENSE: "accept-no-persist" @@ -739,6 +845,23 @@ steps: automatic: limit: 1 + - label: "[build] :linux: aarch64 pkg-mesosize" + agents: + queue: docker-linux-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - .expeditor/scripts/verify/build_package.sh components/pkg-mesosize + expeditor: + executor: + docker: + privileged: true + retry: + automatic: + limit: 1 + - label: "[build] :linux: plan-build" env: HAB_LICENSE: "accept-no-persist" @@ -753,6 +876,23 @@ steps: automatic: limit: 1 + - label: "[build] :linux: aarch64 plan-build" + agents: + queue: docker-linux-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - .expeditor/scripts/verify/build_package.sh components/plan-build + expeditor: + executor: + docker: + privileged: true + retry: + automatic: + limit: 1 + - label: "[build] :linux: studio" env: HAB_LICENSE: "accept-no-persist" @@ -767,6 +907,23 @@ steps: automatic: limit: 1 + - label: "[build] :linux: aarch64 studio" + agents: + queue: docker-linux-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - .expeditor/scripts/verify/build_package.sh components/studio + expeditor: + executor: + docker: + privileged: true + retry: + automatic: + limit: 1 + - label: "[build] :linux: sup" env: HAB_LICENSE: "accept-no-persist" @@ -781,6 +938,23 @@ steps: automatic: limit: 1 + - label: "[build] :linux: aarch64 sup" + agents: + queue: docker-linux-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - .expeditor/scripts/verify/build_package.sh components/sup + expeditor: + executor: + docker: + privileged: true + retry: + automatic: + limit: 1 + ####################################################################### # Things that have no tests but should be built to make sure they # still build. - Linux Kernel 2 diff --git a/components/hab/habitat/plan.sh b/components/hab/habitat/plan.sh index 1c36321f71..e5d0787339 100644 --- a/components/hab/habitat/plan.sh +++ b/components/hab/habitat/plan.sh @@ -56,7 +56,7 @@ do_prepare() { # With the musl target, the ring crate is looking for aarch64-linux-musl-gcc, # but the core/musl package provides musl-gcc. This workaround is necessary until the appropriate changes are made to core/musl for aarch64. if [[ "${pkg_target%%-*}" == "aarch64" ]]; then - if [[ ! -r "$(pkg_path_for musl)/bin/musl-gcc" ]]; then + if [[ ! -r "$(pkg_path_for musl)/bin/aarch64-linux-musl-gcc" ]]; then ln -sv "$(pkg_path_for musl)/bin/musl-gcc" "$(pkg_path_for musl)/bin/aarch64-linux-musl-gcc" fi fi diff --git a/components/pkg-export-tar/habitat/plan.sh b/components/pkg-export-tar/habitat/plan.sh index 6518e15c93..7f6ca0ddd8 100644 --- a/components/pkg-export-tar/habitat/plan.sh +++ b/components/pkg-export-tar/habitat/plan.sh @@ -52,6 +52,14 @@ do_before() { do_prepare() { _common_prepare + # With the musl target, the ring crate is looking for aarch64-linux-musl-gcc, + # but the core/musl package provides musl-gcc. This workaround is necessary until the appropriate changes are made to core/musl for aarch64. + if [[ "${pkg_target%%-*}" == "aarch64" ]]; then + if [[ ! -r "$(pkg_path_for musl)/bin/aarch64-linux-musl-gcc" ]]; then + ln -sv "$(pkg_path_for musl)/bin/musl-gcc" "$(pkg_path_for musl)/bin/aarch64-linux-musl-gcc" + fi + fi + export rustc_target="${pkg_target%%-*}-unknown-linux-musl" build_line "Setting rustc_target=$rustc_target" From f20b1716f1a6ad1d778ea465557ab835a566127a Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Mon, 9 Sep 2024 12:26:07 +0530 Subject: [PATCH 10/43] try with default-privileged-aarch64 Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 834fbdadd9..5096dcbaa1 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -628,7 +628,7 @@ steps: - label: "[build] :linux: aarch64 test-probe" agents: - queue: docker-linux-arm64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" From 73602a24cc65f35bd21ea333bbb214feb1b1a935 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Mon, 9 Sep 2024 12:36:50 +0530 Subject: [PATCH 11/43] target default-privileged-aarch64 queue Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 5096dcbaa1..ba5883e430 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -663,7 +663,7 @@ steps: # This build currently fails due to a circular dependency in 'LTS-2024' and needs investigation. - label: "[build] :linux: aarch64 backline" agents: - queue: docker-linux-arm64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -694,7 +694,7 @@ steps: - label: "[build] :linux: aarch64 hab" agents: - queue: docker-linux-arm64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -718,7 +718,7 @@ steps: - label: "[build] :linux: aarch64 launcher" agents: - queue: docker-linux-arm64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -753,7 +753,7 @@ steps: # This build currently fails due to a dependency on 'pkg-export-container' - label: "[build] :linux: aarch64 pkg-cfize" agents: - queue: docker-linux-arm64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -785,7 +785,7 @@ steps: # This build currently fails due to a dependency on 'core/buildah', which is not available in 'LTS-2024'. - label: "[build] :linux: aarch64 pkg-export-containe" agents: - queue: docker-linux-arm64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -816,7 +816,7 @@ steps: - label: "[build] :linux: aarch64 pkg-export-tar" agents: - queue: docker-linux-arm64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -847,7 +847,7 @@ steps: - label: "[build] :linux: aarch64 pkg-mesosize" agents: - queue: docker-linux-arm64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -878,7 +878,7 @@ steps: - label: "[build] :linux: aarch64 plan-build" agents: - queue: docker-linux-arm64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -909,7 +909,7 @@ steps: - label: "[build] :linux: aarch64 studio" agents: - queue: docker-linux-arm64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -940,7 +940,7 @@ steps: - label: "[build] :linux: aarch64 sup" agents: - queue: docker-linux-arm64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" From ba7af1f619665a2e13fe995cd78fe9bf95052988 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Mon, 9 Sep 2024 13:32:47 +0530 Subject: [PATCH 12/43] try varied config Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index ba5883e430..b3f5c88063 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -628,7 +628,7 @@ steps: - label: "[build] :linux: aarch64 test-probe" agents: - queue: default-privileged-aarch64 + queue: default-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -670,10 +670,6 @@ steps: BUILD_PKG_TARGET: "aarch64-linux" command: - .expeditor/scripts/verify/build_package.sh components/backline - expeditor: - executor: - docker: - privileged: true retry: automatic: limit: 1 From fdfcaceb5f06f8443e1b1564fab872d6c0d1323a Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Mon, 9 Sep 2024 13:34:34 +0530 Subject: [PATCH 13/43] default-arm64 Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index b3f5c88063..eb60039aba 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -628,7 +628,7 @@ steps: - label: "[build] :linux: aarch64 test-probe" agents: - queue: default-aarch64 + queue: default-arm64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" From 386e737c48c12e8264b595d700d03b2b7db0e24e Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Mon, 9 Sep 2024 13:52:02 +0530 Subject: [PATCH 14/43] try without privileged Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index eb60039aba..a6090419e8 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -638,7 +638,6 @@ steps: expeditor: executor: docker: - privileged: true retry: automatic: limit: 1 From 90d6edfa9fd42b54e82cb181a001f41b699a1182 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Mon, 9 Sep 2024 14:08:01 +0530 Subject: [PATCH 15/43] revert privileged Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index a6090419e8..eb60039aba 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -638,6 +638,7 @@ steps: expeditor: executor: docker: + privileged: true retry: automatic: limit: 1 From 6cb11710dbc57ce216709a66f6b2e47fe8087f66 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Mon, 9 Sep 2024 19:50:59 +0530 Subject: [PATCH 16/43] fix shellcheck Signed-off-by: Phani Sajja --- .expeditor/scripts/shared.sh | 2 +- components/hab/habitat/plan.sh | 4 ++-- components/pkg-export-container/habitat/plan.sh | 4 ++-- components/pkg-export-tar/habitat/plan.sh | 4 ++-- components/sup/habitat/plan.sh | 4 ++-- components/sup/static/plan.sh | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.expeditor/scripts/shared.sh b/.expeditor/scripts/shared.sh index 02fd1127c8..cd57710617 100755 --- a/.expeditor/scripts/shared.sh +++ b/.expeditor/scripts/shared.sh @@ -27,7 +27,7 @@ curlbash_hab() { if [ "$pkg_target" = "aarch64-linux" ]; then install_args="$install_args -c aarch64-linux -v 1.6.706" fi - curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- $install_args + curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- "$install_args" case "${pkg_target}" in x86_64-linux | aarch64-linux | x86_64-linux-kernel2) hab_binary="/bin/hab" diff --git a/components/hab/habitat/plan.sh b/components/hab/habitat/plan.sh index e5d0787339..e9d25f2831 100644 --- a/components/hab/habitat/plan.sh +++ b/components/hab/habitat/plan.sh @@ -87,12 +87,12 @@ do_prepare() { do_build() { pushd "$SRC_PATH" > /dev/null || exit - cargo build ${build_type#--debug} --target=$rustc_target --verbose + cargo build ${build_type#--debug} --target="$rustc_target" --verbose popd > /dev/null || exit } do_install() { - install -v -D "$CARGO_TARGET_DIR"/$rustc_target/${build_type#--}/$bin \ + install -v -D "$CARGO_TARGET_DIR"/"$rustc_target"/${build_type#--}/$bin \ "$pkg_prefix"/bin/$bin } diff --git a/components/pkg-export-container/habitat/plan.sh b/components/pkg-export-container/habitat/plan.sh index f1efbce790..3fda523b9b 100644 --- a/components/pkg-export-container/habitat/plan.sh +++ b/components/pkg-export-container/habitat/plan.sh @@ -89,12 +89,12 @@ do_prepare() { do_build() { pushd "$PLAN_CONTEXT" || exit - cargo build ${build_type#--debug} --target=$rustc_target --verbose + cargo build ${build_type#--debug} --target="$rustc_target" --verbose popd || exit } do_install() { - install -v -D "$CARGO_TARGET_DIR"/$rustc_target/${build_type#--}/$bin \ + install -v -D "$CARGO_TARGET_DIR"/"$rustc_target"/${build_type#--}/$bin \ "$pkg_prefix"/bin/$bin } diff --git a/components/pkg-export-tar/habitat/plan.sh b/components/pkg-export-tar/habitat/plan.sh index 7f6ca0ddd8..8bb4093e46 100644 --- a/components/pkg-export-tar/habitat/plan.sh +++ b/components/pkg-export-tar/habitat/plan.sh @@ -82,11 +82,11 @@ do_prepare() { do_build() { pushd "$PLAN_CONTEXT" || exit - cargo build ${build_type#--debug} --target=$rustc_target --verbose + cargo build ${build_type#--debug} --target="$rustc_target" --verbose popd || exit } do_install() { - install -v -D "$CARGO_TARGET_DIR"/$rustc_target/${build_type#--}/$bin \ + install -v -D "$CARGO_TARGET_DIR"/"$rustc_target"/${build_type#--}/$bin \ "$pkg_prefix"/bin/$bin } diff --git a/components/sup/habitat/plan.sh b/components/sup/habitat/plan.sh index fb19b016bd..5cae29a76a 100644 --- a/components/sup/habitat/plan.sh +++ b/components/sup/habitat/plan.sh @@ -91,13 +91,13 @@ do_build() { export LIBRARY_PATH=$LIBZMQ_PREFIX/lib pushd "$SRC_PATH" > /dev/null || exit - cargo build ${build_type#--debug} --target=$rustc_target --verbose --no-default-features \ + cargo build ${build_type#--debug} --target="$rustc_target" --verbose --no-default-features \ --features apidocs popd > /dev/null || exit } do_install() { - install -v -D "$CARGO_TARGET_DIR"/$rustc_target/${build_type#--}/$bin \ + install -v -D "$CARGO_TARGET_DIR"/"$rustc_target"/${build_type#--}/$bin \ "$pkg_prefix"/bin/$bin } diff --git a/components/sup/static/plan.sh b/components/sup/static/plan.sh index 2330aa2a39..59dedae4ba 100644 --- a/components/sup/static/plan.sh +++ b/components/sup/static/plan.sh @@ -13,7 +13,7 @@ do_begin() { PLAN_CONTEXT=$(abspath ..) } -# shellcheck disable=2155 +# shellcheck disable=2155,SC2154 do_prepare() { _common_prepare From 5df4362b53da864208bfb1284e141972dddc5ffb Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Wed, 11 Sep 2024 10:55:31 +0530 Subject: [PATCH 17/43] trigger pipeline Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index eb60039aba..38d8bd0e0d 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -628,7 +628,7 @@ steps: - label: "[build] :linux: aarch64 test-probe" agents: - queue: default-arm64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -670,6 +670,10 @@ steps: BUILD_PKG_TARGET: "aarch64-linux" command: - .expeditor/scripts/verify/build_package.sh components/backline + expeditor: + executor: + docker: + privileged: true retry: automatic: limit: 1 @@ -697,6 +701,10 @@ steps: BUILD_PKG_TARGET: "aarch64-linux" command: - .expeditor/scripts/verify/build_package.sh components/hab + expeditor: + executor: + docker: + privileged: true - label: "[build] :linux: launcher" env: From 911d84549fd78ad5f11dce8d48e5e000c0f366b5 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Wed, 11 Sep 2024 11:34:08 +0530 Subject: [PATCH 18/43] try without quotes Signed-off-by: Phani Sajja --- .expeditor/scripts/shared.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.expeditor/scripts/shared.sh b/.expeditor/scripts/shared.sh index cd57710617..666369f335 100755 --- a/.expeditor/scripts/shared.sh +++ b/.expeditor/scripts/shared.sh @@ -25,9 +25,10 @@ curlbash_hab() { # Once hab is released in the LTS channel, we can use either HAB_BLDR_CHANNEL or HAB_REFRESH_CHANNEL to install hab. install_args="-t $pkg_target" if [ "$pkg_target" = "aarch64-linux" ]; then - install_args="$install_args -c aarch64-linux -v 1.6.706" + install_args+="-c aarch64-linux -v 1.6.706" fi - curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- "$install_args" + echo "install_args: $install_args" + curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- ${install_args} case "${pkg_target}" in x86_64-linux | aarch64-linux | x86_64-linux-kernel2) hab_binary="/bin/hab" From 106a9c4f67756e496ff15b4abeee32fa7195a4f5 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Wed, 11 Sep 2024 11:42:32 +0530 Subject: [PATCH 19/43] add missing space in cmd aqrgs Signed-off-by: Phani Sajja --- .expeditor/scripts/shared.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.expeditor/scripts/shared.sh b/.expeditor/scripts/shared.sh index 666369f335..a8f434de58 100755 --- a/.expeditor/scripts/shared.sh +++ b/.expeditor/scripts/shared.sh @@ -25,7 +25,7 @@ curlbash_hab() { # Once hab is released in the LTS channel, we can use either HAB_BLDR_CHANNEL or HAB_REFRESH_CHANNEL to install hab. install_args="-t $pkg_target" if [ "$pkg_target" = "aarch64-linux" ]; then - install_args+="-c aarch64-linux -v 1.6.706" + install_args+=" -c aarch64-linux -v 1.6.706" fi echo "install_args: $install_args" curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- ${install_args} From 9c59e3540ad35e11ace7146289dad499ad70ae91 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Thu, 19 Sep 2024 13:52:19 +0530 Subject: [PATCH 20/43] try with docker-linux-amazon-2023-arm64 Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 38d8bd0e0d..df00d01b8c 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -628,7 +628,7 @@ steps: - label: "[build] :linux: aarch64 test-probe" agents: - queue: default-privileged-aarch64 + queue: docker-linux-amazon-2023-arm64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" From e135a22e952aa4d6de0822d02d14aea5ccd78ad0 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Thu, 19 Sep 2024 14:41:40 +0530 Subject: [PATCH 21/43] try sudo Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index df00d01b8c..abf16ab5db 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -634,11 +634,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - .expeditor/scripts/verify/build_package.sh test-services/test-probe - expeditor: - executor: - docker: - privileged: true + - sudo -E .expeditor/scripts/verify/build_package.sh test-services/test-probe retry: automatic: limit: 1 From 2ef816ae8f144d91c5e7a870c7ec54fed8e49042 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Thu, 19 Sep 2024 15:08:46 +0530 Subject: [PATCH 22/43] target docker-linux-amazon-2023-arm64 with sudo Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 83 ++++++++++------------------------ 1 file changed, 23 insertions(+), 60 deletions(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index abf16ab5db..9b50022c03 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -659,17 +659,13 @@ steps: # This build currently fails due to a circular dependency in 'LTS-2024' and needs investigation. - label: "[build] :linux: aarch64 backline" agents: - queue: default-privileged-aarch64 + queue: docker-linux-amazon-2023-arm64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - .expeditor/scripts/verify/build_package.sh components/backline - expeditor: - executor: - docker: - privileged: true + - sudo -E .expeditor/scripts/verify/build_package.sh components/backline retry: automatic: limit: 1 @@ -690,17 +686,16 @@ steps: - label: "[build] :linux: aarch64 hab" agents: - queue: default-privileged-aarch64 + queue: docker-linux-amazon-2023-arm64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - .expeditor/scripts/verify/build_package.sh components/hab - expeditor: - executor: - docker: - privileged: true + - sudo -E .expeditor/scripts/verify/build_package.sh components/hab + retry: + automatic: + limit: 1 - label: "[build] :linux: launcher" env: @@ -718,17 +713,13 @@ steps: - label: "[build] :linux: aarch64 launcher" agents: - queue: default-privileged-aarch64 + queue: docker-linux-amazon-2023-arm64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - .expeditor/scripts/verify/build_package.sh components/launcher - expeditor: - executor: - docker: - privileged: true + - sudo -E .expeditor/scripts/verify/build_package.sh components/launcher retry: automatic: limit: 1 @@ -753,17 +744,13 @@ steps: # This build currently fails due to a dependency on 'pkg-export-container' - label: "[build] :linux: aarch64 pkg-cfize" agents: - queue: default-privileged-aarch64 + queue: docker-linux-amazon-2023-arm64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - .expeditor/scripts/verify/build_package.sh components/pkg-cfize - expeditor: - executor: - docker: - privileged: true + - sudo -E .expeditor/scripts/verify/build_package.sh components/pkg-cfize retry: automatic: limit: 1 @@ -785,17 +772,13 @@ steps: # This build currently fails due to a dependency on 'core/buildah', which is not available in 'LTS-2024'. - label: "[build] :linux: aarch64 pkg-export-containe" agents: - queue: default-privileged-aarch64 + queue: docker-linux-amazon-2023-arm64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - .expeditor/scripts/verify/build_package.sh components/pkg-export-containe - expeditor: - executor: - docker: - privileged: true + - sudo -E .expeditor/scripts/verify/build_package.sh components/pkg-export-containe retry: automatic: limit: 1 @@ -816,17 +799,13 @@ steps: - label: "[build] :linux: aarch64 pkg-export-tar" agents: - queue: default-privileged-aarch64 + queue: docker-linux-amazon-2023-arm64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - .expeditor/scripts/verify/build_package.sh components/pkg-export-tar - expeditor: - executor: - docker: - privileged: true + - sudo -E .expeditor/scripts/verify/build_package.sh components/pkg-export-tar retry: automatic: limit: 1 @@ -847,17 +826,13 @@ steps: - label: "[build] :linux: aarch64 pkg-mesosize" agents: - queue: default-privileged-aarch64 + queue: docker-linux-amazon-2023-arm64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - .expeditor/scripts/verify/build_package.sh components/pkg-mesosize - expeditor: - executor: - docker: - privileged: true + - sudo -E .expeditor/scripts/verify/build_package.sh components/pkg-mesosize retry: automatic: limit: 1 @@ -878,17 +853,13 @@ steps: - label: "[build] :linux: aarch64 plan-build" agents: - queue: default-privileged-aarch64 + queue: docker-linux-amazon-2023-arm64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - .expeditor/scripts/verify/build_package.sh components/plan-build - expeditor: - executor: - docker: - privileged: true + - sudo -E .expeditor/scripts/verify/build_package.sh components/plan-build retry: automatic: limit: 1 @@ -909,17 +880,13 @@ steps: - label: "[build] :linux: aarch64 studio" agents: - queue: default-privileged-aarch64 + queue: docker-linux-amazon-2023-arm64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - .expeditor/scripts/verify/build_package.sh components/studio - expeditor: - executor: - docker: - privileged: true + - sudo -E .expeditor/scripts/verify/build_package.sh components/studio retry: automatic: limit: 1 @@ -940,17 +907,13 @@ steps: - label: "[build] :linux: aarch64 sup" agents: - queue: default-privileged-aarch64 + queue: docker-linux-amazon-2023-arm64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - .expeditor/scripts/verify/build_package.sh components/sup - expeditor: - executor: - docker: - privileged: true + - sudo -E .expeditor/scripts/verify/build_package.sh components/sup retry: automatic: limit: 1 From 52f7b10731bd60f364a097a8799a5a91c9ae93ba Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Mon, 23 Sep 2024 22:32:09 +0530 Subject: [PATCH 23/43] fix component name Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 9b50022c03..cdd52cf9d6 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -770,7 +770,7 @@ steps: limit: 1 # This build currently fails due to a dependency on 'core/buildah', which is not available in 'LTS-2024'. - - label: "[build] :linux: aarch64 pkg-export-containe" + - label: "[build] :linux: aarch64 pkg-export-container" agents: queue: docker-linux-amazon-2023-arm64 env: @@ -778,7 +778,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/build_package.sh components/pkg-export-containe + - sudo -E .expeditor/scripts/verify/build_package.sh components/pkg-export-container retry: automatic: limit: 1 From bd0f999f92d3f29598904a688e5f2eca469a8442 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Wed, 25 Sep 2024 10:57:32 +0530 Subject: [PATCH 24/43] disable shellcheck SC2086 Signed-off-by: Phani Sajja --- .expeditor/scripts/shared.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.expeditor/scripts/shared.sh b/.expeditor/scripts/shared.sh index a8f434de58..7595f24a44 100755 --- a/.expeditor/scripts/shared.sh +++ b/.expeditor/scripts/shared.sh @@ -28,6 +28,7 @@ curlbash_hab() { install_args+=" -c aarch64-linux -v 1.6.706" fi echo "install_args: $install_args" + # shellcheck disable=SC2086 curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- ${install_args} case "${pkg_target}" in x86_64-linux | aarch64-linux | x86_64-linux-kernel2) From 15391a03c65673af9c7bc68d0ab4b8a6b13e3155 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Fri, 4 Oct 2024 13:50:25 +0530 Subject: [PATCH 25/43] first cargo test Signed-off-by: Phani Sajja --- .../scripts/verify/run_cargo_test-aarch64.sh | 65 +++++++++++++++++++ .expeditor/verify.pipeline.yml | 14 ++++ 2 files changed, 79 insertions(+) create mode 100755 .expeditor/scripts/verify/run_cargo_test-aarch64.sh diff --git a/.expeditor/scripts/verify/run_cargo_test-aarch64.sh b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh new file mode 100755 index 0000000000..3b1952496f --- /dev/null +++ b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh @@ -0,0 +1,65 @@ +#!/bin/bash + +set -eou pipefail + +# shellcheck source=.expeditor/scripts/shared.sh +source .expeditor/scripts/verify/shared.sh + +if [[ ${1:-"--"} = "--" ]]; then + scope="habitat workspace" +else + component="$1" + shift + scope="$component" +fi + +toolchain=$(get_toolchain) + +hab pkg install core/zeromq +hab pkg install core/protobuf +hab pkg install core/rust/"$toolchain" +hab pkg install core/xz +hab pkg install core/coreutils +hab pkg install core/openssl + +export LIBZMQ_PREFIX +LIBZMQ_PREFIX=$(hab pkg path core/zeromq) +# now include zeromq and gcc so they exist in the runtime library path when cargo test is run +export LD_LIBRARY_PATH +LD_LIBRARY_PATH="$(hab pkg path core/gcc-base)/lib:$(hab pkg path core/zeromq)/lib:$(hab pkg path core/xz)/lib:$(hab pkg path core/openssl)/lib" +export LIBRARY_PATH="$(hab pkg path core/xz)/lib" + +export PROTOC_NO_VENDOR=1 +export PROTOC +PROTOC=$(hab pkg path core/protobuf)/bin/protoc + +_oldPth=$PATH +_pth="$(hab pkg path core/coreutils)/bin:$(hab pkg path core/openssl)/bin" +eval "$(hab pkg env core/rust/"$toolchain"):$PATH" +export PATH="$PATH:$_pth:$_oldPth" + +export OPENSSL_DIR="$(hab pkg path core/openssl)/bin" +export OPENSSL_LIB_DIR="$(hab pkg path core/openssl)/lib" + +# Set testing filesystem root +export FS_ROOT +FS_ROOT=$(mktemp -d /tmp/testing-fs-root-XXXXXX) + +export RUST_BACKTRACE=1 + +# Build the all the hab binaries so that we can run integration tests +if [[ "$scope" == "sup" ]]; then + cargo build +fi + +echo "--- Running cargo test with scope '$scope' and args '$*'" + +if [[ -n ${component:-} ]]; then + cd "components/$component" +fi + +# Always add `--quiet` to avoid the noise of compilation in test output. +# The invocation to this script can add `--format pretty` to the test runner +# args (that is, after --, like --nocapture and --test-threads) if the names +# of the tests being run is desired in the output. +cargo test --quiet "$@" diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index cdd52cf9d6..228150e251 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -111,6 +111,20 @@ steps: automatic: limit: 1 + - label: "[unit] :linux: aarch64 ignored" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test.sh -- --ignored + timeout_in_minutes: 20 + retry: + automatic: + limit: 1 + - label: "[unit] :linux: builder-api-client" command: - .expeditor/scripts/verify/run_cargo_test.sh builder-api-client From ed5925b123bb377eaf0ca513c3b65b81591341e5 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Fri, 4 Oct 2024 14:04:05 +0530 Subject: [PATCH 26/43] fix command Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 228150e251..1a9788f23a 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -119,7 +119,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test.sh -- --ignored + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh -- --ignored timeout_in_minutes: 20 retry: automatic: From 1257f999cbd1a6b999be8260b4798875eccf95e5 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Fri, 4 Oct 2024 15:30:19 +0530 Subject: [PATCH 27/43] add deps Signed-off-by: Phani Sajja --- .expeditor/scripts/verify/run_cargo_test-aarch64.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.expeditor/scripts/verify/run_cargo_test-aarch64.sh b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh index 3b1952496f..467ae130bf 100755 --- a/.expeditor/scripts/verify/run_cargo_test-aarch64.sh +++ b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh @@ -21,6 +21,11 @@ hab pkg install core/rust/"$toolchain" hab pkg install core/xz hab pkg install core/coreutils hab pkg install core/openssl +hab pkg install core/perl +hab pkg install core/make + +export OPENSSL_DIR="$(hab pkg path core/openssl)/bin" +export OPENSSL_LIB_DIR="$(hab pkg path core/openssl)/lib" export LIBZMQ_PREFIX LIBZMQ_PREFIX=$(hab pkg path core/zeromq) @@ -34,13 +39,10 @@ export PROTOC PROTOC=$(hab pkg path core/protobuf)/bin/protoc _oldPth=$PATH -_pth="$(hab pkg path core/coreutils)/bin:$(hab pkg path core/openssl)/bin" +_pth="$(hab pkg path core/coreutils)/bin:$(hab pkg path core/openssl)/bin:$(hab pkg path core/perl)/bin:$(hab pkg path core/make)/bin" eval "$(hab pkg env core/rust/"$toolchain"):$PATH" export PATH="$PATH:$_pth:$_oldPth" -export OPENSSL_DIR="$(hab pkg path core/openssl)/bin" -export OPENSSL_LIB_DIR="$(hab pkg path core/openssl)/lib" - # Set testing filesystem root export FS_ROOT FS_ROOT=$(mktemp -d /tmp/testing-fs-root-XXXXXX) From 11ae276030e71f0c3efc921bc2e7fdc38e7587cf Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Fri, 4 Oct 2024 16:13:09 +0530 Subject: [PATCH 28/43] add all unit tests Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 217 +++++++++++++++++++++++++++++++++ 1 file changed, 217 insertions(+) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 1a9788f23a..9f805cfe75 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -137,6 +137,20 @@ steps: automatic: limit: 1 + - label: "[unit] :linux: aarch64 builder-api-client" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh builder-api-client + timeout_in_minutes: 20 + retry: + automatic: + limit: 1 + - label: "[unit] :linux: butterfly lock_as_mutex" command: - .expeditor/scripts/verify/run_cargo_test.sh butterfly --features "lock_as_mutex" -- --test-threads=1 --format=pretty @@ -147,6 +161,18 @@ steps: timeout_in_minutes: 20 soft_fail: true + - label: "[unit] :linux: aarch64 butterfly lock_as_mutex" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh butterfly --features "lock_as_mutex" -- --test-threads=1 --format=pretty + timeout_in_minutes: 20 + soft_fail: true + - label: "[unit] :linux: butterfly lock_as_rwlock" command: - .expeditor/scripts/verify/run_cargo_test.sh butterfly --features "lock_as_rwlock" -- --test-threads=1 --format=pretty @@ -159,6 +185,20 @@ steps: automatic: limit: 1 + - label: "[unit] :linux: aarch64 butterfly lock_as_rwlock" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh butterfly --features "lock_as_rwlock" -- --test-threads=1 --format=pretty + timeout_in_minutes: 20 + retry: + automatic: + limit: 1 + - label: "[unit] :linux: common" command: - .expeditor/scripts/verify/run_cargo_test.sh common @@ -176,6 +216,20 @@ steps: automatic: limit: 1 + - label: "[unit] :linux: aarch64 common" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh common + timeout_in_minutes: 10 + retry: + automatic: + limit: 1 + - label: "[unit] :linux: core" command: - .expeditor/scripts/verify/run_cargo_test.sh core @@ -188,6 +242,20 @@ steps: automatic: limit: 1 + - label: "[unit] :linux: aarch64 core" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh core + timeout_in_minutes: 10 + retry: + automatic: + limit: 1 + - label: "[unit] :linux: core functional" command: - .expeditor/scripts/verify/run_cargo_test.sh core --features "functional" -- --format=pretty @@ -197,6 +265,17 @@ steps: privileged: true timeout_in_minutes: 20 + - label: "[unit] :linux: aarch64 core functional" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh core --features "functional" -- --format=pretty + timeout_in_minutes: 20 + - label: "[unit] :linux: http-client" command: - .expeditor/scripts/verify/run_cargo_test.sh http-client @@ -209,6 +288,20 @@ steps: automatic: limit: 1 + - label: "[unit] :linux: aarch64 http-client" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh http-client + timeout_in_minutes: 10 + retry: + automatic: + limit: 1 + - label: "[unit] :linux: hab" command: - .expeditor/scripts/verify/run_cargo_test.sh hab @@ -221,6 +314,20 @@ steps: automatic: limit: 1 + - label: "[unit] :linux: aarch64 hab" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh hab + timeout_in_minutes: 10 + retry: + automatic: + limit: 1 + - label: "[unit] :linux: launcher-client" command: - .expeditor/scripts/verify/run_cargo_test.sh launcher-client @@ -233,6 +340,20 @@ steps: automatic: limit: 1 + - label: "[unit] :linux: aarch64 launcher-client" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh launcher-client + timeout_in_minutes: 10 + retry: + automatic: + limit: 1 + - label: "[unit] :linux: launcher-protocol" command: - .expeditor/scripts/verify/run_cargo_test.sh launcher-protocol @@ -245,6 +366,20 @@ steps: automatic: limit: 1 + - label: "[unit] :linux: aarch64 launcher-protocol" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh launcher-protocol + timeout_in_minutes: 10 + retry: + automatic: + limit: 1 + - label: "[unit] :linux: pkg-export-container" command: - .expeditor/scripts/verify/run_cargo_test.sh pkg-export-container @@ -257,6 +392,20 @@ steps: automatic: limit: 1 + - label: "[unit] :linux: aarch64 pkg-export-container" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh pkg-export-container + timeout_in_minutes: 10 + retry: + automatic: + limit: 1 + - label: "[unit] :linux: pkg-export-tar" command: - .expeditor/scripts/verify/run_cargo_test.sh pkg-export-tar @@ -269,6 +418,20 @@ steps: automatic: limit: 1 + - label: "[unit] :linux: aarch64 pkg-export-tar" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh pkg-export-tar + timeout_in_minutes: 10 + retry: + automatic: + limit: 1 + - label: "[unit] :linux: sup lock_as_rwlock" command: - .expeditor/scripts/verify/run_cargo_test.sh sup --features "lock_as_rwlock" @@ -281,6 +444,20 @@ steps: automatic: limit: 1 + - label: "[unit] :linux: aarch64 sup lock_as_rwlock" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh sup --features "lock_as_rwlock" + timeout_in_minutes: 40 + retry: + automatic: + limit: 1 + - label: "[unit] :linux: sup lock_as_mutex" command: - .expeditor/scripts/verify/run_cargo_test.sh sup --features "lock_as_mutex" @@ -291,6 +468,18 @@ steps: timeout_in_minutes: 40 soft_fail: true + - label: "[unit] :linux: aarch64 sup lock_as_mutex" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh sup --features "lock_as_mutex" + timeout_in_minutes: 40 + soft_fail: true + - label: "[unit] :linux: sup-client" command: - .expeditor/scripts/verify/run_cargo_test.sh sup-client @@ -303,6 +492,20 @@ steps: automatic: limit: 1 + - label: "[unit] :linux: aarch64 sup-client" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh sup-client + timeout_in_minutes: 10 + retry: + automatic: + limit: 1 + - label: "[unit] :linux: sup-protocol" command: - .expeditor/scripts/verify/run_cargo_test.sh sup-protocol @@ -315,6 +518,20 @@ steps: automatic: limit: 1 + - label: "[unit] :linux: aarch64 sup-protocol" + agents: + queue: docker-linux-amazon-2023-arm64 + env: + HAB_LICENSE: "accept-no-persist" + HAB_BLDR_CHANNEL: "LTS-2024" + BUILD_PKG_TARGET: "aarch64-linux" + command: + - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh sup-protocol + timeout_in_minutes: 10 + retry: + automatic: + limit: 1 + - label: "[unit] :linux: studio" command: - .expeditor/scripts/verify/run_studio_test.sh From d69bf24196537e0109610beaf87b5bea9352bcd8 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Fri, 4 Oct 2024 16:18:19 +0530 Subject: [PATCH 29/43] fix shellcheck Signed-off-by: Phani Sajja --- .expeditor/scripts/verify/run_cargo_test-aarch64.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.expeditor/scripts/verify/run_cargo_test-aarch64.sh b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh index 467ae130bf..2ced32e081 100755 --- a/.expeditor/scripts/verify/run_cargo_test-aarch64.sh +++ b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh @@ -24,15 +24,19 @@ hab pkg install core/openssl hab pkg install core/perl hab pkg install core/make -export OPENSSL_DIR="$(hab pkg path core/openssl)/bin" -export OPENSSL_LIB_DIR="$(hab pkg path core/openssl)/lib" +export OPENSSL_DIR +OPENSSL_DIR="$(hab pkg path core/openssl)/bin" +export OPENSSL_LIB_DIR +OPENSSL_LIB_DIR="$(hab pkg path core/openssl)/lib" export LIBZMQ_PREFIX LIBZMQ_PREFIX=$(hab pkg path core/zeromq) # now include zeromq and gcc so they exist in the runtime library path when cargo test is run export LD_LIBRARY_PATH LD_LIBRARY_PATH="$(hab pkg path core/gcc-base)/lib:$(hab pkg path core/zeromq)/lib:$(hab pkg path core/xz)/lib:$(hab pkg path core/openssl)/lib" -export LIBRARY_PATH="$(hab pkg path core/xz)/lib" + +export LIBRARY_PATH +LIBRARY_PATH="$(hab pkg path core/xz)/lib" export PROTOC_NO_VENDOR=1 export PROTOC From 0830856c02f6e03de42d5839a876f43f3660e617 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Mon, 7 Oct 2024 17:21:35 +0530 Subject: [PATCH 30/43] adjust script, fix test Signed-off-by: Phani Sajja --- .../scripts/verify/run_cargo_test-aarch64.sh | 16 ++++++++-------- components/common/src/templating/hooks.rs | 11 ----------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/.expeditor/scripts/verify/run_cargo_test-aarch64.sh b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh index 2ced32e081..85ce2d7d71 100755 --- a/.expeditor/scripts/verify/run_cargo_test-aarch64.sh +++ b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh @@ -15,14 +15,14 @@ fi toolchain=$(get_toolchain) -hab pkg install core/zeromq -hab pkg install core/protobuf -hab pkg install core/rust/"$toolchain" -hab pkg install core/xz -hab pkg install core/coreutils -hab pkg install core/openssl -hab pkg install core/perl -hab pkg install core/make +sudo -E hab pkg install core/zeromq +sudo -E hab pkg install core/protobuf +sudo -E hab pkg install core/rust/"$toolchain" +sudo -E hab pkg install core/xz +sudo -E hab pkg install core/coreutils +sudo -E hab pkg install core/openssl +sudo -E hab pkg install core/perl +sudo -E hab pkg install core/make export OPENSSL_DIR OPENSSL_DIR="$(hab pkg path core/openssl)/bin" diff --git a/components/common/src/templating/hooks.rs b/components/common/src/templating/hooks.rs index c0abb0a717..d2ad20aa95 100644 --- a/components/common/src/templating/hooks.rs +++ b/components/common/src/templating/hooks.rs @@ -635,7 +635,6 @@ mod tests { test_helpers::*}; #[cfg(not(any(all(target_os = "linux", any(target_arch = "x86_64")), all(target_os = "windows", target_arch = "x86_64"),)))] - use habitat_core::package::metadata::MetaFile; use habitat_core::{package::{PackageIdent, PackageInstall}, service::ServiceGroup}; @@ -866,16 +865,6 @@ echo "The message is Hola Mundo" PathBuf::from("/tmp"), PathBuf::from("/tmp")); - // Platforms without standard package support require all packages to be native packages - #[cfg(not(any(all(target_os = "linux", any(target_arch = "x86_64")), - all(target_os = "windows", target_arch = "x86_64"))))] - { - tokio::fs::create_dir_all(pkg_install.installed_path()).await - .unwrap(); - create_with_content(pkg_install.installed_path() - .join(MetaFile::PackageType.to_string()), - "native"); - } let pkg = Pkg::from_install(&pkg_install).await .expect("Could not create package!"); From 176c16f15768f8580ff9fd8ba47ad507035fd584 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Mon, 7 Oct 2024 19:47:12 +0530 Subject: [PATCH 31/43] install hab Signed-off-by: Phani Sajja --- .../scripts/verify/run_cargo_test-aarch64.sh | 3 ++ .expeditor/verify.pipeline.yml | 34 +++++++++---------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.expeditor/scripts/verify/run_cargo_test-aarch64.sh b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh index 85ce2d7d71..f248c7106f 100755 --- a/.expeditor/scripts/verify/run_cargo_test-aarch64.sh +++ b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh @@ -5,6 +5,9 @@ set -eou pipefail # shellcheck source=.expeditor/scripts/shared.sh source .expeditor/scripts/verify/shared.sh +# Install hab +curlbash_hab "${BUILD_PKG_TARGET}" + if [[ ${1:-"--"} = "--" ]]; then scope="habitat workspace" else diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 9f805cfe75..54feef096d 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -119,7 +119,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh -- --ignored + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh -- --ignored timeout_in_minutes: 20 retry: automatic: @@ -145,7 +145,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh builder-api-client + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh builder-api-client timeout_in_minutes: 20 retry: automatic: @@ -169,7 +169,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh butterfly --features "lock_as_mutex" -- --test-threads=1 --format=pretty + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh butterfly --features "lock_as_mutex" -- --test-threads=1 --format=pretty timeout_in_minutes: 20 soft_fail: true @@ -193,7 +193,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh butterfly --features "lock_as_rwlock" -- --test-threads=1 --format=pretty + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh butterfly --features "lock_as_rwlock" -- --test-threads=1 --format=pretty timeout_in_minutes: 20 retry: automatic: @@ -224,7 +224,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh common + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh common timeout_in_minutes: 10 retry: automatic: @@ -250,7 +250,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh core + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh core timeout_in_minutes: 10 retry: automatic: @@ -273,7 +273,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh core --features "functional" -- --format=pretty + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh core --features "functional" -- --format=pretty timeout_in_minutes: 20 - label: "[unit] :linux: http-client" @@ -296,7 +296,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh http-client + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh http-client timeout_in_minutes: 10 retry: automatic: @@ -322,7 +322,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh hab + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh hab timeout_in_minutes: 10 retry: automatic: @@ -348,7 +348,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh launcher-client + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh launcher-client timeout_in_minutes: 10 retry: automatic: @@ -374,7 +374,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh launcher-protocol + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh launcher-protocol timeout_in_minutes: 10 retry: automatic: @@ -400,7 +400,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh pkg-export-container + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh pkg-export-container timeout_in_minutes: 10 retry: automatic: @@ -426,7 +426,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh pkg-export-tar + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh pkg-export-tar timeout_in_minutes: 10 retry: automatic: @@ -452,7 +452,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh sup --features "lock_as_rwlock" + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh sup --features "lock_as_rwlock" timeout_in_minutes: 40 retry: automatic: @@ -476,7 +476,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh sup --features "lock_as_mutex" + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh sup --features "lock_as_mutex" timeout_in_minutes: 40 soft_fail: true @@ -500,7 +500,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh sup-client + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh sup-client timeout_in_minutes: 10 retry: automatic: @@ -526,7 +526,7 @@ steps: HAB_BLDR_CHANNEL: "LTS-2024" BUILD_PKG_TARGET: "aarch64-linux" command: - - sudo -E .expeditor/scripts/verify/run_cargo_test-aarch64.sh sup-protocol + - .expeditor/scripts/verify/run_cargo_test-aarch64.sh sup-protocol timeout_in_minutes: 10 retry: automatic: From 93bce856239ef7d5198c8dbb935c332a359feca3 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Mon, 7 Oct 2024 20:46:27 +0530 Subject: [PATCH 32/43] install hab with curl Signed-off-by: Phani Sajja --- .expeditor/scripts/verify/run_cargo_test-aarch64.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.expeditor/scripts/verify/run_cargo_test-aarch64.sh b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh index f248c7106f..e3c6b4326a 100755 --- a/.expeditor/scripts/verify/run_cargo_test-aarch64.sh +++ b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh @@ -6,7 +6,7 @@ set -eou pipefail source .expeditor/scripts/verify/shared.sh # Install hab -curlbash_hab "${BUILD_PKG_TARGET}" +curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- -t aarch64-linux -c aarch64-linux -v 1.6.706 if [[ ${1:-"--"} = "--" ]]; then scope="habitat workspace" From 2cca391666cc5f877abe151997fdbe3a5e575819 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Mon, 7 Oct 2024 20:59:56 +0530 Subject: [PATCH 33/43] install hab Signed-off-by: Phani Sajja --- .expeditor/scripts/verify/run_cargo_test-aarch64.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.expeditor/scripts/verify/run_cargo_test-aarch64.sh b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh index e3c6b4326a..55ad0fc444 100755 --- a/.expeditor/scripts/verify/run_cargo_test-aarch64.sh +++ b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh @@ -2,12 +2,12 @@ set -eou pipefail -# shellcheck source=.expeditor/scripts/shared.sh -source .expeditor/scripts/verify/shared.sh - # Install hab curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- -t aarch64-linux -c aarch64-linux -v 1.6.706 +# shellcheck source=.expeditor/scripts/shared.sh +source .expeditor/scripts/verify/shared.sh + if [[ ${1:-"--"} = "--" ]]; then scope="habitat workspace" else From e3725c5227049d2fbc460a0d3d64fbaa8e2f8d33 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Mon, 7 Oct 2024 21:26:27 +0530 Subject: [PATCH 34/43] fix cfg Signed-off-by: Phani Sajja --- components/common/src/templating/hooks.rs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/components/common/src/templating/hooks.rs b/components/common/src/templating/hooks.rs index d2ad20aa95..a336f82da7 100644 --- a/components/common/src/templating/hooks.rs +++ b/components/common/src/templating/hooks.rs @@ -633,8 +633,11 @@ mod tests { context::RenderContext, package::Pkg, test_helpers::*}; - #[cfg(not(any(all(target_os = "linux", any(target_arch = "x86_64")), - all(target_os = "windows", target_arch = "x86_64"),)))] + #[cfg(not(any( + all(target_os = "linux", any(target_arch = "x86_64", target_arch = "aarch64")), + all(target_os = "windows", target_arch = "x86_64"), + )))] + use habitat_core::package::metadata::MetaFile; use habitat_core::{package::{PackageIdent, PackageInstall}, service::ServiceGroup}; @@ -865,6 +868,18 @@ echo "The message is Hola Mundo" PathBuf::from("/tmp"), PathBuf::from("/tmp")); + // Platforms without standard package support require all packages to be native packages + #[cfg(not(any( + all(target_os = "linux", any(target_arch = "x86_64", target_arch = "aarch64")), + all(target_os = "windows", target_arch = "x86_64") + )))] + { + tokio::fs::create_dir_all(pkg_install.installed_path()).await + .unwrap(); + create_with_content(pkg_install.installed_path() + .join(MetaFile::PackageType.to_string()), + "native"); + } let pkg = Pkg::from_install(&pkg_install).await .expect("Could not create package!"); From 3657ac55aa4660b6006303d1fe07b2cb050429cd Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Mon, 7 Oct 2024 21:40:45 +0530 Subject: [PATCH 35/43] fix fmt Signed-off-by: Phani Sajja --- components/common/src/templating/hooks.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/components/common/src/templating/hooks.rs b/components/common/src/templating/hooks.rs index a336f82da7..6ca15bd45d 100644 --- a/components/common/src/templating/hooks.rs +++ b/components/common/src/templating/hooks.rs @@ -633,10 +633,9 @@ mod tests { context::RenderContext, package::Pkg, test_helpers::*}; - #[cfg(not(any( - all(target_os = "linux", any(target_arch = "x86_64", target_arch = "aarch64")), - all(target_os = "windows", target_arch = "x86_64"), - )))] + #[cfg(not(any(all(target_os = "linux", + any(target_arch = "x86_64", target_arch = "aarch64")), + all(target_os = "windows", target_arch = "x86_64"),)))] use habitat_core::package::metadata::MetaFile; use habitat_core::{package::{PackageIdent, PackageInstall}, @@ -869,10 +868,9 @@ echo "The message is Hola Mundo" PathBuf::from("/tmp")); // Platforms without standard package support require all packages to be native packages - #[cfg(not(any( - all(target_os = "linux", any(target_arch = "x86_64", target_arch = "aarch64")), - all(target_os = "windows", target_arch = "x86_64") - )))] + #[cfg(not(any(all(target_os = "linux", + any(target_arch = "x86_64", target_arch = "aarch64")), + all(target_os = "windows", target_arch = "x86_64"))))] { tokio::fs::create_dir_all(pkg_install.installed_path()).await .unwrap(); From 8e106023277b6b8fd25b6ebfc806d625ca1f4ad8 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Tue, 8 Oct 2024 16:56:48 +0530 Subject: [PATCH 36/43] updage agent Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 56 +++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 54feef096d..e6bd94c5f6 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -113,7 +113,7 @@ steps: - label: "[unit] :linux: aarch64 ignored" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -139,7 +139,7 @@ steps: - label: "[unit] :linux: aarch64 builder-api-client" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -163,7 +163,7 @@ steps: - label: "[unit] :linux: aarch64 butterfly lock_as_mutex" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -187,7 +187,7 @@ steps: - label: "[unit] :linux: aarch64 butterfly lock_as_rwlock" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -218,7 +218,7 @@ steps: - label: "[unit] :linux: aarch64 common" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -244,7 +244,7 @@ steps: - label: "[unit] :linux: aarch64 core" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -267,7 +267,7 @@ steps: - label: "[unit] :linux: aarch64 core functional" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -290,7 +290,7 @@ steps: - label: "[unit] :linux: aarch64 http-client" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -316,7 +316,7 @@ steps: - label: "[unit] :linux: aarch64 hab" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -342,7 +342,7 @@ steps: - label: "[unit] :linux: aarch64 launcher-client" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -368,7 +368,7 @@ steps: - label: "[unit] :linux: aarch64 launcher-protocol" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -394,7 +394,7 @@ steps: - label: "[unit] :linux: aarch64 pkg-export-container" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -420,7 +420,7 @@ steps: - label: "[unit] :linux: aarch64 pkg-export-tar" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -446,7 +446,7 @@ steps: - label: "[unit] :linux: aarch64 sup lock_as_rwlock" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -470,7 +470,7 @@ steps: - label: "[unit] :linux: aarch64 sup lock_as_mutex" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -494,7 +494,7 @@ steps: - label: "[unit] :linux: aarch64 sup-client" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -520,7 +520,7 @@ steps: - label: "[unit] :linux: aarch64 sup-protocol" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -859,7 +859,7 @@ steps: - label: "[build] :linux: aarch64 test-probe" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -890,7 +890,7 @@ steps: # This build currently fails due to a circular dependency in 'LTS-2024' and needs investigation. - label: "[build] :linux: aarch64 backline" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -917,7 +917,7 @@ steps: - label: "[build] :linux: aarch64 hab" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -944,7 +944,7 @@ steps: - label: "[build] :linux: aarch64 launcher" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -975,7 +975,7 @@ steps: # This build currently fails due to a dependency on 'pkg-export-container' - label: "[build] :linux: aarch64 pkg-cfize" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -1003,7 +1003,7 @@ steps: # This build currently fails due to a dependency on 'core/buildah', which is not available in 'LTS-2024'. - label: "[build] :linux: aarch64 pkg-export-container" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -1030,7 +1030,7 @@ steps: - label: "[build] :linux: aarch64 pkg-export-tar" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -1057,7 +1057,7 @@ steps: - label: "[build] :linux: aarch64 pkg-mesosize" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -1084,7 +1084,7 @@ steps: - label: "[build] :linux: aarch64 plan-build" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -1111,7 +1111,7 @@ steps: - label: "[build] :linux: aarch64 studio" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -1138,7 +1138,7 @@ steps: - label: "[build] :linux: aarch64 sup" agents: - queue: docker-linux-amazon-2023-arm64 + queue:default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" From 3abacab43a7d21cd122e1db57b0a9ddf1f51662f Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Tue, 8 Oct 2024 18:55:59 +0530 Subject: [PATCH 37/43] adds space Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 56 +++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index e6bd94c5f6..fabd70d5bf 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -113,7 +113,7 @@ steps: - label: "[unit] :linux: aarch64 ignored" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -139,7 +139,7 @@ steps: - label: "[unit] :linux: aarch64 builder-api-client" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -163,7 +163,7 @@ steps: - label: "[unit] :linux: aarch64 butterfly lock_as_mutex" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -187,7 +187,7 @@ steps: - label: "[unit] :linux: aarch64 butterfly lock_as_rwlock" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -218,7 +218,7 @@ steps: - label: "[unit] :linux: aarch64 common" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -244,7 +244,7 @@ steps: - label: "[unit] :linux: aarch64 core" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -267,7 +267,7 @@ steps: - label: "[unit] :linux: aarch64 core functional" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -290,7 +290,7 @@ steps: - label: "[unit] :linux: aarch64 http-client" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -316,7 +316,7 @@ steps: - label: "[unit] :linux: aarch64 hab" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -342,7 +342,7 @@ steps: - label: "[unit] :linux: aarch64 launcher-client" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -368,7 +368,7 @@ steps: - label: "[unit] :linux: aarch64 launcher-protocol" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -394,7 +394,7 @@ steps: - label: "[unit] :linux: aarch64 pkg-export-container" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -420,7 +420,7 @@ steps: - label: "[unit] :linux: aarch64 pkg-export-tar" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -446,7 +446,7 @@ steps: - label: "[unit] :linux: aarch64 sup lock_as_rwlock" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -470,7 +470,7 @@ steps: - label: "[unit] :linux: aarch64 sup lock_as_mutex" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -494,7 +494,7 @@ steps: - label: "[unit] :linux: aarch64 sup-client" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -520,7 +520,7 @@ steps: - label: "[unit] :linux: aarch64 sup-protocol" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -859,7 +859,7 @@ steps: - label: "[build] :linux: aarch64 test-probe" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -890,7 +890,7 @@ steps: # This build currently fails due to a circular dependency in 'LTS-2024' and needs investigation. - label: "[build] :linux: aarch64 backline" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -917,7 +917,7 @@ steps: - label: "[build] :linux: aarch64 hab" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -944,7 +944,7 @@ steps: - label: "[build] :linux: aarch64 launcher" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -975,7 +975,7 @@ steps: # This build currently fails due to a dependency on 'pkg-export-container' - label: "[build] :linux: aarch64 pkg-cfize" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -1003,7 +1003,7 @@ steps: # This build currently fails due to a dependency on 'core/buildah', which is not available in 'LTS-2024'. - label: "[build] :linux: aarch64 pkg-export-container" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -1030,7 +1030,7 @@ steps: - label: "[build] :linux: aarch64 pkg-export-tar" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -1057,7 +1057,7 @@ steps: - label: "[build] :linux: aarch64 pkg-mesosize" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -1084,7 +1084,7 @@ steps: - label: "[build] :linux: aarch64 plan-build" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -1111,7 +1111,7 @@ steps: - label: "[build] :linux: aarch64 studio" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" @@ -1138,7 +1138,7 @@ steps: - label: "[build] :linux: aarch64 sup" agents: - queue:default-privileged-aarch64 + queue: default-privileged-aarch64 env: HAB_LICENSE: "accept-no-persist" HAB_BLDR_CHANNEL: "LTS-2024" From ed14c128b2bf29bfef474f8b5219728f7dce45ec Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Thu, 17 Oct 2024 11:16:18 +0530 Subject: [PATCH 38/43] should be an error Signed-off-by: Phani Sajja --- components/core/src/os/net.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/core/src/os/net.rs b/components/core/src/os/net.rs index 22e5395444..1d68f04245 100644 --- a/components/core/src/os/net.rs +++ b/components/core/src/os/net.rs @@ -65,6 +65,4 @@ fn test_fqdn_lookup() { fn test_fqdn_lookup_err() { let fqdn = lookup_fqdn(""); assert!(fqdn.is_err(), "Should be an Err()"); - assert_eq!(format!("{}", fqdn.unwrap_err()), - "failed to lookup address information: Name or service not known"); } From cc10dc0dbe7654b68b7b809067465bb3ffd300b4 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Thu, 17 Oct 2024 23:18:15 +0530 Subject: [PATCH 39/43] aarch64-linux has standard pkgs Signed-off-by: Phani Sajja --- components/common/src/templating.rs | 3 ++- components/common/src/templating/config.rs | 3 ++- components/sup/src/manager/service/hooks.rs | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/common/src/templating.rs b/components/common/src/templating.rs index 2f1bfa4483..bc6158a239 100644 --- a/components/common/src/templating.rs +++ b/components/common/src/templating.rs @@ -420,7 +420,8 @@ mod test { let pkg_install = PackageInstall::new_from_parts(pg_id, root.clone(), root.clone(), root.clone()); // Platforms without standard package support require all packages to be native packages - #[cfg(not(any(all(target_os = "linux", any(target_arch = "x86_64")), + #[cfg(not(any(all(target_os = "linux", + any(target_arch = "x86_64", target_arch = "aarch64")), all(target_os = "windows", target_arch = "x86_64"))))] { tokio::fs::create_dir_all(pkg_install.installed_path()).await diff --git a/components/common/src/templating/config.rs b/components/common/src/templating/config.rs index bfb43e29eb..65d45bca37 100644 --- a/components/common/src/templating/config.rs +++ b/components/common/src/templating/config.rs @@ -1151,7 +1151,8 @@ mod test { "config message is {{cfg.message}}"); // Platforms without standard package support require all packages to be native packages - #[cfg(not(any(all(target_os = "linux", any(target_arch = "x86_64")), + #[cfg(not(any(all(target_os = "linux", + any(target_arch = "x86_64", target_arch = "aarch64")), all(target_os = "windows", target_arch = "x86_64"))))] { create_with_content(pkg_dir.join(MetaFile::PackageType.to_string()), "native"); diff --git a/components/sup/src/manager/service/hooks.rs b/components/sup/src/manager/service/hooks.rs index 385d374fa4..e9646286f0 100644 --- a/components/sup/src/manager/service/hooks.rs +++ b/components/sup/src/manager/service/hooks.rs @@ -797,8 +797,8 @@ mod tests { PathBuf::from("/tmp"), PathBuf::from("/tmp")); // Platforms without standard package support require all packages to be native packages - // TODO: This is currently also needed on aarch64-linux until we publish official packages - #[cfg(not(any(all(target_os = "linux", any(target_arch = "x86_64")), + #[cfg(not(any(all(target_os = "linux", + any(target_arch = "x86_64", target_arch = "aarch64")), all(target_os = "windows", target_arch = "x86_64"))))] { tokio::fs::create_dir_all(pkg_install.installed_path()).await From 21b2dd0a857bb2680a248d086c3cac064106279a Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Thu, 17 Oct 2024 23:39:37 +0530 Subject: [PATCH 40/43] fix unused import Signed-off-by: Phani Sajja --- components/common/src/templating.rs | 3 ++- components/common/src/templating/config.rs | 3 ++- components/sup/src/manager/service/hooks.rs | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/components/common/src/templating.rs b/components/common/src/templating.rs index bc6158a239..7b44c1a6ee 100644 --- a/components/common/src/templating.rs +++ b/components/common/src/templating.rs @@ -178,7 +178,8 @@ mod test { FS_ROOT_PATH}, package::PackageIdent}, templating::test_helpers::*}; - #[cfg(not(any(all(target_os = "linux", any(target_arch = "x86_64")), + #[cfg(not(any(all(target_os = "linux", + any(target_arch = "x86_64", target_arch = "aarch64")), all(target_os = "windows", target_arch = "x86_64"),)))] use habitat_core::package::metadata::MetaFile; use std::{collections::BTreeMap, diff --git a/components/common/src/templating/config.rs b/components/common/src/templating/config.rs index 65d45bca37..57ad3f8708 100644 --- a/components/common/src/templating/config.rs +++ b/components/common/src/templating/config.rs @@ -614,7 +614,8 @@ mod test { PackageInstall}}, templating::{context::RenderContext, test_helpers::*}}; - #[cfg(not(any(all(target_os = "linux", any(target_arch = "x86_64")), + #[cfg(not(any(all(target_os = "linux", + any(target_arch = "x86_64", target_arch = "aarch64")), all(target_os = "windows", target_arch = "x86_64"),)))] use hcore::package::metadata::MetaFile; use std::{env, diff --git a/components/sup/src/manager/service/hooks.rs b/components/sup/src/manager/service/hooks.rs index e9646286f0..1433c5c419 100644 --- a/components/sup/src/manager/service/hooks.rs +++ b/components/sup/src/manager/service/hooks.rs @@ -732,8 +732,9 @@ mod tests { types::{GossipListenAddr, HttpListenAddr, ListenCtlAddr}}; - #[cfg(not(any(all(target_os = "linux", any(target_arch = "x86_64")), - all(target_os = "windows", target_arch = "x86_64"))))] + #[cfg(not(any(all(target_os = "linux", + any(target_arch = "x86_64", target_arch = "aarch64")), + all(target_os = "windows", target_arch = "x86_64"),)))] use habitat_core::package::metadata::MetaFile; use habitat_core::{crypto::keys::KeyCache, fs::CACHE_KEY_PATH, From ff04592d8a287358b2acb33db1b48ad38fc5fb20 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Fri, 18 Oct 2024 00:10:44 +0530 Subject: [PATCH 41/43] remove cfize, mesomise and fix container plan Signed-off-by: Phani Sajja --- .expeditor/verify.pipeline.yml | 27 ------------------- .../pkg-export-container/habitat/plan.sh | 8 ++++++ 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index fabd70d5bf..1cf1ac7575 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -972,19 +972,6 @@ steps: # automatic: # limit: 1 - # This build currently fails due to a dependency on 'pkg-export-container' - - label: "[build] :linux: aarch64 pkg-cfize" - agents: - queue: default-privileged-aarch64 - env: - HAB_LICENSE: "accept-no-persist" - HAB_BLDR_CHANNEL: "LTS-2024" - BUILD_PKG_TARGET: "aarch64-linux" - command: - - sudo -E .expeditor/scripts/verify/build_package.sh components/pkg-cfize - retry: - automatic: - limit: 1 - label: "[build] :linux: pkg-export-container" env: @@ -1000,7 +987,6 @@ steps: automatic: limit: 1 - # This build currently fails due to a dependency on 'core/buildah', which is not available in 'LTS-2024'. - label: "[build] :linux: aarch64 pkg-export-container" agents: queue: default-privileged-aarch64 @@ -1055,19 +1041,6 @@ steps: automatic: limit: 1 - - label: "[build] :linux: aarch64 pkg-mesosize" - agents: - queue: default-privileged-aarch64 - env: - HAB_LICENSE: "accept-no-persist" - HAB_BLDR_CHANNEL: "LTS-2024" - BUILD_PKG_TARGET: "aarch64-linux" - command: - - sudo -E .expeditor/scripts/verify/build_package.sh components/pkg-mesosize - retry: - automatic: - limit: 1 - - label: "[build] :linux: plan-build" env: HAB_LICENSE: "accept-no-persist" diff --git a/components/pkg-export-container/habitat/plan.sh b/components/pkg-export-container/habitat/plan.sh index 3fda523b9b..d9e22a27c1 100644 --- a/components/pkg-export-container/habitat/plan.sh +++ b/components/pkg-export-container/habitat/plan.sh @@ -58,6 +58,14 @@ do_before() { do_prepare() { _common_prepare + # With the musl target, the ring crate is looking for aarch64-linux-musl-gcc, + # but the core/musl package provides musl-gcc. This workaround is necessary until the appropriate changes are made to core/musl for aarch64. + if [[ "${pkg_target%%-*}" == "aarch64" ]]; then + if [[ ! -r "$(pkg_path_for musl)/bin/aarch64-linux-musl-gcc" ]]; then + ln -sv "$(pkg_path_for musl)/bin/musl-gcc" "$(pkg_path_for musl)/bin/aarch64-linux-musl-gcc" + fi + fi + export rustc_target="${pkg_target%%-*}-unknown-linux-musl" build_line "Setting rustc_target=$rustc_target" From 781b5854b67e2abb9452738ecc5b7353e5f220a8 Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Fri, 18 Oct 2024 14:51:41 +0530 Subject: [PATCH 42/43] set interpreter for aarch64 tests Signed-off-by: Phani Sajja --- .expeditor/scripts/verify/run_cargo_test-aarch64.sh | 4 ++++ components/sup/tests/utils/fs.rs | 9 +++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.expeditor/scripts/verify/run_cargo_test-aarch64.sh b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh index 55ad0fc444..0d0088f4b3 100755 --- a/.expeditor/scripts/verify/run_cargo_test-aarch64.sh +++ b/.expeditor/scripts/verify/run_cargo_test-aarch64.sh @@ -67,6 +67,10 @@ if [[ -n ${component:-} ]]; then cd "components/$component" fi +# We do not have any packages in the stable channel for aarch64 and probably never will. +# Set the HAB_INTERPRETER_IDENT to point to LTS-2024 to proceed with the tests. +export HAB_INTERPRETER_IDENT="core/busybox-static/1.36.1/20240805133911" + # Always add `--quiet` to avoid the noise of compilation in test output. # The invocation to this script can add `--format pretty` to the test runner # args (that is, after --, like --nocapture and --test-threads) if the names diff --git a/components/sup/tests/utils/fs.rs b/components/sup/tests/utils/fs.rs index e81c9b8ef7..a8f866b2a2 100644 --- a/components/sup/tests/utils/fs.rs +++ b/components/sup/tests/utils/fs.rs @@ -365,12 +365,9 @@ async fn write_default_metafiles(hab_root: &HabRoot, // Write metafiles to convert the package to a native package on platforms without package // support - // TODO: We intentionally use native packages on aarch64-linux platform as the interpreter - // packages core/busybox-static are not yet available publicly on builder. This will cause - // The package to fail when the supervisor attempts to load it. We should use standard - // packages on aarch64-linux once the interpreter package is made publicly available. - #[cfg(not(any(all(target_os = "linux", any(target_arch = "x86_64")), - all(target_os = "windows", target_arch = "x86_64"))))] + #[cfg(not(any(all(target_os = "linux", + any(target_arch = "x86_64", target_arch = "aarch64")), + all(target_os = "windows", target_arch = "x86_64"))))] { let pkg_type_metafile = hab_root.pkg_type_path(pkg_origin, pkg_name); write_metafile(pkg_type_metafile, "native").await?; From 779441c5c834d6c4421fb0e4560ded45c1727b0e Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Fri, 18 Oct 2024 14:58:16 +0530 Subject: [PATCH 43/43] fix rustfmt Signed-off-by: Phani Sajja --- components/sup/tests/utils/fs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/sup/tests/utils/fs.rs b/components/sup/tests/utils/fs.rs index a8f866b2a2..6d15ad639b 100644 --- a/components/sup/tests/utils/fs.rs +++ b/components/sup/tests/utils/fs.rs @@ -366,8 +366,8 @@ async fn write_default_metafiles(hab_root: &HabRoot, // Write metafiles to convert the package to a native package on platforms without package // support #[cfg(not(any(all(target_os = "linux", - any(target_arch = "x86_64", target_arch = "aarch64")), - all(target_os = "windows", target_arch = "x86_64"))))] + any(target_arch = "x86_64", target_arch = "aarch64")), + all(target_os = "windows", target_arch = "x86_64"))))] { let pkg_type_metafile = hab_root.pkg_type_path(pkg_origin, pkg_name); write_metafile(pkg_type_metafile, "native").await?;