tuigreet
tuigreet copied to clipboard
Fixed PKGBUILD for Arch AUR
Hey! Thanks for the great package! There are few issues in PKGBUILD in AUR right now, I modified it a bit to address them: https://github.com/ava1ar/PKGBUILDs/tree/master/greetd-tuigreet. Similar changes to be done for other packages for tuigreet.
Could you enumerate the changes you performed to make sure I got them all? As far as I can see, they are:
-
greetd
added as a dependency -
tuigreet
's cache directory is added tosystemd
's list of temporary files instaed of creating it directly
Is there something I missed?
I am running into what I think is a related issue. I build AUR packages on a local server which are separately installed on my laptop. Is there a way for the tuigreet build script to not depend on the greeter
user when its built? This fails on my server where greetd isn't actually installed.
Do you mean that our PKGBUILD
depends on the greetd
package, and not the greeter
user? Or is there something I am missing?
If the former, yeah I just learned that depends
declares dependencies for both build- and runtime. So I should either remove the dependency or move it runtime-only.
Do you have any log output of your error?
EDIT: apparently, AUR-dependencies in AUR packages is not something that can be resolved (or I missed something), so I might remove the dependency on greetd
altogether for the next release.
Can you try building the package from your clean environment with the following PKGBUILD
(edited from the latest version published a few hours ago)? If it works properly, I'll submit an updated buildscript tomorrow.
# Maintainer: Antoine POPINEAU <antoine at popineau dot eu>
pkgname=greetd-tuigreet
pkgver=0.3.1
pkgrel=2
pkgdesc='A console UI greeter for greetd'
url='https://github.com/apognu/tuigreet'
license=(GPL3)
conflicts=(greetd-tuigreet-bin greetd-tuigreet-git)
arch=(x86_64)
makedepends=(rust)
source=("${url}/archive/${pkgver}.tar.gz"
'tuigreet.conf')
sha256sums=('7ee71be9719d99950028724300090faa4b5a281ebf1cb9b1564f74b636754c6c'
'8f83aee7874aab5d06981a1d1cd05df906368a79dbca90d157a33a2f023b67d3')
build() {
cd "tuigreet-${pkgver}"
cargo build --release
}
package() {
install -Dm755 "${srcdir}/tuigreet-${pkgver}/target/release/tuigreet" "${pkgdir}/usr/bin/tuigreet"
install -Dm644 "${srcdir}/tuigreet-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/tuigreet/LICENSE"
install -Dm644 "${srcdir}/tuigreet.conf" "${pkgdir}/usr/lib/tmpfiles.d/tuigreet.conf"
}
I am not super confident in my AUR abilities, but I gave it a shot:
- removed
greetd
which had been installed with the latest version - updated the
greetd-tuigreet
PKGBUILD to what you pasted above - built
greetd-tuigreet
withmakepkg -s
It ran smoothly, but maybe this isn't a totally clean environment?
EDIT: I went back and made sure to actually remove the greeter
user which had been installed on the system and the build still worked fine. However, this reddit thread on AUR dependencies has me thinking my request to drop the depends on greetd might be a bad call.
Thank you for trying it out!
I'm looking at the PKGBUILD
for other greetd
greeters, and they do not define greetd
as a dependency at all. I like clean dependency trees, mais there might be a reason they do not do it themselves.
There is a documented way to declare runtime-only dependencies (depends
in package()
) but yay
does not find the dependency when installed manually with -U
so I'm a bit wary of publishing something like that.
I removed the dependency on greetd
in a new pkgrel
for all three AUR packages. Can you try again the build that used to fail and report if it is fixed?
Any news about this? Did you have the opportunity to try?
I'll close this since I believe this issue is fixed. Please respond if you still encounter issues building tuigreet
.
Greetings,
greetd
should be a dependency. Ask yourself: Is it possible (=does it make sense) to run tuigreet
standalone, without greetd
? If the answer is NO (which I am convinced is the case), then greetd
belongs to depends=()
.
https://wiki.archlinux.org/title/PKGBUILD#depends
At the very least:
Dependencies defined inside the package() function are only required to run the software.
So even if you don't want to add it to depends=()
on a global level, it should at least belong to depends=()
within the package()
function. For example, 1Password does this: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=1password
I don't have powers to re-open this issue, let me know if you would prefer that a new one be filed.
Can you please also fix the below issue of greetd-tuigreet-git? The git package solves #40 so I cannot switch to greetd-tuigreet or greed-tuigreetd-bin.
andreafeletto mentioned in the comment section:
Current pkgver function returns tip.r124.64a41c3-1 so AUR helpers like yay always think the package has to be updated. I suggest using: git describe --long | sed 's/-/.r/;s/-/./' as suggested by the wiki. This would return 0.7.1.r10.g64a41c3.