Don't patch(1) as the 'build' user; it has no right over the src tree.
authorajacoutot <ajacoutot@openbsd.org>
Tue, 6 Jun 2017 20:34:07 +0000 (20:34 +0000)
committerajacoutot <ajacoutot@openbsd.org>
Tue, 6 Jun 2017 20:34:07 +0000 (20:34 +0000)
That bug was hidden because patch(1) returns '0' on that particular case.
To be fixed...

ok robert@

distrib/syspatch/bsd.syspatch.mk

index a382cf7..cdfd7d0 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: bsd.syspatch.mk,v 1.11 2017/06/05 09:47:54 robert Exp $
+#      $OpenBSD: bsd.syspatch.mk,v 1.12 2017/06/06 20:34:07 ajacoutot Exp $
 #
 # Copyright (c) 2016-2017 Robert Nagy <robert@openbsd.org>
 #
@@ -119,7 +119,7 @@ ${ERRATA}/${ERRATA}.patch:
 
 ${_PATCH_COOKIE}: ${ERRATA}/${ERRATA}.patch
        @echo '>> Applying ${ERRATA}.patch'; \
-       su ${BUILDUSER} -c '/usr/bin/patch ${PATCH_ARGS} < ${ERRATA}/${ERRATA}.patch' || \
+       /usr/bin/patch ${PATCH_ARGS} < ${ERRATA}/${ERRATA}.patch || \
                { echo "***>   ${ERRATA}.patch did not apply cleanly"; \
                exit 1; };
        @su ${BUILDUSER} -c 'touch $@'