1999-11-11 16:10:37 -01:00
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
# Copyright 1999 Rapha<68>l Hertzog <hertzog@debian.org>
|
|
|
|
|
# See the README file for the license
|
|
|
|
|
|
2005-12-13 01:04:33 -01:00
|
|
|
|
# This script will create the Release files
|
|
|
|
|
# First arg = directory of the CD
|
1999-11-11 16:10:37 -01:00
|
|
|
|
|
|
|
|
|
#set -e
|
|
|
|
|
|
2000-06-16 23:42:50 +00:00
|
|
|
|
BDIR=$TDIR/$CODENAME-$ARCH
|
|
|
|
|
|
|
|
|
|
PREFIX=`echo $2 | sed "s?$BDIR/CD?$BDIR/?"`
|
|
|
|
|
|
2002-12-07 09:22:40 -01:00
|
|
|
|
SECTIONS="main"
|
|
|
|
|
SECTIONSNONUS="non-US/main"
|
2005-12-13 01:04:33 -01:00
|
|
|
|
if [ "${NONFREE:-0}" != "0" -o "${EXTRANONFREE:-0}" != "0" ] ; then
|
|
|
|
|
SECTIONS="${SECTIONS} non-free"
|
|
|
|
|
SECTIONSNONUS="${SECTIONSNONUS} non-US/non-free"
|
2002-12-07 09:22:40 -01:00
|
|
|
|
fi
|
2005-12-13 01:04:33 -01:00
|
|
|
|
if [ "${CONTRIB:-0}" != "0" ] ; then
|
|
|
|
|
SECTIONS="${SECTIONS} contrib"
|
|
|
|
|
SECTIONSNONUS="${SECTIONSNONUS} non-US/contrib"
|
1999-11-11 16:10:37 -01:00
|
|
|
|
fi
|
|
|
|
|
|
2005-12-13 01:04:33 -01:00
|
|
|
|
if [ -n "$LOCAL" ] ; then
|
|
|
|
|
SECTIONS="$SECTIONS local"
|
2001-11-09 06:55:23 -01:00
|
|
|
|
fi
|
|
|
|
|
|
2005-12-13 01:04:33 -01:00
|
|
|
|
cd "$1"
|
1999-11-11 16:10:37 -01:00
|
|
|
|
|
2002-12-20 00:46:25 -01:00
|
|
|
|
# these two lines can be inserted below the "Architectures" line below,
|
|
|
|
|
# to sort out broken Release files just after the testing --> stable
|
|
|
|
|
# transition
|
|
|
|
|
# sed -e "s/^Suite: .*$/Suite: stable/" | \
|
|
|
|
|
# sed -e "s/^Description: .*$/Description: Debian $DEBVERSION/" | \
|
|
|
|
|
|
2005-12-13 01:04:33 -01:00
|
|
|
|
if [ -e "$MIRROR/dists/$CODENAME/Release" ] ; then
|
|
|
|
|
# Strip the MD5Sum and SHA1 fields
|
|
|
|
|
# Update some other information as well
|
|
|
|
|
sed -e "s/^Architectures: .*$/Architectures: $ARCH/" \
|
|
|
|
|
$MIRROR/dists/$CODENAME/Release | \
|
|
|
|
|
sed -e "s|^Components: .*$|Components: $SECTIONS|" | \
|
|
|
|
|
perl -ne 'if (/^(MD5Sum|SHA1):/i) { $f=1; next }
|
|
|
|
|
if ($f) {
|
|
|
|
|
unless (/^ /) { print; $f=0 }
|
|
|
|
|
} else { print }' > dists/$CODENAME/Release
|
2001-12-29 17:52:24 -01:00
|
|
|
|
else
|
2005-12-13 01:04:33 -01:00
|
|
|
|
echo "ERROR: Release file ($MIRROR/dists/$CODENAME/Release) is missing !"
|
|
|
|
|
exit 1
|
2001-12-29 17:52:24 -01:00
|
|
|
|
fi
|
1999-11-11 16:10:37 -01:00
|
|
|
|
|
2005-12-13 01:04:33 -01:00
|
|
|
|
if [ -n "$NONUS" ] ; then
|
|
|
|
|
if [ -e "$NONUS/dists/$CODENAME/non-US/Release" ] ; then
|
|
|
|
|
# Strip the MD5Sum and SHA1 fields
|
|
|
|
|
# Update some other information as well
|
|
|
|
|
sed -e "/^ /d" -e "s/^Architectures: .*$/Architectures: $ARCH/" \
|
|
|
|
|
$NONUS/dists/$CODENAME/non-US/Release | \
|
|
|
|
|
sed -e "s|^Components: .*$|Components: $SECTIONSNONUS|" | \
|
|
|
|
|
perl -ne 'if (/^(MD5Sum|SHA1):/i) { $f=1; next }
|
|
|
|
|
if ($f) {
|
|
|
|
|
unless (/^ /) { print; $f=0 }
|
|
|
|
|
} else { print }' > dists/$CODENAME/non-US/Release
|
|
|
|
|
else
|
|
|
|
|
echo -n "ERROR: Release file ($NONUS/dists/$CODENAME/non-US/Release)"
|
|
|
|
|
echo " is missing !"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
2001-10-06 15:55:12 +00:00
|
|
|
|
fi
|
2001-02-27 00:01:40 -01:00
|
|
|
|
|
2005-12-13 01:04:33 -01:00
|
|
|
|
# Copying release files
|
|
|
|
|
for SECT in $SECTIONS
|
|
|
|
|
do
|
|
|
|
|
# Install the release files
|
|
|
|
|
if [ -e "$MIRROR/dists/$CODENAME/$SECT/binary-$ARCH/Release" ] ; then
|
|
|
|
|
cp $MIRROR/dists/$CODENAME/$SECT/binary-$ARCH/Release \
|
|
|
|
|
dists/$CODENAME/$SECT/binary-$ARCH/
|
2001-02-27 00:01:40 -01:00
|
|
|
|
fi
|
2005-12-13 01:04:33 -01:00
|
|
|
|
if [ -n "$NONUS" -a -e "$NONUS/dists/$CODENAME/non-US/$SECT/binary-$ARCH/Release" ] ; then
|
|
|
|
|
cp $NONUS/dists/$CODENAME/non-US/$SECT/binary-$ARCH/Release \
|
|
|
|
|
dists/$CODENAME/non-US/$SECT/binary-$ARCH/
|
2001-02-27 00:01:40 -01:00
|
|
|
|
fi
|
|
|
|
|
done
|
2005-11-09 23:50:19 -01:00
|
|
|
|
|
2005-12-13 01:04:33 -01:00
|
|
|
|
if [ -n "$LOCALDEBS" -a -n "$LOCAL" ] ; then
|
|
|
|
|
if [ -e $LOCALDEBS/dists/$CODENAME/local/binary-$ARCH/Release ] ; then
|
|
|
|
|
cp $LOCALDEBS/dists/$CODENAME/local/binary-$ARCH/Release \
|
|
|
|
|
dists/$CODENAME/local/binary-$ARCH/
|
|
|
|
|
fi
|
2005-11-09 23:50:19 -01:00
|
|
|
|
fi
|
2002-10-10 12:56:48 +00:00
|
|
|
|
|
2005-12-13 01:04:33 -01:00
|
|
|
|
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/
|
2002-10-10 12:56:48 +00:00
|
|
|
|
fi
|
|
|
|
|
|
2005-12-13 01:04:33 -01:00
|
|
|
|
# Generating Packages files is now done in add_debs; we no longer use
|
|
|
|
|
# apt-ftparchive
|
2002-10-10 12:56:48 +00:00
|
|
|
|
|
2001-11-09 06:55:23 -01:00
|
|
|
|
# Creating the indices directory
|
|
|
|
|
if [ ! -d "$BDIR/indices" ]; then
|
|
|
|
|
mkdir $BDIR/indices
|
|
|
|
|
cp $MIRROR/indices/* $BDIR/indices/
|
|
|
|
|
if [ -n "$LOCALDEBS" -a -d $LOCALDEBS/indices ]; then
|
|
|
|
|
cp $LOCALDEBS/indices/* $BDIR/indices/
|
|
|
|
|
fi
|
|
|
|
|
gunzip -f $BDIR/indices/*.gz
|
|
|
|
|
for SECT in $SECTIONS; do
|
2005-12-13 01:04:33 -01:00
|
|
|
|
touch $BDIR/indices/override.$CODENAME.$SECT
|
|
|
|
|
touch $BDIR/indices/override.$EXTRA_CODENAME.extra.$SECT
|
|
|
|
|
touch $BDIR/indices/override.$CODENAME.$SECT.src
|
2001-11-09 06:55:23 -01:00
|
|
|
|
done
|
2004-03-08 12:43:40 -01:00
|
|
|
|
if [ -e "$MIRROR/dists/$DI_CODENAME/main/debian-installer" ]; then
|
2005-12-13 01:04:33 -01:00
|
|
|
|
touch $BDIR/indices/override.$CODENAME.main.debian-installer
|
2002-10-10 12:56:48 +00:00
|
|
|
|
fi
|
2004-03-08 12:43:40 -01:00
|
|
|
|
if [ -n "$LOCAL" -a -e "${LOCALDEBS:-$MIRROR}/dists/$DI_CODENAME/local/debian-installer" ]; then
|
2005-12-13 01:04:33 -01:00
|
|
|
|
touch $BDIR/indices/override.$CODENAME.local.debian-installer
|
|
|
|
|
touch $BDIR/indices/override.$EXTRA_CODENAME.extra.local
|
|
|
|
|
touch $BDIR/indices/override.$CODENAME.local.src
|
2002-10-10 12:56:48 +00:00
|
|
|
|
fi
|
2001-11-09 06:55:23 -01:00
|
|
|
|
fi
|
|
|
|
|
if [ -n "$NONUS" -a ! -d "$BDIR/indices-non-US" ]; then
|
|
|
|
|
mkdir $BDIR/indices-non-US
|
|
|
|
|
cp $NONUS/indices-non-US/* $BDIR/indices-non-US/
|
|
|
|
|
gunzip -f $BDIR/indices-non-US/*.gz
|
|
|
|
|
for SECT in `echo $SECTIONSNONUS | sed -e 's#non-US/##g'`; do
|
2005-12-13 01:04:33 -01:00
|
|
|
|
touch $BDIR/indices-non-US/override.$CODENAME.$SECT
|
|
|
|
|
touch $BDIR/indices-non-US/override.$EXTRA_CODENAME.extra.$SECT
|
|
|
|
|
touch $BDIR/indices-non-US/override.$CODENAME.$SECT.src
|
2001-11-09 06:55:23 -01:00
|
|
|
|
done
|
2000-03-07 17:59:31 -01:00
|
|
|
|
fi
|
|
|
|
|
|
1999-11-11 16:10:37 -01:00
|
|
|
|
exit 0
|