Add build, deploy and test sources
This commit is contained in:
1 parent
b962581812
commit
3d1a08f230
259 files changed
+15273
No files matched your search
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
W=/root/krd24
|
||||
cd "$W"
|
||||
|
||||
if grep -q 'Paravis: KRD from files' sqroot/etc/KRD/live_env.sh; then
|
||||
echo " уже пропатчено"
|
||||
else
|
||||
python3 - <<'EOF'
|
||||
import io
|
||||
p='/root/krd24/sqroot/etc/KRD/live_env.sh'
|
||||
s=io.open(p,encoding='utf-8').read()
|
||||
old='export KRD_LIVE_LAYERS_BOOT_FOLDER="/run/live/medium"\n'
|
||||
new=('export KRD_LIVE_LAYERS_BOOT_FOLDER="/run/live/medium"\n'
|
||||
'# Paravis: KRD from files (efi/Paravis/KRD/live) instead of ISO image\n'
|
||||
'if [[ -d "/run/live/medium/efi/Paravis/KRD/live/KRD" ]]\n'
|
||||
'then\n'
|
||||
' export KRD_LIVE_LAYERS_BOOT_FOLDER="/run/live/medium/efi/Paravis/KRD"\n'
|
||||
'fi\n')
|
||||
assert old in s
|
||||
io.open(p,'w',encoding='utf-8').write(s.replace(old,new,1))
|
||||
print(' live_env.sh: патч применён')
|
||||
EOF
|
||||
fi
|
||||
echo "=== результат:"
|
||||
sed -n '76,86p' sqroot/etc/KRD/live_env.sh
|
||||
|
||||
echo "=== пересборка squashfs (xz, 256K, 16 потоков) ..."
|
||||
rm -f filesystem-patched.squashfs
|
||||
mksquashfs sqroot filesystem-patched.squashfs \
|
||||
-comp xz -b 262144 -noappend -processors 16 > /tmp/mksq.log 2>&1 || { tail -20 /tmp/mksq.log; exit 1; }
|
||||
tail -4 /tmp/mksq.log
|
||||
ls -l filesystem.squashfs filesystem-patched.squashfs
|
||||
echo "=== проверка нового образа:"
|
||||
unsquashfs -s filesystem-patched.squashfs | head -6
|
||||
unsquashfs -cat filesystem-patched.squashfs etc/KRD/live_env.sh 2>/dev/null | sed -n '76,86p'
|
||||
Reference in new issue
Block a user