You are not logged in.

#1 2025-09-25 01:32:14

plrigaux
Member
Registered: 2025-03-25
Posts: 6

[SOLVED] AUR How to force Rust minimal version

Hello

I'm the maintainer of a rust application namely sysd-manager

I got an issue that the user rustc has an outdated version. The user has the rustc  version 1.87 but the application requires version 1.89 as described by the application Cargo.toml rust-version = "1.89"

Is there a way to make a PKGBUILD to require at least rustc version 1.89 as a build dependency?

Thank you


Here the PKGBUILD I use

pkgname=sysd-manager
pkgver=
pkgrel=1
epoch=
pkgdesc="A systemd GUI to manage your Services, Timers, Sockets and other units. You can enable, disable, stop and start them. Also, you can view their config file and peak at their journal logs."
arch=('x86_64' 'aarch64')
url="https://github.com/plrigaux/sysd-manager"
license=('GPLv3+')
groups=()
depends=("gtk4" "libadwaita" "systemd-libs" "gtksourceview5" "gettext")
makedepends=('cargo' 'git')
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=$pkgname.install
changelog=CHANGELOG.md
_commit=
source=("https://github.com/plrigaux/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz")
noextract=()
sha256sums=()
validpgpkeys=()
_pkgsrcdir=$pkgname-$pkgver

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

build() {
	cd $_pkgsrcdir
	export RUSTUP_TOOLCHAIN=stable
	export CARGO_TARGET_DIR=target
	cargo build --locked --release --features default
}

package() {
	cd $_pkgsrcdir
	echo Generating translation files
	echo ""
	cargo run -p transtools -- packfiles
	echo ""
	install -Dm755 "./target/release/sysd-manager" -t "$pkgdir/usr/bin"
	install -Dm644 "./data/icons/hicolor/scalable/apps/io.github.plrigaux.sysd-manager.svg" -t "$pkgdir/usr/share/icons/hicolor/scalable/apps/"
	install -Dm644 "./data/schemas/io.github.plrigaux.sysd-manager.gschema.xml" -t "$pkgdir/usr/share/glib-2.0/schemas"
	install -Dm644 "./target/loc/io.github.plrigaux.sysd-manager.desktop" -t "$pkgdir/usr/share/applications"
	install -Dm644 "./target/loc/io.github.plrigaux.sysd-manager.metainfo.xml" -t "$pkgdir/usr/share/metainfo"
	cp -r          "./target/locale" "$pkgdir/usr/share/" 
}

Last edited by plrigaux (2025-10-01 18:06:32)

Offline

#2 2025-09-25 01:34:58

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

Re: [SOLVED] AUR How to force Rust minimal version

You can't. The version in the repos is 1.90, so either they're out of date, or they're using rustup to manage their own rust environments. Either way, it's a user problem, not a PKGBUILD problem.

Offline

#3 2025-09-25 12:38:12

plrigaux
Member
Registered: 2025-03-25
Posts: 6

Re: [SOLVED] AUR How to force Rust minimal version

Ok good to know.

Please just confirm if this line is enough

makedepends=('cargo' 'git')

or should I put

makedepends=('rust' 'cargo' 'git')

Does this will supersede rustup?

Thank you

Offline

#4 2025-10-01 18:12:08

plrigaux
Member
Registered: 2025-03-25
Posts: 6

Re: [SOLVED] AUR How to force Rust minimal version

I put it as solved, since it is agreed that is the duty of the user to upgrade its rust if they have installed rustup

Offline

#5 2025-10-01 20:00:36

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

Re: [SOLVED] AUR How to force Rust minimal version

from https://archlinux.org/packages/extra/x86_64/rustup/

Provides: 	cargo, cargo-nightly, lib32-rust-libs, rust, rust-analyzer, rust-musl, rust-nightly, rust-src, rust-wasm, rustfmt

Since rustup provides rust & cargo (just like rust package does) adding rust to makedepends doesn't change anything.


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

Board footer

Powered by FluxBB