adding files to git
[eostre.git] / files / .build
CommitLineData
1c66ee26 1#!/usr/bin/env bash -xe
2
3# This build script is meant to be run from the vroot.x(32|64) directory, as part of the build process
4# It more-or-less automates the Abigail build process
5# Make sure appropriate directories have been bind-mounted (sudo sh ../bm.sh)
6
7# Update the build chroot, last release published was 20191111
8sudo chroot . /bin/bash -c '(xbps-install -Syu && xbps-install -Syu && exit)'
9
10# Copy in our RELEASE, etc, files
11for F in RELEASE .pkgs .svcs .patches .build; do sudo cp -r ../files/"${F}" ./; done
12
13# Enter the updated build environment
14# Install packages, remake the mandoc db, enable services, patch the boot process, and finally remove orphan packages
15sudo chroot . /bin/bash -xe -c '\
16( \
17 cd / &&\
18 for PKG in $(cat .pkgs); do xbps-install -Suy $PKG; done &&\
19 makewhatis /usr/share/man &&\
20 for SVC in $(cat .svcs); do ln -s /etc/sv/$SVC /etc/runit/runsvdir/default/$SVC; done &&\
21 patch -R -p1 /etc/runit/core-services/03-filesystems.sh < /.patches/fix-panic-on-readonly-root.patch &&\
22 xbps-install -Syu &&\
23 mkdir -m 755 /rw &&\
24 cd / &&\
25 mv etc rw/etc &&\
26 mv var rw/var &&\
27 ln -s rw/etc etc &&\
28 ln -s rw/var var &&\
29 mkdir -m 0400 /initrd &&\
30 xbps-remove --remove-orphans &&\
31 rmdir /opt /media ||: &&\
32: )'
33
34sudo touch ./initrd/init3.btrfs
35sudo mkfs.btrfs --shrink --rootdir=../../initrd2 initrd/init3.btrfs
36sudo chown root:root initrd/init3.btrfs
37sudo chmod 0400 initrd/init3.btrfs