changes to make cds with a special d-i version
Hi!
This are the changes I made at gluck to be able to build cds for a version
of Debian using Debian installer from another version, for example, the
sid_d-i netinst images we are making using Debian installer from sid and
having the packages from sarge.
It is a quick hack I did, so sugestions are welcome, specially on how to
handle the DI_CODENAME thing at the CONF.sh (BTW, CONF.sh on debian dir is
completely out of sync with the other one).
Raphael, if you like this I can commit it, I still have some other misc
stuff around, but that is not related, so I guess I'll commit them later on.
Index: CONF.sh
===================================================================
RCS file: /cvs/debian-boot/debian-cd/CONF.sh,v
retrieving revision 1.36
diff -u -r1.36 CONF.sh
--- CONF.sh 18 Dec 2003 10:22:38 -0000 1.36
+++ CONF.sh 7 Feb 2004 22:44:53 -0000
@@ -49,6 +49,12 @@
# Building woody cd set ...
export CODENAME=woody
+# By default use Debian installer packages from $CODENAME
+if [ ! "$DI_CODENAME" ]
+then
+ export DI_CODENAME=$CODENAME
+fi
+
# Version number, "2.2 r0", "2.2 r1" etc.
export DEBVERSION="3.0"
Index: tools/add_dirs
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/add_dirs,v
retrieving revision 1.11
diff -u -r1.11 add_dirs
--- tools/add_dirs 7 Dec 2002 10:33:52 -0000 1.11
+++ tools/add_dirs 9 Jan 2004 17:45:28 -0000
@@ -44,7 +44,7 @@
mkdir -p dists/$CODENAME/non-free/binary-$ARCH
mkdir -p dists/$CODENAME/non-free/source
fi
-if [ -e "$MIRROR/dists/$CODENAME/main/debian-installer" ]; then
+if [ -e "$MIRROR/dists/$DI_CODENAME/main/debian-installer" ]; then
mkdir -p dists/$CODENAME/main/debian-installer/binary-$ARCH
fi
Index: tools/apt-selection
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/apt-selection,v
retrieving revision 1.16
diff -u -r1.16 apt-selection
--- tools/apt-selection 7 Dec 2002 10:22:40 -0000 1.16
+++ tools/apt-selection 9 Jan 2004 15:56:27 -0000
@@ -65,12 +65,12 @@
>> $APTTMP/$CODENAME-$ARCH/apt/sources.list
fi
# Debian-installer
- if [ -e "$MIRROR/dists/$CODENAME/main/debian-installer" ]; then
- echo "deb file:$MIRROR $CODENAME main/debian-installer" \
+ if [ -e "$MIRROR/dists/$DI_CODENAME/main/debian-installer" ]; then
+ echo "deb file:$MIRROR $DI_CODENAME main/debian-installer" \
>> $APTTMP/$CODENAME-$ARCH/apt/sources.list
fi
- if [ -n "$LOCAL" -a -e "${LOCALDEBS:-$MIRROR}/dists/$CODENAME/local/debian-installer" ]; then
- echo "deb file:${LOCALDEBS:-$MIRROR} $CODENAME local/debian-installer" \
+ if [ -n "$LOCAL" -a -e "${LOCALDEBS:-$MIRROR}/dists/$DI_CODENAME/local/debian-installer" ]; then
+ echo "deb file:${LOCALDEBS:-$MIRROR} $DI_CODENAME local/debian-installer" \
>> $APTTMP/$CODENAME-$ARCH/apt/sources.list
fi
fi
Index: tools/generate_di_list
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/generate_di_list,v
retrieving revision 1.4
diff -u -r1.4 generate_di_list
--- tools/generate_di_list 24 Dec 2003 17:19:14 -0000 1.4
+++ tools/generate_di_list 25 Jan 2004 13:44:09 -0000
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
# Generate a list of packages required for debian-installer
# This script makes use of the following variables that need to be preset:
-# MIRROR, CODENAME, BASEDIR
+# MIRROR, DI_CODENAME, BASEDIR
my @ARCHES=qw{alpha arm hppa hurd-i386 i386 ia64 m68k mips mipsel
powerpc s390 sparc sh};
my $DATE=`date`;
@@ -24,7 +24,7 @@
my @exclude = @common_excludes;
push @exclude, read_exclude("exclude-udebs-$arch")
if -e exclude_path("exclude-udebs-$arch");
- my $packagefile="$ENV{MIRROR}/dists/$ENV{CODENAME}/main/debian-installer/binary-$arch/Packages";
+ my $packagefile="$ENV{MIRROR}/dists/$ENV{DI_CODENAME}/main/debian-installer/binary-$arch/Packages";
UDEB: foreach my $udeb (map { chomp; $_ } `grep-dctrl -n -s Package '' $packagefile`) {
foreach my $pattern (@exclude) {
if ($udeb =~ /^$pattern$/) {
@@ -54,5 +54,5 @@
sub exclude_path {
my $file=shift;
- return "$ENV{BASEDIR}/data/$ENV{CODENAME}/$file";
+ return "$ENV{BASEDIR}/data/$ENV{DI_CODENAME}/$file";
}
Index: tools/scanpackages
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/scanpackages,v
retrieving revision 1.25
diff -u -r1.25 scanpackages
--- tools/scanpackages 20 Dec 2002 01:46:25 -0000 1.25
+++ tools/scanpackages 9 Jan 2004 15:56:27 -0000
@@ -91,8 +91,8 @@
fi
fi
-if [ -e "$MIRROR/dists/$CODENAME/main/debian-installer/binary-$ARCH/Release" ]; then
- cp $MIRROR/dists/$CODENAME/main/debian-installer/binary-$ARCH/Release \
+if [ -e "$MIRROR/dists/$DI_CODENAME/main/debian-installer/binary-$ARCH/Release" ]; then
+ cp $MIRROR/dists/$DI_CODENAME/main/debian-installer/binary-$ARCH/Release \
dists/$CODENAME/main/debian-installer/binary-$ARCH/
fi
@@ -101,7 +101,7 @@
if [ -n "$NONUS" ]; then
apt-ftparchive generate $PREFIX.generate-binary-non-US
fi
-if [ -e "$MIRROR/dists/$CODENAME/main/debian-installer" ]; then
+if [ -e "$MIRROR/dists/$DI_CODENAME/main/debian-installer" ]; then
apt-ftparchive generate $PREFIX.generate-binary-debian-installer
fi
@@ -214,7 +214,7 @@
Packages::Extensions ".udeb";
}
EOF
-if [ -n "$LOCAL" -a -e "${LOCALDEBS:-$MIRROR}/dists/$CODENAME/local/debian-installer" ]; then
+if [ -n "$LOCAL" -a -e "${LOCALDEBS:-$MIRROR}/dists/$DI_CODENAME/local/debian-installer" ]; then
cat >>$PREFIX.generate-binary-debian-installer <<EOF
Tree "dists/$CODENAME/local" {
@@ -243,10 +243,10 @@
touch $BDIR/indices/override.$CODENAME.extra.$SECT
touch $BDIR/indices/override.$CODENAME.$SECT.src
done
- if [ -e "$MIRROR/dists/$CODENAME/main/debian-installer" ]; then
+ if [ -e "$MIRROR/dists/$DI_CODENAME/main/debian-installer" ]; then
touch $BDIR/indices/override.$CODENAME.main.debian-installer
fi
- if [ -n "$LOCAL" -a -e "${LOCALDEBS:-$MIRROR}/dists/$CODENAME/local/debian-installer" ]; then
+ if [ -n "$LOCAL" -a -e "${LOCALDEBS:-$MIRROR}/dists/$DI_CODENAME/local/debian-installer" ]; then
touch $BDIR/indices/override.$CODENAME.local.debian-installer
touch $BDIR/indices/override.$CODENAME.extra.local
touch $BDIR/indices/override.$CODENAME.local.src
Regards...
--
Manty/BestiaTester -> http://manty.net
Reply to: