Compare commits

...

7 commits

Author SHA1 Message Date
e0cc8b9dc4 removed old github yaml files 2024-10-18 13:54:06 +00:00
3aa137df03 Update README.md 2024-10-18 13:21:08 +00:00
769abac301 updated readme 2024-10-17 12:50:31 +03:30
7f18ec51ed updated Parch Linux Mate base 2024-10-17 12:48:51 +03:30
910192db12
Update README.md 2024-06-28 19:32:10 +00:00
1c56287a95
Update README.md 2024-06-17 15:25:18 +00:00
ef1b4f0c8c
added boost to packages list 2024-06-16 22:35:06 +03:30
9 changed files with 80 additions and 181 deletions

View file

@ -1,37 +0,0 @@
# This workflow will build an Arch Linux ISO file with the commit on it
name: build parchiso per release
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
container:
image: archlinux:latest
options: --privileged
steps:
- uses: actions/checkout@v3
- name: Install Packages via Pacman
run: pacman -Sy; pacman --noconfirm -S git archiso python python-pygithub github-cli reflector p7zip zip unzip
- name: Change Arch docker mirror
run: reflector -c "US" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist
- name: Build image
run: mkarchiso -v iso/
- name: Upload iso to the release
run: |
cd ./out
mkdir iso_parts
# split -d -b 2000M "$(ls *.iso)" iso_parts/"$(ls *.iso)"_part
zip -s 1000m iso_parts/"$(ls *.iso)".zip "$(ls *.iso)"
#7z -v1000m a iso_parts/"$(ls *.iso)".zip "$(ls *.iso)"
md5sum iso_parts/* > iso_parts/md5sums.txt
gh release upload ${{ github.event.release.tag_name }} ./iso_parts/* -R ${{ github.repository }}

36
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,36 @@
stages:
- build
- deploy
image: archlinux/archlinux:base-devel
variables:
Desktop: "mate"
build_iso:
stage: build
script:
- ./build.sh
- echo "Renaming the output ISO file"
- mv out/*.iso out/ParchLinux-$Desktop-latest.iso
artifacts:
paths:
- out/ParchLinux-$Desktop-latest.iso
rules:
- if: $CI_COMMIT_TAG
deploy_iso:
stage: deploy
dependencies:
- build_iso
script:
- echo "Installing sshpass and rsync"
- pacman -Syu --noconfirm sshpass rsync
- echo "Removing old ISO files from remote directory"
- sshpass -p "$PASS" ssh -o StrictHostKeyChecking=no parch@$SSH_ROOT rm -rf /srv/http/$Desktop/
- echo "Creating new directory on remote host"
- sshpass -p "$PASS" ssh -o StrictHostKeyChecking=no parch@$SSH_ROOT mkdir -p /srv/http/$Desktop/
- echo "Uploading new ISO via rsync"
- sshpass -p "$PASS" rsync -r out/ParchLinux-$Desktop-latest.iso parch@$SSH_ROOT:/srv/http/$Desktop/
rules:
- if: $CI_COMMIT_TAG

View file

@ -1,46 +0,0 @@
ci:
autoupdate_branch: "2.1.x"
autoupdate_schedule: monthly
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.0
hooks:
- id: pyupgrade
args: ["--py36-plus"]
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.1.0
hooks:
- id: reorder-python-imports
name: Reorder Python imports (src, tests)
files: "^(?!examples/)"
args: ["--application-directories", "src"]
additional_dependencies: ["setuptools>60.9"]
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-implicit-str-concat
- repo: https://github.com/peterdemin/pip-compile-multi
rev: v2.4.5
hooks:
- id: pip-compile-multi-verify
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: fix-byte-order-marker
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: fix-byte-order-marker
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-case-conflict
- id: check-merge-conflict

View file

@ -1,3 +1,9 @@
# Parch Linux iso template # [![](https://git.parchlinux.com/artwork/Arts/-/raw/main/Logo/NewLogo/logo.png){width=32px} Parch Linux](https://parchlinux.com) [![](https://upload.wikimedia.org/wikipedia/commons/thumb/e/e8/Mate-logo.svg/1024px-Mate-logo.svg.png){width=32px}](https://mate-desktop.org/) MATE desktop (_community version_)
## Use this template for making releases You can download the live/installation ISO [from the mirror](https://mirror.parchlinux.com/mate/).
[![](https://img.shields.io/gitlab/v/tag/iso%2Fcommunity%2Fparch-iso-mate?gitlab_url=https%3A%2F%2Fgit.parchlinux.com%2F&style=for-the-badge&logo=mate&label=Latest%20build&labelColor=%232f2f2f&color=%231AA67E)](https://mirror.parchlinux.com/mate/ParchLinux-mate-latest.iso)
> **Notice:**
> If you encountered any problem with this version, you can start an thread in [Parch Linux forum](https://forum.parchlinux.com/).
> Optionally, you can mention the maintainer of this version ([@almasi](https://forum.parchlinux.com/u/almasi/)) in Parch Linux forum.

View file

@ -2,7 +2,7 @@
main() { main() {
set -e set -e
local Black DarkGray Red LightRed Green LightGreen Brown Yellow Blue LightBlue Purple Light Purple Cyan LightCyan LightGray White reset local Black DarkGray Red LightRed Green LightGreen Brown Yellow Blue LightBlue Purple Light Purple Cyan LightCyan LightGray White reset
## save colors ## Save colors
Black="\e[0;30m" Black="\e[0;30m"
DarkGray="\e[1;30m" DarkGray="\e[1;30m"
Red="\e[0;31m" Red="\e[0;31m"
@ -23,38 +23,34 @@ main() {
local reponame local reponame
reponame=${PWD##*/} reponame=${PWD##*/}
echo -e "$Green### start install packeges for build $reponame ###$reset" echo -e "$Green### Start install packages for build $reponame ###$reset"
echo -e "$Brown### checking your os ###$reset" echo -e "$Brown### Checking your OS ###$reset"
if type pacman >/dev/null 2>&1;then if type pacman >/dev/null 2>&1;then
if [ "$(id -u)" != "0" ]; then if [ "$(id -u)" != "0" ]; then
echo -e "$Red### you are not in root$reset" echo -e "$Red### You are not in root$reset"
exit 1 exit 1
else else
install install
echo -e "$Blue### install complete ###$reset" echo -e "$Blue### Install complete ###$reset"
echo -e "$Green### start build $reponame with archiso ###$reset" echo -e "$Green### Start build $reponame with archiso ###$reset"
build build
makezip
fi fi
else else
echo -e "$Red###os cant supported###$reset" echo -e "$Red###OS can't supported###$reset"
exit 1 exit 1
fi fi
} }
install() { install() {
set -e set -e
pacman -Sy; pacman --noconfirm -S --needed git archiso github-cli p7zip pacman -Sy; pacman --noconfirm -S --needed git archiso github-cli p7zip reflector rsync
} }
build() { build() {
set -e set -e
mkarchiso -v iso/ mkarchiso -v iso/
} }
makezip() {
cd out
7z -v500m a "$(ls *.iso)".zip "$(ls *.iso)"
md5sum * > md5sums.txt
}
main main

View file

@ -164,3 +164,6 @@ parch-welcome
fira-code-font fira-code-font
fira-code-mono fira-code-mono
vazirmatn-fonts vazirmatn-fonts
# Community Changes
boost

View file

@ -35,10 +35,13 @@ Architecture = auto
CheckSpace CheckSpace
#VerbosePkgLists #VerbosePkgLists
#ParallelDownloads = 5 #ParallelDownloads = 5
DownloadUser = alpm
# By default, pacman accepts packages signed by keys that its local keyring # By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages. # trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional SigLevel = Never
LocalFileSigLevel = Optional LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required #RemoteFileSigLevel = Required
@ -72,6 +75,10 @@ LocalFileSigLevel = Optional
#[core-testing] #[core-testing]
#Include = /etc/pacman.d/mirrorlist #Include = /etc/pacman.d/mirrorlist
[ppr]
SigLevel = Optional TrustedOnly
Server = https://git.parchlinux.com/repo/ppr/-/raw/main/x86_64/
[core] [core]
Include = /etc/pacman.d/mirrorlist Include = /etc/pacman.d/mirrorlist
@ -87,16 +94,13 @@ Include = /etc/pacman.d/mirrorlist
#[multilib-testing] #[multilib-testing]
#Include = /etc/pacman.d/mirrorlist #Include = /etc/pacman.d/mirrorlist
[multilib] #[multilib]
Include = /etc/pacman.d/mirrorlist #Include = /etc/pacman.d/mirrorlist
[ppr]
SigLevel = Optional TrustedOnly
Server = https://raw.githubusercontent.com/parchlinux/ppr/main/x86_64/
[pcp] [pcp]
SigLevel = Optional TrustedOnly SigLevel = Optional TrustedOnly
Server = https://raw.githubusercontent.com/parchlinux/pcp/main/x86_64/ Server = https://git.parchlinux.com/repo/pcp/-/raw/main/x86_64/
# An example of a custom package repository. See the pacman manpage for # An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories. # tips on creating your own repositories.

