Building in a clean chroot
I am getting this error when running is there a way to fix this? Using makechrootpkg -c -r "$CHROOT" -- --ignorearch --skippgpcheck works fine $ arch-nspawn $CHROOT/root pacman -Syy :: Synchronizing package databases... custom 11.5 KiB 261 KiB/s 00:00 [#############################################] 100% core.db failed to download extra 9.5 MiB 15.9 MiB/s 00:01 [#############################################] 100% alarm.db failed to download aur.db failed to download error: failed retrieving file 'aur.db' from mirror.archlinuxarm.org : The requested URL returned error: 404 error: failed retrieving file 'alarm.db' from mirror.archlinuxarm.org : The requested URL returned error: 404 error: failed retrieving file 'core.db' from mirror.archlinuxarm.org : The requested URL returned error: 404 warning: too many errors from mirror.archlinuxarm.org, skipping for the remainder of this transaction error: failed to synchronize all databases (failed to retrieve some files) -- Hindi madali ang maging ako
On 5/4/25 8:20 AM, Pocket wrote:
I am getting this error when running is there a way to fix this?
We aren't the ones to be asking. Arch is x86_64 only, ArchLinuxARM is a separate distro with it's own repositories.
On 5/4/25 3:12 PM, Doug Newgard wrote:
On 5/4/25 8:20 AM, Pocket wrote:
I am getting this error when running is there a way to fix this?
We aren't the ones to be asking. Arch is x86_64 only, ArchLinuxARM is a separate distro with it's own repositories.
I found something interesting The mirrorlist file is being butchered by I believe by sudo cp -v /etc/pacman.d/mirrorlist root/etc/pacman.d/ arch-nspawn $CHROOT/root pacman -Syy cat root/etc/pacman.d/mirrorlist Server = http://mirror.archlinuxarm.org/aarch64/extra why I don't know at this point Tried with systemd-nspawn sudo cp -v /etc/pacman.d/mirrorlist root/etc/pacman.d/ '/etc/pacman.d/mirrorlist' -> 'root/etc/pacman.d/mirrorlist' sudo systemd-nspawn -bD /home/Builder/root pacman -Syy :: Synchronizing package databases... custom 11.5 KiB 287 KiB/s 00:00 [#############################################] 100% core 227.4 KiB 412 KiB/s 00:01 [#############################################] 100% extra 9.5 MiB 3.65 MiB/s 00:03 [#############################################] 100% alarm 58.2 KiB 118 KiB/s 00:00 [#############################################] 100% aur 12.0 KiB 28.2 KiB/s 00:00 [#############################################] 100% [root@root ~]# cat root/etc/pacman.d/mirrorlist # # Arch Linux ARM repository mirrorlist # Generated on 2023-02-06 # ## Geo-IP based mirror selection and load balancing Server = http://mirror.archlinuxarm.org/$arch/$repo ### Mirrors by country ### Denmark ## Aalborg # Server = http://dk.mirror.archlinuxarm.org/$arch/$repo ### Germany ## Aachen # Server = http://de3.mirror.archlinuxarm.org/$arch/$repo ## Berlin # Server = http://de.mirror.archlinuxarm.org/$arch/$repo ## Coburg # Server = http://de4.mirror.archlinuxarm.org/$arch/$repo ## Falkenstein # Server = http://eu.mirror.archlinuxarm.org/$arch/$repo # Server = http://de5.mirror.archlinuxarm.org/$arch/$repo ### Greece ## Athens # Server = http://gr.mirror.archlinuxarm.org/$arch/$repo ### Hungary ## Budapest # Server = http://hu.mirror.archlinuxarm.org/$arch/$repo ### Japan ## Tokyo #Server = http://jp.mirror.archlinuxarm.org/$arch/$repo ### Singapore # Server = http://sg.mirror.archlinuxarm.org/$arch/$repo ### Taiwan ## Hsinchu # Server = http://tw2.mirror.archlinuxarm.org/$arch/$repo ## New Taipei City # Server = http://tw.mirror.archlinuxarm.org/$arch/$repo ### United Kingdom ## London #Server = http://uk.mirror.archlinuxarm.org/$arch/$repo ### United States ## California #Server = http://ca.us.mirror.archlinuxarm.org/$arch/$repo ## Florida #Server = http://fl.us.mirror.archlinuxarm.org/$arch/$repo ## New Jersey #Server = http://nj.us.mirror.archlinuxarm.org/$arch/$repo What in arch-spawn causes the mirrorlist file to be changed/truncated? If I could run pacman -Syy from systemd-nspawn command line and then have it exit it would fix my issue. Otherwise I guess I will have to have a look at the arch-spawn script -- Hindi madali ang maging ako
On 5/4/25 3:12 PM, Doug Newgard wrote:
On 5/4/25 8:20 AM, Pocket wrote:
I am getting this error when running is there a way to fix this?
We aren't the ones to be asking. Arch is x86_64 only, ArchLinuxARM is a separate distro with it's own repositories.
I heard you the first time. arch-chroot is broken, or do you think a shell script breaks if it is run on aarch64? sudo chroot root pacman -Syy Works -- Hindi madali ang maging ako
On 5/4/25 3:12 PM, Doug Newgard wrote:
On 5/4/25 8:20 AM, Pocket wrote:
I am getting this error when running is there a way to fix this?
We aren't the ones to be asking. Arch is x86_64 only, ArchLinuxARM is a separate distro with it's own repositories.
This is what I believe is breaking the mirrorlist From arch-nspawn # shellcheck disable=2016 host_mirrors=($(pacman-conf --repo extra Server 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#')) for host_mirror in "${host_mirrors[@]}"; do if [[ $host_mirror == *file://* ]]; then host_mirror=$(echo "$host_mirror" | sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g') for m in "$host_mirror"/pool/*/; do in_array "$m" "${cache_dirs[@]}" || cache_dirs+=("$m") done fi done # {{{ functions copy_hostconf () { unshare --fork --pid gpg --homedir "$working_dir"/etc/pacman.d/gnupg/ --no-permission-warning --quiet --batch --import --import-options import-local-sigs "$(pacman-conf GpgDir)"/pubring.gpg >/dev/null 2>&1 pacman-key --gpgdir "$working_dir"/etc/pacman.d/gnupg/ --import-trustdb "$(pacman-conf GpgDir)" >/dev/null 2>&1 printf 'Server = %s\n' "${host_mirrors[@]}"
"$working_dir/etc/pacman.d/mirrorlist"
[[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf" [[ -n $makepkg_conf ]] && cp "$makepkg_conf" "$working_dir/etc/makepkg.conf" I don't know why that is there, I expected arch-nspawn to just spawn a container. -- Hindi madali ang maging ako
Pocket <pocket@columbus.rr.com> wrote:
On 5/4/25 3:12 PM, Doug Newgard wrote:
On 5/4/25 8:20 AM, Pocket wrote:
I am getting this error when running is there a way to fix this?
We aren't the ones to be asking. Arch is x86_64 only, ArchLinuxARM is a separate distro with it's own repositories.
This is what I believe is breaking the mirrorlist
From arch-nspawn
# shellcheck disable=2016 host_mirrors=($(pacman-conf --repo extra Server 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#'))
for host_mirror in "${host_mirrors[@]}"; do if [[ $host_mirror == *file://* ]]; then host_mirror=$(echo "$host_mirror" | sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g') for m in "$host_mirror"/pool/*/; do in_array "$m" "${cache_dirs[@]}" || cache_dirs+=("$m") done fi done
# {{{ functions copy_hostconf () { unshare --fork --pid gpg --homedir "$working_dir"/etc/pacman.d/gnupg/ --no-permission-warning --quiet --batch --import --import-options import-local-sigs "$(pacman-conf GpgDir)"/pubring.gpg >/dev/null 2>&1 pacman-key --gpgdir "$working_dir"/etc/pacman.d/gnupg/ --import-trustdb "$(pacman-conf GpgDir)" >/dev/null 2>&1
printf 'Server = %s\n' "${host_mirrors[@]}"
"$working_dir/etc/pacman.d/mirrorlist"
[[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf" [[ -n $makepkg_conf ]] && cp "$makepkg_conf" "$working_dir/etc/makepkg.conf"
I don't know why that is there, I expected arch-nspawn to just spawn a container.
-- Hindi madali ang maging ako
I don't know enough to answer you, other then pointing you to https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot . Have you read it, or do you feel you can manage without it? In case you followed it, do qoute in full the exect, and 1st, command that didn't work for you, as well as the exact and full output you were given for the failure. I think you will do better if you follow the article step by step, even if you have enough knowledge to take a different route. You would do better following the article step by step because it will help possible helpers here to compare the output you will hopefully qoute in full to their expectations about successful output during the process. -- u34
On 5/4/25 9:33 PM, u34@net9.cf wrote:
Pocket <pocket@columbus.rr.com> wrote:
On 5/4/25 3:12 PM, Doug Newgard wrote:
On 5/4/25 8:20 AM, Pocket wrote:
I am getting this error when running is there a way to fix this?
We aren't the ones to be asking. Arch is x86_64 only, ArchLinuxARM is a separate distro with it's own repositories.
This is what I believe is breaking the mirrorlist
From arch-nspawn
# shellcheck disable=2016 host_mirrors=($(pacman-conf --repo extra Server 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#'))
for host_mirror in "${host_mirrors[@]}"; do if [[ $host_mirror == *file://* ]]; then host_mirror=$(echo "$host_mirror" | sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g') for m in "$host_mirror"/pool/*/; do in_array "$m" "${cache_dirs[@]}" || cache_dirs+=("$m") done fi done
# {{{ functions copy_hostconf () { unshare --fork --pid gpg --homedir "$working_dir"/etc/pacman.d/gnupg/ --no-permission-warning --quiet --batch --import --import-options import-local-sigs "$(pacman-conf GpgDir)"/pubring.gpg >/dev/null 2>&1 pacman-key --gpgdir "$working_dir"/etc/pacman.d/gnupg/ --import-trustdb "$(pacman-conf GpgDir)" >/dev/null 2>&1
printf 'Server = %s\n' "${host_mirrors[@]}"
"$working_dir/etc/pacman.d/mirrorlist"
[[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf" [[ -n $makepkg_conf ]] && cp "$makepkg_conf" "$working_dir/etc/makepkg.conf"
I don't know why that is there, I expected arch-nspawn to just spawn a container.
-- Hindi madali ang maging ako
I don't know enough to answer you, other then pointing you to https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot . Have you read it, or do you feel you can manage without it? In case you followed it, do qoute in full the exect, and 1st, command that didn't work for you, as well as the exact and full output you were given for the failure. I think you will do better if you follow the article step by step, even if you have enough knowledge to take a different route. You would do better following the article step by step because it will help possible helpers here to compare the output you will hopefully qoute in full to their expectations about successful output during the process.
I have read that, been there and done that. It is by following that document that the build process fails. From the document: 3.2 Building in the chroot Firstly, make sure the base chroot ($CHROOT/root) is up to date: $ arch-nspawn $CHROOT/root pacman -Syu The script fragment is from arch-nspawn script and it is what is causing the breakage. Not following the document has allowed me to build 878 packages in a clean chroot and put them in a local repository running on a remote raspberry pi 4 ngix web server, archlinuxarm as the OS. Only the extra repo gets updated and sometimes the "custom" repo will be updated. That dog don't hunt. It is an painful process as it can not be scripted currently, due to "tool" breakage. I am working on that...... The following allows me to update the "clean chroot" using systemd-nspawn: sudo systemd-nspawn -D /home/Builder/root \ -E "PATH=/usr/local/sbin:/usr/local/bin:/usr/bin" \ --register=no --keep-unit --as-pid2 pacman -Syy sudo chroot root pacman -Syy works also This is part of a project to build archlinuxarm optimized packages using -mcpu=cortex-a72 instead of -march=armv8-a (CFLAGS). I have been building custom GNU/Linux OSes since before 2000 and building custom Oses from the raspberry pi since the rpi 1. It results in a desktop system that can play 4K videos using the bog standard vlc. The desktop speed is also very much faster and responsive. In fact I am writing this from my RPI 5 (16GB RAM nvme drives) desktop, My daily driver system. -- Hindi madali ang maging ako
participants (3)
-
Doug Newgard
-
Pocket
-
u34@net9.cf