paru icon indicating copy to clipboard operation
paru copied to clipboard

Support for libalpm v16.0.0

Open LeGmask opened this issue 2 weeks ago • 147 comments

Affected Version

paru 2.1.0 and older

Description

Pacman v7.1.0 and libalpm v16.0.0 got released in arch-testing as of today. The new version of libalpm break paru (as intended), and as of now paru is not compatible with libalpm v16:

  • patching with patchelf : paru: symbol lookup error: paru: undefined symbol: alpm_option_set_disable_sandbox
  • recompiling : this version of alpm.rs does not support libalpm v16.0.0 only v15.x.x is supported

Output

paru: symbol lookup error: paru: undefined symbol: alpm_option_set_disable_sandbox
error: failed to run custom build command for `alpm v4.0.3`

Caused by:
  process didn't exit successfully: `/home/evann/paru/src/paru-2.1.0/target/release/build/alpm-45b5776683cd9bb8/build-script-build` (exit status: 101)
  --- stderr

  thread 'main' (151165) panicked at /home/evann/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alpm-4.0.3/build.rs:25:13:
  this version of alpm.rs does not support libalpm v16.0.0 only v15.x.x is supported
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
❯ pacman --version                                                      

 .--.                  Pacman v7.1.0 - libalpm v16.0.0
/ _.-' .-.  .-.  .-.   Copyright (C) 2006-2025 Pacman Development Team
\  '-. '-'  '-'  '-'   Copyright (C) 2002-2006 Judd Vinet
 '--'
                       This program may be freely redistributed under
                       the terms of the GNU General Public License.

LeGmask avatar Dec 04 '25 23:12 LeGmask

I think the arch team haven't tagged a new release for alpm.rs to support libalpm.so.16 even though I think the code is updated.

bertin0 avatar Dec 05 '25 08:12 bertin0

Faced this same issue just now.

Arch-Lover avatar Dec 05 '25 10:12 Arch-Lover

Same issue here.

orlfman avatar Dec 05 '25 14:12 orlfman

Currently, even recompiling will fail. An alternative solution is to use the original makepkg method. Additionally, yay seems to be working fine at the moment and can be used as an alternative AUR helper.

Memacs-E avatar Dec 05 '25 14:12 Memacs-E

yay works as this is an issue with the libalpm rust wrapper only as far as I can tell.

bertin0 avatar Dec 05 '25 15:12 bertin0

same issue

medispis avatar Dec 05 '25 23:12 medispis

Are there any current workarounds for this issue?

loxoron218 avatar Dec 06 '25 16:12 loxoron218

paru is currently unusable. is their is some workarounds to make it usable ?

akileshas avatar Dec 06 '25 17:12 akileshas

There certainly is a workaround.

PKGBUILD
# Maintainer: Morgan <[email protected]>
pkgname=paru
pkgver=2.1.0
pkgrel=2.1
pkgdesc='Feature packed AUR helper'
url='https://github.com/morganamilo/paru'
source=("$pkgname-$pkgver.tar.gz::https://github.com/Morganamilo/paru/archive/v$pkgver.tar.gz")
backup=("etc/paru.conf")
arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64')
license=('GPL-3.0-or-later')
makedepends=('cargo')
depends=('git' 'pacman' 'libalpm.so>=14')
optdepends=('bat: colored pkgbuild printing' 'devtools: build in chroot and downloading pkgbuilds')
sha256sums=('eea4dbb524db765d5316f540f9ee670c0bf81aae4827b5417eebb4c9b5651727')

prepare() {
  cd "$pkgname-$pkgver"

  patch -Np1 <<EOF
diff --git a/Cargo.toml b/Cargo.toml
index 26063f7..eb556cf 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -75,2 +75,2 @@ mock_chroot = ["mock"]
-#alpm = { path = "../alpm.rs/alpm" }
-#alpm-utils = { path = "../alpm.rs/alpm-utils" }
+alpm = { git = "https://github.com/archlinux/alpm.rs.git", rev = "b010ec79ee92b54e87f07fa4e287cbabc035c0ca" }
+alpm-utils = { git = "https://github.com/archlinux/alpm.rs.git", rev = "b010ec79ee92b54e87f07fa4e287cbabc035c0ca" }
EOF
  rm Cargo.lock

  cargo fetch --target "$(rustc -vV | sed -n 's|host: ||p')"
}

