suggested copy://<repo> path results in false-positive errors for failing to stat existsing fails #7

Closed
opened 3 years ago by toni-patroni · 4 comments

Same usecase I have as in #6 but with the warning-as-error detection patched out to be able to continue.

I tried to use the local repo via file:///path/to/repo but then I get:

...
Get:69 file://root/sources/infra/pve-cd-builder/tmp/bootstraprepo bullseye/main amd64 sysvinit-utils amd64 2.96-7 [25.3 kB]
Download complete and in download only mode
E: nothing got downloaded -- use copy:// instead of file:// at /usr/bin/mmdebstrap line 170, <$pipe_apt> line 1.

OK, so changing the path to copy:///path/to/repo and re-running gives me:

Err:1 copy://root/sources/infra/builder/tmp/bootstraprepo bullseye/main amd64 libext2fs2 amd64 1.46.2-1
  Failed to stat - stat (2: No such file or directory)

But that, and all other package files it complains about, exist just fine:

# stat /root/sources/infra/pve-cd-builder/tmp/bootstraprepo/dists/bullseye/main/binary-amd64/libext2fs2_1.46.2-1_amd64.deb
  File: /root/sources/infra/builder/tmp/bootstraprepo/dists/bullseye/main/binary-amd64/libext2fs2_1.46.2-1_amd64.deb
  Size: 256992          Blocks: 504        IO Block: 4096   regular file
Device: 802h/2050d      Inode: 4205001     Links: 1
Access: (0444/-r--r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2021-05-26 14:12:23.497207948 +0200
Modify: 2021-05-26 14:12:22.297199814 +0200
Change: 2021-05-26 14:12:22.297199814 +0200
 Birth: 2021-05-26 14:12:22.297199814 +0200

For completnesss sake the whole mmdebstrap command:

mmdebstrap -d --aptopt 'Acquire::AllowInsecureRepositories "1"' \
  --include btrfs-progs,busybox,bind9-dnsutils,chrony,dosfstools,efibootmgr,eject,gdisk,grub-efi-amd64-bin,grub-pc,less,lvm2,openssh-client,pciutils,spl,traceroute,usbutils,xfsprogs,zfs-initramfs,zfsutils-linux \
  bullseye /root/sources/infra/builder/tmp/base.tmp \
  file:////root/sources/infra/builder/tmp/bootstraprepo

Maybe I'm doing something completely stupid, then I'd appreaciate some hints (and say sorry for the noise), but I do not see anything obviously wrong. A file-path permission error would probably look different too, I'd guess.

Same usecase I have as in #6 but with the warning-as-error detection patched out to be able to continue. I tried to use the local repo via file:///path/to/repo but then I get: ``` ... Get:69 file://root/sources/infra/pve-cd-builder/tmp/bootstraprepo bullseye/main amd64 sysvinit-utils amd64 2.96-7 [25.3 kB] Download complete and in download only mode E: nothing got downloaded -- use copy:// instead of file:// at /usr/bin/mmdebstrap line 170, <$pipe_apt> line 1. ``` OK, so changing the path to copy:///path/to/repo and re-running gives me: ``` Err:1 copy://root/sources/infra/builder/tmp/bootstraprepo bullseye/main amd64 libext2fs2 amd64 1.46.2-1 Failed to stat - stat (2: No such file or directory) ``` But that, and all other package files it complains about, exist just fine: ``` # stat /root/sources/infra/pve-cd-builder/tmp/bootstraprepo/dists/bullseye/main/binary-amd64/libext2fs2_1.46.2-1_amd64.deb File: /root/sources/infra/builder/tmp/bootstraprepo/dists/bullseye/main/binary-amd64/libext2fs2_1.46.2-1_amd64.deb Size: 256992 Blocks: 504 IO Block: 4096 regular file Device: 802h/2050d Inode: 4205001 Links: 1 Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2021-05-26 14:12:23.497207948 +0200 Modify: 2021-05-26 14:12:22.297199814 +0200 Change: 2021-05-26 14:12:22.297199814 +0200 Birth: 2021-05-26 14:12:22.297199814 +0200 ``` For completnesss sake the whole mmdebstrap command: ``` mmdebstrap -d --aptopt 'Acquire::AllowInsecureRepositories "1"' \ --include btrfs-progs,busybox,bind9-dnsutils,chrony,dosfstools,efibootmgr,eject,gdisk,grub-efi-amd64-bin,grub-pc,less,lvm2,openssh-client,pciutils,spl,traceroute,usbutils,xfsprogs,zfs-initramfs,zfsutils-linux \ bullseye /root/sources/infra/builder/tmp/base.tmp \ file:////root/sources/infra/builder/tmp/bootstraprepo ``` Maybe I'm doing something completely stupid, then I'd appreaciate some hints (and say sorry for the noise), but I do not see anything obviously wrong. A file-path permission error would probably look different too, I'd guess.
josch commented 3 years ago
Owner

It probably fails after the step I: installing remaining packages inside the chroot..., right?

This is expected, because the path /root/sources/... cannot be accessed from inside the chroot. You can only use a copy:// mirror for the essential packages.

It probably fails after the step `I: installing remaining packages inside the chroot...`, right? This is expected, because the path `/root/sources/...` cannot be accessed from inside the chroot. You can only use a `copy://` mirror for the essential packages.
Poster

It probably fails after the step I: installing remaining packages inside the chroot..., right?

yes.

This is expected, because the path /root/sources/... cannot be accessed from inside the chroot. You can only use a copy:// mirror for the essential packages.

But why then the first error? Isn't this a catch 22?

> It probably fails after the step I: installing remaining packages inside the chroot..., right? yes. > This is expected, because the path /root/sources/... cannot be accessed from inside the chroot. You can only use a copy:// mirror for the essential packages. But why then the first error? Isn't this a catch 22?
josch commented 3 years ago
Owner

You mean the E: nothing got downloaded error? That one is independent of the second.

The fact that file:// is not allowed is also a relict from the past when mmdebstrap only relied on the files downloaded by apt to figure out which packages are essential. Now mmdebstrap knows about a different way and it should be possible to make file:// possible again. I'll look into it and leave this issue open until I know more.

You mean the `E: nothing got downloaded` error? That one is independent of the second. The fact that `file://` is not allowed is also a relict from the past when mmdebstrap only relied on the files downloaded by apt to figure out which packages are essential. Now mmdebstrap knows about a different way and it should be possible to make `file://` possible again. I'll look into it and leave this issue open until I know more.
josch commented 3 years ago
Owner

It probably fails after the step I: installing remaining packages inside the chroot..., right?

This is expected, because the path /root/sources/... cannot be accessed from inside the chroot. You can only use a copy:// mirror for the essential packages.

This will change with the next mmdebstrap release. Then you can use copy:// for everything.

> It probably fails after the step `I: installing remaining packages inside the chroot...`, right? > > This is expected, because the path `/root/sources/...` cannot be accessed from inside the chroot. You can only use a `copy://` mirror for the essential packages. This will change with the next mmdebstrap release. Then you can use `copy://` for everything.
josch closed this issue 2 years ago
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: josch/mmdebstrap#7
Loading…
There is no content yet.