Morganamilo / paru

Feature packed AUR helper
GNU General Public License v3.0
6.2k stars 239 forks source link

not able to install latest paru version #1240

Open Jagadishwar49 opened 1 month ago

Jagadishwar49 commented 1 month ago

paru 2.0.3-1

Description : after cloning and while doing makepkg -si getting error for higher dependency

Error :

error: failed to run custom build command foralpm v3.0.4 (https://github.com/archlinux/alpm.rs?rev=306342#306342ef)`

Caused by: process didn't exit successfully: /home/jagan/paru/src/paru-2.0.3/target/release/build/alpm-fe8130be9696cf00/build-script-build (exit status: 101) --- stderr thread 'main' panicked at /home/jagan/.cargo/git/checkouts/alpm.rs-a0070a235cf20bfa/306342e/alpm/build.rs:25:13: this version of alpm.rs does not support libalpm v15.0.0 only v14.x.x is supported note: run with RUST_BACKTRACE=1 environment variable to display a backtrace warning: build failed, waiting for other jobs to finish... ==> ERROR: A failure occurred in build(). Aborting...`

Jagadishwar49 commented 1 month ago

i tired linking also : sudo ln -s /usr/lib/libalpm.so.15.0.0 /usr/lib/libalpm.so.14 got error like already there ln: failed to create symbolic link '/usr/lib/libalpm.so.14': File exists image

michelesr commented 1 month ago

@Jagadishwar49 https://github.com/Morganamilo/paru/issues/1239#issuecomment-2351021340

Jagadishwar49 commented 1 month ago

@michelesr getting conflicts with paru and paru-git can you let me know how to remove paru i tried pacman but didnt find the pkg image

michelesr commented 1 month ago

@michelesr getting conflicts with paru and paru-git can you let me know how to remove paru i tried pacman but didnt find the pkg

I just did sudo pacman -Rs paru paru-debug before installing paru-git with makepkg -si.

pihkaal commented 1 month ago

hey, installing with cargo install --git https://github.com/Morganamilo/paru.git works

thx: https://github.com/Morganamilo/paru/issues/1166#issuecomment-2031007447

zancas commented 1 month ago

I am seeing the same issue with the update to alpm lagging behind paru requirement.

ghost commented 1 month ago

There was an update for pacman version 7.0.0.r3.g7736133-1 which caused the issue. I reverted back to version pacman-6.1.0-3 and put pacman in IgnorePkgs in /etc/pacman.conf. It works fine. We will have to wait for paru to be updated.

zancas commented 1 month ago

Is there an issue on the pacman repo?

I don't immediately see how to open an issue here:

https://gitlab.archlinux.org/pacman/pacman

ClementTsang commented 1 month ago

I don't immediately see how to open an issue here:

I presume you need an account first:

image

But why would you need to open an issue on the pacman repo? The issue is on paru's end, isn't it? And it's at least temporarily resolved by just installing paru-git until everything lands.

fam007e commented 1 month ago

Likewise yay is also not working.This is due to dependency issue because of new update in pacman. This happened due to libalpm.so.14 getting updated to libalpm.so.15. Hopefully, they (aur-helpers) are updated quickly.

sleepy-goth commented 1 month ago

Yes, basically I think that the paru-git package is updated, but the paru package binary not, so just compile from scratch the other package

ZombieLurker commented 1 month ago

Remove 'paru' and 'paru-debug' with pacman, then manually clone and install 'paru-git'. No issue with 'paru-git'.

kj-sh604 commented 1 month ago

I re-wrote the paru-git PKGBUILD, and I think it could be useful for some folks. Essentially, it builds the latest paru git commit into a regular paru release package instead of a paru-git package. That way, when the official paru package eventually gets updated, you'll automatically get the latest release without having to remember to remove paru-git. It's admittedly a bit of a quick janky re-write 😅 (I promise my AUR PKGBUILDs are much cleaner 😆), but I think it could be a decent temporary fix for some people.

pkgname=paru
_pkgname=paru
pkgver=2.0.3
pkgrel=1
pkgdesc='Feature packed AUR helper'
url='https://github.com/morganamilo/paru'
source=("git+https://github.com/morganamilo/paru")
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')
conflicts=('paru-git')
provides=('paru')
sha256sums=(SKIP)

prepare() {
  cd "$_pkgname"
  cargo fetch --locked --target "$(rustc -vV | sed -n 's|host: ||p')"
}

build () {
  cd "$srcdir/$_pkgname"

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

  if [[ $(rustc -V) == *"nightly"* ]]; then
    _features+="backtrace,"
  fi

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

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

package() {
  cd "$srcdir/$_pkgname"

  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/"
}
hirak99 commented 1 month ago

To clarify a few points, as per my understanding -

  1. This is not a pacman bug. Yes pacman was updated to 7.0 which caused this, but the solution is to update paru as well.
  2. Paru dependencies are already updated in the master branch, https://github.com/Morganamilo/paru/commit/90656a901479b77cb3b7a54e393dff9a0ca6a45f which is why paru-git works.
  3. All we need now is a release from paru to get paru AUR working as well.
TTimo commented 1 month ago

Or use paru-git AUR in the meantime (https://aur.archlinux.org/packages/paru-git).

kj-sh604 commented 1 month ago

I re-wrote the paru-git PKGBUILD, and I think it could be useful for some folks. Essentially, it builds the latest paru git commit into a regular paru release package instead of a paru-git package. That way, when the official paru package eventually gets updated, you'll automatically get the latest release without having to remember to remove paru-git. It's admittedly a bit of a quick janky re-write 😅 (I promise my AUR PKGBUILDs are much cleaner 😆), but I think it could be a decent temporary fix for some people.

pkgname=paru
_pkgname=paru
pkgver=2.0.3
pkgrel=1
pkgdesc='Feature packed AUR helper'
url='https://github.com/morganamilo/paru'
source=("git+https://github.com/morganamilo/paru")
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')
conflicts=('paru-git')
provides=('paru')
sha256sums=(SKIP)

prepare() {
  cd "$_pkgname"
  cargo fetch --locked --target "$(rustc -vV | sed -n 's|host: ||p')"
}

build () {
  cd "$srcdir/$_pkgname"

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

  if [[ $(rustc -V) == *"nightly"* ]]; then
    _features+="backtrace,"
  fi

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

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

package() {
  cd "$srcdir/$_pkgname"

  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/"
}

I just want to reference a reply from another thread from @TheGentleChainsaw, who provided a much more elegant temporary solution than mine: https://github.com/Morganamilo/paru/issues/1239#issuecomment-2351465944

I am currently using their PKGBUILD as well 👌. This might be helpful for some people, as we wait for an update on the actual paru PKGBUILD in the AUR.

Cheers y'all 🍻.