added pacman config

This commit is contained in:
Sohrab Behdani 2024-05-01 09:58:34 +03:30
parent a9d7fd31ad
commit 9049731906
11 changed files with 224 additions and 0 deletions

21
pacman-config/PKGBUILD Normal file
View file

@ -0,0 +1,21 @@
# Maintainer: Parchlinux
pkgname=parch-pacman
destname="/"
pkgver=27
pkgrel=0
pkgdesc="parchlinux custom pacman config"
arch=('any')
url="https://github.com/parchlinux"
license=('GPL3')
makedepends=()
install="parch.install"
depends=()
conflicts=()
provides=("${pkgname}")
options=(!strip !emptydirs)
source=("parch-pacman.zip")
sha256sums=('SKIP')
package() {
install -dm755 ${pkgdir}${destname}
cp -r ${srcdir}/${pkgname}${destname}/* ${pkgdir}${destname}
}

11
pacman-config/README.md Normal file
View file

@ -0,0 +1,11 @@
# How to remake
```bash
zip -r parch-pacman.zip parch-pacman
makepkg -sc
```
- Submit your changes as PullRequest

View file

@ -0,0 +1,108 @@
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
HookDir = /etc/pacman.d/hooks/
HoldPkg = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
Color
#NoProgressBar
CheckSpace
VerbosePkgLists
ParallelDownloads = 5
ILoveCandy
# 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.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
# 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.
#[core-testing]
#Include = /etc/pacman.d/mirrorlist
[core]
Include = /etc/pacman.d/mirrorlist
#[extra-testing]
#Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.
#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist
[multilib]
Include = /etc/pacman.d/mirrorlist
[ppr]
SigLevel = Optional TrustAll
Include = /etc/pacman.d/ppr-mirrorlist
[pcp]
SigLevel = Optional TrustAll
Include = /etc/pacman.d/pcp-mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

View file

@ -0,0 +1,10 @@
[Trigger]
Operation = Upgrade
Operation = Install
Type = Package
Target = grub
[Action]
Description = Reinstall GRUB
When = PostTransaction
Exec = /bin/bash -c '/etc/pacman.d/hooks/zx-grub-disk-type.sh'

View file

@ -0,0 +1,23 @@
#!/bin/bash
# Check if the system is running in UEFI mode
if [[ -d "/sys/firmware/efi" ]]; then
# UEFI mode detected
echo "UEFI system detected. Reinstalling GRUB for UEFI..."
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Parch
else
# Legacy (BIOS) mode detected
echo "Legacy (BIOS) system detected. Reinstalling GRUB for BIOS..."
# Find the primary disk for MBR installations
primary_disk=$(lsblk -o NAME,SIZE,MOUNTPOINT -nl | awk '$3=="/" {print $1}' | sed 's/[0-9]//g')
if [[ -n "$primary_disk" ]]; then
grub-install --target=i386-pc --recheck "/dev/$primary_disk"
else
echo "Error: Unable to determine primary disk. Check your configuration."
exit 1
fi
fi
grub-mkconfig -o /boot/grub/grub.cfg

View file

@ -0,0 +1,12 @@
[Trigger]
Operation = Upgrade
Operation = Install
Type = Package
Target = linux
Target = linux-*
Target = systemd
Target = grub
[Action]
Description = Generate GRUB configuration
When = PostTransaction
Exec = /bin/bash -c '/etc/pacman.d/hooks/zxe-grub-linux.sh'

View file

@ -0,0 +1,2 @@
# Generate GRUB configuration
grub-mkconfig -o /boot/grub/grub.cfg

View file

@ -0,0 +1,21 @@
################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################
# With: reflector --verbose --protocol https --age 2 --sort rate --number 10
# When: 2024-04-12 17:50:12 UTC
# From: https://archlinux.org/mirrors/status/json/
# Retrieved: 2024-04-12 17:50:12 UTC
# Last Check: 2024-04-12 17:16:00 UTC
Server = https://mirror.aarnet.edu.au/pub/archlinux/$repo/os/$arch
Server = https://mirror.puzzle.ch/archlinux/$repo/os/$arch
Server = https://mirror.csclub.uwaterloo.ca/archlinux/$repo/os/$arch
Server = https://mirror.archlinux.no/$repo/os/$arch
Server = https://mirrors.kernel.org/archlinux/$repo/os/$arch
Server = https://ftp.rnl.tecnico.ulisboa.pt/pub/archlinux/$repo/os/$arch
Server = https://mirrors.dotsrc.org/archlinux/$repo/os/$arch
Server = https://archlinux.cs.nycu.edu.tw/$repo/os/$arch
Server = https://ftp.lysator.liu.se/pub/archlinux/$repo/os/$arch
Server = https://mirror.ams1.nl.leaseweb.net/archlinux/$repo/os/$arch

View file

@ -0,0 +1 @@
Server = https://raw.githubusercontent.com/parchlinux/pcp/main/x86_64/

View file

@ -0,0 +1 @@
Server = https://raw.githubusercontent.com/parchlinux/ppr/main/x86_64/

View file

@ -0,0 +1,14 @@
post_install() {
cp etc/pacman.conf.parch etc/pacman.conf
cp etc/pacman.d/mirrorlist.parch etc/pacman.d/mirrorlist
cp etc/pacman.d/pcp-mirrorlist.parch etc/pacman.d/pcp-mirrorlist
cp etc/pacman.d/ppr-mirrorlist.parch etc/pacman.d/ppr-mirrorlist
cp etc/pacman.d/ptr-mirrorlist.parch etc/pacman.d/ptr-mirrorlist
rm /etc/pacman.d/*.parch
rm /etc/pacman.conf.parch
}
post_upgrade() {
post_install
}