Download raw body.
MAINTAINER FIX: x11/emwm-utils: Enable unpriv shutdown/reboot/suspend and add pkg-readme
Hello ports@
In a previous mail, I got x11/emwm-utils to work with authenticate(3).
In this diff, I set the SHUTDOWN_CMD, REBOOT_CMD, and SUSPEND_CMD
correctly, as well as enable unprivileged access to these commands. I
bumped REVISION as well. Hopefully the pkg-readme is correctly phrased?
Tested on amd64 and arm64.
CC: Lucas Gabriel Vuotto
Good to merge if pkg/README is correct?
--
iz (she/her)
> i like to say mundane things,
> there are too many uninteresting things
> that go unnoticed.
izder456 (dot) neocities (dot) org
diff --git a/x11/emwm-utils/Makefile b/x11/emwm-utils/Makefile
index 0d8b6ba9f61..62e4397077a 100644
--- a/x11/emwm-utils/Makefile
+++ b/x11/emwm-utils/Makefile
@@ -3,6 +3,7 @@ COMMENT = session manager and a toolchest-like application launcher
V = 1.3
DISTNAME = emwm-utils-src-${V}
PKGNAME = emwm-utils-${V}
+REVISION = 0
CATEGORIES = x11
HOMEPAGE = https://fastestcode.org/emwm.html
@@ -19,8 +20,13 @@ WANTLIB += X11 Xinerama Xm Xrandr Xss Xt c
LIB_DEPENDS = x11/motif
+MAKE_ENV = REBOOT_CMD="/sbin/shutdown -r now" \
+ SHUTDOWN_CMD="/sbin/shutdown -p now" \
+ SUSPEND_CMD="/usr/sbin/zzz"
+
MAKE_FLAGS = RCDIR=${PREFIX}/lib/X11 \
- CFLAGS="${CFLAGS} -I./Xm -I${X11BASE}/include -I${LOCALBASE}/include"
+ CFLAGS="${CFLAGS} -DUNPRIVILEGED_SHUTDOWN \
+ -I./Xm -I${X11BASE}/include -I${LOCALBASE}/include"
FAKE_FLAGS = PREFIX=${WRKINST}${PREFIX} \
APPLRESDIR=${WRKINST}${PREFIX}/lib/X11/app-defaults \
diff --git a/x11/emwm-utils/pkg/PLIST b/x11/emwm-utils/pkg/PLIST
index 763b5a0e51f..36f96dc0494 100644
--- a/x11/emwm-utils/pkg/PLIST
+++ b/x11/emwm-utils/pkg/PLIST
@@ -10,3 +10,4 @@ lib/X11/app-defaults/XmToolbox
lib/X11/toolboxrc
@man man/man1/xmsm.1
@man man/man1/xmtoolbox.1
+share/doc/pkg-readmes/${PKGSTEM}
diff --git a/x11/emwm-utils/pkg/README b/x11/emwm-utils/pkg/README
new file mode 100644
index 00000000000..33648b63b53
--- /dev/null
+++ b/x11/emwm-utils/pkg/README
@@ -0,0 +1,11 @@
++-------------------------------------------------------------------------------
+| Running ${PKGSTEM} on OpenBSD
++-------------------------------------------------------------------------------
+
+This package is not installed with SUID root. You can ignore any warnings about
+Lacking SUID root.
+
+- To enable shutdown/reboot access, the user should be in the _shutdown group.
+- To enable suspend access, the user should be in the operator group.
+
+Use usermod(8) to add your user to these groups.
MAINTAINER FIX: x11/emwm-utils: Enable unpriv shutdown/reboot/suspend and add pkg-readme