fix: handle /var/cache/blendOS mount
This commit is contained in:
parent
938b273b5c
commit
c932ded8c1
1 changed files with 18 additions and 7 deletions
|
|
@ -34,7 +34,7 @@ stages:
|
|||
- module: exec
|
||||
inputs:
|
||||
- |
|
||||
git clone --revision 8f5e52db0512ff5b2c35bddb1e9bc3be3795a5e0 --depth 1 https://git.ruds.io/rs2009/akshara /akshara
|
||||
git clone --revision 956ef6fb0105c2b10f22142252e2900847cb589e --depth 1 https://git.ruds.io/rs2009/akshara /akshara
|
||||
cd /akshara
|
||||
cp -a usr/lib/akshara /usr/lib/akshara
|
||||
cp -a usr/lib/dracut/modules.d/10akshara /usr/lib/dracut/modules.d/10akshara
|
||||
|
|
@ -48,6 +48,9 @@ override:
|
|||
- path: /etc/pacman.conf
|
||||
keep: new
|
||||
|
||||
- path: /var/cache/blendOS/
|
||||
keep: old
|
||||
|
||||
- path: /etc/locale.conf
|
||||
keep: old
|
||||
|
||||
|
|
@ -62,7 +65,9 @@ distro-config:
|
|||
before-stages: |
|
||||
set -e
|
||||
|
||||
mkdir -m 0755 -p ./var/{cache/blendOS/pacman/pkg,lib/pacman,log} ./{dev,run,etc/pacman.d}
|
||||
mkdir -p /var/cache/blendOS/pacman/pkg
|
||||
|
||||
mkdir -m 0755 -p ./var/{cache/blendOS,lib/pacman,log} ./{dev,run,etc/pacman.d}
|
||||
mkdir -m 1777 -p ./tmp
|
||||
mkdir -m 0555 -p ./{sys,proc}
|
||||
|
||||
|
|
@ -96,20 +101,26 @@ distro-config:
|
|||
Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch
|
||||
EOF
|
||||
|
||||
mount --bind /var/cache/blendOS ./var/cache/blendOS
|
||||
|
||||
pacman -Sy --config ./etc/pacman.conf --cachedir ./var/cache/blendOS/pacman/pkg -r . --needed --noconfirm base
|
||||
|
||||
ln -sfn usr/lib64 ./lib64
|
||||
ln -sfn usr/sbin ./sbin
|
||||
|
||||
after-stages: |
|
||||
locale-gen
|
||||
umount -l ./var/cache/blendOS
|
||||
|
||||
rm -f /boot/* &>/dev/null
|
||||
systemd-nspawn -D . locale-gen
|
||||
|
||||
cd /usr/lib/modules
|
||||
rm -f ./boot/* &>/dev/null
|
||||
|
||||
pushd ./usr/lib/modules
|
||||
kernels=(*)
|
||||
cp "${kernels[0]}"/vmlinuz /boot/vmlinuz-"${kernels[0]}"
|
||||
dracut --force --regenerate-all
|
||||
popd
|
||||
cp ./usr/lib/modules/"${kernels[0]}"/vmlinuz ./boot/vmlinuz-"${kernels[0]}"
|
||||
|
||||
systemd-nspawn -D . dracut --force --regenerate-all
|
||||
|
||||
should-update: |
|
||||
[ "$(checkupdates | wc -l)" -gt 0 ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue