feat: add arch imag
Some checks failed
ci/woodpecker/push/arch-docker Pipeline failed

This commit is contained in:
Jef Roosens 2023-02-16 14:33:39 +01:00
parent e4d3efb47f
commit d5c3194587
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
8 changed files with 128 additions and 0 deletions

View file

@ -0,0 +1 @@
Server = http://mirrors.xtom.com/archlinux/$repo/os/$arch

View file

@ -0,0 +1 @@
Server = http://mirror.archlinuxarm.org/$arch/$repo

31
arch/files/pacstrap-docker Executable file
View file

@ -0,0 +1,31 @@
#!/bin/bash
out() { printf "$1 $2\n" "${@:3}"; }
error() { out "==> ERROR:" "$@"; } >&2
die() { error "$@"; exit 1; }
(( $# )) || die "No root directory specified"
newroot=$1; shift
pacman_args=("${@:-base}")
if [[ $EUID -ne 0 ]]; then
die "This script must be run as root"
fi
[[ -d $newroot ]] || die "%s is not a directory" "$newroot"
echo 'Creating install root at %s' "$newroot"
mkdir -m 0755 -p "$newroot"/var/{cache/pacman/pkg,lib/pacman,log} "$newroot"/{dev,run,etc}
mkdir -m 1777 -p "$newroot"/tmp
mkdir -m 0555 -p "$newroot"/{sys,proc}
echo 'Creating /dev/null in new root'
mknod "$newroot/dev/null" c 1 3
echo 'Installing packages to %s' "$newroot"
if ! pacman -r "$newroot" -Sy --noconfirm "${pacman_args[@]}"; then
die 'Failed to install packages to new root'
fi
echo 'Deleting /dev/null from new root'
rm "$newroot/dev/null"

8
arch/files/repos-amd64 Normal file
View file

@ -0,0 +1,8 @@
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
[community]
Include = /etc/pacman.d/mirrorlist

14
arch/files/repos-arm64 Normal file
View file

@ -0,0 +1,14 @@
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
[community]
Include = /etc/pacman.d/mirrorlist
[alarm]
Include = /etc/pacman.d/mirrorlist
[aur]
Include = /etc/pacman.d/mirrorlist