diff --git a/extra/bootstrap/apacman-1.9-1-any.pkg.tar.xz b/extra/bootstrap/apacman-1.9-1-any.pkg.tar.xz deleted file mode 100644 index 37272ec..0000000 Binary files a/extra/bootstrap/apacman-1.9-1-any.pkg.tar.xz and /dev/null differ diff --git a/extra/packages.32 b/extra/packages.i686 similarity index 100% rename from extra/packages.32 rename to extra/packages.i686 diff --git a/extra/packages.64 b/extra/packages.x86_64 similarity index 100% rename from extra/packages.64 rename to extra/packages.x86_64 diff --git a/extra/pre-build.d/32/etc/pacman.conf b/extra/pre-build.d/32/etc/pacman.conf deleted file mode 100644 index 308a2ee..0000000 --- a/extra/pre-build.d/32/etc/pacman.conf +++ /dev/null @@ -1,95 +0,0 @@ -# -# /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/ -HoldPkg = pacman glibc -#XferCommand = /usr/bin/curl -C - -f %u > %o -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -#UseDelta = 0.7 -Architecture = i686 - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -UseSyslog -Color -TotalDownload -CheckSpace -VerbosePkgLists - -# 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 #RE-ENABLE ME WHEN A NEW SNAPSHOT IS RELEASED WITH FIXED GPG -SigLevel = Never -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. - -#[testing] -#Include = /etc/pacman.d/mirrorlist - -[core] -Include = /etc/pacman.d/mirrorlist - -[extra] -Include = /etc/pacman.d/mirrorlist - -#[community-testing] -#Include = /etc/pacman.d/mirrorlist - -[community] -Include = /etc/pacman.d/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 - -#[archlinuxfr] -#SigLevel = Never -#Server = http://repo.archlinux.fr/$arch diff --git a/extra/pre-build.d/64/etc/pacman.conf b/extra/pre-build.d/64/etc/pacman.conf deleted file mode 100644 index 6cfaeb0..0000000 --- a/extra/pre-build.d/64/etc/pacman.conf +++ /dev/null @@ -1,104 +0,0 @@ -# -# /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/ -HoldPkg = pacman glibc -#XferCommand = /usr/bin/curl -C - -f %u > %o -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -#UseDelta = 0.7 -Architecture = x86_64 - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -UseSyslog -Color -TotalDownload -CheckSpace -VerbosePkgLists - -# 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 #RE-ENABLE ME WHEN A NEW SNAPSHOT IS RELEASED WITH FIXED GPG -SigLevel = Never -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. - -#[testing] -#Include = /etc/pacman.d/mirrorlist - -[core] -Include = /etc/pacman.d/mirrorlist - -[extra] -Include = /etc/pacman.d/mirrorlist - -#[community-testing] -#Include = /etc/pacman.d/mirrorlist - -[community] -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 - -# 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 - -#[archlinuxfr] -#SigLevel = Never -#Server = http://repo.archlinux.fr/$arch diff --git a/extra/bootstrap/apacman-3.0-1-any.pkg.tar.xz b/extra/pre-build.d/root/apacman-3.0-1-any.pkg.tar.xz similarity index 100% rename from extra/bootstrap/apacman-3.0-1-any.pkg.tar.xz rename to extra/pre-build.d/root/apacman-3.0-1-any.pkg.tar.xz diff --git a/extra/pre-build.d/root/pre-build.sh b/extra/pre-build.d/root/pre-build.sh new file mode 100755 index 0000000..92ac7f8 --- /dev/null +++ b/extra/pre-build.d/root/pre-build.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +# Logging! +exec 3>&1 4>&2 +trap 'exec 2>&4 1>&3' 0 1 2 3 +exec 1>/var/log/chroot_install.log 2>&1 + +cleanPacorigs() +{ + for x in $(find /etc/ -type f -iname "*.pacorig"); + do + mv -f ${x} ${x%%.pacorig} + done +} + +# NetworkManager is a scourge upon the earth that must be purged and cleansed. +ln -s /dev/null /etc/systemd/system/NetworkManager.service +ln -s /dev/null /etc/systemd/system/NetworkManager-dispatcher.service +# Build the keys +pacman-key --init +pacman-key --populate archlinux +pacman-key -r 93481F6B +# Update the mirror cache +pacman -Syy +# Just in case. +cleanPacorigs +# Install some prereqs +pacman -S --noconfirm --needed base syslinux wget rsync unzip jshon sed sudo abs xmlto bc docbook-xsl git +# And get rid of files it wants to replace +cleanPacorigs +# Force update all currently installed packages in case the tarball's out of date +pacman -Syyu --force --noconfirm +# And in case the keys updated... +pacman-key --refresh-keys +cleanPacorigs +# We'll need these. +pacman -S --noconfirm --needed base-devel +cleanPacorigs +# Install apacman +pacman --noconfirm -U /root/apacman*.tar.xz &&\ + mkdir /var/tmp/apacman && chmod 0750 /var/tmp/apacman &&\ + chown root:aurbuild /var/tmp/apacman +cleanPacorigs +apacman -S --noconfirm --noedit --skipinteg -S apacman apacman-deps apacman-utils expac +apacman --gendb +cleanPacorigs +# Install multilib-devel if we're in an x86_64 chroot. +if $(egrep -q '^\[multilib' /etc/pacman.conf); +then + pacman --noconfirm -R gcc-libs libtool + pacman --noconfirm -S --needed multilib-devel + TGT_ARCH='x86_64' +else + TGT_ARCH='i686' +fi +# Install some stuff we need for the ISO. +PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' /root/prereqs/iso.pkgs.both | tr '\n' ' ') +cleanPacorigs +apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST} +apacman --gendb +cleanPacorigs +PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' /root/prereqs/iso.pkgs.${TGT_ARCH} | tr '\n' ' ') + diff --git a/extra/pre-build.d/root/prereqs/iso.pkgs.both b/extra/pre-build.d/root/prereqs/iso.pkgs.both new file mode 100644 index 0000000..d7eba67 --- /dev/null +++ b/extra/pre-build.d/root/prereqs/iso.pkgs.both @@ -0,0 +1,39 @@ +arch-install-scripts +archiso +bzip2 +coreutils +cronie +dhclient +dhcp +dhcpcd +dosfstools +efibootmgr +efitools +efivar +ethtool +file +findutils +iproute2 +iputils +libisoburn +localepurge +lz4 +lzo +lzop +mkinitcpio-nfs-utils +ms-sys +mtools +net-tools +netctl +networkmanager +openssh +openvpn +pv +rsync +sed +shorewall +squashfs-tools +sudo +sysfsutils +syslinux +traceroute diff --git a/extra/pre-build.d/root/prereqs/iso.pkgs.i686 b/extra/pre-build.d/root/prereqs/iso.pkgs.i686 new file mode 100644 index 0000000..7626efb --- /dev/null +++ b/extra/pre-build.d/root/prereqs/iso.pkgs.i686 @@ -0,0 +1 @@ +# This can be used for 32-bit only packages diff --git a/extra/pre-build.d/root/prereqs/iso.pkgs.x86_64 b/extra/pre-build.d/root/prereqs/iso.pkgs.x86_64 new file mode 100644 index 0000000..3d2d993 --- /dev/null +++ b/extra/pre-build.d/root/prereqs/iso.pkgs.x86_64 @@ -0,0 +1 @@ +# This can be used for 64-bit only packages