summaryrefslogtreecommitdiff
path: root/greetd
diff options
context:
space:
mode:
authorTim Biermann <tbier@posteo.de>2022-10-30 10:00:29 +0000
committerTim Biermann <tbier@posteo.de>2022-10-30 10:00:29 +0000
commit5a9b9064f725b3e1b468a5073f1c798813abd571 (patch)
tree9923953be15eeea1d5d3c2c2ac77c1ae66ace276 /greetd
parent6c5b89a42b2674cd491ffc0820a01cd8e435498a (diff)
downloadcontrib-5a9b9064f725b3e1b468a5073f1c798813abd571.tar.gz
contrib-5a9b9064f725b3e1b468a5073f1c798813abd571.tar.xz
greetd: initial commit, version 0.8.0
Diffstat (limited to 'greetd')
-rw-r--r--greetd/.footprint11
-rw-r--r--greetd/.signature7
-rw-r--r--greetd/Pkgfile40
-rw-r--r--greetd/README15
-rw-r--r--greetd/greetd.pam7
-rwxr-xr-xgreetd/greetd.service30
-rwxr-xr-xgreetd/post-install5
7 files changed, 115 insertions, 0 deletions
diff --git a/greetd/.footprint b/greetd/.footprint
new file mode 100644
index 000000000..c499a586e
--- /dev/null
+++ b/greetd/.footprint
@@ -0,0 +1,11 @@
+drwxr-xr-x root/root etc/
+drwxr-xr-x root/root etc/greetd/
+-rwxr-xr-x root/root etc/greetd/config.toml
+drwxr-xr-x root/root etc/pam.d/
+-rw-r--r-- root/root etc/pam.d/greetd
+drwxr-xr-x root/root etc/rc.d/
+-rwxr-xr-x root/root etc/rc.d/greetd
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/agreety
+-rwxr-xr-x root/root usr/bin/greetd
diff --git a/greetd/.signature b/greetd/.signature
new file mode 100644
index 000000000..1ad2f5655
--- /dev/null
+++ b/greetd/.signature
@@ -0,0 +1,7 @@
+untrusted comment: verify with /etc/ports/contrib.pub
+RWSagIOpLGJF34t7C7NjB6TOo1nw5UyikgfVuKTHUCnMpGXWvUPzjs2P1guHOe75m2f+d0kzxuyMKW1KrF2SFBDFntsrVaIFqQk=
+SHA256 (Pkgfile) = f2c9fc48553e3869fb3582861bc9eb958c2e51fd6ee4fa775b7cb96dfdddbf9b
+SHA256 (.footprint) = b758cce14ac46104bc464b7a714c2d7d86b274f2bdce5730fdcb83ece42d0dbd
+SHA256 (greetd-0.8.0.tar.gz) = 47a73709df60f04b63fc50cfc409e47a451a9620777638f527b9d9333256035f
+SHA256 (greetd.pam) = 47288a182c28a0d3614e67210492b9b39a82131a16674575cca03f76ac80e686
+SHA256 (greetd.service) = 60a9a348dc19d7cdc839e6aca552a105e13097b0efdb1839ce20e94c56add322
diff --git a/greetd/Pkgfile b/greetd/Pkgfile
new file mode 100644
index 000000000..2d2ea2602
--- /dev/null
+++ b/greetd/Pkgfile
@@ -0,0 +1,40 @@
+# Description: greetd is a minimal and flexible login manager daemon
+# URL: https://kl.wtf/projects/greetd/
+# Maintainer: Tim Biermann, tbier at posteo dot de
+# Depends on: rust
+# Optional: scdoc
+
+name=greetd
+version=0.8.0
+release=1
+source=(https://git.sr.ht/~kennylevinsen/greetd/archive/$version.tar.gz
+ greetd.pam greetd.service)
+renames=($name-$version.tar.gz SKIP SKIP)
+
+build() {
+ prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
+ mkdir "$PKGMK_SOURCE_DIR/rust" || true
+ export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
+
+ cargo build --release --manifest-path $name-$version/Cargo.toml
+
+ install -Dt $PKG/usr/bin $name-$version/target/release/greetd
+ install -Dt $PKG/usr/bin $name-$version/target/release/agreety
+ install -Dt $PKG/etc/greetd $name-$version/config.toml
+
+ ## needs scdoc
+ prt-get isinst scdoc && (
+ cd $name-$version/man
+ for i in *scd; do
+ scdoc < "$i"> "$(basename "$i")".roff
+ done
+ install -Dm755 agreety-1.scd.roff $PKG/usr/share/man/man1/agreety.1
+ install -Dm755 greetd-1.scd.roff $PKG/usr/share/man/man1/greetd.1
+ install -Dm755 greetd-5.scd.roff $PKG/usr/share/man/man5/greetd.5
+ install -Dm755 greetd-ipc-7.scd.roff $PKG/usr/share/man/man7/greetd-ipc.7)
+
+ # install pam configuration
+ install -Dm644 $SRC/greetd.pam $PKG/etc/pam.d/greetd
+ # install service file
+ install -Dm755 $SRC/greetd.service $PKG/etc/rc.d/greetd
+}
diff --git a/greetd/README b/greetd/README
new file mode 100644
index 000000000..a66c9c3ad
--- /dev/null
+++ b/greetd/README
@@ -0,0 +1,15 @@
+This branch can be started from a rooted tty shell.
+Currently tested is the included agreety (minimal) greeter.
+
+Can start a shell, X, or anything. This is my config.toml
+
+############### /etc/greetd/config.toml
+[terminal]
+# The VT to run the greeter on. Can be "next", "current" or a number
+vt = 2
+
+[default_session]
+#command = "sway --config /etc/greetd/sway-config"
+command = "agreety --cmd start-sway"
+user = "greeter"
+############### End of file
diff --git a/greetd/greetd.pam b/greetd/greetd.pam
new file mode 100644
index 000000000..24f1cdd76
--- /dev/null
+++ b/greetd/greetd.pam
@@ -0,0 +1,7 @@
+#%PAM-1.0
+
+auth required pam_securetty.so
+auth requisite pam_nologin.so
+auth include common-auth
+account include common-account
+session include common-session
diff --git a/greetd/greetd.service b/greetd/greetd.service
new file mode 100755
index 000000000..25b978da6
--- /dev/null
+++ b/greetd/greetd.service
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# /etc/rc.d/greetd: start/stop greetd
+#
+
+SSD=/sbin/start-stop-daemon
+PROG=/usr/bin/greetd
+OPTS=""
+RUNDIR=/var/run/greetd
+PIDFILE=$RUNDIR/greetd.pid
+
+case $1 in
+ start)
+ $SSD --start -b --exec $PROG -u greeter -- $OPTS ;;
+ stop)
+ $SSD --stop --retry 10 --exec $PROG ;;
+ restart)
+ $0 stop
+ $0 start ;;
+ status)
+ $SSD --status --exec $PROG
+ case $? in
+ 0) echo "$PROG is running with pid $(pidof $PROG)" ;;
+ 1) echo "$PROG is not running but the pid file $PID exists" ;;
+ 3) echo "$PROG is not running" ;;
+ 4) echo "Unable to determine the program status" ;;
+ esac ;;
+ *)
+ echo "usage: $0 [start|stop|restart|status]" ;;
+esac
diff --git a/greetd/post-install b/greetd/post-install
new file mode 100755
index 000000000..fc1773224
--- /dev/null
+++ b/greetd/post-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+getent group greeter || /usr/sbin/groupadd greeter
+getent passwd greeter || /usr/sbin/useradd -M -g greeter -G video,tty -c "greed user" greeter
+/usr/bin/passwd -l greeter

Generated by cgit