* Add support for tracking which packages we've extracted binaries from,

so that we can archive them (both binaries and sources). If we need
    anything, we will list it in CD$N.pkgs_extracted so that external
    scripts can pick it up and do whatever's needed.
  * Minor changes to the interface of tools/which_deb to accommodate that:
    now just lists the files *within* the mirror; it's up to callers to
    prepend ${MIRROR} as needed.
This commit is contained in:
Steve McIntyre 2008-11-23 18:19:25 +00:00
parent 1db50822b3
commit 4c0e41e465
11 changed files with 66 additions and 11 deletions

View File

@ -204,6 +204,12 @@ export NORECOMMENDS=1
# Set to 1 to generate MD5 and SHA1 sums for generated images
export IMAGESUMS=1
# We may have to extract files from packages to put them onto the CD
# (e.g. bootloader files). If you make those packages (and their
# sources) available somewhere, list it here so that README.source
# can point to it
export ARCHIVE_EXTRACTED_SOURCES="http://cdimage.debian.org/cdimage/cd-sources/"
# Produce iso/jigdo files: specify how many iso/jigdo files should be
# produced in your set. If not set or when the value is "ALL" they will
# be created for all images. One of the variables can be set to zero if

View File

@ -128,7 +128,7 @@ $(BDIR)/DATE:
$(Q)date '+%Y%m%d' > $(BDIR)/DATE
ifdef MIRROR
LATEST_DB := $(shell $(which_deb) $(MIRROR) $(CODENAME) debootstrap)
LATEST_DB := $(MIRROR)/$(shell $(which_deb) $(MIRROR) $(CODENAME) debootstrap)
$(DB_DIR): $(LATEST_DB)
@rm -rf $(DB_DIR)
$(Q)dpkg -x $(LATEST_DB) $(DB_DIR)

6
debian/CONF.sh vendored
View File

@ -204,6 +204,12 @@ export NORECOMMENDS=1
# Set to 1 to generate MD5 and SHA1 sums for generated images
export IMAGESUMS=1
# We may have to extract files from packages to put them onto the CD
# (e.g. bootloader files). If you make those packages (and their
# sources) available somewhere, list it here so that README.source
# can point to it
export ARCHIVE_EXTRACTED_SOURCES="http://cdimage.debian.org/cdimage/cd-sources/"
# Produce iso/jigdo files: specify how many iso/jigdo files should be
# produced in your set. If not set or when the value is "ALL" they will
# be created for all images. One of the variables can be set to zero if

7
debian/changelog vendored
View File

@ -50,6 +50,13 @@ debian-cd (3.1.0) UNRELEASED; urgency=low
[ Steve McIntyre ]
* Stop copying the /tools/ directory on from the mirror; it's going away.
* Add support for multiple desktop tasks on a single disk
* Add support for tracking which packages we've extracted binaries from,
so that we can archive them (both binaries and sources). If we need
anything, we will list it in CD$N.pkgs_extracted so that external
scripts can pick it up and do whatever's needed.
* Minor changes to the interface of tools/which_deb to accommodate that:
now just lists the files *within* the mirror; it's up to callers to
prepend ${MIRROR} as needed.
-- Frans Pop <fjp@debian.org> Thu, 13 Nov 2008 22:17:21 +0100

View File

@ -117,9 +117,12 @@ sed -i "s|/install/|/install.amd/|" boot$N/isolinux-amd64/isolinux.cfg
mkdir -p $CDDIR/../syslinux
SYSLINUXDEB=`$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME syslinux`
ar p "${SYSLINUXDEB}" data.tar.gz | tar zxf - -C $CDDIR/../syslinux ./usr/lib
ar p "$MIRROR/${SYSLINUXDEB}" data.tar.gz | tar zxf - -C $CDDIR/../syslinux ./usr/lib
cp -f $CDDIR/../syslinux/usr/lib/syslinux/isolinux.bin boot$N/isolinux/
echo $SYSLINUXDEB >> $CDDIR/../$N.pkgs_extracted
$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME syslinux source >> $CDDIR/../$N.pkgs_extracted
if [ -n "$KERNEL_PARAMS" ]; then
# Substitute custom kernel params into the isolinux config
# file.

View File

@ -215,9 +215,12 @@ if [ "$NN" = "1" ]; then
mkdir -p $CDDIR/../syslinux
SYSLINUXDEB=`$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME syslinux`
ar p "${SYSLINUXDEB}" data.tar.gz | tar zxf - -C $CDDIR/../syslinux ./usr/lib
ar p "$MIRROR/${SYSLINUXDEB}" data.tar.gz | tar zxf - -C $CDDIR/../syslinux ./usr/lib
cp -f $CDDIR/../syslinux/usr/lib/syslinux/isolinux.bin boot$N/isolinux/
echo $SYSLINUXDEB >> $CDDIR/../$N.pkgs_extracted
$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME syslinux source >> $CDDIR/../$N.pkgs_extracted
if [ -n "$KERNEL_PARAMS" ]; then
# Substitute custom kernel params into the isolinux config
# file.

View File

@ -56,10 +56,14 @@ cd $INSTALLDIR
# Extract yaboot from the archive
if [ -z "$YABOOT_DEBUG" ]; then
YADEB=`$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME yaboot`
(ar p "${YADEB}" data.tar.gz | \
(ar p "$MIRROR/${YADEB}" data.tar.gz | \
tar zxf - -C . ./usr/lib/yaboot/yaboot)
mv usr/lib/yaboot/yaboot .
rm -rf usr
echo $YADEB >> $CDDIR/../$N.pkgs_extracted
$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME yaboot source >> $CDDIR/../$N.pkgs_extracted
else
cp -f $YABOOT_DEBUG yaboot
fi

View File

@ -40,9 +40,12 @@ mkdir -p $inst/boot
silo_deb=`$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME silo`
# put the relevant parts of SILO boot loader
(ar p $silo_deb data.tar.gz | \
(ar p $MIRROR/$silo_deb data.tar.gz | \
tar zxf - -C $inst/ ./boot/{isofs,second}.b)
echo $silo_deb >> $CDDIR/../$N.pkgs_extracted
$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME silo source >> $CDDIR/../$N.pkgs_extracted
# Some custom etc files
cp -f -p $BASEDIR/data/lenny/sparc/silo.conf $inst/boot/
if [ -n "$KERNEL_PARAMS" ]; then

View File

@ -145,9 +145,12 @@ if [ "$THISTYPE" = "isolinux" ]; then
mkdir -p $CDDIR/../syslinux
SYSLINUXDEB=`$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME syslinux`
(ar p "${SYSLINUXDEB}" data.tar.gz | \
(ar p "$MIRROR/${SYSLINUXDEB}" data.tar.gz | \
tar zxf - -C $CDDIR/../syslinux ./usr/lib)
echo $SYSLINUXDEB >> $CDDIR/../$N.pkgs_extracted
$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME syslinux source >> $CDDIR/../$N.pkgs_extracted
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long"
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-cache-inodes"
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-b isolinux/isolinux.bin"

View File

@ -386,7 +386,27 @@ do
fi
done
if [ "$DISC_PKG_HOOK"x != ""x ] ; then
# If we've had to extract any files from packages to put them onto the
# CD (e.g. bootloader files), then we will have listed them in
# $BDIR/$DISKNUM.pkgs_extracted. If that file exists, add a README.source
# to the root of the CD
if [ -e $BDIR/$DISKNUM.pkgs_extracted ] && \
[ ""x != "$ARCHIVE_EXTRACTED_SOURCES"x ] ; then
echo " Adding README.source"
cat > $CDDIR/README.source <<EOF
Creation of this disk image included extracting files from some Debian
packages. In case you do not have those packages already, both the
binary and source packages are archived at
EOF
echo "$ARCHIVE_EXTRACTED_SOURCES" >> $CDDIR/README.source
echo "" >> $CDDIR/README.source
echo "The following binary/source packages were used:" >> $CDDIR/README.source
sort $BDIR/$DISKNUM.pkgs_extracted | uniq | \
xargs -n1 basename >> $CDDIR/README.source
fi
if [ "$disc_pkg_HOOK"x != ""x ] ; then
echo " Calling pkg hook: $DISC_PKG_HOOK"
$DISC_PKG_HOOK $TDIR $MIRROR $DISKNUM $CDDIR "$ARCHES"
fi

View File

@ -98,7 +98,7 @@ if ($pkg eq "debootstrap") {
if (length($pkgdata) > 2) {
if ($output eq "binary") {
$pkgdata =~ m/^Filename: (\S+)/m and $bin_deb = $1;
print "$mirror/$bin_deb\n";
print "$bin_deb\n";
}
elsif ($output eq "source") {
$srcname = $pkg;
@ -107,9 +107,9 @@ if (length($pkgdata) > 2) {
if (length($pkgdata) > 2) {
my $dir;
$pkgdata =~ m/^Directory: (\S+)/m and $dir = $1;
$pkgdata =~ m/^ (\S+) (\S+) ((\S+).*dsc)/m and print "$mirror/$dir/$3\n";
$pkgdata =~ m/^ (\S+) (\S+) ((\S+).*diff.gz)/m and print "$mirror/$dir/$3\n";
$pkgdata =~ m/^ (\S+) (\S+) ((\S+).*tar.gz)/m and print "$mirror/$dir/$3\n";
$pkgdata =~ m/^ (\S+) (\S+) ((\S+).*dsc)/m and print "$dir/$3\n";
$pkgdata =~ m/^ (\S+) (\S+) ((\S+).*diff.gz)/m and print "$dir/$3\n";
$pkgdata =~ m/^ (\S+) (\S+) ((\S+).*tar.gz)/m and print "$dir/$3\n";
}
}
}