Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed PKGBUILD for Arch AUR #14

Open
ava1ar opened this issue Feb 14, 2021 · 12 comments
Open

Fixed PKGBUILD for Arch AUR #14

ava1ar opened this issue Feb 14, 2021 · 12 comments
Labels
bug Something isn't working

Comments

@ava1ar
Copy link

ava1ar commented Feb 14, 2021

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.

@apognu
Copy link
Owner

apognu commented May 26, 2021

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 to systemd's list of temporary files instaed of creating it directly

Is there something I missed?

@nyonson
Copy link

nyonson commented May 31, 2021

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.

@apognu
Copy link
Owner

apognu commented May 31, 2021

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.

@apognu
Copy link
Owner

apognu commented May 31, 2021

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

@nyonson
Copy link

nyonson commented May 31, 2021

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 with makepkg -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.

@apognu
Copy link
Owner

apognu commented Jun 1, 2021

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.

@apognu
Copy link
Owner

apognu commented Jun 8, 2021

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?

@apognu apognu added the bug Something isn't working label Jun 9, 2021
@apognu
Copy link
Owner

apognu commented Jun 13, 2021

Any news about this? Did you have the opportunity to try?

@apognu
Copy link
Owner

apognu commented Jun 19, 2021

I'll close this since I believe this issue is fixed. Please respond if you still encounter issues building tuigreet.

@apognu apognu closed this as completed Jun 19, 2021
@thiagowfx
Copy link

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

@thiagowfx
Copy link

I don't have powers to re-open this issue, let me know if you would prefer that a new one be filed.

@apognu apognu reopened this Aug 16, 2021
@equalis3r
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants