No description
Find a file
damfle 7a38cd809c
Some checks failed
Build and Deploy Arch Linux Packages / detect-packages (push) Has been cancelled
Build and Deploy Arch Linux Packages / build-packages (push) Has been cancelled
Build and Deploy Arch Linux Packages / deploy (push) Has been cancelled
fix(ci): changes detection
2025-10-09 18:22:09 +02:00
.github fix(ci): changes detection 2025-10-09 18:22:09 +02:00
mkinitcpio-install-tools@6477de819e feat: add submodules 2025-10-09 18:15:29 +02:00
mkinitcpio-sd-zfs-poscat@77001f05c9 feat: add submodules 2025-10-09 18:15:29 +02:00
pacman-zfs-hook@4eec6b3781 feat: add submodules 2025-10-09 18:15:29 +02:00
patches init: initial commit 2025-10-09 18:13:50 +02:00
shh@b232b1d236 feat: add submodules 2025-10-09 18:15:29 +02:00
uboot-rk1 init: initial commit 2025-10-09 18:13:50 +02:00
zfs-dkms@5e4471c6f1 feat: add submodules 2025-10-09 18:15:29 +02:00
zfs-utils@e79fa02f5d feat: add submodules 2025-10-09 18:15:29 +02:00
.gitignore init: initial commit 2025-10-09 18:13:50 +02:00
.gitmodules feat: add submodules 2025-10-09 18:15:29 +02:00
README.md init: initial commit 2025-10-09 18:13:50 +02:00

Damfle Arch Linux Packages

A modern, automated repository for custom Arch Linux packages with intelligent cross-compilation support and multi-architecture builds.

Build Status

Features

  • 🎯 Intelligent Change Detection - Only builds packages that have changed
  • 🔧 Cross-Compilation Support - Automatic aarch64 cross-compilation
  • 📦 Multi-Architecture - Supports x86_64, aarch64, and any-arch packages
  • Parallel Builds - Matrix builds for different architectures
  • 🛡️ Resilient CI - Failed packages don't block successful ones
  • 🧪 Testable Scripts - Standalone bash scripts for easy local testing
  • 📂 Modular Architecture - Environment-specific configuration files
  • 🩹 Automatic Patching - Patches applied after submodule checkout

Available Packages

Package Architecture Description
mkinitcpio-install-tools x86_64 Build an initramfs that can bootstrap Arch
mkinitcpio-sd-zfs-poscat any Systemd-based mkinitcpio hooks for ZFS
pacman-zfs-hook x86_64 Pacman Hook to create ZFS Snapshots on transactions
shh x86_64 Automatic systemd service hardening guided by strace
uboot-rk1 aarch64 U-Boot for TuringPi RK1
zfs-dkms any Kernel modules for the Zettabyte File System
zfs-utils x86_64 + aarch64 Userspace utilities for the Zettabyte File System

Note: Packages marked with + are built for multiple architectures automatically.

Repository Usage

Adding to pacman.conf

Add the following to your /etc/pacman.conf:

[damfle]
Server = https://damfle.github.io/archlinux-packages/$repo/$arch
SigLevel = Optional TrustAll

Installing Packages

# Update package database
sudo pacman -Sy

# Install ZFS packages
sudo pacman -S zfs-dkms zfs-utils

# Install system hardening tool
sudo pacman -S shh

# Install U-Boot for TuringPi RK1 (aarch64 only)
sudo pacman -S uboot-rk1

Architecture Support

The repository automatically builds packages for appropriate architectures:

Architecture Build Method Use Case
any Native on x86_64 Architecture-independent packages
x86_64 Native Standard x86_64 packages
aarch64 Cross-compilation ARM64/AArch64 packages

Supported combinations:

  • Single-arch: [uboot-rk1, aarch64]
  • Multi-arch: [zfs-utils, x86_64] + [zfs-utils, aarch64]
  • Any-arch: [zfs-dkms, any]

Repository Structure