View file

@ -1,24 +1,26 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck disable=SC2034 # shellcheck disable=SC2034
iso_name="Parchlinux Mate" iso_name="Parch Linux Mate"
iso_label="PARCH_LINUX_MATE_$(date +%Y%m)" iso_label="ParchLinux_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)"
iso_publisher="Parch Linux <https://parchlinux.ir>" iso_publisher="Parch Linux <https://Parchlinux.com>"
iso_application="Parch Linux Live/Rescue CD" iso_application="Parch Linux Live/Rescue DVD"
iso_version="$(date +%Y.%m.%d)" iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
install_dir="arch" install_dir="arch"
buildmodes=('iso') buildmodes=('iso')
bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito'
'uefi-x64.systemd-boot.esp' 'uefi-ia32.systemd-boot.esp' 'uefi-x64.systemd-boot.esp'
'uefi-x64.systemd-boot.eltorito') 'uefi-ia32.systemd-boot.eltorito' 'uefi-x64.systemd-boot.eltorito')
arch="x86_64" arch="x86_64"
pacman_conf="pacman.conf" pacman_conf="pacman.conf"
airootfs_image_type="squashfs" airootfs_image_type="squashfs"
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M') airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M')
bootstrap_tarball_compression=('zstd' '-c' '-T0' '--auto-threads=logical' '--long' '-19')
file_permissions=( file_permissions=(
["/etc/shadow"]="0:0:400" ["/etc/shadow"]="0:0:400"
["/root"]="0:0:750" ["/root"]="0:0:750"
["/root/.automated_script.sh"]="0:0:755" ["/root/.automated_script.sh"]="0:0:755"
["/root/.gnupg"]="0:0:700"
["/usr/local/bin/choose-mirror"]="0:0:755" ["/usr/local/bin/choose-mirror"]="0:0:755"
["/usr/local/bin/Installation_guide"]="0:0:755" ["/usr/local/bin/Installation_guide"]="0:0:755"
["/usr/local/bin/livecd-sound"]="0:0:755" ["/usr/local/bin/livecd-sound"]="0:0:755"

View file

@ -1,65 +0,0 @@
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("REPO_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 environment vars."
"please add this and run again."
)
sys.exit(1)
gh = Github(api_key)
print(repo_name, api_key)
repo = gh.get_repo(repo_name)
release = repo.get_release(release_name)
logging.info("Statrting upload ISO to release")
release.upload_asset(path=path)
logging.info("ISO uploaded.")
# 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.")