You are not logged in.

#1 2025-11-28 01:05:57

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 32
Website

[FINISHED] PKGBUILD review: vibe

Hi! I'd like to request a review of the following `PKGBUILD`:

# Maintainer: TornaxO7 <tornax(at)pm.me>
# 
# Heavily inspired by `awww`'s PKGBUILD
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=awww-git

pkgname=vibe
pkgver=vibe.v2.3.0.r54.g5cceea6
pkgrel=1
pkgdesc="A desktop audio visualizer for wayland."
arch=('x86_64')
url="https://github.com/TornaxO7/vibe"
license=('AGPL-3.0-or-later')
depends=('libxkbcommon' 'alsa-lib' 'wayland' 'wayland-protocols' 'vulkan-validation-layers' 'vulkan-headers')
optdepends=(
	'vulkan-radeon: If you have an AMD GPU',
	'vulkan-intel: If you have an Intel GPU',
	'vulkan-utils: If you have a Nvidia GPU',
)
makedepends=('rust' 'git')
source=("$pkgname::git+$url.git")
sha256sums=('SKIP')

prepare() {
	cd "$pkgname"

	export RUSTUP_TOOLCHAIN=stable
	cargo update
	cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

pkgver() {
	git -C $pkgname describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	cd "$pkgname"

	export RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target
	cargo build --frozen --release --all-features
}

check() {
	cd "$pkgname"

	export RUSTUP_TOOLCHAIN=stable
	cargo test --frozen --all-features
}

package() {
    install -Dm755 -t "$pkgdir/usr/bin/" "$pkgname/target/release/$pkgname"
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" $pkgname/LICENSE
}

I'm a bit unsure if the final package name will be set by the `pkgname` variable of the `PKGBUILD` file or the repository name because I'd like the aur package to be called `vibe-audio-visualizer` to avoid collisions with other packages which have the prefix `vibe`.

Last edited by TornaxO7 (2025-12-09 12:53:01)

Offline

#2 2025-11-28 17:21:48

killertofus
Member
Registered: 2025-02-10
Posts: 95

Re: [FINISHED] PKGBUILD review: vibe

# Maintainer: TornaxO7 <tornax(at)pm.me>
# 
# Heavily inspired by `awww`'s PKGBUILD
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=awww-git

pkgname=vibe-git
_pkgname=vibe
pkgver=vibe.v2.3.0.r54.g5cceea6
pkgrel=1
pkgdesc="A desktop audio visualizer for wayland."
arch=('x86_64')
url="https://github.com/TornaxO7/vibe"
license=('AGPL-3.0-or-later')
depends=('libxkbcommon' 'alsa-lib' 'wayland' 'wayland-protocols' 'vulkan-validation-layers' 'vulkan-headers')
makedepends=('rust' 'git')
source=("$_pkgname::git+$url.git")
sha256sums=('SKIP')
provides=($_pkgname)
conflicts=($_pkgname)

pkgver() {
    printf "r%s.%s" "$(git -C ${_pkgname} rev-list --count HEAD)" "$(git -C ${_pkgname} rev-parse --short HEAD)"
}

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

    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --release --all-features


package() {
  cd "$_pkgname"
  install -Dm755 target/release/vibe "$pkgdir/usr/bin/vibe"
}

since you are building the git version, I adapted it to build from the git version

Last edited by killertofus (2025-11-28 17:22:26)

Offline

#3 2025-11-28 19:29:50

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 32
Website

Re: [FINISHED] PKGBUILD review: vibe

killertofus wrote:

since you are building the git version, I adapted it to build from the git version

Looks like a big adaption big_smile Could you please explain each change why you did that? Or to be more clear:

  • Why did you add `_pkgname=vibe`? Is it because `pkgname` will be resulting package name in the AUR? Like, if you'd like to install it with your AUR helper it will be like `paru -S vibe-git`?

  • Why did you remove my `optdepends` lits?

  • Why did you replace `cd "$pkgname"` with `cd "${srcdir}/${_pkgname}/"`? Wouldn't `cd $_pkgname` be sufficient?

  • Why did you remove the LICENSE copy in the `package()` function? I think it's better if it stays there.

Never the less, thank you for your review! smile

Offline

#4 2025-11-28 19:44:39

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,494

Re: [FINISHED] PKGBUILD review: vibe

optdepends=(
	'vulkan-radeon: If you have an AMD GPU',
	'vulkan-intel: If you have an Intel GPU',
	'vulkan-utils: If you have a Nvidia GPU',
)

vulkan-utils is not an archlinux package, you probably meant nvidia-utils .
All vulkan driver packages (incl. nvidia-utils) on archlinux provide vulkan-driver.
If vulkan support is required, add vulkan-driver as depend .


https://github.com/TornaxO7/vibe wrote:

wgsl and glsl support for shaders

Neither of those require vulkan , but https://github.com/TornaxO7/vibe/wiki/Config mentions vulkan as recommended backend.
Does your software require vulkan or wgsl / glsl ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#5 2025-11-28 19:46:24

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 32
Website

Re: [FINISHED] PKGBUILD review: vibe

Lone_Wolf wrote:

vulkan-utils is not an archlinux package, you probably meant nvidia-utils .
All vulkan driver packages (incl. nvidia-utils) on archlinux provide vulkan-driver.
If vulkan support is required, add vulkan-driver as depend .

Do you mean like this?

depends=('vulkan-driver' ...)
Lone_Wolf wrote:

Neither of those require vulkan , but https://github.com/TornaxO7/vibe/wiki/Config mentions vulkan as recommended backend.
Does your software require vulkan or wgsl / glsl ?

Hi! My software does require a graphics API. Can be either vulkan or opengl but I recommend vulkan.

Last edited by TornaxO7 (2025-11-28 19:48:44)

Offline

#6 2025-12-01 15:51:47

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 32
Website

Re: [FINISHED] PKGBUILD review: vibe

Alright, so I applied some fixes, recommended by you and the new PKGBUILD looks now like this:

# Maintainer: TornaxO7 <tornax(at)pm.me>
# 
# Heavily inspired by `awww`'s PKGBUILD
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=awww-git

pkgname=vibe-audio-visualizer-git
_pkgname=vibe
pkgver=vibe.v2.3.0.r54.g5cceea6
pkgrel=1
pkgdesc="A desktop audio visualizer for wayland."
arch=('x86_64')
url="https://github.com/TornaxO7/vibe"
license=('AGPL-3.0-or-later')
depends=('libxkbcommon' 'alsa-lib' 'wayland' 'wayland-protocols' 'vulkan-validation-layers' 'vulkan-headers' 'vulkan-driver')
makedepends=('rust' 'git')
source=("$_pkgname::git+$url.git")
sha256sums=('SKIP')
provides=($_pkgname)
conflicts=($_pkgname)

pkgver() {
	git -C $_pkgname describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable
	cargo update
	cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

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

	export RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target
	cargo build --frozen --release --all-features
}

check() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable
	cargo test --frozen --all-features
}