build () {
  cd "$srcdir/$pkgname-$pkgver"

  if pacman -T pacman-git > /dev/null; then
    _features+="git,"
  fi

  if [[ $CARCH != x86_64 ]]; then
    export CARGO_PROFILE_RELEASE_LTO=off
  fi

  cargo build --frozen --features "${_features:-}" --release --target-dir target
  ./scripts/mkmo locale/
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  install -Dm755 target/release/paru "${pkgdir}/usr/bin/paru"
  install -Dm644 paru.conf "${pkgdir}/etc/paru.conf"

  install -Dm644 man/paru.8 "$pkgdir/usr/share/man/man8/paru.8"
  install -Dm644 man/paru.conf.5 "$pkgdir/usr/share/man/man5/paru.conf.5"

  install -Dm644 completions/bash "${pkgdir}/usr/share/bash-completion/completions/paru.bash"
  install -Dm644 completions/fish "${pkgdir}/usr/share/fish/vendor_completions.d/paru.fish"
  install -Dm644 completions/zsh "${pkgdir}/usr/share/zsh/site-functions/_paru"

  install -d "$pkgdir/usr/share/"
  cp -r locale "$pkgdir/usr/share/"
}

Just be careful with it.

marmitar avatar Dec 06 '25 17:12 marmitar

@marmitar Thank You, this worked for me, from the previous paru directory, I did a git pull, then replaced the PKGBUILD with the one you provided, then makepkg -si. You said be careful with it, please tell me what I should be concerned about Thanks

Jee-bit avatar Dec 07 '25 07:12 Jee-bit

It's just that this PKGBUILD will produce a very untested version of paru, and that it's more likely to break than standard versions. Even that PKGBUILD itself is likely to break sooner rather than later.

marmitar avatar Dec 07 '25 13:12 marmitar

For those wondering macgyvering it via ln --symbolic to trick it unfortunately wont work.

Imeguras avatar Dec 08 '25 00:12 Imeguras

For those wondering macgyvering it via ln --symbolic to trick it unfortunately wont work.

Symbolic link granted to not working as the library itself had some breaking changes.

Edit: My workaround for the time being is to use Pikaur.

Arch-Lover avatar Dec 08 '25 04:12 Arch-Lover

facing the same issue if i try to run paru -Sl I get this on the last line:

