From 22a4a89ef8deb8d223a567e9d9a63e8ac7617942 Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Sun, 20 Oct 2024 20:09:13 -0400 Subject: [PATCH] zero-system: some cleanup --- pentoo/zero-system/files/zshrc | 26 +++--- ....2-r3.ebuild => zero-system-2024.3.ebuild} | 88 ++++++++++--------- 2 files changed, 58 insertions(+), 56 deletions(-) rename pentoo/zero-system/{zero-system-2024.2-r3.ebuild => zero-system-2024.3.ebuild} (72%) diff --git a/pentoo/zero-system/files/zshrc b/pentoo/zero-system/files/zshrc index 5919fcc17..a75840146 100644 --- a/pentoo/zero-system/files/zshrc +++ b/pentoo/zero-system/files/zshrc @@ -59,22 +59,18 @@ bindkey "\eOF" end-of-line #bindkey "\eOc" forward-word if [ "${USER}" != "root" ]; then - if [ ! -r ~/.ssh/id_ed25519_sk_green ] && [ ! -r ~/.ssh/id_ed25519_sk_red ] && [ ! -r ~/.ssh/gentoo_rsa ]; then - printf "This system has no ssh keys, you are expected to forward ssh agent\n" - else - if [ ! -r ~/.ssh/id_ed25519_sk_green ]; then - printf "This system is missing your yk5cgreen primary key id_ed25519_sk_green\n" - fi - if [ ! -r ~/.ssh/id_ed25519_sk_red ]; then - printf "This system is missing your yk5cred backup key id_ed25519_sk_red\n" - fi - if [ ! -r ~/.ssh/gentoo_rsa ]; then - printf "This system is missing your old key gentoo_rsa\n" - fi - - eval $(keychain --eval --ignore-missing ~/.ssh/id_ed25519_sk_green ~/.ssh/id_ed25519_sk_red ~/.ssh/gentoo_rsa) - GPG_TTY=$(tty) + if [ ! -r ~/.ssh/id_ed25519_sk_green ] || [ ! -r id_ed25519_sk_rk_yk5cgreen ]; then + printf "This system is missing your yk5cgreen primary key file\n" fi + if [ ! -r ~/.ssh/id_ed25519_sk_red ] || [ ! -r id_ed25519_sk_rk_yk5cred ]; then + printf "This system is missing your yk5cred backup key file\n" + fi + if [ ! -r ~/.ssh/gentoo_rsa ]; then + printf "This system is missing your old key gentoo_rsa\n" + fi + + eval $(keychain --eval --ignore-missing ~/.ssh/id_ed25519_sk_green ~/.ssh/id_ed25519_sk_rk_yk5cgreen ~/.ssh/id_ed25519_sk_red ~/.ssh/id_ed25519_sk_rk_yk5cred ~/.ssh/gentoo_rsa) + GPG_TTY=$(tty) fi setopt prompt_subst diff --git a/pentoo/zero-system/zero-system-2024.2-r3.ebuild b/pentoo/zero-system/zero-system-2024.3.ebuild similarity index 72% rename from pentoo/zero-system/zero-system-2024.2-r3.ebuild rename to pentoo/zero-system/zero-system-2024.3.ebuild index 728f98963..554bedb07 100644 --- a/pentoo/zero-system/zero-system-2024.2-r3.ebuild +++ b/pentoo/zero-system/zero-system-2024.3.ebuild @@ -10,45 +10,48 @@ S="${WORKDIR}" LICENSE="GPL-3" SLOT="0" KEYWORDS="amd64 arm x86" -IUSE="dev lto nu printer naga" +IUSE="dev lto minimal nu printer naga" RDEPEND=" + app-shells/zsh + net-misc/keychain + !minimal? ( dev? ( - app-crypt/glep63-check - app-doc/eclass-manpages - app-doc/pms - app-portage/iwdevtools - app-shells/dash - app-shells/mksh - dev-python/mock - dev-python/pytest - dev-ruby/blinkstick - dev-ruby/bundler-audit - dev-ruby/irb - dev-ruby/pry - dev-util/checkbashisms - dev-util/libabigail - dev-util/meld - dev-util/pkgdev - dev-util/shellcheck - dev-vcs/mercurial - dev-vcs/cvs - sys-kernel/gentoo-sources + app-crypt/glep63-check + app-doc/eclass-manpages + app-doc/pms + app-portage/iwdevtools + app-shells/dash + app-shells/mksh + dev-python/mock + dev-python/pytest + dev-ruby/blinkstick + dev-ruby/bundler-audit + dev-ruby/irb + dev-ruby/pry + dev-util/checkbashisms + dev-util/libabigail + dev-util/meld + dev-util/pkgdev + dev-util/shellcheck + dev-vcs/mercurial + dev-vcs/cvs + sys-kernel/gentoo-sources ) naga? ( - app-misc/jq - app-misc/siglo - dev-embedded/platformio - dev-embedded/stlink - dev-util/android-sdk-build-tools - dev-util/android-sdk-update-manager - gnome-base/gnome-keyring - kde-apps/filelight - media-plugins/swh-plugins - media-libs/noise-suppression-for-voice - net-p2p/transmission - www-client/firefox - ) + app-misc/jq + app-misc/siglo + dev-embedded/platformio + dev-embedded/stlink + dev-util/android-sdk-build-tools + dev-util/android-sdk-update-manager + gnome-base/gnome-keyring + kde-apps/filelight + media-plugins/swh-plugins + media-libs/noise-suppression-for-voice + net-p2p/transmission + www-client/firefox + ) app-arch/p7zip app-arch/pixz app-containers/docker @@ -57,12 +60,10 @@ RDEPEND=" app-crypt/nitrocli app-crypt/nitrokey-app app-portage/genlop - app-shells/zsh app-shells/gentoo-zsh-completions app-vim/syntastic net-dns/dnsmasq net-misc/axel - net-misc/keychain sys-apps/earlyoom sys-fs/libeatmydata sys-fs/squashfs-tools-ng @@ -80,7 +81,8 @@ RDEPEND=" mail-client/thunderbird-bin net-p2p/mktorrent ) - !nu? ( printer? ( net-print/foo2zjs ) + !nu? ( + printer? ( net-print/foo2zjs ) app-admin/supervisor net-analyzer/metasploit:9999 net-wireless/dsd @@ -115,7 +117,8 @@ RDEPEND=" net-wireless/md380tools !lto? ( dev-embedded/arduino ) x11-misc/xdotool - ) + ) + ) " src_install() { @@ -141,14 +144,17 @@ src_install() { pkg_postinst() { if grep -q '^root' /etc/passwd && [ "$(grep '^root' /etc/passwd | awk -F: '{print $7}')" != "/bin/zsh" ]; then - chsh -s /bin/zsh + chsh -s /bin/zsh || die fi if grep -q '^zero' /etc/passwd && [ "$(grep '^zero' /etc/passwd | awk -F: '{print $7}')" != "/bin/zsh" ]; then - chsh -s /bin/zsh zero + chsh -s /bin/zsh zero || die fi if use dev; then if [ ! -L /etc/portage/bashrc ]; then - ln -s ../../usr/share/iwdevtools/bashrc /etc/portage/bashrc + ln -s ../../usr/share/iwdevtools/bashrc /etc/portage/bashrc || die fi fi + if [ -d /home/zero ]; then + chown zero:zero /home/zero/.vim-scratch || die + fi }