~comcloudway/builds.sr.ht

8c6bd87e9b0f3f2ae3ef7326c524472905489943 — Drew DeVault 5 years ago 2553766
images/debian: improve build.yml for cross build
1 files changed, 10 insertions(+), 2 deletions(-)

M images/debian/build.yml
M images/debian/build.yml => images/debian/build.yml +10 -2
@@ 2,7 2,6 @@ image: debian/unstable
packages:
  - debootstrap
  - e2fsprogs
  - qemu-system-x86
  - qemu-user-static
  - binfmt-support
  - rsync


@@ 24,10 23,19 @@ tasks:
  - genimg: |
      cd builds.sr.ht
      cd images/debian/$release
      case "$arch" in
          arm64)
              qpkg=arm
              ;;
          amd64)
              qpkg=x86
              ;;
      esac
      sudo apt install -y qemu-system-"$qpkg"
      sudo ./genimg $arch
  - sanity-check: |
      cd builds.sr.ht
      if [ -e /dev/kvm ] && [ "$(uname -m)" = "x86_64" ]
      if [ -e /dev/kvm ] && [ "$(uname -m)" = "x86_64" ] && [ "$arch" = "amd64" ]
      then
          # Debian does not have a kvm group so we just gotta do it this way
          sudo chown build:build /dev/kvm