package() {
    install -Dm755 -t "${_pkgdir}/usr/bin/" "${srcdir}/${_pkgname}/target/release/${_pkgname}"
    install -Dm644 -t "${_pkgdir}/usr/share/licenses/${_pkgname}/" ${_pkgname}/LICENSE
}

I hope it's fine/better now smile

Offline

#7 2025-12-01 16:05:24

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,252

Re: [FINISHED] PKGBUILD review: vibe

pkgver=vibe.v2.3.0.r54.g5cceea6

From https://wiki.archlinux.org/title/VCS_pa … elines#Git "If tag contains a prefix, like v or project name then it should be cut off:" In this case, you have a very long prefix, not just the v

provides=($_pkgname)

So anything that says it requires the vibe package can use this package instead and it should work? If not, it doesn't provide that.

"${_pkgdir}/usr/bin/"

What in the world is ${_pkgdir}? This PKGBUILD wouldn't even work.

install -Dm644 -t "${_pkgdir}/usr/share/licenses/${_pkgname}/" ${_pkgname}/LICENSE

If the license needs to be installed, it needs to be to a dir named ${pkgname}, not ${_pkgname}. In this case, you shouldn't be installing it at all as it's a common license.

Offline

#8 2025-12-01 16:25:39

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 32
Website

Re: [FINISHED] PKGBUILD review: vibe

Scimmia wrote:
pkgver=vibe.v2.3.0.r54.g5cceea6

From https://wiki.archlinux.org/title/VCS_pa … elines#Git "If tag contains a prefix, like v or project name then it should be cut off:" In this case, you have a very long prefix, not just the v

Oh neat, I didn't knew there would be an article for VCS packages. Thanks!

Scimmia wrote:
provides=($_pkgname)

So anything that says it requires the vibe package can use this package instead and it should work? If not, it doesn't provide that.

hm... I see your point. I guess it's better to remove it.

