forked from artix/artools
Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
5902f987cc | |||
bfa888251e | |||
0ecfa1a0f6 | |||
e60180ebdb | |||
20b65d06c8 | |||
c7728c2e5b | |||
a0ca1ab3a4 | |||
911a0fff36 | |||
f80c51e8d3 | |||
1e948b3ef5 |
@@ -19,9 +19,10 @@ prepare_artools
|
||||
find_cached_pkgfile() {
|
||||
local searchdirs=("$PKGDEST" "$PWD") results=()
|
||||
local pkg="$1"
|
||||
local search=${pkg%.*}
|
||||
for dir in "${searchdirs[@]}"; do
|
||||
[[ -d $dir ]] || continue
|
||||
results+=$(find "$dir" -type f -name "$pkg")
|
||||
results+=$(find "$dir" -type f -name "$search.*" ! -path '*.sig')
|
||||
done
|
||||
case ${#results[*]} in
|
||||
0)
|
||||
|
@@ -132,7 +132,7 @@ DBGSRCDIR="/usr/src/debug"
|
||||
COMPRESSGZ=(gzip -c -f -n)
|
||||
COMPRESSBZ2=(bzip2 -c -f)
|
||||
COMPRESSXZ=(xz -c -z -)
|
||||
COMPRESSZST=(zstd -c -z -q -)
|
||||
COMPRESSZST=(zstd -c -T0 --ultra -20 -)
|
||||
COMPRESSLRZ=(lrzip -q)
|
||||
COMPRESSLZO=(lzop -q)
|
||||
COMPRESSZ=(compress -c -f)
|
||||
@@ -143,7 +143,7 @@ COMPRESSLZ=(lzip -c -f)
|
||||
# EXTENSION DEFAULTS
|
||||
#########################################################################
|
||||
#
|
||||
PKGEXT='.pkg.tar.xz'
|
||||
PKGEXT='.pkg.tar.zst'
|
||||
SRCEXT='.src.tar.gz'
|
||||
|
||||
# vim: set ft=sh ts=2 sw=2 et:
|
||||
|
@@ -42,6 +42,12 @@ add_svc_s6(){
|
||||
fi
|
||||
done
|
||||
chroot $mnt s6-rc-bundle -c /etc/s6/rc/compiled add $rlvl $valid
|
||||
|
||||
# rebuild s6-linux-init binaries
|
||||
chroot $mnt rm -r /etc/s6/current
|
||||
chroot $mnt s6-linux-init-maker -1 -N -f /etc/s6/skel -G "/usr/bin/agetty -L -8 tty1 115200" -c /etc/s6/current /etc/s6/current
|
||||
chroot $mnt mv /etc/s6/current/bin/init /etc/s6/current/bin/s6-init
|
||||
chroot $mnt cp -a /etc/s6/current/bin /usr
|
||||
}
|
||||
|
||||
set_xdm(){
|
||||
@@ -143,10 +149,10 @@ write_unpackfs() {
|
||||
local yaml=$(write_yaml_header)
|
||||
yaml+=$(write_yaml_map 0 'unpack')
|
||||
# if ${persist}; then
|
||||
# yaml+=$(write_yaml_seq_map 2 'source' '"/run/bootmnt/LiveOS/rootfs.img"')
|
||||
# yaml+=$(write_yaml_seq_map 2 'source' '"/run/artix/bootmnt/LiveOS/rootfs.img"')
|
||||
# yaml+=$(write_yaml_map 4 'sourcefs' '"ext4"')
|
||||
# else
|
||||
yaml+=$(write_yaml_seq_map 2 'source' '"/run/bootmnt/LiveOS/rootfs.img"')
|
||||
yaml+=$(write_yaml_seq_map 2 'source' '"/run/artix/bootmnt/LiveOS/rootfs.img"')
|
||||
yaml+=$(write_yaml_map 4 'sourcefs' '"squashfs"')
|
||||
# fi
|
||||
yaml+=$(write_yaml_map 4 'destination' '""')
|
||||
|
@@ -130,12 +130,15 @@ configure_grub(){
|
||||
|
||||
prepare_grub(){
|
||||
local platform=i386-pc img='core.img' prefix=/boot/grub
|
||||
local lib=$1/usr/lib/grub theme=$2/usr/share/grub
|
||||
local lib="$1"/usr/lib/grub
|
||||
local theme="$1"/usr/share/grub
|
||||
local livecfg="$2"/usr/share/grub
|
||||
local grub=${iso_root}/boot/grub efi=${iso_root}/efi/boot
|
||||
|
||||
|
||||
prepare_dir ${grub}/${platform}
|
||||
|
||||
cp ${theme}/cfg/*.cfg ${grub}
|
||||
cp ${livecfg}/cfg/*.cfg ${grub}
|
||||
|
||||
cp ${lib}/${platform}/* ${grub}/${platform}
|
||||
|
||||
@@ -158,8 +161,9 @@ prepare_grub(){
|
||||
grub-mkimage -d ${grub}/${platform} -o ${efi}/${img} -O ${platform} -p ${prefix} iso9660
|
||||
|
||||
prepare_dir ${grub}/themes
|
||||
cp -r ${theme}/themes/artix ${grub}/themes/
|
||||
cp -r ${theme}/{locales,tz} ${grub}
|
||||
|
||||
cp -r ${theme}/themes/artix ${grub}/themes
|
||||
cp -r ${livecfg}/{locales,tz} ${grub}
|
||||
|
||||
if [[ -f /usr/share/grub/unicode.pf2 ]];then
|
||||
msg2 "Copying %s ..." "unicode.pf2"
|
||||
|
@@ -19,7 +19,7 @@ error_function() {
|
||||
error "A failure occurred in %s()." "$func"
|
||||
plain "Aborting..."
|
||||
fi
|
||||
umount_overlay
|
||||
umount_overlayfs
|
||||
umount_img
|
||||
exit 2
|
||||
}
|
||||
@@ -41,7 +41,7 @@ run_safe() {
|
||||
trap_exit() {
|
||||
local sig=$1; shift
|
||||
error "$@"
|
||||
umount_overlay
|
||||
umount_overlayfs
|
||||
trap -- "$sig"
|
||||
kill "-$sig" "$$"
|
||||
}
|
||||
|
Reference in New Issue
Block a user