From 23f974b8df69840c9af900fd01ff23144a54e161 Mon Sep 17 00:00:00 2001 From: Sohrab Behdani Date: Thu, 23 Mar 2023 15:48:42 +0430 Subject: [PATCH] initial release of parch Gnome Parch Gnome edition with support of qt/gtk theme and some parch apps THIS IS AN ALPHA RELEASE. --- .github/workflows/build.yaml | 12 ++-- iso/airootfs/etc/environment | 6 ++ iso/airootfs/etc/gdm/custom.conf | 4 ++ iso/airootfs/etc/sddm.conf.d/autologin.conf | 7 -- .../systemd/system/display-manager.service | 2 +- iso/packages.x86_64 | 22 +++++-- iso/profiledef.sh | 2 - tools/upload_asset.py | 65 +++++++++++++++++++ 8 files changed, 98 insertions(+), 22 deletions(-) create mode 100644 iso/airootfs/etc/environment create mode 100644 iso/airootfs/etc/gdm/custom.conf delete mode 100644 iso/airootfs/etc/sddm.conf.d/autologin.conf create mode 100644 tools/upload_asset.py diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dd4a62d..5fac3ce 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,13 +1,14 @@ # This workflow will build an Arch Linux ISO file with the commit on it -name: Build Arch ISO with ArchInstall Commit +name: build parchiso per release on: release: types: - created + env: api_key: ${{ secrets.GITHUB_TOKEN }} name: ${{ github.event.repository.name }} - release_name: ${{ github.event.release.name }} + release_name: ${{ github.ref_name }} jobs: build: runs-on: ubuntu-latest @@ -15,10 +16,6 @@ jobs: image: archlinux:latest options: --privileged steps: - - uses: crazy-max/ghaction-import-gpg@v4 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.PASSPHRASE }} - uses: actions/checkout@v3 - name: Install Packages via Pacman run: pacman -Sy; pacman --noconfirm -S git archiso python python-pip @@ -27,4 +24,5 @@ jobs: - name: Build image run: mkarchiso -v iso/ - name: Upload iso to the release - run: python tools/upload_assest.py + run: python tools/upload_asset.py + diff --git a/iso/airootfs/etc/environment b/iso/airootfs/etc/environment new file mode 100644 index 0000000..b7ac3af --- /dev/null +++ b/iso/airootfs/etc/environment @@ -0,0 +1,6 @@ +# +# This file is parsed by pam_env module +# +# Syntax: simple "KEY=VAL" pairs on separate lines +# +QT_QPA_PLATFORMTHEME=gtk2 diff --git a/iso/airootfs/etc/gdm/custom.conf b/iso/airootfs/etc/gdm/custom.conf new file mode 100644 index 0000000..4fa5f2f --- /dev/null +++ b/iso/airootfs/etc/gdm/custom.conf @@ -0,0 +1,4 @@ +[daemon] +AutomaticLoginEnable=True +AutomaticLogin=liveuser +WaylandEnable=false diff --git a/iso/airootfs/etc/sddm.conf.d/autologin.conf b/iso/airootfs/etc/sddm.conf.d/autologin.conf deleted file mode 100644 index 2b23ccf..0000000 --- a/iso/airootfs/etc/sddm.conf.d/autologin.conf +++ /dev/null @@ -1,7 +0,0 @@ -[Autologin] -Relogin=false -User=liveuser -Session=plasma - -[Theme] -Current=breeze-dark diff --git a/iso/airootfs/etc/systemd/system/display-manager.service b/iso/airootfs/etc/systemd/system/display-manager.service index 56f1df2..43e48b1 120000 --- a/iso/airootfs/etc/systemd/system/display-manager.service +++ b/iso/airootfs/etc/systemd/system/display-manager.service @@ -1 +1 @@ -/usr/lib/systemd/system/sddm.service \ No newline at end of file +/usr/lib/systemd/system/gdm.service \ No newline at end of file diff --git a/iso/packages.x86_64 b/iso/packages.x86_64 index 1969efa..44cdfb4 100644 --- a/iso/packages.x86_64 +++ b/iso/packages.x86_64 @@ -29,13 +29,13 @@ ethtool exfatprogs f2fs-tools fatresize -falkon fsarchiver git gnu-netcat gpart gpm gptfdisk +gvfs grml-zsh-config grub hdparm @@ -80,7 +80,6 @@ nmap ntfs-3g nvme-cli open-iscsi -open-vm-tools openconnect openssh openvpn @@ -94,7 +93,6 @@ pv python python-psutil python-systemd -qemu-guest-agent refind #reflector reiserfsprogs @@ -116,6 +114,7 @@ testdisk tmux tpm2-tss udftools +udisks2 usb_modeswitch usbmuxd usbutils @@ -138,14 +137,18 @@ openssl-1.1 openssl #Desktop +gnome +firefox +unzip +unrar #systemutils btop xdg-user-dirs packagekit-qt5 -neofetch +neofetch-git keepassxc -octopi-git + #parchlinuxstuff @@ -155,3 +158,12 @@ os-prober paru parch-branding parch-pacman +parch-os-wallpapers +qt5-styleplugins +parch-dorood +warpinator +appimagelauncher +estedad-fonts +hack-nerd-fonts +parch-emoji-ios +emote \ No newline at end of file diff --git a/iso/profiledef.sh b/iso/profiledef.sh index b14333a..fa415f8 100644 --- a/iso/profiledef.sh +++ b/iso/profiledef.sh @@ -5,8 +5,6 @@ iso_name="Parchlinux" iso_label="PARCH_$(date +%Y%m)" iso_publisher="Parch Linux " iso_application="Parch Linux Live/Rescue CD" -#gpg_key="BC9DCC3C9A0B047F53065EEBFB8554F927F96E60" -#gpg_signer="KomeilParseh " iso_version="$(date +%Y.%m.%d)" install_dir="arch" buildmodes=('iso') diff --git a/tools/upload_asset.py b/tools/upload_asset.py new file mode 100644 index 0000000..37ebf85 --- /dev/null +++ b/tools/upload_asset.py @@ -0,0 +1,65 @@ +import hashlib +import logging +import os +import sys +from datetime import datetime +from pathlib import Path + +from github import Github + +logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s") + +api_key = os.getenv("api_key", None) +current_date = datetime.today().strftime("%Y-%m-%d") + + +def _compute_sha256(file_name): + hash_sha256 = hashlib.sha256() + with open(file_name, "rb") as f: + for chunk in iter(lambda: f.read(4096), b""): + hash_sha256.update(chunk) + return hash_sha256.hexdigest() + + +_path = list(Path().cwd().glob("out/*.iso"))[0] +path = _path.as_posix() + +file_name = _path.name + +hash = _compute_sha256(path) + +repo_name = os.getenv("name", None) +release_name = os.getenv("release_name", None) + +logging.info("Starting at %s", current_date) + +if not (repo_name and api_key and release_name): + logging.error( + "'repo_name'/'api_key'/'release_name' not found in your envs." + "please add this and run again" + ) + sys.exit(1) + + +gh = Github(api_key) +print(repo_name, api_key) +repo = gh.get_repo(f"parchlinux/{repo_name}") + +release = repo.get_release(release_name) + +logging.info("statrting Upload ISO to release") + +release.upload_asset(path=path) +logging.info("ISO upload is done") + +# update release +msg = ( + release.body + + f""" +| name | sha256 | +| :---: | :---: | +| {file_name} | {hash} |""" +) +logging.info("Starting Update release msg with: \n %s" % msg) +release.update_release(name=release.tag_name, message=msg) +logging.info("Release Update is done.")