debian-cd-clone/tools/generate_di+k_list

222 lines
5.0 KiB
Bash
Executable File

#!/bin/sh
# Generate a list of packages required for debian-installer
# This script makes use of the following variables that need to be preset:
# MIRROR, CODENAME, DI_CODENAME
die "Missing \$MIRROR variable" unless $ENV{MIRROR};
die "Missing \$CODENAME variable" unless $ENV{CODENAME};
die "Missing \$DI_CODENAME variable" unless $ENV{DI_CODENAME};
DATE=`date`
cat > debian-installer+kernel-$DI_CODENAME << EOF
/* These packages + the ones needed by debootstrap are the ones needed for
* debian-installer to be able to install a base Debian system.
*
* These packages are installed by various parts of the debian-installer,
* mostly via its apt-install command.
*
* This list can be generated with the command:
* ../tools/generate_di+k_list
*
* DO NOT EDIT THIS FILE, edit the above script
*
* Last update: $DATE
*/
#include <debian-installer-$DI_CODENAME>
eject
locales
libdevmapper1.01
lvm-common
lvm2
mdadm
aptitude
jfbterm
unifont
hotplug
usbutils
console-cyrillic
console-terminus
pcmcia-cs
pcmciautils
wireless-tools
xfsprogs
jfsutils
dosfsutils
reiserfsprogs
libfribidi0
localization-config
acpid
initramfs-tools
ppp
pppoeconf
udev
installation-report
#ifdef ARCH_i386
discover
discover1
grub
lilo
/* Note that we do not have to include every optimised kernel flavor for
* i386. Kernel headers are included as third party modules are commonly
* used on this architecture.
*/
kernel-image-2.4-386
kernel-pcmcia-modules-2.4-386
kernel-headers-2.4-386
linux-image-2.6-386
linux-headers-2.6-386
/* 486 are same images, new name */
linux-image-2.6-486
linux-headers-2.6-486
#endif
#ifdef ARCH_amd64
discover
discover1
grub
lilo
linux-image-2.6-amd64-generic
linux-headers-2.6-amd64-generic
#endif
#ifdef ARCH_alpha
aboot
aboot-base
discover1
kernel-image-2.4-generic
kernel-image-2.4-smp
#endif
#ifdef ARCH_hppa
discover1
linux-image-2.6-parisc
linux-image-2.6-parisc-smp
linux-image-2.6-parisc64
linux-image-2.6-parisc64-smp
palo
#endif
#ifdef ARCH_ia64
discover1
initrd-tools
linux-image-2.6-itanium
linux-image-2.6-itanium-smp
linux-image-2.6-mckinley
linux-image-2.6-mckinley-smp
elilo
#endif
#ifdef ARCH_mips
arcboot
sibyl
EOF
# Only include mips kernels that d-i base-installer installs.
# XXX once mips gets kernel-image-2.4-<subarch> packages, use those
# instead.
for subarch in r4k-ip22 r5k-ip22 sb1-swarm-bn; do
zcat $MIRROR/dists/$CODENAME/main/binary-mips/Packages.gz | \
sed -n 's/Package: \(kernel-image-.*-.*\)$/\1/p' | \
grep -- "-$subarch$" | sort -n | tail -n 1 \
>> debian-installer+kernel-$DI_CODENAME
done
cat >> debian-installer+kernel-$DI_CODENAME << EOF
#endif
#ifdef ARCH_mipsel
sibyl
colo
delo
EOF
# Only include mipsel kernels that d-i base-installer installs.
# XXX once mips gets kernel-image-2.4-<subarch> packages, use those
# instead.
for subarch in r3k-kn02 r4k-kn04 cobalt lasat; do
zcat $MIRROR/dists/$CODENAME/main/binary-mipsel/Packages.gz | \
sed -n 's/Package: \(kernel-image-.*-.*\)$/\1/p' | \
grep -- "-$subarch$" | sort -n | tail -n 1 \
>> debian-installer+kernel-$DI_CODENAME
done
cat >> debian-installer+kernel-$DI_CODENAME << EOF
#endif
#ifdef ARCH_powerpc
discover1
quik
yaboot
powerpc-utils
hfsutils
mkvmlinuz
module-init-tools
initrd-tools
linux-image-2.6-powerpc
linux-image-2.6-powerpc-smp
linux-image-2.6-powerpc64
EOF
# Only include powerpc kernels that d-i base-installer installs.
# XXX once powerpc 2.4 gets kernel-image-2.4-<subarch> packages, use those
# instead, but beware of apus.
for subarch in powerpc power3 power4 power3-pmac power3-chrp-rs6k \
power4-pmac power4-chrp-rs6k powerpc-pmac \
powerpc-prep powerpc-chrp powerpc-chrp-rs6k apus; do
zcat $MIRROR/dists/$CODENAME/main/binary-powerpc/Packages.gz | \
sed -n 's/Package: \(kernel-image-.*-.*\)$/\1/p' | \
grep -- "-$subarch$" | sort -n | tail -n 1 \
>> debian-installer+kernel-$DI_CODENAME
done
cat >> debian-installer+kernel-$DI_CODENAME << EOF
#endif
#ifdef ARCH_sparc
silo
discover1
initrd-tools
linux-image-2.6-sparc64
linux-image-2.6-sparc64-smp
kernel-image-2.4-sparc32
kernel-image-2.4-sparc32-smp
kernel-image-2.4-sparc64
kernel-image-2.4-sparc64-smp
#endif
#ifdef ARCH_m68k
fileutils
vmelilo
EOF
# Get all the latest 2.2 for mac kernel
zcat $MIRROR/dists/$CODENAME/main/binary-m68k/Packages.gz | \
sed -n 's/Package: \(kernel-image-2.2.*-mac\)$/\1/p' | \
tail -n 1 \
>> debian-installer+kernel-$DI_CODENAME
# Get the latest 2.4 kernels, except mac
# XXX once m68k gets kernel-image-2.4-<subarch> packages, use those
# instead.
zcat $MIRROR/dists/$CODENAME/main/binary-m68k/Packages.gz | \
sed -n 's/Package: \(kernel-image-2.4.*\)$/\1/p' | \
tail -n 7 | \
grep -v mac >> debian-installer+kernel-$DI_CODENAME
cat >> debian-installer+kernel-$DI_CODENAME << EOF
#endif
#ifdef ARCH_arm
discover1
EOF
zcat $MIRROR/dists/$CODENAME/main/binary-arm/Packages.gz | \
sed -n 's/Package: \(kernel-image-2.4.*\)$/\1/p' | \
tail -n5 \
>> debian-installer+kernel-$DI_CODENAME
cat >> debian-installer+kernel-$DI_CODENAME << EOF
#endif
EOF