aboutsummaryrefslogtreecommitdiff
path: root/opendoas
diff options
context:
space:
mode:
authorWoodpecker CI <emmett1.2miligrams@protonmail.com>2025-06-03 14:32:36 +0000
committerWoodpecker CI <emmett1.2miligrams@protonmail.com>2025-06-03 14:32:36 +0000
commit93a354611e38a6949add5c2e5ccc93ef79b9755f (patch)
tree7fee41752b1047d74c59f8ee046cd62735e7e934 /opendoas
parent35912580b66e9439f91ea441938828ad8aa33b0d (diff)
downloadalicelinux-93a354611e38a6949add5c2e5ccc93ef79b9755f.tar.gz
alicelinux-93a354611e38a6949add5c2e5ccc93ef79b9755f.zip
Woodpecker CI 5171f1fdd74e7137c305450dd69a29fa5be4143f [SKIP CI]
Diffstat (limited to 'opendoas')
-rw-r--r--opendoas/.checksum3
-rw-r--r--opendoas/.files11
-rw-r--r--opendoas/abuild22
-rw-r--r--opendoas/better-wayland-support.patch42
-rw-r--r--opendoas/doas.conf8
5 files changed, 86 insertions, 0 deletions
diff --git a/opendoas/.checksum b/opendoas/.checksum
new file mode 100644
index 00000000..db719d77
--- /dev/null
+++ b/opendoas/.checksum
@@ -0,0 +1,3 @@
+de5c561e6570e64562f6e5294d6993672abef3d01742f01ea0681847a0c88af2 better-wayland-support.patch
+e46e0b0581322a2fd5c02b96033544dd8df5e9d8d9e86b1c022daf653ee63df4 doas.conf
+55d03b4c113bfa6c16f2abdee04192b8416c5ed91baef825f8fb27450aeaa197 opendoas-6.8.2.tar.xz
diff --git a/opendoas/.files b/opendoas/.files
new file mode 100644
index 00000000..e5ab580f
--- /dev/null
+++ b/opendoas/.files
@@ -0,0 +1,11 @@
+drwxr-xr-x root/root etc/
+-rw------- root/root etc/doas.conf.new
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwsr-xr-x root/root usr/bin/doas
+drwxr-xr-x root/root usr/share/
+drwxr-xr-x root/root usr/share/man/
+drwxr-xr-x root/root usr/share/man/man1/
+-rw-r--r-- root/root usr/share/man/man1/doas.1.gz
+drwxr-xr-x root/root usr/share/man/man5/
+-rw-r--r-- root/root usr/share/man/man5/doas.conf.5.gz
diff --git a/opendoas/abuild b/opendoas/abuild
new file mode 100644
index 00000000..449a92d7
--- /dev/null
+++ b/opendoas/abuild
@@ -0,0 +1,22 @@
+name=opendoas
+version=6.8.2
+release=2
+source="https://github.com/Duncaen/OpenDoas/releases/download/v${version}/${name}-${version}.tar.xz
+ doas.conf
+ better-wayland-support.patch"
+
+build() {
+ BINOWN="$(id -u)" \
+ BINGRP="$(id -g)" \
+ ./configure \
+ --prefix=/usr \
+ --with-shadow \
+ --with-timestamp \
+ --without-pam
+ make
+ make install
+
+ mkdir -p $PKG/etc
+ cp $SRC/doas.conf $PKG/etc
+ chmod 600 $PKG/etc/doas.conf
+}
diff --git a/opendoas/better-wayland-support.patch b/opendoas/better-wayland-support.patch
new file mode 100644
index 00000000..e77bf0a1
--- /dev/null
+++ b/opendoas/better-wayland-support.patch
@@ -0,0 +1,42 @@
+From b861d070092ee71ac4208f79b699cf7dadd5c154 Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact@emersion.fr>
+Date: Mon, 3 May 2021 15:42:19 +0200
+Subject: [PATCH] Copy XDG_RUNTIME_DIR and WAYLAND_DISPLAY
+
+This allows to run Wayland clients under doas.
+---
+ doas.1 | 6 +++++-
+ env.c | 2 +-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/doas.1 b/doas.1
+index a91705e..bd1f543 100644
+--- a/doas.1
++++ b/doas.1
+@@ -58,8 +58,12 @@ is set to the name of the user executing
+ .Nm .
+ The variables
+ .Ev DISPLAY
+-and
++,
+ .Ev TERM
++,
++.Ev XDG_RUNTIME_DIR
++and
++.Ev WAYLAND_DISPLAY
+ are inherited from the current environment.
+ This behavior may be modified by the config file.
+ The working directory is not changed.
+diff --git a/env.c b/env.c
+index e2286fc..b7955d7 100644
+--- a/env.c
++++ b/env.c
+@@ -91,7 +91,7 @@ createenv(const struct rule *rule, const struct passwd *mypw,
+ const struct passwd *targpw)
+ {
+ static const char *copyset[] = {
+- "DISPLAY", "TERM",
++ "DISPLAY", "TERM", "XDG_RUNTIME_DIR", "WAYLAND_DISPLAY",
+ NULL
+ };
+ struct env *env;
diff --git a/opendoas/doas.conf b/opendoas/doas.conf
new file mode 100644
index 00000000..36187c39
--- /dev/null
+++ b/opendoas/doas.conf
@@ -0,0 +1,8 @@
+# Doas configuration file.
+# See doas.conf(5) for details.
+
+# The general syntax form of /etc/doas.conf is:
+# permit|deny [options] identity [as target] [cmd command [args ...]]
+
+#permit persist :wheel
+#permit nopass root