summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2020-08-01 15:15:21 -0400
committerDavid P <megver83@parabola.nu>2020-08-01 15:15:21 -0400
commitf013f2bc1b1b512c4a44a2046ccb1a2d76a489eb (patch)
treef0ba2f8505352b2bcb60696156f13436d0174359
parentc41c0be2d73c12ef0e02eb6699fffd1dd8d929ca (diff)
sync baseline with archiso v46
Signed-off-by: David P <megver83@parabola.nu>
-rw-r--r--configs/baseline/airootfs/etc/mkinitcpio.conf69
-rw-r--r--configs/baseline/airootfs/etc/mkinitcpio.d/linux-libre.preset11
-rw-r--r--configs/baseline/airootfs/etc/shadow1
-rwxr-xr-xconfigs/baseline/build.sh65
-rw-r--r--configs/baseline/isolinux/isolinux.cfg3
-rw-r--r--configs/baseline/mkinitcpio.conf1
-rw-r--r--configs/baseline/packages.both7
-rw-r--r--configs/baseline/pacman.conf125
-rw-r--r--configs/baseline/syslinux/syslinux.cfg10
9 files changed, 270 insertions, 22 deletions
diff --git a/configs/baseline/airootfs/etc/mkinitcpio.conf b/configs/baseline/airootfs/etc/mkinitcpio.conf
new file mode 100644
index 0000000..9741d17
--- /dev/null
+++ b/configs/baseline/airootfs/etc/mkinitcpio.conf
@@ -0,0 +1,69 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# vim:set ft=sh
+# MODULES
+# The following modules are loaded before any boot hooks are
+# run. Advanced users may wish to specify all system modules
+# in this array. For instance:
+# MODULES=(piix ide_disk reiserfs)
+MODULES=()
+
+# BINARIES
+# This setting includes any additional binaries a given user may
+# wish into the CPIO image. This is run last, so it may be used to
+# override the actual binaries included by a given hook
+# BINARIES are dependency parsed, so you may safely ignore libraries
+BINARIES=()
+
+# FILES
+# This setting is similar to BINARIES above, however, files are added
+# as-is and are not parsed in any way. This is useful for config files.
+FILES=()
+
+# HOOKS
+# This is the most important setting in this file. The HOOKS control the
+# modules and scripts added to the image, and what happens at boot time.
+# Order is important, and it is recommended that you do not change the
+# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
+# help on a given hook.
+# 'base' is _required_ unless you know precisely what you are doing.
+# 'udev' is _required_ in order to automatically load modules
+# 'filesystems' is _required_ unless you specify your fs modules in MODULES
+# Examples:
+## This setup specifies all modules in the MODULES setting above.
+## No raid, lvm2, or encrypted root is needed.
+# HOOKS=(base)
+#
+## This setup will autodetect all modules for your system and should
+## work as a sane default
+# HOOKS=(base udev autodetect block filesystems)
+#
+## This setup will generate a 'full' image which supports most systems.
+## No autodetection is done.
+# HOOKS=(base udev block filesystems)
+#
+## This setup assembles a pata mdadm array with an encrypted root FS.
+## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
+# HOOKS=(base udev block mdadm encrypt filesystems)
+#
+## This setup loads an lvm2 volume group on a usb device.
+# HOOKS=(base udev block lvm2 filesystems)
+#
+## NOTE: If you have /usr on a separate partition, you MUST include the
+# usr, fsck and shutdown hooks.
+HOOKS=(base udev archiso block filesystems)
+
+# COMPRESSION
+# Use this to compress the initramfs image. By default, gzip compression
+# is used. Use 'cat' to create an uncompressed image.
+#COMPRESSION="gzip"
+#COMPRESSION="bzip2"
+#COMPRESSION="lzma"
+#COMPRESSION="xz"
+#COMPRESSION="lzop"
+#COMPRESSION="lz4"
+
+# COMPRESSION_OPTIONS
+# Additional options for the compressor
+#COMPRESSION_OPTIONS=()
diff --git a/configs/baseline/airootfs/etc/mkinitcpio.d/linux-libre.preset b/configs/baseline/airootfs/etc/mkinitcpio.d/linux-libre.preset
new file mode 100644
index 0000000..782d1cd
--- /dev/null
+++ b/configs/baseline/airootfs/etc/mkinitcpio.d/linux-libre.preset
@@ -0,0 +1,11 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# mkinitcpio preset file for the 'linux-libre' package on parabolaiso
+
+PRESETS=('parabolaiso')
+
+ALL_kver='/boot/vmlinuz-linux-libre'
+ALL_config='/etc/mkinitcpio.conf'
+
+parabolaiso_image="/boot/parabolaiso.img"
diff --git a/configs/baseline/airootfs/etc/shadow b/configs/baseline/airootfs/etc/shadow
new file mode 100644
index 0000000..7edfd69
--- /dev/null
+++ b/configs/baseline/airootfs/etc/shadow
@@ -0,0 +1 @@
+root::14871::::::
diff --git a/configs/baseline/build.sh b/configs/baseline/build.sh
index c87abdf..7c117cb 100755
--- a/configs/baseline/build.sh
+++ b/configs/baseline/build.sh
@@ -1,16 +1,18 @@
-#!/bin/bash
+#!/usr/bin/env bash
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
set -e -u
iso_name=parabola
iso_label="PARA_$(date +%Y%m)"
iso_version=$(date +%Y.%m.%d)
-install_dir=parabola
+install_dir=para
arch=$(uname -m)
work_dir=work
out_dir=out
-script_path=$(readlink -f "${0%/*}")
+script_path="$( cd -P "$( dirname "$(readlink -f "$0")" )" && pwd )"
umask 0022
@@ -22,33 +24,57 @@ run_once() {
fi
}
-# Base installation (airootfs)
-make_basefs() {
- mkparabolaiso -v -w "${work_dir}" -D "${install_dir}" init
+# Setup custom pacman.conf with current cache directories.
+make_pacman_conf() {
+ local _cache_dirs
+ _cache_dirs=("$(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')")
+ sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n "${_cache_dirs[@]}")|g" \
+ "${script_path}/pacman.conf" > "${work_dir}/pacman.conf"
}
-# Copy mkinitcpio parabolaiso hooks and build initramfs (airootfs)
-make_setup_mkinitcpio() {
- mkdir -p "${work_dir}/airootfs/etc/initcpio/hooks"
- mkdir -p "${work_dir}/airootfs/etc/initcpio/install"
- cp /usr/lib/initcpio/hooks/parabolaiso "${work_dir}/airootfs/etc/initcpio/hooks"
- cp /usr/lib/initcpio/install/parabolaiso "${work_dir}/airootfs/etc/initcpio/install"
- cp "${script_path}/mkinitcpio.conf" "${work_dir}/airootfs/etc/mkinitcpio-parabolaiso.conf"
- mkparabolaiso -v -w "${work_dir}" -D "${install_dir}" \
- -r 'mkinitcpio -c /etc/mkinitcpio-parabolaiso.conf -k /boot/vmlinuz-linux -g /boot/parabolaiso.img' run
+# Prepare working directory and copy custom airootfs files (airootfs)
+make_custom_airootfs() {
+ local _airootfs="${work_dir}/airootfs"
+ mkdir -p -- "${_airootfs}"
+
+ if [[ -d "${script_path}/airootfs" ]]; then
+ cp -af --no-preserve=ownership -- "${script_path}/airootfs/." "${_airootfs}"
+ [[ -e "${_airootfs}/etc/shadow" ]] && chmod -f 0400 -- "${_airootfs}/etc/shadow"
+ [[ -e "${_airootfs}/etc/gshadow" ]] && chmod -f 0400 -- "${_airootfs}/etc/gshadow"
+
+ # Set up user home directories and permissions
+ if [[ -e "${_airootfs}/etc/passwd" ]]; then
+ while IFS=':' read -a passwd -r; do
+ [[ "${passwd[5]}" == '/' ]] && continue
+
+ if [[ -d "${_airootfs}${passwd[5]}" ]]; then
+ chown -hR -- "${passwd[2]}:${passwd[3]}" "${_airootfs}${passwd[5]}"
+ chmod -f 0750 -- "${_airootfs}${passwd[5]}"
+ else
+ install -d -m 0750 -o "${passwd[2]}" -g "${passwd[3]}" -- "${_airootfs}${passwd[5]}"
+ fi
+ done < "${_airootfs}/etc/passwd"
+ fi
+ fi
+}
+
+# Packages (airootfs)
+make_packages() {
+ mkparabolaiso -v -w "${work_dir}" -C "${work_dir}/pacman.conf" -D "${install_dir}" \
+ -p "$(grep -h -v '^#' "${script_path}/packages.both"| sed ':a;N;$!ba;s/\n/ /g')" install
}
# Prepare ${install_dir}/boot/
make_boot() {
mkdir -p "${work_dir}/iso/${install_dir}/boot/${arch}"
cp "${work_dir}/airootfs/boot/parabolaiso.img" "${work_dir}/iso/${install_dir}/boot/${arch}/parabolaiso.img"
- cp "${work_dir}/airootfs/boot/vmlinuz-linux" "${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz"
+ cp "${work_dir}/airootfs/boot/vmlinuz-linux-libre" "${work_dir}/iso/${install_dir}/boot/${arch}/"
}
# Prepare /${install_dir}/boot/syslinux
make_syslinux() {
mkdir -p "${work_dir}/iso/${install_dir}/boot/syslinux"
- sed "s|%PARABOLAISO_LABEL%|${iso_label}|g;
+ sed "s|%parabolaiso_LABEL%|${iso_label}|g;
s|%INSTALL_DIR%|${install_dir}|g;
s|%ARCH%|${arch}|g" "${script_path}/syslinux/syslinux.cfg" > \
"${work_dir}/iso/${install_dir}/boot/syslinux/syslinux.cfg"
@@ -78,8 +104,9 @@ make_iso() {
"${iso_name}-${iso_version}-${arch}.iso"
}
-run_once make_basefs
-run_once make_setup_mkinitcpio
+run_once make_custom_airootfs
+run_once make_pacman_conf
+run_once make_packages
run_once make_boot
run_once make_syslinux
run_once make_isolinux
diff --git a/configs/baseline/isolinux/isolinux.cfg b/configs/baseline/isolinux/isolinux.cfg
index 33e8b65..e078ce3 100644
--- a/configs/baseline/isolinux/isolinux.cfg
+++ b/configs/baseline/isolinux/isolinux.cfg
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
PATH /%INSTALL_DIR%/boot/syslinux/
DEFAULT loadconfig
diff --git a/configs/baseline/mkinitcpio.conf b/configs/baseline/mkinitcpio.conf
deleted file mode 100644
index 279eccb..0000000
--- a/configs/baseline/mkinitcpio.conf
+++ /dev/null
@@ -1 +0,0 @@
-HOOKS=(base udev archiso block filesystems)
diff --git a/configs/baseline/packages.both b/configs/baseline/packages.both
new file mode 100644
index 0000000..495a6cb
--- /dev/null
+++ b/configs/baseline/packages.both
@@ -0,0 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+base
+linux
+mkinitcpio
+mkinitcpio-parabolaiso
+syslinux
diff --git a/configs/baseline/pacman.conf b/configs/baseline/pacman.conf
new file mode 100644
index 0000000..2de1d4f
--- /dev/null
+++ b/configs/baseline/pacman.conf
@@ -0,0 +1,125 @@
+#
+# /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 -C - -f %u > %o
+#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
+#CleanMethod = KeepInstalled
+#UseDelta = 0.7
+Architecture = auto
+
+# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
+#IgnorePkg =
+#IgnoreGroup =
+
+#NoUpgrade =
+#NoExtract =
+
+# Misc options
+#UseSyslog
+#Color
+#TotalDownload
+# We cannot check disk space from within a chroot environment
+#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
+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 Arch/Parabola packagers
+# with `pacman-key --populate archlinux` and `pacman-key --populate parabola`.
+
+#
+# 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.
+
+#[libre-testing]
+#Include = /etc/pacman.d/mirrorlist
+
+[libre]
+Include = /etc/pacman.d/mirrorlist
+
+#[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
+
+#[pcr-testing]
+#Include = /etc/pacman.d/mirrorlist
+
+[pcr]
+Include = /etc/pacman.d/mirrorlist
+
+# If you want to run 32 bit applications on your x86_64 system,
+# enable the libre-multilib, multilib and pcr-multilib repositories as required here.
+
+#[libre-multilib-testing]
+#Include = /etc/pacman.d/mirrorlist
+
+#[libre-multilib]
+#Include = /etc/pacman.d/mirrorlist
+
+#[multilib-testing]
+#Include = /etc/pacman.d/mirrorlist
+
+#[multilib]
+#Include = /etc/pacman.d/mirrorlist
+
+#[pcr-multilib-testing]
+#Include = /etc/pacman.d/mirrorlist
+
+#[pcr-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
diff --git a/configs/baseline/syslinux/syslinux.cfg b/configs/baseline/syslinux/syslinux.cfg
index 2243164..3f7a85d 100644
--- a/configs/baseline/syslinux/syslinux.cfg
+++ b/configs/baseline/syslinux/syslinux.cfg
@@ -1,9 +1,15 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
UI boot/syslinux/menu.c32
MENU TITLE Parabola GNU/Linux-libre
MENU CLEAR
-LABEL arch
+DEFAULT parabola
+TIMEOUT 30
+
+LABEL parabola
MENU LABEL Parabola GNU/Linux-libre
-LINUX boot/%ARCH%/vmlinuz
+LINUX boot/%ARCH%/vmlinuz-linux-libre
INITRD boot/%ARCH%/parabolaiso.img
APPEND parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL%