From 74df96fc30c9d71a65d90cf93ddba3b84a2f50a9 Mon Sep 17 00:00:00 2001 From: Sohrab Behdani Date: Tue, 23 Jul 2024 11:43:21 +0330 Subject: [PATCH 1/7] added plasma edition --- .github/workflows/build.yml | 70 ------------------------------ setup/plasma | 86 +++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 70 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100755 setup/plasma diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index d602d04..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,70 +0,0 @@ -# Adapted from https://github.com/andrewboring/alarm-images/blob/master/.github/workflows/build.yml - -name: Build Images - -on: - release: - types: - - created - -env: - api_key: ${{ secrets.GITHUB_TOKEN }} - name: ${{ github.event.repository.name }} - release_name: ${{ github.ref_name }} - GH_TOKEN: ${{ github.token }} - -jobs: - build: - permissions: - contents: write - runs-on: ubuntu-latest - strategy: - matrix: - arch: ['aarch64', 'rpi-aarch64'] - flavor: ['barebone'] - include: - - arch: rpi-aarch64 - flavor: xfce - - arch: rpi-aarch64 - flavor: trinity - - - - steps: - - uses: actions/checkout@v3 - - name: Configure Git user - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y parted wget dosfstools zip arch-install-scripts aria2 gh git - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - with: - platforms: arm,arm64 - - name: Build image - shell: bash - run: | - scripts=() - for script_name in "${{ matrix.arch }}" "${{ matrix.flavor }}" "${{ matrix.arch }}-${{ matrix.flavor }}"; do - script_path="setup/$script_name" - if [ -f "$script_path" ]; then - scripts+=("$script_path") - fi - done - sudo ./create-image 8G ${{ matrix.arch }} "${scripts[@]}" - - name: Rename image - id: rename-image - run: | - image_in_name="archlinux-${{ matrix.arch }}.img" - image_out_name="Parchlinux-${{ matrix.arch }}-${{ matrix.flavor }}-$(date '+%Y-%m-%d').img" - mv "$image_in_name" "$image_out_name" - echo "image_name=$image_out_name" >> "$GITHUB_OUTPUT" - - name: Compress image - run: | - mkdir image_parts - zip -r "image_parts/${{ steps.rename-image.outputs.image_name }}.zip" "${{ steps.rename-image.outputs.image_name }}" - - name: Upload image - run: | - sha256sum image_parts/* > image_parts/sha256sums.${{ matrix.arch }}.${{ matrix.flavor }}.txt - gh release upload ${{ github.event.release.tag_name }} ./image_parts/* -R ${{ github.repository }} diff --git a/setup/plasma b/setup/plasma new file mode 100755 index 0000000..1a4d0e2 --- /dev/null +++ b/setup/plasma @@ -0,0 +1,86 @@ +#!/bin/bash + +set -uo pipefail + +# Configure system locale to en_US.UTF-8 +sed -i 's/#\(en_US.UTF-8 UTF-8\)/\1/g' /etc/locale.gen +locale-gen +echo 'LANG=en_US.UTF-8' > /etc/locale.conf + +# Add archsink repo +cat <> /etc/pacman.conf + +[archsink] +Server = https://github.com/archsink/\$arch/releases/latest/download +SigLevel = Never + +[ppr] +Server = https://raw.githubusercontent.com/parchlinux-arm/ppr/main/aarch64/ +SigLevel = Never + +EOF + +# Enable parallel downloads +sed -i 's/#\(ParallelDownloads \)/\1/g' /etc/pacman.conf + +# Enable Sudo +sudo sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers + + +# Install Desktop and Apps +packages=( + plasma + dolphin + konsole + kate + gwenview + okular + parch-zram + sddm + parch-branding + noto-fonts + vazirmatn-fonts + parch-emoji-ios + arch-install-scripts + avahi + curl + git + htop + btop + man-db + neovim + pacman-contrib + yay-bin + python + rsync + sudo + tree + fastfetch + neofetch-git + firefox + networkmanager + network-manager-applet + zsh + vim + pipewire + pipewire-pulse + bluez + bluez-utils + blueman + pipewire-alsa + wireplumber +) +pacman -Syu --noconfirm --needed "${packages[@]}" + +# Enable services +systemctl enable avahi-daemon NetworkManager +systemctl enable sddm +systemctl enable bluetooth +systemctl enable parch-zram + + +# Prepare system for containers (e.g. for use with K3s) +# https://github.com/k3s-io/k3s/issues/2067#issuecomment-664048424 +#if ! grep -q cgroup /boot/cmdline.txt; then +# sed -i '$ s/$/ cgroup_memory=1 cgroup_enable=memory/g' /boot/cmdline.txt +#fi -- 2.45.3 From ea9b5c9b2188884febf19b5f38f2211299dd6c93 Mon Sep 17 00:00:00 2001 From: Sohrab Behdani Date: Tue, 23 Jul 2024 11:45:45 +0330 Subject: [PATCH 2/7] added plasma edition --- .github/workflows/build.yml | 72 +++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f1e97e2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,72 @@ +# Adapted from https://github.com/andrewboring/alarm-images/blob/master/.github/workflows/build.yml + +name: Build Images + +on: + release: + types: + - created + +env: + api_key: ${{ secrets.GITHUB_TOKEN }} + name: ${{ github.event.repository.name }} + release_name: ${{ github.ref_name }} + GH_TOKEN: ${{ github.token }} + +jobs: + build: + permissions: + contents: write + runs-on: ubuntu-latest + strategy: + matrix: + arch: ['aarch64', 'rpi-aarch64'] + flavor: ['barebone'] + include: + - arch: rpi-aarch64 + flavor: plasma + - arch: rpi-aarch64 + flavor: xfce + - arch: rpi-aarch64 + flavor: trinity + + + + steps: + - uses: actions/checkout@v3 + - name: Configure Git user + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y parted wget dosfstools zip arch-install-scripts aria2 gh git + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: arm,arm64 + - name: Build image + shell: bash + run: | + scripts=() + for script_name in "${{ matrix.arch }}" "${{ matrix.flavor }}" "${{ matrix.arch }}-${{ matrix.flavor }}"; do + script_path="setup/$script_name" + if [ -f "$script_path" ]; then + scripts+=("$script_path") + fi + done + sudo ./create-image 8G ${{ matrix.arch }} "${scripts[@]}" + - name: Rename image + id: rename-image + run: | + image_in_name="archlinux-${{ matrix.arch }}.img" + image_out_name="Parchlinux-${{ matrix.arch }}-${{ matrix.flavor }}-$(date '+%Y-%m-%d').img" + mv "$image_in_name" "$image_out_name" + echo "image_name=$image_out_name" >> "$GITHUB_OUTPUT" + - name: Compress image + run: | + mkdir image_parts + zip -r "image_parts/${{ steps.rename-image.outputs.image_name }}.zip" "${{ steps.rename-image.outputs.image_name }}" + - name: Upload image + run: | + sha256sum image_parts/* > image_parts/sha256sums.${{ matrix.arch }}.${{ matrix.flavor }}.txt + gh release upload ${{ github.event.release.tag_name }} ./image_parts/* -R ${{ github.repository }} -- 2.45.3 From 92929104e266f466532404b237d5224aca9597c9 Mon Sep 17 00:00:00 2001 From: Sohrab Behdani Date: Tue, 23 Jul 2024 13:05:51 +0330 Subject: [PATCH 3/7] testing --- setup/plasma | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/setup/plasma b/setup/plasma index 1a4d0e2..8f274ef 100755 --- a/setup/plasma +++ b/setup/plasma @@ -7,21 +7,9 @@ sed -i 's/#\(en_US.UTF-8 UTF-8\)/\1/g' /etc/locale.gen locale-gen echo 'LANG=en_US.UTF-8' > /etc/locale.conf -# Add archsink repo -cat <> /etc/pacman.conf - -[archsink] -Server = https://github.com/archsink/\$arch/releases/latest/download -SigLevel = Never - -[ppr] -Server = https://raw.githubusercontent.com/parchlinux-arm/ppr/main/aarch64/ -SigLevel = Never - -EOF - -# Enable parallel downloads -sed -i 's/#\(ParallelDownloads \)/\1/g' /etc/pacman.conf +# Fix Pacman.conf +rm -f /etc/pacman.conf +curl https://raw.githubusercontent.com/parchlinux-ports/Parchlinuxarm-images/main/examples/pacman.conf.example >> /etc/pacman.conf # Enable Sudo sudo sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers -- 2.45.3 From 4910cf76bceb05f8cc4be88d1ee0ff843dcc79c9 Mon Sep 17 00:00:00 2001 From: Sohrab Behdani Date: Tue, 23 Jul 2024 13:41:18 +0330 Subject: [PATCH 4/7] added plasma packages --- setup/plasma | 63 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/setup/plasma b/setup/plasma index 8f274ef..7032c84 100755 --- a/setup/plasma +++ b/setup/plasma @@ -14,10 +14,68 @@ curl https://raw.githubusercontent.com/parchlinux-ports/Parchlinuxarm-images/mai # Enable Sudo sudo sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers +# Fix sddm Theming + +mkdir -p /etc/sddm.conf.d/ +curl https://raw.githubusercontent.com/parchlinux/parch-iso-plasma/main/iso/airootfs/etc/sddm.conf.d/kde_settings.conf >> /etc/sddm.conf.d/kde_settings.conf # Install Desktop and Apps packages=( - plasma + bluedevil + breeze + breeze-gtk + breeze-plymouth + drkonqi + kactivitymanagerd + kde-cli-tools + kde-gtk-config + kdecoration + kdeplasma-addons + kgamma + kglobalacceld + kinfocenter + kmenuedit + kpipewire + krdp + kscreen + kscreenlocker + ksshaskpass + ksystemstats + kwallet-pam + kwayland + kwin + kwrited + layer-shell-qt + libkscreen + libksysguard + libplasma + milou + ocean-sound-theme + plasma-activities + plasma-activities-stats + plasma-browser-integration + plasma-desktop + plasma-disks + plasma-firewall + plasma-integration + plasma-nm + plasma-pa + plasma-sdk + plasma-systemmonitor + plasma-thunderbolt + plasma-vault + plasma-workspace + plasma-workspace-wallpapers + plasma5support + plymouth-kcm + polkit-kde-agent + powerdevil + print-manager + qqc2-breeze-style + sddm-kcm + systemsettings + wacomtablet + xdg-desktop-portal-kde dolphin konsole kate @@ -33,7 +91,6 @@ packages=( avahi curl git - htop btop man-db neovim @@ -45,7 +102,6 @@ packages=( tree fastfetch neofetch-git - firefox networkmanager network-manager-applet zsh @@ -54,7 +110,6 @@ packages=( pipewire-pulse bluez bluez-utils - blueman pipewire-alsa wireplumber ) -- 2.45.3 From eb21d10efa1d4850bb74956e1997cc87c4a41bf0 Mon Sep 17 00:00:00 2001 From: Sohrab Behdani Date: Tue, 23 Jul 2024 13:51:38 +0330 Subject: [PATCH 5/7] changed rootfs size to 9G --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1e97e2..aaff37d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: scripts+=("$script_path") fi done - sudo ./create-image 8G ${{ matrix.arch }} "${scripts[@]}" + sudo ./create-image 9G ${{ matrix.arch }} "${scripts[@]}" - name: Rename image id: rename-image run: | -- 2.45.3 From 1b0a532c8e3d2afd3b331541c402d6b9ed0578c6 Mon Sep 17 00:00:00 2001 From: Sohrab Behdani Date: Tue, 23 Jul 2024 14:10:18 +0330 Subject: [PATCH 6/7] sized zip --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aaff37d..e77ff12 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,7 +65,7 @@ jobs: - name: Compress image run: | mkdir image_parts - zip -r "image_parts/${{ steps.rename-image.outputs.image_name }}.zip" "${{ steps.rename-image.outputs.image_name }}" + zip -s 2000m "image_parts/${{ steps.rename-image.outputs.image_name }}.zip" "${{ steps.rename-image.outputs.image_name }}" - name: Upload image run: | sha256sum image_parts/* > image_parts/sha256sums.${{ matrix.arch }}.${{ matrix.flavor }}.txt -- 2.45.3 From 7680fd747fd92ae008b32a462eb749a16a286b4b Mon Sep 17 00:00:00 2001 From: Sohrab Behdani Date: Tue, 23 Jul 2024 17:13:32 +0330 Subject: [PATCH 7/7] changed build phase, fixed sudo added plasma --- setup/trinity | 16 ++++++++-------- setup/xfce | 19 +++++-------------- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/setup/trinity b/setup/trinity index c6fcb1c..7f71914 100755 --- a/setup/trinity +++ b/setup/trinity @@ -7,19 +7,19 @@ sed -i 's/#\(en_US.UTF-8 UTF-8\)/\1/g' /etc/locale.gen locale-gen echo 'LANG=en_US.UTF-8' > /etc/locale.conf + +# Fix Pacman.conf +rm -f /etc/pacman.conf +curl https://raw.githubusercontent.com/parchlinux-ports/Parchlinuxarm-images/main/examples/pacman.conf.example >> /etc/pacman.conf + +# Enable Sudo +sudo sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers + pacman-key --recv-keys 0x8685AD8B # Add archsink repo cat <> /etc/pacman.conf -[archsink] -Server = https://github.com/archsink/\$arch/releases/latest/download -SigLevel = Never - -[ppr] -Server = https://raw.githubusercontent.com/parchlinux-arm/ppr/main/aarch64/ -SigLevel = Never - [trinity] Server = https://mirror.ppa.trinitydesktop.org/trinity/archlinux/\$arch SigLevel = Never diff --git a/setup/xfce b/setup/xfce index cb28dac..df10cfe 100755 --- a/setup/xfce +++ b/setup/xfce @@ -7,21 +7,12 @@ sed -i 's/#\(en_US.UTF-8 UTF-8\)/\1/g' /etc/locale.gen locale-gen echo 'LANG=en_US.UTF-8' > /etc/locale.conf -# Add archsink repo -cat <> /etc/pacman.conf +# Fix Pacman.conf +rm -f /etc/pacman.conf +curl https://raw.githubusercontent.com/parchlinux-ports/Parchlinuxarm-images/main/examples/pacman.conf.example >> /etc/pacman.conf -[archsink] -Server = https://github.com/archsink/\$arch/releases/latest/download -SigLevel = Never - -[ppr] -Server = https://raw.githubusercontent.com/parchlinux-arm/ppr/main/aarch64/ -SigLevel = Never - -EOF - -# Enable parallel downloads -sed -i 's/#\(ParallelDownloads \)/\1/g' /etc/pacman.conf +# Enable Sudo +sudo sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers # Install useful packages packages=( -- 2.45.3