<pre style='margin:0'>
Dan Villiom Podlaski Christiansen (danchr) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/3a180a6541b1b7544ad0ab88bd759c375b66ce8f">https://github.com/macports/macports-ports/commit/3a180a6541b1b7544ad0ab88bd759c375b66ce8f</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 3a180a6541b opendoas: replacement for doas
</span>3a180a6541b is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 3a180a6541b1b7544ad0ab88bd759c375b66ce8f
</span>Author: Dan Villiom Podlaski Christiansen <danchr@macports.org>
AuthorDate: Sat Jun 12 14:43:24 2021 +0200
<span style='display:block; white-space:pre;color:#404040;'> opendoas: replacement for doas
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes: https://trac.macports.org/ticket/62191
</span>---
sysutils/doas/Portfile | 77 ++-----------------------------
sysutils/opendoas/Portfile | 50 ++++++++++++++++++++
sysutils/opendoas/files/doas.conf.example | 5 ++
sysutils/opendoas/files/pam-service.diff | 13 ++++++
4 files changed, 73 insertions(+), 72 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/doas/Portfile b/sysutils/doas/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 8cad15749fd..6db6bdde67b 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/sysutils/doas/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/doas/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,80 +1,13 @@
</span> # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-PortGroup github 1.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-PortGroup makefile 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup obsolete 1.0
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-github.setup slicer69 doas 6.3p4
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name doas
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 6.3p4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 2
</span> categories sysutils security
license BSD
maintainers {danchr @danchr}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-description Run a command as another user
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-long_description \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- The doas utility is a program originally written for OpenBSD \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- which allows a user to run a command as though they were another \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- user. Typically doas is used to allow non-privileged users to \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- run commands as though they were the root user. The doas program \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- acts as an alternative to sudo, which is a popular method for \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- granting admin access to specific users.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-platforms darwin
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-checksums rmd160 005f6ec49387f21d050162c3bd5c0de3b8bddd8d \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 56faaf38977c43eea4b254ce01447211e60fcce292b69e981dade939318b357b \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 29884
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-use_configure no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# the "sudo" pam specification is available by default, so reuse it
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-patchfiles patch-use-sudo-pam.diff
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-build.args-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- PREFIX=${prefix} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- CC="${configure.cc} ${configure.universal_cflags}" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- YACC=${prefix}/bin/byacc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-depends_build port:byacc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-post-patch {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace s,/usr/local,${prefix},g \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/Makefile \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/vidoas \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/doas.h \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/doas.conf.5
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-pre-destroot {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [getuid] != 0 } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "------------------------------------------------------------"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "Installing doas as non-root doesn't really do anything"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "useful, so be sure to install doas as root"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "------------------------------------------------------------"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-post-destroot {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -d -m 0755 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${destroot}${prefix}/share/doc/doas
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 0644 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${filespath}/doas.conf.dist \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/doas.conf.sample \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${destroot}${prefix}/share/doc/doas
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- move ${destroot}${prefix}/bin/vidoas ${destroot}${prefix}/sbin/
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-post-activate {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![file exists ${prefix}/etc/doas.conf]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${prefix}/share/doc/doas/doas.conf.dist \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${prefix}/etc/doas.conf
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-notes "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-To complete the installation, run:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-\t${prefix}/bin/doas ${prefix}/sbin/vidoas
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-Edit as necessary. (See the doas.conf manpage for additional information.)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+replaced_by opendoas
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/opendoas/Portfile b/sysutils/opendoas/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..85496044b21
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/opendoas/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,50 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup github 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+github.setup Duncaen opendoas 6.8.1 v
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories sysutils security
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license BSD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {danchr @danchr}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description Run a command as another user
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The doas utility is a program originally written for OpenBSD \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ which allows a user to run a command as though they were another \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ user. Typically doas is used to allow non-privileged users to \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ run commands as though they were the root user. The doas program \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ acts as an alternative to sudo, which is a popular method for \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ granting admin access to specific users.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 e75dd0ad51c55eb9347dd80af75952d3b508e802 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 446a3372fb97e973b491833f00a8a37c85892b330d13574cd55cf22ea4f9b983 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 32408
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --sysconfdir=${prefix}/etc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles pam-service.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+pre-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { [getuid] != 0 } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "------------------------------------------------------------"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Installing doas as non-root doesn't really do anything"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "useful, so be sure to install doas as root"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "------------------------------------------------------------"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 640 ${filespath}/doas.conf.example ${destroot}${prefix}/etc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-activate {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![file exists ${prefix}/etc/doas.conf]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Installing sample configuration to ${prefix}/etc/doas.conf"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 640 ${prefix}/etc/doas.conf.example ${prefix}/etc/doas.conf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/opendoas/files/doas.conf.example b/sysutils/opendoas/files/doas.conf.example
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..e85cf03671d
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/opendoas/files/doas.conf.example
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Please see doas.conf manual page for information on setting
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# up a doas.conf file.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Permit members of the admin group to perform actions as root.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+permit :admin
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/opendoas/files/pam-service.diff b/sysutils/opendoas/files/pam-service.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..aa74e92a7d8
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/opendoas/files/pam-service.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- pam.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ #<buffer pam.c>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -44,7 +44,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define PAM_SERVICE_NAME "doas"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define PAM_SERVICE_NAME "sudo"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static pam_handle_t *pamh = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static char doas_prompt[128];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Diff finished. Sat Jun 12 14:28:03 2021
</span></pre><pre style='margin:0'>
</pre>