From 5dc4aa331ab029627df4350dac3d8678936fa5a9 Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Wed, 27 Oct 2021 23:14:35 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20reduce=20iso=20size.=20add=20-v3?= =?UTF-8?q?=20repos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archiso/airootfs/etc/pacman-more.conf | 14 +++++++--- archiso/airootfs/usr/local/bin/removeun | 26 +++++++++++++++++++ .../airootfs/usr/local/bin/removeun-online | 2 +- archiso/packages.x86_64 | 16 +----------- 4 files changed, 39 insertions(+), 19 deletions(-) diff --git a/archiso/airootfs/etc/pacman-more.conf b/archiso/airootfs/etc/pacman-more.conf index e4009cc..71d73b1 100644 --- a/archiso/airootfs/etc/pacman-more.conf +++ b/archiso/airootfs/etc/pacman-more.conf @@ -21,6 +21,7 @@ HoldPkg = pacman glibc #CleanMethod = KeepInstalled #UseDelta = 0.7 Architecture = auto +#Architecture = x86_64 x86_64_v3 # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup #IgnorePkg = @@ -68,6 +69,16 @@ LocalFileSigLevel = Optional # uncommented to enable the repo. # +# cachyos repos +#[cachyos-desktop-v3] +#Include = /etc/pacman.d/cachyos-v3-mirrorlist +#[cachyos-v3] +#Include = /etc/pacman.d/cachyos-v3-mirrorlist +[cachyos-desktop] +Include = /etc/pacman.d/cachyos-mirrorlist +[cachyos] +Include = /etc/pacman.d/cachyos-mirrorlist + # The testing repositories are disabled by default. To enable, uncomment the # repo name header and Include lines. You can add preferred servers immediately # after the header, and they will be used before the default mirrors. @@ -96,9 +107,6 @@ Include = /etc/pacman.d/mirrorlist [multilib] Include = /etc/pacman.d/mirrorlist -[cachyos] -Include = /etc/pacman.d/cachyos-mirrorlist - # An example of a custom package repository. See the pacman manpage for # tips on creating your own repositories. #[custom] diff --git a/archiso/airootfs/usr/local/bin/removeun b/archiso/airootfs/usr/local/bin/removeun index b93d9cf..52f23a0 100755 --- a/archiso/airootfs/usr/local/bin/removeun +++ b/archiso/airootfs/usr/local/bin/removeun @@ -70,4 +70,30 @@ _clean_packages(){ } +_try_v3(){ + /lib/ld-linux-x86-64.so.2 --help | grep "x86-64-v3 (supported, searched)" > /dev/null + + local pacman_conf="/etc/pacman.conf" + local pacman_conf_cachyos="/etc/pacman-more.conf" + local pacman_conf_path_backup="/etc/pacman.conf.bak" + + if [ $? -eq 0 ]; then + echo "x86-64-v3 is supported" + + sed -i 's/Architecture = auto/#Architecture = auto/' $pacman_conf_cachyos + sed -i 's/#//g' $pacman_conf_cachyos + + echo "backup old config" + mv $pacman_conf $pacman_conf_path_backup + + echo "CachyOS -v3 Repo changed" + mv $pacman_conf_cachyos $pacman_conf + + else + echo "x86-64-v3 is not supported" + fi + +} + _clean_packages +_try_v3 diff --git a/archiso/airootfs/usr/local/bin/removeun-online b/archiso/airootfs/usr/local/bin/removeun-online index b8d2fd5..23822cb 100755 --- a/archiso/airootfs/usr/local/bin/removeun-online +++ b/archiso/airootfs/usr/local/bin/removeun-online @@ -1,7 +1,7 @@ #!/bin/bash _clean_packages(){ - local _leave_these_packages="base\nbase-devel\ncachyos-keyring\ncachyos-mirrorlist\ncachyos-hello\ngrub\nefibootmgr\n" + local _leave_these_packages="base\nbase-devel\ncachyos-keyring\ncachyos-mirrorlist\ncachyos-v3-mirrorlist\ncachyos-hello\ngrub\nefibootmgr\n" local _packages_to_remove=($(comm -23 <(pacman -Qqt | sort) <({ pacman -Qqg base-devel; printf $_leave_these_packages; } | sort -u))) local xx # @ does one by one to avoid errors in the entire process diff --git a/archiso/packages.x86_64 b/archiso/packages.x86_64 index c8dcfaf..5d419d0 100644 --- a/archiso/packages.x86_64 +++ b/archiso/packages.x86_64 @@ -146,7 +146,6 @@ kwin-scripts-forceblur netctl net-tools networkmanager -networkmanager-openconnect networkmanager-openvpn networkmanager-qt networkmanager-vpnc @@ -190,7 +189,6 @@ qt5-tools xorg-server xorg-apps -neofetch # zfs support(not working) @@ -298,6 +296,7 @@ gst-plugins-ugly gst-plugin-pipewire cachyos-mirrorlist +cachyos-v3-mirrorlist cachyos-keyring #fonts @@ -306,11 +305,6 @@ ttf-liberation ttf-bitstream-vera cantarell-fonts noto-fonts -noto-fonts-cjk -noto-fonts-emoji -adobe-source-han-sans-jp-fonts -adobe-source-han-sans-kr-fonts -adobe-source-han-sans-cn-fonts opendesktop-fonts ttf-opensans @@ -322,9 +316,7 @@ char-white cachyos-nord-kde-theme-git cachyos-emerald-kde-theme-git paru -yad meld -#keyserver-rank-cachy reflector-simple @@ -332,9 +324,3 @@ reflector-simple open-vm-tools xf86-input-vmmouse xf86-video-vmware - -##### want to add/use your local repo packages -##### create your packages and put them in the local repo - -veracrypt -firejail