Scimmia wrote:
"${_pkgdir}/usr/bin/"

What in the world is ${_pkgdir}? This PKGBUILD wouldn't even work.

Oops, sorry, my brain somehow thought I should use `pkgdir`... thank you for spotting that smile

Scimmia wrote:
install -Dm644 -t "${_pkgdir}/usr/share/licenses/${_pkgname}/" ${_pkgname}/LICENSE

If the license needs to be installed, it needs to be to a dir named ${pkgname}, not ${_pkgname}. In this case, you shouldn't be installing it at all as it's a common license.

Oh ok. Thank you for the explanation about why the license shouldn't be installed as well.

So here's the updated version:

# Maintainer: TornaxO7 <tornax(at)pm.me>
# 
# Heavily inspired by `awww`'s PKGBUILD
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=awww-git

pkgname=vibe-audio-visualizer-git
_pkgname=vibe
pkgver=v2.3.0.r54.g5cceea6
pkgrel=1
pkgdesc="A desktop audio visualizer for wayland."
arch=('x86_64')
url="https://github.com/TornaxO7/vibe"
license=('AGPL-3.0-or-later')
depends=('libxkbcommon' 'alsa-lib' 'wayland' 'wayland-protocols' 'vulkan-validation-layers' 'vulkan-headers' 'vulkan-driver')
makedepends=('rust' 'git')
source=("$_pkgname::git+$url.git")
sha256sums=('SKIP')
conflicts=($_pkgname)

pkgver() {
	git -C $_pkgname describe --long --tags --abbrev=7 | sed 's/^vibe.//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable
	cargo update
	cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

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

	export RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target
	cargo build --frozen --release --all-features
}

check() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable
	cargo test --frozen --all-features
}

package() {
    install -Dm755 -t "${_pkgname}/usr/bin/" "${srcdir}/${_pkgname}/target/release/${_pkgname}"
}

Offline

#9 2025-12-01 16:29:42

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,252

Re: [FINISHED] PKGBUILD review: vibe

You *do* need to use ${pkgdir}, but you used ${_pkgdir}, which doesn't exist.

And you still have the 'v' prefix in the version that needs to go.

Last edited by Scimmia (2025-12-01 16:30:11)

Offline

#10 2025-12-01 16:32:11

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 32
Website

Re: [FINISHED] PKGBUILD review: vibe

Scimmia wrote:

You *do* need to use ${pkgdir}, but you used ${_pkgdir}, which doesn't exist.

And you still have the 'v' prefix in the version that needs to go.

Oh... sorry. I hope that I've applied the fixes correctly now ;-;

# Maintainer: TornaxO7 <tornax(at)pm.me>
# 
# Heavily inspired by `awww`'s PKGBUILD
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=awww-git

pkgname=vibe-audio-visualizer-git
_pkgname=vibe
pkgver=2.3.0.r54.g5cceea6
pkgrel=1
pkgdesc="A desktop audio visualizer for wayland."
arch=('x86_64')
url="https://github.com/TornaxO7/vibe"
license=('AGPL-3.0-or-later')
depends=('libxkbcommon' 'alsa-lib' 'wayland' 'wayland-protocols' 'vulkan-validation-layers' 'vulkan-headers' 'vulkan-driver')
makedepends=('rust' 'git')
source=("$_pkgname::git+$url.git")
sha256sums=('SKIP')
conflicts=($_pkgname)

pkgver() {
	git -C $_pkgname describe --long --tags --abbrev=7 | sed 's/^vibe.v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable
	cargo update
	cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

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

	export RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target
	cargo build --frozen --release --all-features
}

check() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable
	cargo test --frozen --all-features
}

package() {
    install -Dm755 -t "${pkgdir}/usr/bin/" "${srcdir}/${_pkgname}/target/release/${_pkgname}"
}

Offline

#11 2025-12-02 09:20:30

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,494

Re: [FINISHED] PKGBUILD review: vibe

--locked tells cargo to strictly adhere to the versions specified in the Cargo.lock file and prevent it from updating dependencies. This is important for reproducible builds.

That should make "cargo update" unnecessary/unwanted .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#12 2025-12-03 11:43:49

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 32
Website

Re: [FINISHED] PKGBUILD review: vibe

Lone_Wolf wrote:

--locked tells cargo to strictly adhere to the versions specified in the Cargo.lock file and prevent it from updating dependencies. This is important for reproducible builds.

That should make "cargo update" unnecessary/unwanted .

Well, that makes sense... here's the updated version:

