pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/security/opendoas security/opendoas: import package



details:   https://anonhg.NetBSD.org/pkgsrc/rev/405efce11755
branches:  trunk
changeset: 443992:405efce11755
user:      pin <pin%pkgsrc.org@localhost>
date:      Fri Jan 01 14:28:56 2021 +0000

description:
security/opendoas: import package

Packaged in wip by Sunil Nimmagadda.

An unofficial, portable fork of the OpenBSD doas command.

doas is a minimal replacement for the venerable sudo. It was
initially written by Ted Unangst of the OpenBSD project to provide
95% of the features of sudo with a fraction of the codebase.

diffstat:

 security/opendoas/DESCR                     |   5 ++
 security/opendoas/Makefile                  |  63 +++++++++++++++++++++++++++++
 security/opendoas/PLIST                     |   6 ++
 security/opendoas/distinfo                  |   7 +++
 security/opendoas/patches/patch-GNUmakefile |  25 +++++++++++
 5 files changed, 106 insertions(+), 0 deletions(-)

diffs (126 lines):

diff -r 5f111776f117 -r 405efce11755 security/opendoas/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/opendoas/DESCR   Fri Jan 01 14:28:56 2021 +0000
@@ -0,0 +1,5 @@
+An unofficial, portable fork of the OpenBSD doas command.
+
+doas is a minimal replacement for the venerable sudo. It was
+initially written by Ted Unangst of the OpenBSD project to provide
+95% of the features of sudo with a fraction of the codebase.
diff -r 5f111776f117 -r 405efce11755 security/opendoas/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/opendoas/Makefile        Fri Jan 01 14:28:56 2021 +0000
@@ -0,0 +1,63 @@
+# $NetBSD: Makefile,v 1.1 2021/01/01 14:28:56 pin Exp $
+
+DISTNAME=      opendoas-6.8
+CATEGORIES=    security
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=duncaen/}
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+
+MAINTAINER=    sunil%nimmagadda.net@localhost
+HOMEPAGE=      https://github.com/duncaen/opendoas
+COMMENT=       Execute commands as another user
+LICENSE=       isc
+
+CONFLICTS=     doas-[0-9]*
+
+WRKSRC=                ${WRKDIR}/OpenDoas-${PKGVERSION_NOREV}
+
+SUBST_CLASSES+=                paths
+SUBST_MESSAGE.paths=   Fixing hardcoded paths.
+SUBST_STAGE.paths=     pre-configure
+SUBST_FILES.paths=     doas.1 doas.conf.5
+SUBST_SED.paths=       -e "s,/etc,${PKG_SYSCONFDIR},"
+
+EGDIR= share/examples/${PKGBASE}
+
+.include "../../mk/bsd.prefs.mk"
+
+HAS_CONFIGURE=         yes
+CONFIGURE_ARGS+=       --prefix=${PREFIX}
+CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+=       --mandir=${PREFIX}/${PKGMANDIR}
+CONFIGURE_ARGS+=       --datadir=${PREFIX}/${EGDIR}
+.if ${OPSYS} == "Linux" && !exists(/usr/include/security/pam_appl.h)
+CONFIGURE_ARGS+=       --without-pam
+.endif
+
+USE_TOOLS=     gmake yacc
+MAKE_FILE=     GNUmakefile
+
+BUILDLINK_TRANSFORM+=  rm:-Werror
+
+SPECIAL_PERMS+=                bin/doas ${SETUID_ROOT_PERMS}
+NOT_FOR_UNPRIVILEGED=  yes
+
+INSTALLATION_DIRS=     bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 ${EGDIR}
+
+PLIST_VARS+=   pam-conf
+
+.if ${OPSYS} == "Linux" && exists(/usr/include/security/pam_appl.h)
+PLIST.pam-conf=        yes
+REQD_FILES=    ${EGDIR}/doas /etc/pam.d/doas
+.include "../../mk/pam.buildlink3.mk"
+.endif
+
+.if ${OPSYS} == "Darwin"
+PLIST.pam-conf=        yes
+REQD_FILES=    ${EGDIR}/doas /etc/pam.d/doas
+.endif
+
+.if ${OPSYS} != "Linux"
+.include "../../mk/pam.buildlink3.mk"
+.endif
+
+.include "../../mk/bsd.pkg.mk"
diff -r 5f111776f117 -r 405efce11755 security/opendoas/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/opendoas/PLIST   Fri Jan 01 14:28:56 2021 +0000
@@ -0,0 +1,6 @@
+@comment $NetBSD: PLIST,v 1.1 2021/01/01 14:28:56 pin Exp $
+bin/doas
+man/man1/doas.1
+man/man5/doas.conf.5
+${PLIST.pam-conf}@pkgdir share/examples/opendoas
+${PLIST.pam-conf}share/examples/opendoas/doas
diff -r 5f111776f117 -r 405efce11755 security/opendoas/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/opendoas/distinfo        Fri Jan 01 14:28:56 2021 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2021/01/01 14:28:56 pin Exp $
+
+SHA1 (opendoas-6.8.tar.gz) = 11963ee647b7166972512740bc7f648c8aa1272f
+RMD160 (opendoas-6.8.tar.gz) = 56f9c02d81f6ad9925323f1b44d7f7087f1108f0
+SHA512 (opendoas-6.8.tar.gz) = 4a57079bba353247e645bc07a5d4e78fd01471d193e83751fd87b72cffa4e152c0f7ea172563f767a7193b14489f57bc066b4fee50842d30b5b7f7ce918434bb
+Size (opendoas-6.8.tar.gz) = 32307 bytes
+SHA1 (patch-GNUmakefile) = d301c0334ce6ac7992d61681e1852a301557d300
diff -r 5f111776f117 -r 405efce11755 security/opendoas/patches/patch-GNUmakefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/opendoas/patches/patch-GNUmakefile       Fri Jan 01 14:28:56 2021 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-GNUmakefile,v 1.1 2021/01/01 14:28:57 pin Exp $
+
+- Allow build as an unpriviliged user.
+- Install configuration files in EGDIR.
+
+--- GNUmakefile.orig   2020-11-14 15:44:04.000000000 +0000
++++ GNUmakefile
+@@ -16,15 +16,9 @@ ${PROG}: ${OBJS}
+       ${CC} ${CFLAGS} $^ -o $@ ${LDFLAGS} ${LDLIBS}
+ 
+ install: ${PROG} ${PAM_DOAS} ${MAN}
+-      mkdir -p -m 0755 ${DESTDIR}${BINDIR}
+-      [ -n "${PAM_DOAS}" ] && mkdir -p -m 0755 ${DESTDIR}${PAMDIR} || true
+-      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
++      [ -n "${PAM_DOAS}" ] && cp ${PAM_DOAS} ${DESTDIR}${SHAREDIR}/doas || true
++      [ -n "${PAM_DOAS}" ] && chmod 0644 ${DESTDIR}${SHAREDIR}/doas || true
+       cp -f doas.1 ${DESTDIR}${MANDIR}/man1
+       cp -f doas.conf.5 ${DESTDIR}${MANDIR}/man5
+ 



Home | Main Index | Thread Index | Old Index