From 7802bef3913c3095282c55e5a5d1bf2f491a74b5 Mon Sep 17 00:00:00 2001
From: Fabricio Silva <hi@fabricio.dev>
Date: Thu, 6 Feb 2025 10:32:07 +0000
Subject: [PATCH] testing/greetd-regreet: fix greetd permissions for required
 folders

---
 testing/greetd-regreet/APKBUILD | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/testing/greetd-regreet/APKBUILD b/testing/greetd-regreet/APKBUILD
index dfd3a2ebe695..c1b02c27236c 100644
--- a/testing/greetd-regreet/APKBUILD
+++ b/testing/greetd-regreet/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Guy Godfroy <guy.godfroy@gugod.fr>
 pkgname=greetd-regreet
 pkgver=0.2.0
-pkgrel=0
+pkgrel=1
 pkgdesc="Clean and customizable GTK4 based greeter for greetd"
 url="https://github.com/rharish101/ReGreet"
 # s390x, riscv64: greetd
@@ -14,6 +14,8 @@ depends="greetd"
 makedepends="cargo gtk4.0-dev cargo-auditable"
 source="$pkgname-$pkgver.tar.gz::https://github.com/rharish101/ReGreet/archive/refs/tags/$pkgver.tar.gz"
 builddir="$srcdir/ReGreet-$pkgver"
+pkgusers="greetd" # regreet runs on same user as greetd
+pkggroups="greetd"
 
 _cargo_opts="--frozen --features gtk4_8"
 
@@ -33,6 +35,11 @@ check() {
 
 package() {
 	install -Dm755 target/release/regreet "$pkgdir"/usr/bin/regreet
+
+	# required folders
+	install -dm755 -o "$pkgusers" -g "$pkggroups" \
+		"$pkgdir"/var/lib/regreet \
+		"$pkgdir"/var/log/regreet
 }
 
 sha512sums="
-- 
GitLab