# Maintainer: TornaxO7 <tornax(at)pm.me>
# 
# Heavily inspired by `awww`'s PKGBUILD
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=awww-git

pkgname=vibe-audio-visualizer-git
_pkgname=vibe
pkgver=2.3.0.r54.g5cceea6
pkgrel=1
pkgdesc="A desktop audio visualizer for wayland."
arch=('x86_64')
url="https://github.com/TornaxO7/vibe"
license=('AGPL-3.0-or-later')
depends=('libxkbcommon' 'alsa-lib' 'wayland' 'wayland-protocols' 'vulkan-validation-layers' 'vulkan-headers' 'vulkan-driver')
makedepends=('rust' 'git')
source=("$_pkgname::git+$url.git")
sha256sums=('SKIP')
conflicts=($_pkgname)

pkgver() {
	git -C $_pkgname describe --long --tags --abbrev=7 | sed 's/^vibe.v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable
	cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

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

	export RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target
	cargo build --frozen --release --all-features
}

check() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable
	cargo test --frozen --all-features
}

package() {
    install -Dm755 -t "${pkgdir}/usr/bin/" "${srcdir}/${_pkgname}/target/release/${_pkgname}"
}

Offline

#13 2025-12-04 09:13:01

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,494

Re: [FINISHED] PKGBUILD review: vibe

several of the tests fail in a clean chroot build, but that's not unusual for vcs packages.

You may want to check if there's an option to continue build even when tests fail.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#14 2025-12-06 22:00:36

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 32
Website

Re: [FINISHED] PKGBUILD review: vibe

Lone_Wolf wrote:

several of the tests fail in a clean chroot build, but that's not unusual for vcs packages.

You may want to check if there's an option to continue build even when tests fail.

Hm.. it looks like as if everything else works (see here).
How bad is it if I comment out the check function?

Offline

#15 2025-12-07 10:51:18

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,494

Re: [FINISHED] PKGBUILD review: vibe

It's a bit of a grey area. Since users can disable the check function easily, having one is preferred.

There are cases however (like mesa trunk builds) where it's very common to have failing tests without runtime issues.
llvm trunk builds have the same though they offer an option to not abort when tests fail, mesa doesn't .

Do you prefer this package to be "correct" or easy to build with the risk of runtime issues ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#16 2025-12-08 12:39:06

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 32
Website

Re: [FINISHED] PKGBUILD review: vibe

Lone_Wolf wrote:

There are cases however (like mesa trunk builds) where it's very common to have failing tests without runtime issues.
llvm trunk builds have the same though they offer an option to not abort when tests fail, mesa doesn't .

Wait, so it's "expected behaviour" for them to have failing tests?

Lone_Wolf wrote:

Do you prefer this package to be "correct" or easy to build with the risk of runtime issues ?

I'm feeling confident regarding "correctness" because I'm trying my best to guarantee that the `main` branch stays functional.

Offline

#17 2025-12-08 13:05:11

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,494

Re: [FINISHED] PKGBUILD review: vibe

Wait, so it's "expected behaviour" for them to have failing tests?

Yup.
It depends on the project leadership, but typically new commits are tested for build failures and not so much for unit and other tests.
Around stable releases there's more attention for failing tests.

Writing, running and fixing tests is not exactly fun and requires a lot of resources.
Often available resources are used for other things.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#18 2025-12-08 14:13:03

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 32
Website

Re: [FINISHED] PKGBUILD review: vibe

I'm running my unit and integration tests on my program if I'm pushing/merging something new to my `main` branch so this shouldn't be a problem for me/vibe.

Hm... so I think it's fine if I comment out the check function.

Last edited by TornaxO7 (2025-12-08 14:13:27)

Offline

#19 2025-12-09 10:50:15

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,494

Re: [FINISHED] PKGBUILD review: vibe

I'm running my unit and integration tests on my program if I'm pushing/merging something new to my `main` branch so this shouldn't be a problem for me/vibe.

Hm... so I think it's fine if I comment out the check function.

Agreed.

Last edited by Lone_Wolf (2025-12-09 10:50:46)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#20 2025-12-09 11:05:03

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 32
Website

Re: [FINISHED] PKGBUILD review: vibe

Nice. Then I'll do that. Thank you for your review guys happy emoji.

Now I just have to look that I don't do any other mistakes.

Offline

#21 2025-12-09 12:39:46

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 32
Website

Re: [FINISHED] PKGBUILD review: vibe

It's out now.

Offline

Board footer

Powered by FluxBB