summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-10-14 22:07:19 -0500
committerDan McGee <dan@archlinux.org>2007-10-14 22:07:19 -0500
commitef89b8a29f84db65cdd8fbcf0049911cd80ed5a2 (patch)
tree056146488f6516ba448a1b28158972fc669a640c
parent2f10bc9b795e91a3e8c7467f4fa3147c06de9ad1 (diff)
downloadarchiso32-ef89b8a29f84db65cdd8fbcf0049911cd80ed5a2.tar.xz
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 <dan@archlinux.org>
-rwxr-xr-xmkarchiso57
-rw-r--r--mkarchiso.conf11
-rw-r--r--packages.list (renamed from packages/base.packages)36
-rw-r--r--packages/ARCH.modules5
-rw-r--r--packages/other.packages0
-rwxr-xr-x[-rw-r--r--]testiso0
6 files changed, 49 insertions, 60 deletions
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 <exitvalue>
@@ -19,12 +18,12 @@ usage ()
{
echo "usage ${APPNAME} [options] command <command options>"
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 <working dir> : where to build the ISO root"
echo " squash <working dir> : 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/base.packages b/packages.list
index a337d20..b18fb51 100644
--- a/packages/base.packages
+++ b/packages.list
@@ -1,56 +1,74 @@
bash
bin86
-binutils
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
-groff
grub-gfx
gzip
+hdparm
initscripts
+iptables
iputils
+ipw3945
jfsutils
kbd
+kernel-headers
+kernel26
less
lftp
-libpcap
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
@@ -59,7 +77,9 @@ pcmciautils
pcre
perl
popt
+portmap
ppp
+pptpclient
procinfo
procps
psmisc
@@ -67,9 +87,12 @@ python
readline
reiserfsprogs
rp-pppoe
+rt2500
+screen
sed
shadow
squashfs-tools
+sudo
sysfsutils
syslog-ng
sysvinit
@@ -81,11 +104,16 @@ unionfs-utils
unrar
unzip
usbutils
-util-linux
+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/other.packages b/packages/other.packages
deleted file mode 100644
index e69de29..0000000
--- a/packages/other.packages
+++ /dev/null
diff --git a/testiso b/testiso
index f129ffa..f129ffa 100644..100755
--- a/testiso
+++ b/testiso