NameDateSize

..Today23

bsd.syspatch.mkH A D25-May-20206.8 KiB

diff.shH A D13-May-20191.8 KiB

MakefileH A D03-Sep-201624

Makefile.000H A D30-Oct-2018446

READMEH A D15-Aug-20193.2 KiB

README

1$OpenBSD: README,v 1.4 2019/08/14 20:30:19 tb Exp $
2
3Notes about the syspatch(8) build process
4=========================================
5
6The syspatch(8) build system will eventually be properly documented in its own
7man(1) page but until things settle and the framework is robust, this file will
8be used as a quick reminder.
9
10Requirements for the build machine
11----------------------------------
12
13- ${FAKEROOT} must be a local mount point with the no perm mount option set and
14  be owned by ${BUILDUSER} with a mode of 0700. It should be big enough to
15  contain one full release per syspatch (~30G).
16
17- ${SRCDIR} and ${XSRCDIR} must be checked out using the OPENBSD_X_X_BASE
18  release tag.
19
20- Timezone must be set to "Canada/Mountain".
21
22Requirements for the fakeroot
23-----------------------------
24
25Before building the first syspatch, the same release used on the build machine
26must be extracted under a subdirectory of ${FAKEROOT} to allow clean comparison
27and find differing files between patched releases.
28
29e.g.
30FAKEROOT=/fakeroot
31FAKE=${FAKEROOT}/syspatch/64-000_release
32RELEASEDIR=/path/to/sets
33mkdir -p ${FAKE}
34install -m 0700 ${RELEASEDIR}/bsd{,.mp} ${FAKE}
35for set in base comp game man xbase xshare xfont xserv; do
36	tar xzphf ${RELEASEDIR}/${set}$(uname -r | tr -d '.').tgz -C ${FAKE}
37done
38mkdir -m 700 -p ${FAKE}/usr/share/relink/kernel/GENERIC{,.MP}
39tar -C ${FAKE}/usr/share/relink/kernel -xzf ${FAKE}/usr/share/relink/kernel.tgz
40rm ${FAKE}/usr/share/relink/kernel.tgz
41
42Continuing syspatch builds
43--------------------------
44
45If syspatches were already built for this release on a different machine, the
46following additional steps are required. Prepare a ${SYSPATCHES} directory
47containing all the syspatches of the release. Make a copy of the ${FAKE}
48directory and extract all the syspatches in it.
49
50e.g.
51SYSPATCHES=/path/to/syspatches
52PATCHED=${FAKEROOT}/syspatch/64-018_mds
53cp -Rp ${FAKE} ${PATCHED}
54for _s in ${SYSPATCHES}/*.tgz; do tar -C ${PATCHED} -xzphf ${_s}; done
55
56Then apply all the errata patches to the source trees.
57
58Building a syspatch
59-------------------
60
61When building a xenocara syspatch, make sure to set XSRCDIR to the directory
62where the xenocara checkout was made.
63    # export XSRCDIR=/usr/xenocara
64
65Everything is done as root under ${BSDSRCDIR}/distrib/syspatch/.
66
67Before building the first syspatch, the obj directory must be created.
68    # FAKEROOT=/fakeroot make -f Makefile.000 obj
69
70Each syspatch requires its own Makefile numbered after the patch level.
71    # cp Makefile.000 Makefile.001
72    # ${EDITOR} Makefile.001
73    -> set the ERRATA name and BUILD type
74
75The patched release can now be built.
76    # FAKEROOT=/fakeroot make -f Makefile.001 001_dummy/.plist
77    # ${EDITOR} obj/001_dummy/.plist
78    -> edit the plist to make sure it only contains files we want to end up in
79       the syspatch(8) tarball
80
81At last, a syspatch(8) can be created.
82    # FAKEROOT=/fakeroot make -f Makefile.001 syspatch
83
84Patches are incremental and must be built in order. In case an errata does not
85apply to the current architecture and to prevent a gap in the numbering, the
86"previous" fakeroot must be created manually by copying the previous one.
87e.g.
88    # cp -Rp /fakeroot/syspatch/61-010_perl /fakeroot/syspatch/61-011_sti
89