diff --git a/sysutils/doas/Portfile b/sysutils/doas/Portfile index 5bf4b6a505a..d6fadf52425 100644 --- a/sysutils/doas/Portfile +++ b/sysutils/doas/Portfile @@ -5,7 +5,7 @@ PortGroup codeberg 1.0 PortGroup makefile 1.0 codeberg.setup thejessesmith doas 6.3p13 -revision 1 +revision 2 checksums rmd160 7584ac777c09e07bbeb153f28be1f750963713a8 \ sha256 2cca9003856e92ec0a50b3e559b7f3132bf8293dc8302613933f8ed06c8c7fc5 \ size 34883 @@ -29,6 +29,12 @@ depends_build port:bison build.env "OPT=${configure.optflags}" +patchfiles vidoas-fix-path.diff + +post-patch { + reinplace "s|@PREFIX@|${prefix}|" ${worksrcpath}/vidoas +} + post-destroot { xinstall -m 0644 ${worksrcpath}/doas.conf.sample ${destroot}${prefix}/etc set docdir ${prefix}/share/doc/${subport} diff --git a/sysutils/doas/files/vidoas-fix-path.diff b/sysutils/doas/files/vidoas-fix-path.diff new file mode 100644 index 00000000000..463920040aa --- /dev/null +++ b/sysutils/doas/files/vidoas-fix-path.diff @@ -0,0 +1,21 @@ +--- vidoas.orig ++++ vidoas +@@ -15,17 +15,17 @@ + # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + # PERFORMANCE OF THIS SOFTWARE. + + # Edit a temporary copy of the doas.conf file and check it for syntax + # errors before installing it as the actual doas.conf file. + + set -eu + +-PATH=/bin:/usr/bin:/usr/local/bin ++PATH=/bin:/usr/bin:/usr/local/bin:@PREFIX@/bin + export PATH + + PROG="${0##*/}" + + umask 022 + + DOAS_CONF=@DOAS_CONF@ + doas_conf_mode="0600"