summaryrefslogtreecommitdiff
path: root/distrib/syspatch
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2017-08-21 08:45:39 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2017-08-21 08:45:39 +0000
commit0d4999b7130921970f027c3dfc2e51a88889018a (patch)
treebcd93597934d0ab7c7c911bbaa0fa95b55e14aca /distrib/syspatch
parent43d00c174886ff0b0d7a65051e19b25e73246de2 (diff)
Kernel syspatches will now only contain the differing object files.
The syspatch(8) utility will be modified accordingly to relink the kernel at the end of its run (not done yet, still WIP). That will give us KARL and much smaller patches. Idea from deraadt@ OK robert@
Diffstat (limited to 'distrib/syspatch')
-rw-r--r--distrib/syspatch/bsd.syspatch.mk20
1 files changed, 11 insertions, 9 deletions
diff --git a/distrib/syspatch/bsd.syspatch.mk b/distrib/syspatch/bsd.syspatch.mk
index b00776f0bf9..92a4dd6203e 100644
--- a/distrib/syspatch/bsd.syspatch.mk
+++ b/distrib/syspatch/bsd.syspatch.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.syspatch.mk,v 1.15 2017/07/11 18:16:48 robert Exp $
+# $OpenBSD: bsd.syspatch.mk,v 1.16 2017/08/21 08:45:38 ajacoutot Exp $
#
# Copyright (c) 2016-2017 Robert Nagy <robert@openbsd.org>
#
@@ -160,16 +160,18 @@ ${_BUILD_COOKIE}: ${_PATCH_COOKIE} ${_FAKE_COOKIE}
fi; exit 1; \
fi;
@if [ ${_kern} = "GENERIC" ]; then \
- su ${BUILDUSER} -c '${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${LOCALEGRP} \
- -m 0644 ${SRCDIR}/sys/arch/${MACHINE_ARCH}/compile/${_kern}/obj/bsd \
- ${FAKE}/bsd' || \
- { echo "***> failed to install ${_kern}"; \
+ su ${BUILDUSER} -c 'umask ${WOBJUMASK} && \
+ cd ${SRCDIR}/sys/arch/${MACHINE_ARCH}/compile/GENERIC/obj && \
+ cp -p *.o Makefile ld.script makegap.sh \
+ ${FAKE}/usr/share/compile/GENERIC/' || \
+ { echo "***> failed to install ${_kern} object files"; \
exit 1; }; \
elif [ ${_kern} = "GENERIC.MP" ]; then \
- su ${BUILDUSER} -c '${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${LOCALEGRP} \
- -m 0644 ${SRCDIR}/sys/arch/${MACHINE_ARCH}/compile/${_kern}/obj/bsd \
- ${FAKE}/bsd.mp' || \
- { echo "***> failed to install ${_kern}"; \
+ su ${BUILDUSER} -c 'umask ${WOBJUMASK} && \
+ cd ${SRCDIR}/sys/arch/${MACHINE_ARCH}/compile/GENERIC.MP/obj && \
+ cp -p *.o Makefile ld.script makegap.sh \
+ ${FAKE}/usr/share/compile/GENERIC.MP/' || \
+ { echo "***> failed to install ${_kern} object files"; \
exit 1; }; \
fi; exit 0
. endfor