build command triggers mkinitfs in native chroot and crashes
To reproduce
$ git checkout feature/wireguard
$ ./pmbootstrap.py --details-to-stdout build --arch=armhf wireguard-postmarketos-stable
It seems that in setting up the native chroot it adds some unexpected dependencies like osk-sdl and postmarketos-mkinitfs. The big issue is that postmarketos-mkinitfs triggers a mkinitfs build after installing and this fails because the build chroot doesn't have a device package. This makes the build system sad.
(032399) [01:22:49] (buildroot_armhf) % chmod -R a+rw /var/cache/distfiles
(032399) [01:22:49] (buildroot_armhf) % cp /tmp/gzip_wrapper.sh /usr/local/bin/gzip
(032399) [01:22:49] (buildroot_armhf) % chmod +x /usr/local/bin/gzip
(032399) [01:22:49] (buildroot_armhf) % adduser pmos abuild
(032399) [01:22:49] (buildroot_armhf) % sed -i -e 's/^CLEANUP=.*/CLEANUP='"'"''"'"'/' /etc/abuild.conf
(032399) [01:22:49] (buildroot_armhf) % touch /var/local/pmbootstrap_chroot_build_init_done
(032399) [01:22:49] (buildroot_armhf) % sed -i -e 's/^export JOBS=.*/export JOBS=9/' /etc/abuild.conf
(032399) [01:22:49] Calculate depends of packages ['libmnl-dev', 'linux-postmarketos-stable', 'linux-postmarketos-stable-dev'], arch: armhf
(032399) [01:22:50] (buildroot_armhf) install libmnl-dev linux-postmarketos-stable linux-postmarketos-stable-dev
(032399) [01:22:50] (buildroot_armhf) % apk --no-progress add -u libmnl-dev linux-postmarketos-stable linux-postmarketos-stable-dev linux-headers libmnl postmarketos-mkinitfs gmp-dev bash perl busybox-extras lddtree cryptsetup kmod multipath-tools postmarketos-splash device-mapper parted e2fsprogs e2fsprogs-extra osk-sdl libgmpxx readline libbz2 cryptsetup-libs popt libuuid xz-libs eudev libaio device-mapper-libs json-c eudev-libs userspace-rcu ttf-dejavu ttf-droid py3-pillow lvm2-libs libblkid ncurses-libs libcom_err e2fsprogs-libs sdl2 sdl2_ttf mesa-gl directfb cryptsetup1-libs argon2-libs udev-init-scripts fontconfig encodings mkfontdir mkfontscale py3-olefile freetype libjpeg-turbo lcms2 openjpeg python3 tiff libwebp device-mapper-event-libs ncurses-terminfo-base ncurses-terminfo libx11 libxdamage libxext libxfixes libxxf86vm libdrm expat mesa-glapi libxcb libxshmfence libpng tslib libfontenc libffi gdbm sqlite-libs libxau libxdmcp libbsd
...
(78/82) Installing osk-sdl (0.51-r0)
(79/82) Installing postmarketos-mkinitfs (0.5.9-r0)
(80/82) Installing linux-postmarketos-stable (4.14.9-r1)
(81/82) Installing perl (5.26.1-r1)
(82/82) Installing linux-postmarketos-stable-dev (4.14.9-r1)
Executing busybox-1.27.2-r8.trigger
Executing kmod-24-r0.trigger
Executing fontconfig-2.12.6-r0.trigger
Executing mkfontscale-1.1.2-r1.trigger
Executing mkfontdir-1.0.7-r1.trigger
Executing postmarketos-mkinitfs-0.5.9-r0.trigger
ERROR: Missing /etc/deviceinfo!
ERROR: postmarketos-mkinitfs-0.5.9-r0.trigger: script exited with error 1
My current workaround is running touch /etc/deviceinfo
in the chroot.