├── .github/
│   ├── actions/
│   │   ├── build-package/
│   │   │   ├── arch/                    # Architecture-specific environments
│   │   │   │   ├── x86_64.env          # Native x86_64 build environment
│   │   │   │   ├── aarch64.env         # Cross-compilation environment
│   │   │   │   └── any.env             # Any-arch build environment
│   │   │   ├── action.yml              # GitHub Action interface
│   │   │   ├── arch-detect.sh          # Architecture detection logic
│   │   │   └── build.sh               # Main build script
│   │   └── detect-changes/
│   │       ├── action.yml              # GitHub Action interface
│   │       └── detect-changes.sh       # Change detection script
│   └── workflows/
│       └── build-and-deploy.yml        # Main CI/CD pipeline
├── patches/                             # Package patches applied after checkout
│   └── README.md                       # Patch documentation and conventions
├── mkinitcpio-install-tools/           # AUR submodule
├── mkinitcpio-sd-zfs-poscat/          # AUR submodule
├── pacman-zfs-hook/                    # AUR submodule
├── shh/                                # AUR submodule
├── uboot-rk1/                          # Custom package
├── zfs-dkms/                           # AUR submodule
└── zfs-utils/                          # AUR submodule

Development

Architecture System

The build system uses modular environment files for different architectures:

# Architecture detection
source .github/actions/build-package/arch-detect.sh
setup_build_environment "aarch64"

# Manual environment loading
source .github/actions/build-package/arch/aarch64.env

Local Testing

Test package detection:

# Test detecting all packages
./.github/actions/detect-changes/detect-changes.sh true workflow_dispatch

# Test specific change detection
./.github/actions/detect-changes/detect-changes.sh false push

Test package builds with Docker:

# Cross-compile aarch64 package
docker run --rm -v $(pwd):/workspace -w /workspace archlinux:latest \
  /workspace/.github/actions/build-package/build.sh uboot-rk1 aarch64

# Native x86_64 build
docker run --rm -v $(pwd):/workspace -w /workspace archlinux:latest \
  /workspace/.github/actions/build-package/build.sh zfs-utils x86_64

Cross-Compilation Details

aarch64 packages use the following toolchain:

  • aarch64-linux-gnu-gcc - Cross-compiler
  • aarch64-linux-gnu-binutils - Cross-binutils
  • Environment variables: CROSS_COMPILE, CC, CXX, AR, etc.

x86_64 packages build natively with system compilers.

any packages build natively and work on all architectures.

Patch System

The repository supports automatic patch application for package customization:

# Create a patch (from repository root)
cd package-name/
# Make your changes to PKGBUILD or other files...
cd ..
git diff package-name/ > patches/package-name-fix-description.patch

# Test patch application
patch -p1 --dry-run < patches/package-name-fix-description.patch

Patch naming convention: <package-name>-<description>.patch

Automatic application:

  • Patches are applied after submodule checkout
  • Applied before makepkg build process
  • Failed patches will cause build failure
  • Patch changes automatically trigger package rebuilds

CI/CD Pipeline

The GitHub Actions workflow:

  1. detect-packages - Analyzes changes and generates build matrix
  2. build-packages - Builds each package+architecture combination in parallel
  3. deploy - Creates repository databases and deploys to GitHub Pages

Manual Triggers

Use GitHub's "Run workflow" button to:

  • Build all packages: Set build_all to true
  • Build only changed: Leave build_all as false

Repository URLs

Contributing

  1. Fork this repository
  2. Make changes to package directories or add new packages
  3. Submit a pull request

For new packages:

  • Add PKGBUILD with appropriate arch=() declaration
  • Ensure it builds for supported architectures only: any, x86_64, aarch64
  • Test locally using the provided scripts

For AUR packages:

  • Add as git submodules: git submodule add https://aur.archlinux.org/package-name.git

For package patches:

  • Create patches in the patches/ directory
  • Use naming convention: <package-name>-<description>.patch
  • Create patches from repository root: git diff package-name/ > patches/package-name-fix.patch
  • Test patches: patch -p1 --dry-run < patches/package-name-fix.patch

The CI will automatically detect changes and build appropriate packages for each architecture.

Package Maintenance

Each package directory contains:

  • PKGBUILD - Package build script (from AUR or custom)
  • Additional files as needed by the package

AUR packages are managed as git submodules and automatically sync with upstream.

Custom packages (like uboot-rk1) are maintained directly in this repository.

License

This repository structure and build system are provided as-is. Individual packages maintain their original licenses as specified in their respective PKGBUILDs.