From ef89b8a29f84db65cdd8fbcf0049911cd80ed5a2 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 14 Oct 2007 22:07:19 -0500 Subject: Make mkarchiso a bit more KISS Remove the need for a configuration file. Some of the command line options had to be switched up a bit in order to do this. Also simplify the package list- only one package list is needed, not a directory, and additional packages can be specified on the command line. Signed-off-by: Dan McGee --- mkarchiso | 57 +++++++---------------- mkarchiso.conf | 11 ----- packages.list | 119 ++++++++++++++++++++++++++++++++++++++++++++++++ packages/ARCH.modules | 5 -- packages/base.packages | 91 ------------------------------------ packages/other.packages | 0 testiso | 0 7 files changed, 136 insertions(+), 147 deletions(-) delete mode 100644 mkarchiso.conf create mode 100644 packages.list delete mode 100644 packages/ARCH.modules delete mode 100644 packages/base.packages delete mode 100644 packages/other.packages mode change 100644 => 100755 testiso diff --git a/mkarchiso b/mkarchiso index 5ca511e..cb314cb 100755 --- a/mkarchiso +++ b/mkarchiso @@ -1,8 +1,9 @@ #!/bin/sh -CONFIG="$(pwd)/mkarchiso.conf" CPIOCONFIG="$(pwd)/archiso-mkinitcpio.conf" DEF_CONFIG_DIR="$(pwd)/default-config" +PKGFILE="$(pwd)/packages.list" +PKGLIST="" QUIET="y" FORCE="n" @@ -10,8 +11,6 @@ command_name="" work_dir="" isoname="" -PKGDIR="$(pwd)" - APPNAME=$(basename "${0}") # usage: usage @@ -19,12 +18,12 @@ usage () { echo "usage ${APPNAME} [options] command " echo " general options:" - echo " -c CONFIG Use CONFIG file. default: ${CONFIG}" - echo " -i CPIO_CONFIG Use CONFIG file for mkinitcpio. default: ${CPIOCONFIG}" - echo " -p PKGFILE_DIR Look for package list files in DIR. default: ${PKGDIR}" echo " -f Force overwrite of working files/squashfs image/iso" - echo " -v Verbose output. Default: no" - echo " -h This message" + echo " -i CPIO_CONFIG Use CONFIG file for mkinitcpio. default: ${CPIOCONFIG}" + echo " -P PKGFILE File with list of packages to install. default: ${PKGFILE}" + echo " -p PACKAGE Additional package to install, can be used multiple times" + echo " -v Enable verbose output." + echo " -h This message." echo " commands:" echo " install : where to build the ISO root" echo " squash : generate a squashfs image of the ISO root" @@ -33,11 +32,11 @@ usage () exit $1 } -while getopts 'c:i:p:fvh' arg; do +while getopts 'i:P:p:fvh' arg; do case "${arg}" in - c) CONFIG="${OPTARG}" ;; i) CPIOCONFIG="${OPTARG}" ;; - p) PKGDIR="${OPTARG}" ;; + P) PKGFILE="${OPTARG}" ;; + p) PKGLIST="${PKGLIST} ${OPTARG}" ;; f) FORCE="y" ;; v) QUIET="n" ;; h|?) usage 0 ;; @@ -67,15 +66,6 @@ esac [ "x${work_dir}" = "x" ] && (echo "please specify a working directory" && usage 1) -#TODO - do we even need a config file? -if [ -e "${CONFIG}" ]; then - source "${CONFIG}" -else - echo "error: Config '${CONFIG}' does not exist, aborting." - exit 1 -fi - -# {{{ Build isoroot="${work_dir}/iso" instroot="${work_dir}/install" @@ -107,7 +97,6 @@ install_pkgfile () if [ -e "${1}" ]; then toinstall="" while read pkg; do - echo $ignorepkgs | grep "\<$pkg\>" >/dev/null 2>&1 && continue toinstall="${toinstall} ${pkg}" done < ${1} _pacman "${toinstall}" @@ -130,30 +119,18 @@ if [ "${command_name}" = "install" -o "${command_name}" = "all" ]; then mkdir -p "${instroot}" echo "Installing packages..." - for pkgfile in ${package_files}; do - echo " Installing packages from '$pkgfile'" - install_pkgfile "${PKGDIR}/$pkgfile.packages" - done - for pkg in ${additional_packages}; do + echo " Installing packages from '${PKGFILE}'" + install_pkgfile "${PKGFILE}" + + for pkg in ${PKGLIST}; do echo " Installing package '${pkg}'" _pacman "${pkg}" done - echo "Installing kernel '${kernelpkg}'" - if ! _pacman "${kernelpkg}" ; then - echo "error: pacman failed to install '${kernelpkg}', aborting." - exit 1 - fi + echo "Updating kernel module dependancies" kernelver=$(_kversion) - kernelsuffix=${kernelver##*-} - echo "Kernel Version ${kernelver} (${kernelsuffix}) installed - installing modules..." - if [ -e "${PKGDIR}/${kernelsuffix}.modules" ]; then - install_pkgfile "${PKGDIR}/${kernelsuffix}.modules" - fi - - echo "Updating module dependancies" - [ "${kernelsuffix}" = "ARCH" ] && kernelsuffix="" - depmod -a -b "${instroot}" -v "${kernelver}" -F "${instroot}/boot/System.map26${kernelsuffix}" >/dev/null + depmod -a -b "${instroot}" -v "${kernelver}" -F "${instroot}/boot/System.map26" >/dev/null + # remove the initcpio images that were generated for the host system find "${instroot}/boot" -name *.img -delete echo "Applying default configuration for the Arch ISO" diff --git a/mkarchiso.conf b/mkarchiso.conf deleted file mode 100644 index 54df69f..0000000 --- a/mkarchiso.conf +++ /dev/null @@ -1,11 +0,0 @@ -# vim: set ft=sh: -#TODO this can all be removed in place of commandline params to mkarchiso -kernelpkg="kernel26" -packager_name="Archlinux User" - -package_files="base" -additional_packages="" -ignorepkgs="devfsd hotplug pcmcia-cs" - -qemu_test="n" -qemuparams="" #"-vnc 1" diff --git a/packages.list b/packages.list new file mode 100644 index 0000000..b18fb51 --- /dev/null +++ b/packages.list @@ -0,0 +1,119 @@ +bash +bin86 +bzip2 +coreutils +cpio +cracklib +cryptsetup +db +dcron +dhcpcd +dialog +diffutils +dnsutils +dosfstools +e2fsprogs +ed +fakeroot +elinks +file +filesystem +findutils +fuse +gawk +gcc +gettext +glibc +grep +grub-gfx +gzip +hdparm +initscripts +iptables +iputils +ipw3945 +jfsutils +kbd +kernel-headers +kernel26 +less +lftp +libusb +licenses +lilo +lshwd +lsof +lvm2 +lzo2 +madwifi +madwifi-utils +mailx +man +man-pages +mdadm +memtest86+ +mkinitcpio +mktemp +module-init-tools +nano +ncurses +ndiswrapper +ndiswrapper-utils +net-tools +netcat +netkit-telnet +nfs-utils +ntfs-3g +ntfsprogs +nmap +openssh +openssl +openvpn +pacman +pam +parted +pciutils +pcmciautils +pcre +perl +popt +portmap +ppp +pptpclient +procinfo +procps +psmisc +python +readline +reiserfsprogs +rp-pppoe +rt2500 +screen +sed +shadow +squashfs-tools +sudo +sysfsutils +syslog-ng +sysvinit +tar +tcp_wrappers +tcpdump +udev +unionfs-utils +unrar +unzip +usbutils +util-linux-ng +vi +vim +wget +which +wireless_tools +wlan-ng26 +wlan-ng26-utils +wpa_supplicant +xfsdump +xfsprogs +zd1211-firmware +zlib diff --git a/packages/ARCH.modules b/packages/ARCH.modules deleted file mode 100644 index b9f450c..0000000 --- a/packages/ARCH.modules +++ /dev/null @@ -1,5 +0,0 @@ -ipw3945 -madwifi -ndiswrapper -rt2500 -wlan-ng26 diff --git a/packages/base.packages b/packages/base.packages deleted file mode 100644 index a337d20..0000000 --- a/packages/base.packages +++ /dev/null @@ -1,91 +0,0 @@ -bash -bin86 -binutils -bzip2 -coreutils -cpio -cracklib -db -dcron -dhcpcd -dialog -e2fsprogs -ed -elinks -file -filesystem -findutils -gawk -gcc -gettext -glibc -grep -groff -grub-gfx -gzip -initscripts -iputils -jfsutils -kbd -less -lftp -libpcap -libusb -licenses -lilo -lshwd -lsof -lzo2 -mailx -man -man-pages -mdadm -memtest86+ -mktemp -module-init-tools -nano -ncurses -net-tools -netcat -netkit-telnet -nmap -openssh -openssl -pacman -pam -parted -pciutils -pcmciautils -pcre -perl -popt -ppp -procinfo -procps -psmisc -python -readline -reiserfsprogs -rp-pppoe -sed -shadow -squashfs-tools -sysfsutils -syslog-ng -sysvinit -tar -tcp_wrappers -tcpdump -udev -unionfs-utils -unrar -unzip -usbutils -util-linux -vim -wget -which -wireless_tools -wpa_supplicant -xfsprogs -zlib diff --git a/packages/other.packages b/packages/other.packages deleted file mode 100644 index e69de29..0000000 diff --git a/testiso b/testiso old mode 100644 new mode 100755 -- cgit v1.2.3-70-g09d2