appliance/kmod.whitelist
appliance/libguestfs-supermin-helper
appliance/make.sh
+appliance/packagelist
appliance/supermin-make.sh
appliance/supermin-split.sh
appliance/supermin.incfiles
make.sh update.sh supermin-split.sh supermin-make.sh \
libguestfs-supermin-helper \
kmod.whitelist \
- kmod.whitelist.in
+ kmod.whitelist.in \
+ packagelist.in
# Build the root filesystem (appliance).
# Currently this is arch-dependent, so it seems like putting it in
# This is for building the normal appliance:
$(INITRAMFSIMG) $(VMLINUZ): $(top_builddir)/initramfs/fakeroot.log
-$(top_builddir)/initramfs/fakeroot.log: make.sh kmod.whitelist
+$(top_builddir)/initramfs/fakeroot.log: make.sh kmod.whitelist packagelist
-mv $(INITRAMFSIMG) $(INITRAMFSIMG).bak
-mv $(VMLINUZ) $(VMLINUZ).bak
if ! bash make.sh; then rm -f $@; exit 1; fi
kmod.whitelist: kmod.whitelist.in
grep -v '^[[:space:]]*$$' < $< | grep -v '^#' > $@
+packagelist: packagelist.in
+ cpp -undef -DREDHAT=1 < $< | \
+ grep -v '^[[:space:]]*$$' | grep -v '^#' > $@
+
# This is for building the supermin appliance. It has to be enabled
# specifically with './configure --enable-supermin'. You really need
# to read the README file.
cd @top_builddir@
-modules="
--i augeas-libs
--i bash
--i binutils
--i coreutils
--i dosfstools
--i file
--i grub
--i iputils
--i kernel
--i lvm2
--i MAKEDEV
--i module-init-tools
--i net-tools
--i ntfs-3g
--i ntfsprogs
--i procps
--i strace
--i util-linux-ng
--i zerofree
-"
-
# Decide on names for the final output. These have to match Makefile.am.
output=appliance/initramfs.@REPO@.@host_cpu@.img
koutput=appliance/vmlinuz.@REPO@.@host_cpu@
rm -f $koutput
# Create the basic initramfs.
-@FEBOOTSTRAP@ $modules -u @UPDATES@ @REPO@ initramfs @MIRROR@
+exec 5<appliance/packagelist
+packages=
+while read pkg 0<&5; do
+ packages="$packages -i $pkg"
+done
+exec 5<&-
+
+@FEBOOTSTRAP@ $packages -u @UPDATES@ @REPO@ initramfs @MIRROR@
# /sysroot is where the guest root filesystem will be mounted.
@FEBOOTSTRAP_RUN@ initramfs -- mkdir -p --mode=0777 /sysroot
--- /dev/null
+/* This is the list of distro packages which are
+ * installed on the appliance.
+ *
+ * This file is processed by cpp with one of the
+ * following symbols defined (depending on the distro):
+ *
+ * REDHAT=1 For Fedora, RHEL, EPEL and workalikes.
+ */
+
+augeas-libs
+bash
+binutils
+coreutils
+dosfstools
+file
+grub
+iputils
+kernel
+lvm2
+MAKEDEV
+module-init-tools
+net-tools
+ntfs-3g
+ntfsprogs
+procps
+strace
+util-linux-ng
+zerofree