pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

emwm-utils: enable suspending from xmsm(1) on NetBSD. Also set the required suid bit on bin/xmsm.



Module Name:	pkgsrc-wip
Committed By:	Paolo Vincenzo Olivo <vms%retrobsd.ddns.net@localhost>
Pushed By:	vms
Date:		Sat Jul 2 21:36:51 2022 +0200
Changeset:	5d93bf642f1d3e5f57aa62ee43ece1d8f26b65e7

Modified Files:
	emwm-utils/Makefile
	emwm-utils/distinfo
Added Files:
	emwm-utils/patches/patch-src_smconf.h

Log Message:
emwm-utils: enable suspending from xmsm(1) on NetBSD.
	    Also set the required suid bit on bin/xmsm.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=5d93bf642f1d3e5f57aa62ee43ece1d8f26b65e7

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 emwm-utils/Makefile                   |  3 +++
 emwm-utils/distinfo                   |  1 +
 emwm-utils/patches/patch-src_smconf.h | 15 +++++++++++++++
 3 files changed, 19 insertions(+)

diffs:
diff --git a/emwm-utils/Makefile b/emwm-utils/Makefile
index f2f4ddaf1d..65eefd9796 100644
--- a/emwm-utils/Makefile
+++ b/emwm-utils/Makefile
@@ -25,6 +25,9 @@ INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1
 INSTALLATION_DIRS+=	share/examples/${DISTNAME:S,-src,,}
 INSTALLATION_DIRS+=	lib/X11/app-defaults
 
+SETUID_ROOT_PERMS?=	${REAL_ROOT_USER} ${BINGRP} 4755
+SPECIAL_PERMS+=		bin/xmsm ${SETUID_ROOT_PERMS}
+
 WRKSRC=	${WRKDIR}/utils
 
 do-install:
diff --git a/emwm-utils/distinfo b/emwm-utils/distinfo
index a074888347..4f283b6762 100644
--- a/emwm-utils/distinfo
+++ b/emwm-utils/distinfo
@@ -3,3 +3,4 @@ $NetBSD$
 BLAKE2s (emwm-utils-1.0/emwm-utils-src.tar.xz) = 314085d2bd9bcd7f3e024d2ae2c24142f4b3fc27aaf949032af45b3009d683d7
 SHA512 (emwm-utils-1.0/emwm-utils-src.tar.xz) = 36bbd9c51e19286f11b7af7daa42c54308b75b70ff5fdb45514d17fb496c331f4eb25d27394aacf4024fd337dd7b56f827c4e7d0f1bf072eaf70c60812cce903
 Size (emwm-utils-1.0/emwm-utils-src.tar.xz) = 24168 bytes
+SHA1 (patch-src_smconf.h) = 73536d4c118cf112b9df7108b25734f69a49358a
diff --git a/emwm-utils/patches/patch-src_smconf.h b/emwm-utils/patches/patch-src_smconf.h
new file mode 100644
index 0000000000..8e09fd60a4
--- /dev/null
+++ b/emwm-utils/patches/patch-src_smconf.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Enable suspending from xmsm(1) on NetBSD.
+
+--- src/smconf.h.orig	2022-04-12 15:12:11.000000000 +0000
++++ src/smconf.h
+@@ -39,6 +39,8 @@
+ #ifndef SUSPEND_CMD
+ #ifdef __linux__
+ #define SUSPEND_CMD     "/usr/sbin/pm-suspend"
++#elif __NetBSD__
++#define SUSPEND_CMD     "/sbin/sysctl -w hw.acpi.sleep.state=3"
+ #else /* BSD */
+ #define SUSPEND_CMD     "/usr/sbin/zzz"
+ #endif /* _linux_ */


Home | Main Index | Thread Index | Old Index