1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287 |
+ cd builds.sr.ht/images/openbsd/latest
+ doas ./genimg amd64
+ : 7.5
+ arch=amd64
+ openbsd_sets=base comp xbase xshare
+ openbsd_kernel=bsd.mp
+ openbsd_installurl=https://cdn.openbsd.org/pub/OpenBSD
+ echo 7.5
+ tr -d .
+ short_version=75
+ image_size=16g
+ image_packages=bash git
+ snapshot=NO
+ pkg_add_params=
+ openbsd_public_key=openbsd-75-base.pub
+ run_syspatch=YES
+ openbsd_bootstrap=NO
+ uname -r
+ [ 7.5 != 7.5 ]
+ [ NO = YES ]
+ mirror_dir=7.5
Will run syspatch: YES
+ echo Will run syspatch: YES
+ BUILD_DIR=/home/build/builds.sr.ht/images/openbsd/latest
+ mkdir -p workdir
+ mkdir -p amd64
+ cd_workdir
+ set_files=
+ set_files= base75.tgz
+ set_files= base75.tgz comp75.tgz
+ set_files= base75.tgz comp75.tgz xbase75.tgz
+ set_files= base75.tgz comp75.tgz xbase75.tgz xshare75.tgz
+ test -f base75.tgz
+ ftp https://cdn.openbsd.org/pub/OpenBSD/7.5/amd64/base75.tgz
+ test -f comp75.tgz
+ ftp https://cdn.openbsd.org/pub/OpenBSD/7.5/amd64/comp75.tgz
+ test -f xbase75.tgz
+ ftp https://cdn.openbsd.org/pub/OpenBSD/7.5/amd64/xbase75.tgz
+ test -f xshare75.tgz
+ ftp https://cdn.openbsd.org/pub/OpenBSD/7.5/amd64/xshare75.tgz
+ test -f bsd.mp
+ ftp https://cdn.openbsd.org/pub/OpenBSD/7.5/amd64/bsd.mp
+ test -f SHA256.sig
+ ftp https://cdn.openbsd.org/pub/OpenBSD/7.5/amd64/SHA256.sig
+ test -f SHA256
+ ftp https://cdn.openbsd.org/pub/OpenBSD/7.5/amd64/SHA256
+ signify -Cp /etc/signify/openbsd-75-base.pub -x SHA256.sig base75.tgz comp75.tgz xbase75.tgz xshare75.tgz bsd.mp
Signature Verified
base75.tgz: OK
bsd.mp: OK
comp75.tgz: OK
xbase75.tgz: OK
xshare75.tgz: OK
+ rm -f root.img
+ create_image root.img 16g
vmctl: raw imagefile created
+ vnconfig vnd0 root.img
+ fdisk -iy vnd0
Writing MBR at offset 0.
+ cat
+ > /tmp/partitions
+ << EOF
+ disklabel -w -A -T /tmp/partitions vnd0
+ tar -zxphf base75.tgz -C /mnt
+ tar -zxphf comp75.tgz -C /mnt
+ tar -zxphf xbase75.tgz -C /mnt
+ tar -zxphf xshare75.tgz -C /mnt
+ tar -zxphf /mnt/var/sysmerge/etc.tgz -C /mnt
+ tar -zxphf /mnt/var/sysmerge/xetc.tgz -C /mnt
+ cat
+ > /mnt/etc/fstab
+ << EOF
+ cd /mnt/dev
+ sh MAKEDEV all
+ cd_workdir
+ cat
+ >> /mnt/etc/ssh/sshd_config
+ << EOF
+ echo build
+ > /mnt/etc/myname
+ echo 10.0.2.2
+ > /mnt/etc/mygate
+ echo inet 10.0.2.15 255.255.255.128
+ > /mnt/etc/hostname.vio0
+ echo nameserver 8.8.8.8
+ > /mnt/etc/resolv.conf
+ echo nameserver 8.8.4.4
+ >> /mnt/etc/resolv.conf
+ echo 127.0.0.1 localhost.localdomain localhost
+ > /mnt/etc/hosts
+ echo ::1 localhost.localdomain localhost
+ >> /mnt/etc/hosts
+ echo https://cdn.openbsd.org/pub/OpenBSD
+ > /mnt/etc/installurl
+ ln -sf /usr/share/zoneinfo/UTC /mnt/etc/localtime
+ cat
+ >> /mnt/etc/rc.conf.local
+ << EOF
+ cp bsd.mp /mnt/bsd
+ [ NO = NO ]
+ cp SHA256.sig /mnt/var/db/installed.SHA256.sig
+ sha256 /mnt/bsd
+ umask 077
+ sed s,/mnt,,
+ > /mnt/var/db/kernel.SHA256
+ rm -rf /mnt/usr/share/relink/kernel
+ mkdir -m 700 /mnt/usr/share/relink/kernel
+ tar -C /mnt/usr/share/relink/kernel -xzf /mnt/usr/share/relink/kernel.tgz GENERIC.MP
+ rm -f /mnt/usr/share/relink/kernel.tgz
+ echo Relinking kernel
Relinking kernel
+ chroot /mnt /bin/ksh -e -c cd /usr/share/relink/kernel/GENERIC.MP; make newbsd; make newinstall
+ > /dev/null
+ [ YES = YES ]
+ set +e
+ chroot /mnt ksh -x /usr/sbin/syspatch
+ set -e
+ umask 0022
+ export PATH=/usr/bin:/bin:/usr/sbin:/sbin
+ sysctl -n kern.version
+ sed s/^OpenBSD \([1-9][0-9]*\.[0-9]\)\([^ ]*\).*/\1 \2/;q
+ set -A _KERNV -- 7.5
+ let 1 > 1
+ id -u
+ let 0 != 0
+ pgrep -qxf /bin/ksh .*reorder_kernel
+ _OSrev=75
+ 2> /dev/null
+ machine
+ _MIRROR=https://cdn.openbsd.org/pub/OpenBSD/syspatch/7.5/amd64
+ _PATCH_APPLIED=false
+ _PDIR=/var/syspatch
+ mktemp -d -p /tmp syspatch.XXXXXXXXXX
+ _TMP=/tmp/syspatch.6Lo3WY4RT1
+ _KARL=false
+ readonly _KERNV _MIRROR _OSrev _PDIR _TMP
+ trap trap_handler EXIT
+ trap exit HUP INT TERM
+ getopts clRr arg
+ shift 0
+ let 0 != 0
+ let OPTIND == 1
+ continue
+ continue
+ ls_missing
+ _PATCHES=001_xserver
003_libcrypto
004_bgpd
005_sndiod
006_cron
007_expat
008_nfs
009_readdir
010_elf
+ apply_patch 75-001_xserver
Get/Verify syspatch75-001_xserver.tgz
Installing patch 001_xserver
+ _PATCH_APPLIED=true
+ apply_patch 75-003_libcrypto
Get/Verify syspatch75-003_libcrypto.tgz
Installing patch 003_libcrypto
Get/Verify syspatch75-004_bgpd.tgz
+ _PATCH_APPLIED=true
+ apply_patch 75-004_bgpd
Installing patch 004_bgpd
+ _PATCH_APPLIED=true
+ apply_patch 75-005_sndiod
Get/Verify syspatch75-005_sndiod.tgz
Installing patch 005_sndiod
+ _PATCH_APPLIED=true
+ apply_patch 75-006_cron
Get/Verify syspatch75-006_cron.tgz
Installing patch 006_cron
+ _PATCH_APPLIED=true
+ apply_patch 75-007_expat
Get/Verify syspatch75-007_expat.tgz
Installing patch 007_expat
+ _PATCH_APPLIED=true
+ apply_patch 75-008_nfs
Get/Verify syspatch75-008_nfs.tgz
Installing patch 008_nfs
+ _PATCH_APPLIED=true
+ apply_patch 75-009_readdir
Get/Verify syspatch75-009_readdir.tgz
Installing patch 009_readdir
+ _PATCH_APPLIED=true
Get/Verify syspatch75-010_elf.tgz
+ apply_patch 75-010_elf
Installing patch 010_elf
+ _PATCH_APPLIED=true
+ trap_handler
Relinking to create unique kernel... done; reboot to load the new kernel
Errata can be reviewed under /var/syspatch
+ syspatch_status=0
+ set -e
+ test 0 -eq 0 -o 0 -eq 2
+ chroot /mnt /usr/sbin/pkg_add -u
quirks-7.14 signed on 2024-09-13T14:54:27Z
+ chroot /mnt /usr/sbin/pkg_add bash git
quirks-7.14 signed on 2024-09-13T14:54:27Z
ldconfig: /var/run/ld.so.hints: No such file or directory
The following new rcscripts were installed: /etc/rc.d/gitdaemon
See rcctl(8) for details.
New and changed readme(s):
/usr/local/share/doc/pkg-readmes/git
+ rm -rf /mnt/usr/share/relink/kernel/GENERIC.MP/
+ sed -i /^build:/d /mnt/etc/master.passwd
+ cp -r /mnt/etc/skel /mnt/home/build
+ chown -R 1000:1000 /mnt/home/build
+ echo build:*:1000:
+ >> /mnt/etc/group
+ echo build::1000:1000:pbuild:0:0:Build user:/home/build:/usr/local/bin/bash
+ >> /mnt/etc/master.passwd
+ echo permit nopass keepenv build
+ > /mnt/etc/doas.conf
+ pwd_mkdb -p -d /mnt/etc /mnt/etc/master.passwd
+ cat
+ > /mnt/usr/libexec/reorder_kernel
+ << EOF
+ echo boot
+ > /mnt/etc/boot.conf
+ cat
+ > /mnt/home/build/.gitconfig
+ << EOF
+ chown build:build /mnt/home/build/.gitconfig
+ makefs /dev/vnd0a /mnt
Calculated size of `/dev/vnd0a': 1209860096 bytes, 20851 inodes
Extent size set to 16384
/dev/vnd0a: 1153.8MB (2363008 sectors) block size 16384, fragment size 2048
using 6 cylinder groups of 217.75MB, 13936 blks, 4096 inodes.
super-block backups (for fsck -b #) at:
32, 445984, 891936, 1337888, 1783840, 2229792,
Populating `/dev/vnd0a'
Image `/dev/vnd0a' complete
+ growfs -y /dev/vnd0a
new filesystem size is: 8388576 frags
Warning: 107904 sector(s) cannot be allocated.
growfs: 16331.2MB (33446400 sectors) block size 16384, fragment size 2048
using 75 cylinder groups of 217.75MB, 13936 blks, 4096 inodes.
super-block backups (for fsck -b #) at:
2675744, 3121696, 3567648, 4013600, 4459552, 4905504, 5351456, 5797408,
6243360, 6689312, 7135264, 7581216, 8027168, 8473120, 8919072, 9365024,
9810976, 10256928, 10702880, 11148832, 11594784, 12040736, 12486688, 12932640,
13378592, 13824544, 14270496, 14716448, 15162400, 15608352, 16054304,
16500256, 16946208, 17392160, 17838112, 18284064, 18730016, 19175968,
19621920, 20067872, 20513824, 20959776, 21405728, 21851680, 22297632,
22743584, 23189536, 23635488, 24081440, 24527392, 24973344, 25419296,
25865248, 26311200, 26757152, 27203104, 27649056, 28095008, 28540960,
28986912, 29432864, 29878816, 30324768, 30770720, 31216672, 31662624,
32108576, 32554528, 33000480
+ fsck -y /dev/vnd0a
** /dev/rvnd0a
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
20850 files, 566584 used, 7774607 free (7 frags, 971825 blocks, 0.0% fragmentation)
MARK FILE SYSTEM CLEAN? yes
***** FILE SYSTEM WAS MODIFIED *****
+ sync
+ mount /dev/vnd0a /mnt
+ installboot -vr /mnt vnd0
Using /mnt as root
installing bootstrap on /dev/rvnd0c
using first-stage /mnt/usr/mdec/biosboot, second-stage /mnt/usr/mdec/boot
copying /mnt/usr/mdec/boot to /mnt/boot
looking for superblock at 65536
bad superblock magic 0x0
looking for superblock at 8192
found valid ffs1 superblock
/mnt/boot is 6 blocks x 16384 bytes
fs block shift 2; part offset 128; inode block 780440, offset 552
expecting 32-bit fs blocks (incr 0)
master boot record (MBR) at sector 0
partition 3: type 0xA6 offset 128 size 33554304
/mnt/usr/mdec/biosboot will be written at sector 128
+ umount /mnt
+ vnconfig -u vnd0
+ cd_workdir
+ vmctl create -i root.img ../amd64/root.img.qcow2
vmctl: qcow2 imagefile created
+ chmod 644 ../amd64/root.img.qcow2
|