[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: "Invalid Release file" when setup autopkgtest env with autopkgtest-build-lxc



Hi update + Debci people:

On Tue, Apr 5, 2022 at 12:20 PM Bo YU <tsu.yubo@gmail.com> wrote:
Hi,
We are going to setup autopkgtest env for riscv64. But got errors from the cmd:
```
sudo  autopkgtest-build-lxc debian sid riscv64
lxc-create: autopkgtest-sid-riscv64: storage/btrfs.c: btrfs_create: 938 Inappropriate ioctl for device - Failed to create btrfs subvolume "/var/lib/lxc/autopkgtest-sid-riscv64/rootfs"
lxc-create: autopkgtest-sid-riscv64: storage/zfs.c: zfs_create: 735 Failed to create zfs dataset "zfs:lxc/autopkgtest-sid-riscv64": lxc-create: autopkgtest-sid-riscv64:
lxc-create: autopkgtest-sid-riscv64: storage/lvm.c: do_lvm_create: 165 Failed to create logical volume "autopkgtest-sid-riscv64": lxc-create: autopkgtest-sid-riscv64:
lxc-create: autopkgtest-sid-riscv64: storage/lvm.c: lvm_create: 623 Error creating new logical volume "lvm:/dev/lxc/autopkgtest-sid-riscv64" of size "1073741824 bytes"
debootstrap is /usr/sbin/debootstrap
Checking cache download in /var/cache/lxc/debian/rootfs-sid-riscv64 ...
Downloading debian minimal ...
I: Target architecture can be executed
I: Retrieving InRelease
I: Checking Release signature
I: Valid Release signature (key id A7236886F3CCCAAD148A27F80E98404D386FA1D9)
E: Invalid Release file, no entry for main/binary-riscv64/Packages
Failed to download the rootfs, aborting.
Failed to download 'debian base'
failed to install debian
lxc-create: autopkgtest-sid-riscv64: lxccontainer.c: create_run_template: 1618 Failed to create container from template
lxc-create: autopkgtest-sid-riscv64: tools/lxc_create.c: main: 317 Failed to create container autopkgtest-sid-riscv64
```
The autopkgtest-build-lxc will invoke the lxc-create:
` lxc-create -B best --name=autopkgtest-sid-riscv64 -t debian -- -r sid -a riscv64`. It will get the same error also.
We can ignore the btrfs related error because executing `sudo  autopkgtest-build-lxc debian sid` on amd64 gets the same hint(and the rootfs-sid-amd64 is setup well)
So, I think the issue cause is due to the ports release file is not compatible with lxc-build as the error described.

In fact, Using debootstrap cmd to setup debian riscv64 base chroot will get the error sometime but we can pass --no-check-gpg arg to debootstrap. But the autopkgtest does not support it maybe. 

Any help will be appricated.
BR,
Bo
Inspired by Debian ci folks on IRC, I hacked the /usr/share/lxc/templates/lxc-debian script as follow(for debian-ports, there is should patches to fix the issue) :
```
 debootstrap --verbose --variant=minbase --arch="$arch" --no-check-gpg --include=debian-ports-archive-keyring \
            --include=$packages \
            "$release" "$cache/partial-$release-$arch" "$MIRROR"
```
The downloading of the minmium Debian rootfs is ok. But got another error at last(I am not sure this will or not affect autopkgtest):
```
I: Base system installed successfully.
Download complete.
Copying rootfs to /var/lib/lxc/autopkgtest-unstable-riscv64.new/rootfs...Generating locales (this might take a while)...
  zh_CN.UTF-8... done
  zh_CN.UTF-8... done
Generation complete.
update-rc.d: error: cannot find a LSB script for checkroot.sh
update-rc.d: error: cannot find a LSB script for umountfs
Failed to disable unit, unit hwclock.sh.service does not exist.
update-rc.d: error: cannot find a LSB script for hwclockfirst.sh
Creating SSH2 RSA key; this may take some time ...
3072 SHA256:T6v16crYCSTYPtG0unM2mq/XwS53YGoF8KwnGeeQ4fc root@MiWiFi-R4A-srv (RSA)
Creating SSH2 ECDSA key; this may take some time ...
256 SHA256:JttXQHYFT9AxHvhcxKuAhZ4rmfBiaZhErWHpPyM/8/Q root@MiWiFi-R4A-srv (ECDSA)
Creating SSH2 ED25519 key; this may take some time ...
256 SHA256:pxc+ezfNbLvPnTh218SyqjGIPTLNdPWgTn5zZXHrDqg root@MiWiFi-R4A-srv (ED25519)
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of restart.

Current default time zone: 'Etc/UTC'
Local time is now:      Wed Apr  6 02:59:27 UTC 2022.
Universal Time is now:  Wed Apr  6 02:59:27 UTC 2022.

Running setup script /usr/share/autopkgtest/setup-commands/setup-testbed...
Unknown architecture, assuming PC-style ttyS0
sh: Setting apt sources from $AUTOPKGTEST_APT_SOURCES
E:  in source file /etc/apt/sources.list has error(type)(I re-wirte here)
E: can not read sources.list
```
I am a bit worry about the unmatched board that does not support function as above described.
BR,
Bo

Reply to: