summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2017-10-16 21:06:07 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2017-11-19 21:46:11 -0500
commit4ba74645423192072cb2c603a261d89081f3a4e7 (patch)
tree2768bb43674bc2a232d7eb2e1056747c74092342 /configs
parentaffa6e70a9da9b4538f85141e604e2189a175e0a (diff)
add options to specify iso edition and pacman.conf
Diffstat (limited to 'configs')
-rwxr-xr-xconfigs/profile/build.sh37
-rw-r--r--configs/profile/packages.i6860
-rw-r--r--configs/profile/packages.x86_641
-rw-r--r--configs/profile/packages/packages-cli.both2
-rw-r--r--configs/profile/packages/packages-systemd.both (renamed from configs/profile/packages.both)4
-rw-r--r--configs/profile/packages/packages-systemd.i6863
-rw-r--r--configs/profile/packages/packages-systemd.x86_645
7 files changed, 42 insertions, 10 deletions
diff --git a/configs/profile/build.sh b/configs/profile/build.sh
index fe2bdfb..830a760 100755
--- a/configs/profile/build.sh
+++ b/configs/profile/build.sh
@@ -3,8 +3,9 @@
set -e -u
# edition-specific strings
-iso_edition="SystemD/CLI"
-iso_title="Parabola GNU/Linux-libre Live - ${iso_edition} Edition" # $iso_version appended
+iso_edition="SystemD/CLI" # default init/wm pair
+iso_title="Parabola GNU/Linux-libre Live" # $iso_edition and $iso_version appended
+base_group='base' # default base package group
# CLI option defaults
archs='i686 x86_64'
@@ -25,6 +26,7 @@ chroot_customization_script=/root/customize_root_image.sh
data_dir=/usr/share/parabolaiso/data
releng_dir=$(readlink -f ${0%/*})
initcpio_dir=${releng_dir}/../../parabolaiso/initcpio
+packages_dir=${releng_dir}/packages
[ "`which mkparabolaiso 2> /dev/null`" ] || export PATH=$PATH:"${releng_dir}/../../parabolaiso"
@@ -33,6 +35,8 @@ _usage ()
echo "usage ${0} [options]"
echo
echo " General options:"
+ echo " -E <iso_edition> Release edition (init/WM pair e.g. 'SystemD/CLI')"
+ echo " Default: ${iso_edition}"
echo " -T <iso_arch> Target architecture (one of 'i686', 'x86_64', or 'dual')"
echo " Default: ${iso_arch}"
echo " -V <iso_version> Set the iso version in the filename"
@@ -43,6 +47,8 @@ _usage ()
echo " Default: ${iso_dirname}"
echo " -O Enable offline install."
echo " Default: '${enable_offline_install}'"
+ echo " -C Specify the pacman.conf file used for chroot install."
+ echo " Default: '${pacman_conf}'"
echo " -w <work_dir> Set the working directory"
echo " Default: ${work_dir}"
echo " -o <out_dir> Set the output directory"
@@ -68,13 +74,14 @@ make_pacman_conf() {
# Base installation, plus needed packages (root-image)
make_basefs() {
- setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} -C ${pacman_conf} -D ${iso_dirname} init
+ setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} -C ${pacman_conf} -D ${iso_dirname} -B ${base_group} init
setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} -C ${pacman_conf} -D ${iso_dirname} -p "memtest86+ mkinitcpio-nfs-utils nbd" install
}
# Additional packages (root-image)
make_packages() {
- setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} -C ${pacman_conf} -D ${iso_dirname} -p "$(grep -h -v ^# ${releng_dir}/packages.{both,${arch}})" install
+ packages=$(grep -h -v ^# ${packages_dir}/packages-{${iso_init},${iso_gui},${iso_wm}}.{both,${arch}} 2> /dev/null || true)
+ setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} -C ${pacman_conf} -D ${iso_dirname} -p "${packages}" install
# create live environment local repo
if [[ "$enable_offline_install" == 'true' ]]; then
@@ -105,6 +112,8 @@ make_customize_root_image() {
echo "Customizing root image"
iso_title="${iso_title}" \
+ iso_init="${iso_init}" \
+ iso_wm="${iso_wm}" \
enable_offline_install="${enable_offline_install}" \
setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} \
-C ${pacman_conf} \
@@ -249,8 +258,6 @@ make_prepare() {
# Build ISO
make_iso() {
- iso_filename=$(echo $iso_filename | tr '[:upper:]/' '[:lower:]-' | sed 's/\s//g')
-
mkparabolaiso ${verbose} -w ${work_dir} -D ${iso_dirname} checksum
mkparabolaiso ${verbose} -w ${work_dir} -D ${iso_dirname} -L ${iso_label} -o ${out_dir} iso ${iso_filename}
}
@@ -259,13 +266,15 @@ make_iso() {
## prepare state ##
# set CLI options
-while getopts 'T:V:L:D:Ow:o:vh' arg; do
+while getopts 'E:T:V:L:D:OC:w:o:vh' arg; do
case "${arg}" in
+ E) iso_edition="${OPTARG}" ;;
T) target="${OPTARG}" ;;
V) iso_version="${OPTARG}" ;;
L) iso_label="${OPTARG}" ;;
D) iso_dirname="${OPTARG}" ;;
O) enable_offline_install='true' ;;
+ C) pacman_conf="${OPTARG}" ;;
w) work_dir="${OPTARG}" ;;
o) out_dir="${OPTARG}" ;;
v) verbose="-v" ;;
@@ -295,9 +304,13 @@ else
iso_arch="${iso_arch}-netinstall"
launch_msg="${launch_msg} (net-install only)"
fi
-[ "${archs}" == 'i686' ] && arch='i686' || arch='x86_64'
+iso_title="${iso_title}${iso_edition} Edition ${iso_version}"
iso_filename="parabola-${iso_edition}-${iso_arch}-${iso_version}.iso"
-iso_title="${iso_title} ${iso_version}"
+iso_filename=$(echo ${iso_filename} | tr '[:upper:]/' '[:lower:]-')
+iso_init=$(echo ${iso_edition} | cut -d '/' -f 1 | tr '[:upper:]' '[:lower:]')
+iso_wm=$( echo ${iso_edition} | cut -d '/' -f 2 | tr '[:upper:]' '[:lower:]')
+[[ "${iso_wm}" == 'cli' ]] && iso_gui='' || iso_gui='gui'
+[[ "${archs}" == 'i686' ]] && arch='i686' || arch='x86_64'
## sanity checks ##
@@ -305,6 +318,9 @@ iso_title="${iso_title} ${iso_version}"
# sanitize paths
iso_label=${iso_label// /}
iso_dirname=${iso_dirname// /}
+iso_filename=${iso_filename// /}
+iso_init=${iso_init// /}
+iso_wm=${iso_wm// /}
work_dir=${work_dir// /}
out_dir=${out_dir// /}
pacman_conf=${pacman_conf// /}
@@ -322,6 +338,9 @@ elif ! pacman --version | grep libalpm > /dev/null; then
elif ! pacman -Qi parabolaiso-data > /dev/null; then
echo "This script needs the 'parabolaiso-data' package to be installed."
exit 1
+elif ! ls ${packages_dir}/packages-{${iso_init},${iso_wm}}.both > /dev/null; then
+ echo "Invalid init/wm combination: '${iso_edition}'."
+ exit 1
fi
# detect previously completed build
diff --git a/configs/profile/packages.i686 b/configs/profile/packages.i686
deleted file mode 100644
index e69de29..0000000
--- a/configs/profile/packages.i686
+++ /dev/null
diff --git a/configs/profile/packages.x86_64 b/configs/profile/packages.x86_64
deleted file mode 100644
index 804cc93..0000000
--- a/configs/profile/packages.x86_64
+++ /dev/null
@@ -1 +0,0 @@
-refind-efi
diff --git a/configs/profile/packages/packages-cli.both b/configs/profile/packages/packages-cli.both
new file mode 100644
index 0000000..f3fc35e
--- /dev/null
+++ b/configs/profile/packages/packages-cli.both
@@ -0,0 +1,2 @@
+# this file specifies the packages that are to be installed in all CLI live environments
+# regardless of the init system and graphical environment
diff --git a/configs/profile/packages.both b/configs/profile/packages/packages-systemd.both
index efb0573..8c600a3 100644
--- a/configs/profile/packages.both
+++ b/configs/profile/packages/packages-systemd.both
@@ -1,3 +1,7 @@
+# this file specifies the packages that are to be installed
+# in all SystemD live environments, regardless of the graphical environment
+# these packages are not to be installed with other init systems
+
arch-install-scripts
btrfs-progs
crda
diff --git a/configs/profile/packages/packages-systemd.i686 b/configs/profile/packages/packages-systemd.i686
new file mode 100644
index 0000000..a3bd1cd
--- /dev/null
+++ b/configs/profile/packages/packages-systemd.i686
@@ -0,0 +1,3 @@
+# this file specifies the packages that are to be installed
+# only in the SystemD i686 live environment
+# these packages are not to be installed in any other targets
diff --git a/configs/profile/packages/packages-systemd.x86_64 b/configs/profile/packages/packages-systemd.x86_64
new file mode 100644
index 0000000..11db863
--- /dev/null
+++ b/configs/profile/packages/packages-systemd.x86_64
@@ -0,0 +1,5 @@
+# this file specifies the packages that are to be installed
+# only in the SystemD x86_64 live environment
+# these packages are not to be installed in any other targets
+
+refind-efi