From a56a0532827e70a300eae8022e7519f22e30bda6 Mon Sep 17 00:00:00 2001 From: Valeria Fadeeva Date: Tue, 24 Oct 2023 21:41:12 +0500 Subject: [PATCH] Update --- 00_reset_1.sh | 15 --------------- 00_reset_light.sh | 8 ++++++++ 00_reset_2.sh => 00_reset_with_packages.sh | 5 ++--- 01_prepare.sh | 2 -- 02_chown.sh | 2 +- 03_make.sh | 16 ++++++++-------- 04_move.sh | 11 ----------- 04_sign.sh | 13 +++++++++++++ 05_chown.sh | 5 +++++ 05_push.sh => 06_push.sh | 0 airootfs/usr/local/bin/remove-unneeded | 4 ---- profiledef.sh | 4 ++-- 12 files changed, 39 insertions(+), 46 deletions(-) delete mode 100755 00_reset_1.sh create mode 100755 00_reset_light.sh rename 00_reset_2.sh => 00_reset_with_packages.sh (71%) delete mode 100755 04_move.sh create mode 100755 04_sign.sh create mode 100755 05_chown.sh rename 05_push.sh => 06_push.sh (100%) diff --git a/00_reset_1.sh b/00_reset_1.sh deleted file mode 100755 index bd35cc8..0000000 --- a/00_reset_1.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -sudo rm -rf ./{work,out} -#rm airootfs/root/packages/*.pkg.tar.zst -#rm airootfs/root/packages/*.pkg.tar.zst.sig -#rm -rf airootfs/root/melawy-skel-liveuser/pkg -#rm airootfs/root/wallpaper.png -#rm airootfs/root/melawy-skel-liveuser/*.pkg.tar.zst -#rm -rf airootfs/etc/pacman.d/ -#rm eosiso*.log -mkdir ./{work,out} - -#echo "melawy" | beep -f 200 -l 250 -d 100 -r 1 -n -s -notify-send -a "$(basename $(pwd)): Reset" -t 999999999 "finished" "$(date '+%Y.%m.%d %H:%M:%S')" - -echo "Ready" diff --git a/00_reset_light.sh b/00_reset_light.sh new file mode 100755 index 0000000..afeef09 --- /dev/null +++ b/00_reset_light.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +sudo rm -rf ../work +mkdir ./work + +notify-send -a "$(basename $(pwd)): Reset" -t 999999999 "finished" "$(date '+%Y.%m.%d %H:%M:%S')" + +echo "Ready" diff --git a/00_reset_2.sh b/00_reset_with_packages.sh similarity index 71% rename from 00_reset_2.sh rename to 00_reset_with_packages.sh index 2e4170b..d648b8b 100755 --- a/00_reset_2.sh +++ b/00_reset_with_packages.sh @@ -1,11 +1,10 @@ #!/bin/sh -sudo rm -rf ./{work,out} +sudo rm -rf ../work rm airootfs/opt/extra-drivers/*.pkg.tar.* rm airootfs/root/packages/*.pkg.tar.* rm airootfs/usr/share/packages/*.pkg.tar.* -mkdir ./{work,out} +mkdir ../work -#echo "melawy" | beep -f 200 -l 250 -d 100 -r 1 -n -s notify-send -a "$(basename $(pwd)): Reset" -t 999999999 "finished" "$(date '+%Y.%m.%d %H:%M:%S')" echo "Ready" diff --git a/01_prepare.sh b/01_prepare.sh index fcb8a81..202b247 100755 --- a/01_prepare.sh +++ b/01_prepare.sh @@ -33,8 +33,6 @@ do sudo pacman -Sw --noconfirm --cachedir "./airootfs/usr/share/packages" $pack done - -#echo "melawy" | beep -f 200 -l 250 -d 100 -r 1 -n -s notify-send -a "$(basename $(pwd)): Prepare" -t 999999999 "finished" "$(date '+%Y.%m.%d %H:%M:%S')" echo "Ready" diff --git a/02_chown.sh b/02_chown.sh index 0dd30c4..f39379f 100755 --- a/02_chown.sh +++ b/02_chown.sh @@ -2,6 +2,6 @@ sudo chown -R 1000:1000 ./airootfs/opt/extra-drivers/ sudo chown -R 1000:1000 ./airootfs/usr/share/packages/ -sudo chown -R 1000:1000 ./out +sudo chown -R 1000:1000 ../boot/iso echo "Ready" diff --git a/03_make.sh b/03_make.sh index 59c96f1..a93c87c 100755 --- a/03_make.sh +++ b/03_make.sh @@ -1,15 +1,15 @@ #!/bin/bash sudo ./mkarchiso_last_my -v "." -rename=$(date +%Y-%m-%d) -cp ./work/iso/arch/pkglist.x86_64.txt ./out/Melawy-linux-${rename}-pkglist.txt -#echo "melawy" | beep -f 200 -l 250 -d 100 -r 1 -n -s +date_tag=$(date +%Y.%m.%d) +iso_name="Melawy-linux-${date_tag}-x86_64.iso" + +gpg --detach-sign --local-user BC8B600E8DDA1F4CB77B10D2BA803A261A5EE6B8 --output "../boot/txt/${iso_name}.sig" "../boot/iso/${iso_name}" +sha1sum "../boot/iso/${iso_name}" > "../boot/txt/${iso_name}.sha1" +sha256sum "../boot/iso/${iso_name}" > "../boot/txt/${iso_name}.sha256" +cp "../boot/iso/arch/pkglist.x86_64.txt" "../boot/txt/Melawy-linux-${date_tag}-pkglist.txt" + notify-send -a "$(basename $(pwd)): Make" -t 999999999 "Make finished" "$(date '+%Y.%m.%d %H:%M:%S')" -if [ -n "$files" ]; then - sudo chown -R 1000:1000 ./out - mv ./out/* ../boot/iso/ -fi - echo "Ready" diff --git a/04_move.sh b/04_move.sh deleted file mode 100755 index 73f751e..0000000 --- a/04_move.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -files=$(ls -1 ./out) - -if [ -n "$files" ]; then - sudo chown -R 1000:1000 ./out - mv ./out/*.iso ../boot/iso/ - mv ./out/*.txt ../boot/txt/ -fi - -echo "Ready" diff --git a/04_sign.sh b/04_sign.sh new file mode 100755 index 0000000..6e1d3d0 --- /dev/null +++ b/04_sign.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +date_tag=$(date +%Y.%m.%d) +iso_name="Melawy-linux-${date_tag}-x86_64.iso" + +gpg --detach-sign --local-user BC8B600E8DDA1F4CB77B10D2BA803A261A5EE6B8 --output "../boot/txt/${iso_name}.sig" "../boot/iso/${iso_name}" +sha1sum "../boot/iso/${iso_name}" > "../boot/txt/${iso_name}.sha1" +sha256sum "../boot/iso/${iso_name}" > "../boot/txt/${iso_name}.sha256" +cp "../boot/iso/arch/pkglist.x86_64.txt" "../boot/txt/Melawy-linux-${date_tag}-pkglist.txt" + +notify-send -a "$(basename $(pwd)): Sign" -t 999999999 "finished" "$(date '+%Y.%m.%d %H:%M:%S')" + +echo "Ready" diff --git a/05_chown.sh b/05_chown.sh new file mode 100755 index 0000000..21195e8 --- /dev/null +++ b/05_chown.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +sudo chown -R 1000:1000 ../boot + +echo "Ready" diff --git a/05_push.sh b/06_push.sh similarity index 100% rename from 05_push.sh rename to 06_push.sh diff --git a/airootfs/usr/local/bin/remove-unneeded b/airootfs/usr/local/bin/remove-unneeded index 77bb032..b121f35 100755 --- a/airootfs/usr/local/bin/remove-unneeded +++ b/airootfs/usr/local/bin/remove-unneeded @@ -1,10 +1,6 @@ #!/bin/bash _clean_packages() { -# local _leave_these_packages="base\nbase-devel\n\ngrub\nefibootmgr\noctopi\nca-certificates\nmelawy-welcome\n" -# local _leave_these_basepackages="filesystem\ngcc-libs\nglibc\nglib2\nbash\ncoreutils\nfile\nfindutils\ngawk\ngrep\nprocps-ng\nsed\ntar\ngettext\npciutils\npsmisc\nshadow\nutil-linux\nbzip2\ngzip\nxz\nlicenses\npacman\nsystemd\nsystemd-sysvcompat\niputils\niproute2\n" -# local _packages_to_remove=($(comm -23 <(pacman -Qq | sort) <({ pacman -Qqg melawy; printf $_leave_these_packages; printf $_leave_these_basepackages; } | sort -u))) - local _packages_to_remove="" _packages_to_remove+=( diff --git a/profiledef.sh b/profiledef.sh index 464ba37..57ae115 100644 --- a/profiledef.sh +++ b/profiledef.sh @@ -9,8 +9,8 @@ iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)" install_dir="arch" buildmodes=('iso') quiet="n" -work_dir="work" -out_dir="out" +work_dir="../work" +out_dir="../boot/iso" bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' 'uefi-x64.systemd-boot.esp' 'uefi-x64.systemd-boot.eltorito') arch="x86_64"