Verified Commit 44905a2b authored by A. Wilcox's avatar A. Wilcox 🦊
Browse files

Better organisation of package lists and post scripts

parent 0f4eabe1
#!/bin/sh -e
def_arch=$(uname -m)
declare -r PROGNAME=$(basename $0)
......@@ -143,9 +143,9 @@ clean_dirs() {
install_pkgs() {
header "Installing base system to squash root..."
declare -r PACKAGES=$(cat packages 2>/dev/null || fatal 'No core packages specified')
declare -r ARCH_PKGS=$(cat packages-$ARCH 2>/dev/null || echo '')
declare -r KIND_PKGS=$(cat packages-$KIND 2>/dev/null || echo '')
declare -r PACKAGES=$(cat packages/base 2>/dev/null || fatal 'No core packages specified')
declare -r ARCH_PKGS=$(cat packages/arch/$ARCH 2>/dev/null || echo '')
declare -r KIND_PKGS=$(cat packages/kind/$KIND 2>/dev/null || echo '')
mkdir -p squashroot-$ARCH/etc/apk/keys
cp '' squashroot-$ARCH/etc/apk/keys/
......@@ -183,12 +183,11 @@ make_structure() {
if [ -f services-$KIND ]; then
for service in $(cat services-$KIND 2>/dev/null || echo ''); do
ln -s /etc/init.d/$service \
for service in $(cat services/base 2>/dev/null || echo '')
$(cat services/kind/$KIND 2>/dev/null || echo ''); do
ln -s /etc/init.d/$service \
cat >squashroot-$ARCH/etc/fstab <<- FSTAB
# Welcome to Adélie Linux.
......@@ -308,9 +307,14 @@ make_initrd() {
prepare_cdroot() {
if test -f post-$; then
if test -f post/arch/$; then
header 'Running architecture-specific scripts...'
sh post-$
sh post/arch/$
if test -f post/kind/$; then
header "Running $KIND script..."
sh post/kind/$
header 'Adding kernel...'
......@@ -89,10 +89,10 @@ is not specified.
Kinds are a specific set of packages and optional startup scripts that define
a specific 'kind' of CD image. Official Kinds include Horizon, KDE Live, and
MATE Live. You can specify your own by creating a
.Pa packages-$KIND
.Pa packages/kind/$KIND
file containing the names of packages you wish (one per line). Additionally,
you may optionally create a
.Pa services-$KIND
.Pa services/kind/$KIND
file containing the names of services to start up in the default runlevel (one
per line).
......@@ -120,7 +120,7 @@ A list of additional parameters to provide to
when generating the ISO image for the specified architecture. This is used to
specify the correct layout for bootable discs on that architecture.
.It Pa packages-$ARCH
.It Pa packages/arch/$ARCH
A list of architecture-specific packages to install on the created media, in
addition to the default packages installed on every architecture. This is
typically used for bootloaders and firmware manipulation packages. It can also
......@@ -130,7 +130,7 @@ or
.Xr strace 1
and so on) on architectures that are still experimental.
.It Pa post-$
.It Pa post/arch/$
If this file exists and is executable, it will be run just before
.Xr mkisofs 8
to do any final preparation to the disc root before creating the image.
......@@ -140,7 +140,7 @@ adelie-build-cd -a x86_64
LDARCH=powerpc adelie-build-cd -a ppc
EXTRA_MIRROR=i525 LDARCH=i386 SIGNING_KEY=/etc/portage/adelie.key ./build-cd -a x86
LDARCH=i386 SIGNING_KEY=/etc/portage/adelie.key ./adelie-build-cd -a pmmx
.Xr mksquashfs 1 ,
.Xr apk 8 ,
No preview for this file type
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment