QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
532 stars 46 forks source link

[Qubes Builder V2] ARCHLINUX_MIRROR is not being used to set the mirrorlist file #8885

Open ejose19 opened 7 months ago

ejose19 commented 7 months ago

Qubes OS release

4.2

Brief summary

When building archlinux packages and template using container executor (docker being the only one available atm), the env ARCHLINUX_MIRROR is not being used to create the mirrorlist file, resulting in slow speeds during package downloads.

Steps to reproduce

  1. Install dependencies
  2. Build docker container image
  3. Run ARCHLINUX_MIRROR=http://mirror.com ./qb package fetch prep build

Expected behavior

ARCHLINUX_MIRROR should be used to create the mirrorlist file

Actual behavior

ARCHLINUX_MIRROR is not being used and the default mirrorlist file is being used

Additional info

Upon debugging, I see that the initial command sent to the executor during build step is the following:

23:23:03,407 [executor:docker:3f7d2db60b] Executing 'sudo mkdir -p -- /builder /builder/build /builder/plugins /builder
/distfiles&&sudo chown -R -- user:user /builder&&sudo jinja2 /builder/plugins/chroot_archlinux/conf/pacman.conf.j2 -D 
enable_builder_local=1 -o /usr/local/share/devtools/pacman-qubes.conf&&sudo cp /builder/plugins/chroot_archlinux
/conf/makepkg-x86_64.conf /usr/local/share/devtools/&&sudo jinja2 /builder/plugins/chroot_archlinux/conf/pacman.conf.j2 -o
/tmp/pacman-qubes.conf&&sudo jinja2 /tmp/pacman-qubes.conf -o /usr/local/share/devtools/qubes-x86_64.conf&&sudo rm -rf
 /etc/pacman.d/gnupg/private-keys-v1.d&&sudo pacman-key --init&&sudo pacman-key --populate&&mkdir -p /builder/cache
/qubes-x86_64&&sudo mkarchroot -C /usr/local/share/devtools/qubes-x86_64.conf -M /usr/local/share/devtools/makepkg-
x86_64.conf /builder/cache/qubes-x86_64/root base-devel&&sudo /builder/plugins/build_archlinux/scripts/update-local-repo.sh
 /builder/cache/qubes-x86_64/root /builder/repository&&cd /builder/core-qrexec&&sudo qubes-x86_64-build -r /builder/cache --  
-d /builder/repository:/builder/repository --  --syncdeps --noconfirm --skipinteg'.

which doesn't mention the https://github.com/QubesOS/qubes-builder-archlinux/blob/main/prepare-chroot-base script that did the ARCHLINUX_MIRROR logic, as well as doing some things that were originally handled in the qubes-builder-archlinux repository.

fepitre commented 7 months ago

It has to be enlarged as this is true for any other _MIRROR variables. This is a known limitation because it has not been implemented yet in qubes-builderv2.