canonical / rockcraft

Tool to create OCI Images using the language from Snapcraft and Charmcraft.
GNU General Public License v3.0
38 stars 44 forks source link

`pack` and `build` will be interrupted w/o relevant message if `arch` is not correct #704

Open DnPlas opened 2 months ago

DnPlas commented 2 months ago

Bug Description

When packing or building a rock that has an arch different than the host machine, the execution will be just interrupted w/o any helpful message.

To Reproduce

  1. Create a rockcraft project with arch amd64
  2. Run rockcraft pack -v on a machine with arm64
  3. Observe the only output:
$ rockcraft build -v
Starting rockcraft, version 1.5.3
Logging execution to '/home/ubuntu/.local/state/rockcraft/log/rockcraft-20240910-201153.008216.log'

Environment

  1. arm64 machine
  2. rockcraft 1.5.3
  3. Ubuntu 22.04

rockcraft.yaml

https://github.com/canonical/kubeflow-rocks/blob/main/admission-webhook/rockcraft.yaml

Relevant log output

$ vim /home/ubuntu/.local/state/rockcraft/log/rockcraft-20240910-202338.827485.log

2024-09-10 20:23:38.828 Starting rockcraft, version 1.5.3
2024-09-10 20:23:38.828 Log verbosity level set to BRIEF
2024-09-10 20:23:38.828 Configuring application...
2024-09-10 20:23:38.828 Preparing application...
2024-09-10 20:23:38.829 Build plan: platform=None, build_for=None
2024-09-10 20:23:38.829 Loading project file '/home/ubuntu/kubeflow-rocks/admission-webhook/rockcraft.yaml'
2024-09-10 20:23:38.831 Processing grammar (on arm64 for arm64)
2024-09-10 20:23:38.831 Processing grammar for plugin: nil
2024-09-10 20:23:38.831 Processing grammar for override-build: mkdir -p ${CRAFT_PART_INSTALL}/usr/share/rocks
(echo "# os-release" && cat /etc/os-release && echo "# dpkg-query" && dpkg-query -f '${db:Status-Abbrev},${binary:Package},${Version},${source:Package},${Source:Version}\n' -W) > ${CRAFT_PART_INSTALL}/usr/share/rocks/dpkg.query
2024-09-10 20:23:38.831 Processing grammar for plugin: go
2024-09-10 20:23:38.831 Processing grammar for build-snaps: ['go/1.21/stable']
2024-09-10 20:23:38.831 Processing grammar for source: https://github.com/kubeflow/kubeflow.git
2024-09-10 20:23:38.831 Processing grammar for source-tag: v1.9.0
2024-09-10 20:23:38.831 Processing grammar for source-depth: 1
2024-09-10 20:23:38.831 Processing grammar for source-subdir: components/admission-webhook
2024-09-10 20:23:38.831 Processing grammar for organize: {'webhook': '/webhook'}
2024-09-10 20:23:38.831 Processing grammar for plugin: nil
2024-09-10 20:23:38.831 Processing grammar for after: ['admission-webhook']
2024-09-10 20:23:38.831 Processing grammar for overlay-script: # Create a user in the /home/ubuntu/kubeflow-rocks/admission-webhook/overlay/overlay chroot
groupadd -R /home/ubuntu/kubeflow-rocks/admission-webhook/overlay/overlay -g 1001 ubuntu
useradd -R /home/ubuntu/kubeflow-rocks/admission-webhook/overlay/overlay -M -r -u 1001 -g ubuntu ubuntu
2024-09-10 20:23:38.831 Processing grammar for override-prime: craftctl default
2024-09-10 20:23:38.831 Processing grammar for plugin: nil
2024-09-10 20:23:38.831 Processing grammar for stage-snaps: ['pebble/latest/stable']
2024-09-10 20:23:38.831 Processing grammar for override-prime: craftctl default
mkdir -p var/lib/pebble/default/layers
chmod 777 var/lib/pebble/default
2024-09-10 20:23:38.831 Processing grammar for stage: ['bin/pebble']
tigarmo commented 2 months ago

Thanks for the report. This was fixed already and the fix will be present on the next version of Rockcraft (this week probably)