Added support for DVD-sized images. Specify default image sizes in
CONF.sh as DEFBINSIZE and DEFSRCSIZE build.sh and build_all.sh now use these settings to calculate the packages and source files to go on each disk, using bc - shell arithmetic cannot cope with > 32-bit numbers use the md5sum from the textutils package - dpkg's md5sum cannot handle large files.
This commit is contained in:
parent
aa0928ffc0
commit
5b892f4ae9
8
CONF.sh
8
CONF.sh
|
@ -22,6 +22,8 @@ unset NOSUGGESTS
|
|||
unset DOJIGDO
|
||||
unset JIGDOCMD
|
||||
unset JIGDOTEMPLATEURL
|
||||
unset DEFBINSIZE
|
||||
unset DEFSRCSIZE
|
||||
|
||||
|
||||
# The debian-cd dir
|
||||
|
@ -115,6 +117,12 @@ export APTTMP=/ftp/tmp/apt
|
|||
# the proper official CD run does not work
|
||||
#ATTEMPT_FALLBACK=yes
|
||||
|
||||
# Set your disk size here in MB. Used in calculating package and
|
||||
# source file layouts in build.sh and build_all.sh. Defaults are for
|
||||
# CD-R, try ~4600 for DVD-R.
|
||||
export DEFBINSIZE=630
|
||||
export DEFSRCSIZE=635
|
||||
|
||||
# We don't want certain packages to take up space on CD1...
|
||||
#export EXCLUDE="$BASEDIR"/tasks/exclude-potato
|
||||
# ...but they are okay for other CDs (UNEXCLUDEx == may be included on CD >= x)
|
||||
|
|
7
Makefile
7
Makefile
|
@ -80,6 +80,7 @@ add_files=$(BASEDIR)/tools/add_files
|
|||
set_mkisofs_opts=$(BASEDIR)/tools/set_mkisofs_opts
|
||||
strip_nonus_bin=$(BASEDIR)/tools/strip-nonUS-bin
|
||||
add_secured=$(BASEDIR)/tools/add_secured
|
||||
md5sum=/usr/bin/md5sum.textutils
|
||||
|
||||
BDIR=$(TDIR)/$(CODENAME)-$(ARCH)
|
||||
ADIR=$(APTTMP)/$(CODENAME)-$(ARCH)
|
||||
|
@ -680,7 +681,7 @@ $(BDIR)/CD1/md5sum.txt:
|
|||
cd $$dir; \
|
||||
find . -follow -type f | grep -v "\./md5sum" | grep -v \
|
||||
"dists/stable" | grep -v "dists/frozen" | \
|
||||
grep -v "dists/unstable" | xargs md5sum > md5sum.txt ; \
|
||||
grep -v "dists/unstable" | xargs $(md5sum) > md5sum.txt ; \
|
||||
done
|
||||
src-md5list: ok sources src-secured $(SDIR)/CD1/md5sum.txt
|
||||
$(SDIR)/CD1/md5sum.txt:
|
||||
|
@ -693,7 +694,7 @@ $(SDIR)/CD1/md5sum.txt:
|
|||
cd $$dir; \
|
||||
find . -follow -type f | grep -v "\./md5sum" | grep -v \
|
||||
"dists/stable" | grep -v "dists/frozen" | \
|
||||
grep -v "dists/unstable" | xargs md5sum > md5sum.txt ; \
|
||||
grep -v "dists/unstable" | xargs $(md5sum) > md5sum.txt ; \
|
||||
done
|
||||
|
||||
# Generate $CODENAME-secured tree with Packages and Release(.gpg) files
|
||||
|
@ -904,7 +905,7 @@ src-image: ok src-md5list $(OUT)
|
|||
#Calculate the md5sums for the images (if available), or get from templates
|
||||
imagesums:
|
||||
$(Q)cd $(OUT); :> MD5SUMS; for file in `find * -name \*.raw`; do \
|
||||
md5sum $$file >>MD5SUMS; \
|
||||
$(md5sum) $$file >>MD5SUMS; \
|
||||
done; \
|
||||
for file in `find * -name \*.template`; do \
|
||||
if [ "`tail --bytes=29 "$$file" | head --bytes=1 | od -tx1 -An | sed -e 's/ //g'`" != 01 ]; then \
|
||||
|
|
6
build.sh
6
build.sh
|
@ -29,9 +29,11 @@ for CD in 1 2 3 4 5 6 7 8; do
|
|||
size=`eval echo '$'"BOOT_SIZE_${CD}"`
|
||||
[ "$size" = "" ] && size=0
|
||||
[ $CD = "1" ] && size=$(($size + $disks))
|
||||
SIZE_ARGS="$SIZE_ARGS SIZELIMIT${CD}=$(((630 - $size) * 1024 *1024))"
|
||||
FULL_SIZE=`echo "($DEFBINSIZE - $size) * 1024 * 1024" | bc`
|
||||
SIZE_ARGS="$SIZE_ARGS SIZELIMIT${CD}=$FULL_SIZE"
|
||||
done
|
||||
make list COMPLETE=1 $SIZE_ARGS SRCSIZELIMIT=$((635 * 1024 * 1024))
|
||||
FULL_SIZE=`echo "($DEFSRCSIZE - $size) * 1024 * 1024" | bc`
|
||||
make list COMPLETE=1 $SIZE_ARGS SRCSIZELIMIT=$FULL_SIZE
|
||||
echo " ... building the images"
|
||||
make official_images
|
||||
|
||||
|
|
16
build_all.sh
16
build_all.sh
|
@ -20,12 +20,12 @@ do
|
|||
exit 1
|
||||
fi
|
||||
echo " ... selecting packages to include"
|
||||
if [ -e ${MIRROR}/dists/${CODENAME}/main/disks-${ARCH}/current/. ] ; then
|
||||
disks=`du -sm ${MIRROR}/dists/${CODENAME}/main/disks-${ARCH}/current/. | \
|
||||
if [ -e ${MIRROR}/dists/${CODENAME}/main/disks-${ARCH}/current/. ] ; then
|
||||
disks=`du -sm ${MIRROR}/dists/${CODENAME}/main/disks-${ARCH}/current/. | \
|
||||
awk '{print $1}'`
|
||||
else
|
||||
disks=0
|
||||
fi
|
||||
else
|
||||
disks=0
|
||||
fi
|
||||
if [ -f $BASEDIR/tools/boot/$CODENAME/boot-$ARCH.calc ]; then
|
||||
. $BASEDIR/tools/boot/$CODENAME/boot-$ARCH.calc
|
||||
fi
|
||||
|
@ -34,9 +34,11 @@ do
|
|||
size=`eval echo '$'"BOOT_SIZE_${CD}"`
|
||||
[ "$size" = "" ] && size=0
|
||||
[ $CD = "1" ] && size=$(($size + $disks))
|
||||
SIZE_ARGS="$SIZE_ARGS SIZELIMIT${CD}=$(((630 - $size) * 1024 *1024))"
|
||||
FULL_SIZE=`echo "($DEFBINSIZE - $size) * 1024 * 1024" | bc`
|
||||
SIZE_ARGS="$SIZE_ARGS SIZELIMIT${CD}=$FULL_SIZE"
|
||||
done
|
||||
make list COMPLETE=1 $SIZE_ARGS SRCSIZELIMIT=$((635 * 1024 * 1024))
|
||||
FULL_SIZE=`echo "($DEFSRCSIZE - $size) * 1024 * 1024" | bc`
|
||||
make list COMPLETE=1 $SIZE_ARGS SRCSIZELIMIT=$FULL_SIZE
|
||||
echo " ... building the images"
|
||||
if [ "$ARCH" = "i386" ]; then
|
||||
export OUT="$TMP_OUT/$ARCH"; mkdir -p $OUT
|
||||
|
|
|
@ -18,6 +18,10 @@ debian-cd (2.2.14) unstable; urgency=low
|
|||
second "compact", third "bf2.4" and fourth the old default one. At
|
||||
least we have the language chooser on the first CD but it's still
|
||||
2.2 based. Reworked the MULTIBOOT code to take this into account.
|
||||
* Added capability to generate DVD-sized images. Use bc to calculate
|
||||
disk sizes in build.sh and build_all.sh, and use the textutils
|
||||
version of md5sum to avoid missing large file support in dpkg
|
||||
version. Specify the output image sizes in CONF.sh
|
||||
|
||||
-- Raphael Hertzog <hertzog@debian.org> Sat, 6 Apr 2002 10:26:42 +0200
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Standards-Version: 3.5.2
|
|||
|
||||
Package: debian-cd
|
||||
Architecture: all
|
||||
Depends: perl, libdigest-md5-perl, sysutils, apt (>= 0.3.11.1), make, mkisofs | mkhybrid, lynx, grep-dctrl, apt-utils (>= 0.5.4), debootstrap
|
||||
Depends: perl, libdigest-md5-perl, sysutils, apt (>= 0.3.11.1), make, mkisofs | mkhybrid, lynx, grep-dctrl, apt-utils (>= 0.5.4), debootstrap, bc
|
||||
Recommends: hfsutils, debianutils (>= 1.6)
|
||||
Suggests: palo (>= 0.94)
|
||||
Description: Tools for building (Official) Debian CD set
|
||||
|
|
Loading…
Reference in New Issue