pkgsrc-WIP-changes archive

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

opendoas: Use SUBST_SED instead of a patch.



Module Name:	pkgsrc-wip
Committed By:	Sunil Nimmagadda <sunil%nimmagadda.net@localhost>
Pushed By:	skn
Date:		Tue Nov 3 12:55:58 2020 +0530
Changeset:	1d947ea6dac5f9a2152f3c8351f54ef6e79f1adb

Modified Files:
	opendoas/Makefile
	opendoas/distinfo
Removed Files:
	opendoas/patches/patch-bsd.prog.mk

Log Message:
opendoas: Use SUBST_SED instead of a patch.

Inspired from voidlinux template here...
https://github.com/void-linux/void-packages/blob/master/srcpkgs/opendoas/template

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

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

diffstat:
 opendoas/Makefile                  |  9 +++++++++
 opendoas/distinfo                  |  1 -
 opendoas/patches/patch-bsd.prog.mk | 15 ---------------
 3 files changed, 9 insertions(+), 16 deletions(-)

diffs:
diff --git a/opendoas/Makefile b/opendoas/Makefile
index 74410b43a0..ae9b066f12 100644
--- a/opendoas/Makefile
+++ b/opendoas/Makefile
@@ -21,6 +21,15 @@ SUBST_STAGE.paths=	pre-configure
 SUBST_FILES.paths=	doas.1 doas.conf.5
 SUBST_SED.paths=	-e "s,/etc,${PKG_SYSCONFDIR},"
 
+# Let SPECIAL_PERMS handle permissions/setuid of the binary while
+# allowing to build as an unprivileged user.
+SUBST_CLASSES+=		install
+SUBST_MESSAGE.install=	Let SPECIAL_PERMS handle permissions.
+SUBST_STAGE.install=	pre-install
+SUBST_FILES.install=	bsd.prog.mk
+SUBST_SED.install=	-e "/chown/d"
+SUBST_SED.install+=	-e "/chmod/d"
+
 HAS_CONFIGURE=		yes
 CONFIGURE_ARGS+=	--prefix=${PREFIX}
 CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
diff --git a/opendoas/distinfo b/opendoas/distinfo
index be8787aa3a..fe78352f28 100644
--- a/opendoas/distinfo
+++ b/opendoas/distinfo
@@ -4,7 +4,6 @@ SHA1 (OpenDoas-6.6.1-84ccfe0b9ac591199d0464ede10a4130c8a3482d.tar.gz) = ca667704
 RMD160 (OpenDoas-6.6.1-84ccfe0b9ac591199d0464ede10a4130c8a3482d.tar.gz) = e428e96df32d3d680dc755b80047e64098902476
 SHA512 (OpenDoas-6.6.1-84ccfe0b9ac591199d0464ede10a4130c8a3482d.tar.gz) = 34c3755bebf43c4142e35683e59b2fa12cf4fdc028f3350ed22b1dc95a86e293fa8a1c22a69d956949b4a4c38f080017cacc19bdb0abdf646809e57a057fb3ff
 Size (OpenDoas-6.6.1-84ccfe0b9ac591199d0464ede10a4130c8a3482d.tar.gz) = 30797 bytes
-SHA1 (patch-bsd.prog.mk) = 78db9daba2593e6481c1da29ad96bee4d87785b9
 SHA1 (patch-configure) = e144a8009b96a00da0320cffc477f36c32c1cfc1
 SHA1 (patch-doas.c) = de7bc8c1312cb186f44fe3f071a34e87dea0f478
 SHA1 (patch-pam.c) = 35df55b83d0071aba476d61dd80ec3e7081f5d4a
diff --git a/opendoas/patches/patch-bsd.prog.mk b/opendoas/patches/patch-bsd.prog.mk
deleted file mode 100644
index 364211fa3c..0000000000
--- a/opendoas/patches/patch-bsd.prog.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-Use SETUID_ROOT_PERMS and allow building as normal user.
-
---- bsd.prog.mk.orig	2020-11-01 11:47:22.462380395 +0000
-+++ bsd.prog.mk
-@@ -22,8 +22,6 @@ install: ${PROG} ${PAM_DOAS} ${MAN}
- 	mkdir -p -m 0755 ${DESTDIR}${MANDIR}/man1
- 	mkdir -p -m 0755 ${DESTDIR}${MANDIR}/man5
- 	cp -f ${PROG} ${DESTDIR}${BINDIR}
--	chown ${BINOWN}:${BINGRP} ${DESTDIR}${BINDIR}/${PROG}
--	chmod ${BINMODE} ${DESTDIR}${BINDIR}/${PROG}
- 	[ -n "${PAM_DOAS}" ] && cp ${PAM_DOAS} ${DESTDIR}${PAMDIR}/doas || true
- 	[ -n "${PAM_DOAS}" ] && chmod 0644 ${DESTDIR}${PAMDIR}/doas || true
- 	cp -f doas.1 ${DESTDIR}${MANDIR}/man1


Home | Main Index | Thread Index | Old Index