paru icon indicating copy to clipboard operation
paru copied to clipboard

Chroot builds fail with checkspace enabled

Open miawgogo opened this issue 6 months ago • 3 comments

Affected Version

paru v2.1.0 - libalpm v15.0.0

Description

Attempting to do a system upgrade with Chroot enabled fails at the checking available disk space step due to the --ro-bind option in arch-nspawn when checkspace is enabled in pacman

Output

Paru Output
$ paru
:: Looking for PKGBUILD upgrades...
:: Looking for AUR upgrades...
:: Looking for devel upgrades...
:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...

:: Conflicts found:
    nodejs-lts-iron: nodejs-lts-jod (nodejs)  nodejs-lts-jod (nodejs)  

:: Conflicting packages will have to be confirmed manually
:: packages not in the AUR: evdi-compat-git  guiscrcpy-git  libprotobuf-compat-32  libvgm-audio-git  libvgm-common-git  libvgm-emu-git  libvgm-player-git  libvgm-utils-git  ms-teams-for-linux-bin  nerd-fonts-meta  
    noto-color-emoji-fontconfig-no-binding  obs-linuxbrowser-bin  obs-ndi-bin  piper-voices  plasma5-applets-fokus  retrosmart-icon-theme-local  ryujinx-bin  sweet-kde-theme-nova-git  ttf-opendyslexic  vgm2wav-git
:: marked out of date: hoppscotch-bin  jellyamp-appimage  jsonnet-language-server-bin  nanotts-git  prusa-slicer-rel-bin  system-bridge
:: orphans: adtrack2-bin  nanotts-git  prusa-slicer-rel-bin  system-bridge  xf86-video-vmware

Repo (3) nodejs-lts-iron-20.19.3-1  libxml2-legacy-2.13.8-1  gumbo-parser-0.13.1-1
Repo Make (46) python-pyproject-hooks-1.2.0-3  python-build-1.2.2-3  python-flit-core-3.12.0-1  python-installer-0.7.0-10  python-execnet-2.1.1-4  python-pytest-xdist-3.6.1-2  python-rpds-py-0.22.3-1  
        python-referencing-0.35.1-3  python-jsonschema-specifications-2024.10.1-1  python-jsonschema-4.23.0-2  blueprint-compiler-0.16.0-1  meson-1.8.2-2  python-setuptools-scm-8.3.1-1  boost-1.88.0-3  asar-3.4.1-1  gn-0.2238.a84e399f-1
        gperf-3.1-5  lld-20.1.7-1  patchutils-0.4.2-3  python-httplib2-0.22.0-8  rust-bindgen-0.72.0-1  benchmark-1.9.3-1  wayland-protocols-1.45-1  intltool-0.51.0-6  glib2-docs-2.84.3-1  gtk-doc-1.34.0-3  python-mako-1.3.10-1  
        gobject-introspection-1.84.0-2  autoconf-archive-1:2024.10.16-2  itstool-1:2.0.7-3  mallard-ducktype-1.0.2-12  yelp-tools-42.1-2  gnome-common-3.18.0-5  extra-cmake-modules-6.15.0-1  dotnet-targeting-pack-9.0.5.sdk106-1  
        dotnet-sdk-9.0.5.sdk106-1  cudnn-9.10.2.21-1  python-semantic-version-2.10.0-7  python-setuptools-rust-1.11.1-1  help2man-1.49.3-2  doxygen-1.14.0-1  cython-3.1.2-1  marked-5.0.0-2  marked-man-1.3.3-2  xorg-util-macros-1.20.2-1
        xorg-server-devel-21.1.18-2