thread 'main' (288149) panicked at /home/lyra/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alpm-4.0.3/src/db.rs:144:39: called Result::unwrap() on an Err value: NulError(0, [0, 28, 142, 22, 28, 92, 227, 39, 239, 62, 193, 173, 222, 50, 131, 227, 112, 232, 38, 118, 184, 142, 149, 116, 216, 87, 134, 212, 48, 147, 201, 163, 235, 219, 74, 174, 236, 48, 63, 1, 45, 31, 243, 18, 174, 188, 65, 134, 91, 88, 92, 52, 115, 80, 113, 187, 115, 123, 229, 221, 137, 251, 128, 74, 4, 70, 180, 50, 160, 236, 80, 5, 42, 215, 1, 178, 58, 3, 84, 118, 41, 97, 59, 59, 3, 52, 115, 234, 185, 159, 72, 226, 130, 39, 104, 242, 170, 24, 23, 134, 79, 225, 88, 203, 86, 11, 103, 46, 18, 142, 14, 97, 226, 108, 135, 231, 124, 160, 30, 90, 190, 210, 206, 218, 82, 109, 71, 96, 45, 53, 176, 72, 254, 236, 5, 214, 224, 184, 12, 67, 174, 194, 155, 47, 184, 255, 94, 110, 1, 98, 193, 230, 22, 122, 239, 84, 24, 21, 236, 254, 75, 206, 110, 6, 8, 224, 67, 36, 183, 44, 202, 87, 16, 84, 169, 4, 138, 64, 123, 99, 180, 46, 5, 67, 44, 193, 122, 75, 225, 248, 27, 26, 217, 138, 5, 237, 173, 170, 79, 136, 177, 90, 134, 163, 44, 122, 255, 95, 145, 162, 22, 213, 91, 116, 83, 7, 222, 109, 232, 91, 47, 3, 193, 56, 197, 13, 154, 244, 181, 207, 88, 94, 148, 54, 178, 175, 104, 229, 192, 161, 79, 82, 138, 53, 200, 2, 178, 196, 15, 50, 141, 177, 240, 111, 249, 233, 77, 74, 196, 210, 238, 98, 207, 32, 212, 23, 72, 38, 95, 129, 197, 194, 130, 17, 147, 236, 49, 124, 181, 52, 165, 101, 18, 99, 192, 48, 185, 25, 214, 71, 103, 146, 47, 119, 193, 123, 67, 229, 107, 118, 225, 115, 147, 141, 208, 196, 93, 119, 50, 105, 112, 106, 52, 204, 78, 116, 13, 221, 7, 88, 74, 204, 71, 172, 234, 41, 177, 168, 134, 149, 61, 173, 167, 68, 133, 203, 234, 100, 174, 35, 8, 171, 87, 12, 139, 43, 79, 132, 148, 56, 4, 18, 33, 32, 168, 99, 59, 8, 57, 160, 175, 29, 92, 36, 131, 196, 70, 110, 242, 139, 5, 57, 243, 25, 95, 130, 72, 81, 106, 84, 231, 156, 105, 71, 155, 235, 203, 126, 173, 51, 91, 76, 166, 157, 154, 26, 76, 197, 92, 237, 144, 96, 119, 49, 149, 245, 158, 58, 78, 139, 18, 118, 37, 132, 45, 103, 4, 65, 62, 78, 85, 35, 234, 34, 126, 112, 14, 74, 66, 68, 216, 85, 216, 32, 3, 160, 114]) note: run with RUST_BACKTRACE=1 environment variable to display a backtrace aur �\�'�>���2��p�&v���t�W��0�ɣ�J��0?-���A�[X\4sPq�s{���JF�2��P*��:Tv)a;;4s깟H�'h��O�X�V g.�▒�┌��≠�Z���R└G◆↑5�H���� C�›/��^┼␉��≥�T�K��C$�←�XJ�G��)����=��D��d��W��MJ��b� �H&�����1|�4�ec�0��Gg�/w�{C�kv�s���]w2ipj4�Nt �+O��8! �c9��$��Fn�9��HQjT�iG��~�3[L���L�\�`w1���:N�v%�-gA>NU#�"~pJBD�U� �⎼ ┤┼┐┼⎺┬┼↑┴␊⎼⎽␋⎺┼%

messyOS avatar Dec 09 '25 06:12 messyOS

libalpm 16.0.0 has hit main repos, paru is unfortunately unusable for me now. I'll be using yay for the moment, but I'll be switching back as soon as I hear anything back from the maintainer on this.

VisceralAsonia avatar Dec 11 '25 20:12 VisceralAsonia

Correction -- had testing above main and didn't notice until just now. Sorry about that!

VisceralAsonia avatar Dec 11 '25 20:12 VisceralAsonia

I've updated the alpm crate to support the new pacman version. Paru will still need to be rebuilt against the new version same as any other soname bump. The -bin package doesn't apply here as it can't be rebuilt by the user.

This is the same version of paru, a proper release still needs to be made at some point as soon as I can gather the time to sift through the changelog and ensure everything is in order.

Morganamilo avatar Dec 12 '25 05:12 Morganamilo

Using -testing and rebuilt paru and having the following config:

cat .config/paru/paru.conf
[options]
LocalRepo=local-aur
Chroot

I'm getting the following:

[..]
:: Accept changes? [Y/n]: y
error: 'failed to resolve path '/var/cache/pacman/pkg /home/inglor/.local-aur' passed to 'CacheDir': No such file or directory
error: failed to run: sudo arch-nspawn -C /tmp/.tmpxuk2sd -M /etc/makepkg.conf /var/lib/aurbuild/x86_64/root --bind-ro /etc/makepkg.conf.d:/etc/makepkg.conf.d --bind-ro /home/inglor/.local-aur --bind /var/cache/pacman/pkg/ pacman -Syu --noconfirm:

inglor avatar Dec 12 '25 08:12 inglor

I've updated the alpm crate to support the new pacman version. Paru will still need to be rebuilt against the new version same as any other soname bump. The -bin package doesn't apply here as it can't be rebuilt by the user.

This is the same version of paru, a proper release still needs to be made at some point as soon as I can gather the time to sift through the changelog and ensure everything is in order.

Thank you so much. Although I won't be able to use my fzf script, having Paru running again is more than enough for the time being.

kbuckleys avatar Dec 12 '25 12:12 kbuckleys

I just rebuilt Paru with Pikaur and deleted Pikaur. Paryu appears to be functioning without any issues.

Arch-Lover avatar Dec 12 '25 14:12 Arch-Lover

Using -testing and rebuilt paru and having the following config:

cat .config/paru/paru.conf
[options]
LocalRepo=local-aur
Chroot

I'm getting the following:

[..]
:: Accept changes? [Y/n]: y
error: 'failed to resolve path '/var/cache/pacman/pkg /home/inglor/.local-aur' passed to 'CacheDir': No such file or directory
error: failed to run: sudo arch-nspawn -C /tmp/.tmpxuk2sd -M /etc/makepkg.conf /var/lib/aurbuild/x86_64/root --bind-ro /etc/makepkg.conf.d:/etc/makepkg.conf.d --bind-ro /home/inglor/.local-aur --bind /var/cache/pacman/pkg/ pacman -Syu --noconfirm:

Exactly the same issue on my side: https://aur.archlinux.org/packages/paru#comment-1051344

iyanmv avatar Dec 12 '25 22:12 iyanmv

@inglor try updating to the latest version of pacman from testing, it works fine now after this commit https://gitlab.archlinux.org/pacman/pacman/-/commit/de68378f9c8e60963b76abdc770900b0e16a6cf4

iyanmv avatar Dec 13 '25 09:12 iyanmv

Hello, I'm getting the issue after updating my pacman and libalpm. I'm using non-testing package. Pacman v7.1.0 - libalpm v16.0.1

harshv5094 avatar Dec 13 '25 14:12 harshv5094

Bumping alpm and alpm-utils to 5.0.0 and rebuilding solves it. Edit: this also needs to be done for the dependency aur-depends

mageOfstructs avatar Dec 13 '25 14:12 mageOfstructs

Well today all hell breaks loose :)

Funny today i was doing my new setup for ns / mail / web / media for my home lab... I tried so hard to convince my self out of rolling release and go with something stable, but i really want to live on the edge :) 3 hours after i set up my 1st VM (NS), pacman and libalpm breaks paru (and yay)... life choices... :/

SoLoR1 avatar Dec 13 '25 14:12 SoLoR1

about two hours ago, pacman 7.1.0 released in repository. After I upgrade it, paru is broken.

paru: error while loading shared libraries: libalpm.so.15: cannot open shared object file: No such file or directory

minortex avatar Dec 13 '25 14:12 minortex

same here paru: error while loading shared libraries: libalpm.so.15: cannot open shared object file: No such file or directory

HeyMoonHere avatar Dec 13 '25 14:12 HeyMoonHere

Paru cannot upgrade itself if it can't run. You'll have to update paru manually.

gtsiam avatar Dec 13 '25 14:12 gtsiam

I found https://github.com/Morganamilo/paru/issues/1239#issuecomment-2351021340 for upgrading manually, however I get build errors now. alpm_option_set_disable_sandbox_filesystem() and alpm_option_set_disable_sandbox_syscalls() are missing, and alpm_sandbox_setup_child() has too many arguments being passed in

jm355 avatar Dec 13 '25 14:12 jm355

Same issue

monaztic avatar Dec 13 '25 14:12 monaztic