Raspberry Pi OS(ARM64)用のpBuilder chroot環境の作成

Raspberry Pi OS(ARM64)用のpBuilder chroot環境の作成

AMD64ホストでRaspberry Pi 4B / 3B用のDebianパッケージを構築するために、Raspberry Pi OS(ARM64)用のpBuilder chroot環境を作成しようとしています。

関連性があると思われるチュートリアルを見つけました。https://jod.al/2015/03/08/building-arm-debs-with-pbuilder/。しかし、古いようで、更新されたリソースが見つかりません。

ビルド環境を設定するために、私はこの調査のすべての後続のステップで使用するVagrantボックスを使用しました。

Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/jammy64"

  config.vm.provision "shell", path: "bootstrap.sh"

  config.vm.provider 'virtualbox' do |vb|
    vb.memory = 2048
    vb.cpus = 2
  end
end

Bootstrap.shスクリプト:

#!/bin/bash
sudo apt-get update
sudo apt-get install -y \
    debian-archive-keyring \
    devscripts \
    dh-make \
    dh-python \
    pbuilder \
    python3-all-dev \
    python3-setuptools \
    qemu-user-static \
    ubuntu-keyring

私は「一般」Debian chrootを正常に作成しました:

sudo OS=debian pbuilder create \
    --distribution bullseye \
    --mirror http://ftp.de.debian.org/debian/ \
    --architecture arm64

これでRaspberry Pi OS chrootを作成しようとしています。

# Get and install apt keyring 
wget https://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-archive-keyring/raspberrypi-archive-keyring_2021.1.1+rpt1_all.deb
sudo dpkg -i raspberrypi-archive-keyring_2021.1.1+rpt1_all.deb

# Create pBuilder chroot
sudo OS=debian pbuilder create \
    --distribution bullseye \
    --mirror https://archive.raspberrypi.org/debian \
    --debootstrapopts --keyring=/usr/share/keyrings/raspberrypi-archive-keyring.gpg \
    --architecture arm64

ただし、「Cannot find this debs: ca-certificates build-essential apt」のため失敗します。

W: /root/.pbuilderrc does not exist
I: Distribution is bullseye.
I: Current time: Mon Jul  3 10:49:50 UTC 2023
I: pbuilder-time-stamp: 1688381390
I: Building the build environment
I: running debootstrap
/usr/sbin/debootstrap
I: Retrieving InRelease 
I: Checking Release signature
I: Valid Release signature (key id CF8A1AF502A2AA2D763BAE7E82B129927FA3303E)
I: Retrieving Packages 
I: Validating Packages 
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on https://archive.raspberrypi.org/debian...
E: Couldn't find these debs: ca-certificates build-essential apt
E: debootstrap failed
E: Tail of debootstrap.log:
2023-07-03 10:49:51 URL:https://archive.raspberrypi.org/debian/dists/bullseye/InRelease [23602/23602] -> "/var/cache/pbuilder/build/32279/var/lib/apt/lists/partial/archive.raspberrypi.org_debian_dists_bullseye_InRelease" [1]
gpgv: Signature made Fri Jun 30 14:46:21 2023 UTC
gpgv:                using RSA key CF8A1AF502A2AA2D763BAE7E82B129927FA3303E
gpgv: Good signature from "Raspberry Pi Archive Signing Key"
2023-07-03 10:49:51 URL:https://archive.raspberrypi.org/debian/dists/bullseye/main/binary-arm64/Packages.gz [307612/307612] -> "/var/cache/pbuilder/build/32279/var/lib/apt/lists/partial/archive.raspberrypi.org_debian_dists_bullseye_main_binary-arm64_Packages.gz" [1]
E: End of debootstrap.log
W: Aborting with an error

ここでの問題は何ですか?pBuilder chrootを実行するために必要な手順は何ですか?

ベストアンサー1

おすすめ記事