Aur (77) android-apktool-bin-2.12.0-1  aws-cli-v2-2.27.49-1  bitwarden-bin-2025.6.1-1  icoextract-0.2.0-1  patool-4.0.1-1  python-fvs-0.3.4-4  python-pathvalidate-3.3.1-1  python-steamgriddb-1.0.5-4  vkbasalt-cli-3.1.1-3  
        bottles-2:51.21-3  chatterino2-git-2.5.3.r50.gd39c1a1-1  discord_arch_electron-1:0.0.101-1  electron32-32.3.3-1  f1multiviewer-bin-1.43.2-1  f1multiviewer-digiflag-2.8.3-1  f1mv-lights-integration-bin-3.2.4-1  furmark-2.8.2.0-1
        vulkan-headers-git-1.4.315.r0.g75ad707-1  gamescope-git-3.16.4.r0.g1ab8009d-1  gconf-3.2.6+11+g07808097-15  google-chrome-138.0.7204.100-1  google-earth-pro-7.3.6.10201-2  hoppscotch-bin-25.5.1-0  insomnia-bin-1:11.2.0-1  
        intiface-central-bin-2.6.7-2  joycond-git-v0.1.0.r58.g39d5728-1  libglibutil-1.0.80-1  libgbinder-1.1.42-2  librewolf-bin-1:140.0.2_1-1  mcpelauncher-linux-1.4.0-1  microsoft-edge-stable-bin-138.0.3351.77-1  
        minecraft-launcher-1:2.1.3-3  mprisence-1.2.1-1  mullvad-vpn-bin-2025.7-1  munt-2.7.2-2 (munt munt-qt)  ndi-sdk-6.2.0.r145805.20250602-1  obsidian-1.8.10-2 (obsidian-bin)  owlink-git-r44.8e4e840-10  kddockwidgets-qt6-2.2.5-1  
        plutovg-1.1.0-1  plutosvg-0.0.7-1  pcsx2-2.4.0-1  polychromatic-0.9.5-1  pomota-bin-0.0.7-7  electron19-bin-19.1.9-3  postybirb-plus-bin-3.1.60-1  powershell-7.5.2-1  python-audioop-lts-0.2.1-1  python-discord-2.5.2-2  
        ccache-ext-3-1  python-dlib-20.0-1  python-casttube-0.2.1-4  python-pychromecast-14.0.7-3  python-selenium-4.34.0-1  python-thefuzz-0.22.1-3  qt5-datavis3d-5.15.17-1  r2modman-bin-3.2.1-1  simple-kdump-0.6-1  
        slack-desktop-wayland-4.44.60-1  superproductivity-bin-14.0.5-1  tidal-hifi-bin-5.19.0-1  httpdirfs-1.2.7-2  ttf-ms-win11-auto-10.0.26100.1742-4  visual-studio-code-bin-1.101.2-1  vobsub2srt-git-1.0.8.g8ea2e11-1  
        python-gbinder-1.1.2-3  waydroid-1.5.4-1  weasis-bin-4.6.1-1  whalebird-6.2.3-1  wluma-4.10.0-1  glib-1.2.10-18  xdelta-1.1.4-8  xf86-video-vmware-13.4.0-4  yubico-authenticator-bin-7.2.3-1  zen-browser-bin-1.14.2b-1  
        zenmap-7.97-1  zoom-6.5.3-1
Aur Make (1) python-setuptools-reproducible-0.1-1

:: Proceed to review? [Y/n]: 

:: Downloading PKGBUILDs...
 PKGBUILDs up to date
 nothing new to review
fetching devel info...
:: Synchronizing package databases...
 core is up to date
 extra                                                                                                              7.8 MiB  6.93 MiB/s 00:01 [#######################################################################################] 100%
 multilib is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (42) archlinux-keyring-20250707-1  audit-4.0.5-1  automake-1.18-1  ca-certificates-mozilla-3.113.1-1  cryptsetup-2.8.0-1  curl-8.14.1-1  dbus-broker-37-2  dbus-broker-units-37-2  dbus-units-37-2  device-mapper-2.03.33-1
              findutils-4.10.0-3  gettext-0.25.1-1  glib2-2.84.3-1  gnupg-2.4.8-1  gpgme-2.0.0-1  hwdata-0.397-1  iana-etc-20250612-1  kbd-2.8.0-1  krb5-1.21.3-2  leancrypto-1.5.0-1  libarchive-3.8.1-1  libffi-3.5.1-1  libldap-2.6.10-1
              libnghttp2-1.66.0-1  libnghttp3-1.10.1-1  libusb-1.0.29-1  libxml2-2.14.4-2  linux-api-headers-6.15-1  nettle-3.10.2-1  openssl-3.5.1-1  pacman-7.0.0.r6.gc685ae6-6  pacman-mirrorlist-20250702-2  pam-1.7.1-1
              pkgconf-2.5.1-1  readline-8.2.013-2  shadow-4.18.0-1  sqlite-3.50.2-1  sudo-1.9.17.p1-1  systemd-257.7-1  systemd-libs-257.7-1  util-linux-2.41.1-1  util-linux-libs-2.41.1-1

Total Installed Size:  221.58 MiB
Net Upgrade Size:        2.32 MiB

:: Proceed with installation? [Y/n] 
(42/42) checking keys in keyring                                                                                                              [#######################################################################################] 100%
(42/42) checking package integrity                                                                                                            [#######################################################################################] 100%
(42/42) loading package files                                                                                                                 [#######################################################################################] 100%
(42/42) checking for file conflicts                                                                                                           [#######################################################################################] 100%
(42/42) checking available disk space                                                                                                         [#######################################################################################] 100%
error: Partition /etc/makepkg.conf.d is mounted read only
error: not enough free disk space
error: failed to commit transaction (not enough free disk space)
Errors occurred, no packages were upgraded.
error: failed to run: sudo arch-nspawn -C /tmp/.tmpiMyKpo -M /etc/makepkg.conf /var/lib/aurbuild/x86_64/root --bind-ro /etc/makepkg.conf.d:/etc/makepkg.conf.d --bind /var/cache/pacman/pkg/ pacman -Syu --noconfirm:

`/etc/paru.conf`
#
# $PARU_CONF
# /etc/paru.conf
# ~/.config/paru/paru.conf
#
# See the paru.conf(5) manpage for options

#
# GENERAL OPTIONS
#
[options]
PgpFetch
Devel
Provides
DevelSuffixes = -git -cvs -svn -bzr -darcs -always -hg -fossil
#AurOnly
#BottomUp
#RemoveMake
#SudoLoop
#UseAsk
#SaveChanges
#CombinedUpgrade
#CleanAfter
#UpgradeMenu
#NewsOnUpgrade

#LocalRepo
Chroot
#Sign
#SignDb
#KeepRepoCache

#
# Binary OPTIONS
#
#[bin]
#FileManager = vifm
#MFlags = --skippgpcheck
#Sudo = doas

`/etc/pacman.conf`
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg     = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
#Color
#NoProgressBar
CheckSpace
#VerbosePkgLists
ParallelDownloads = 5

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

#CacheDir = /var/lib/repo/aur

#[aur]
#SigLevel = PackageOptional DatabaseOptional
#Server = file:///var/lib/repo/aur


# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

#[core-testing]
#Include = /etc/pacman.d/mirrorlist

[core]
Include = /etc/pacman.d/mirrorlist

#[extra-testing]
#Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist

[multilib]
Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

miawgogo avatar Jul 09 '25 10:07 miawgogo

I have this issue, too, but only on my laptop. I have 3 systems that I use paru for, all CachyOS. I use the same paru.conf and pacman.conf on each machine. Both my desktop and headless server work fine, but not my laptop, which suffers this issue. I can get around it by either disabling CheckSpace for pacman or disabling Chroot for paru, but it’s not the most ideal.

dablenparty avatar Oct 28 '25 15:10 dablenparty

I suspect the issue is when the chroot was created with an older version of pacman. When it needs to update pacman, it might fail to do so because /etc/makepkg.conf.d is mounted read-only so that path cannot be upgraded.

In practice it's fine not to upgrade that path because there's nothing critical for the chroot there, and it's mounted from the host, which might have a new pacman version already. But it's fair to detect that it can't be properly upgraded. Maybe there's a way to pacstrap this upgrade instead (specifically for the pacman package), or to run it without mounting /etc/makepkg.conf.d (since the "package upgrade" step doesn't need to build packages, it doesn't need the mounts).

gyscos avatar Dec 15 '25 15:12 gyscos

I actually found a way around this: just delete the directory Chroot is set to. The default path (taken from the man page) is /var/lib/aurbuild, which is what I use; running the following command works for me:

sudo rm -rvf /var/lib/aurbuild

Now, paru -Syu works again. I think the Chroot runs out of space even though the host machine doesn't and I don't know how to add more disk space to a chroot so I chose to just purge it.

dablenparty avatar Dec 17 '25 20:12 dablenparty