From 45c0531c787d2d0ba6261f189b982ee0d6c7e080 Mon Sep 17 00:00:00 2001 From: Steve McIntyre Date: Sat, 12 Dec 2020 03:13:53 +0000 Subject: [PATCH] Add support for running the final make_image step in parallel to make best use of larger machines with SSD storage. Use PARALLEL_MAKE_IMAGE= to specify how many to build in parallel. --- CONF.sh | 5 +++++ Makefile | 6 ++++++ build.sh | 7 ++++++- debian/changelog | 8 +++++++- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/CONF.sh b/CONF.sh index fdfbaee3..783011d9 100644 --- a/CONF.sh +++ b/CONF.sh @@ -439,6 +439,11 @@ if [ -d "/etc/ssl/ca-debian" ]; then fi export WGET="wget $WGET_OPTS" +# Run the make_image step in parallel? Specify the number of calls to +# use in parallel here if desired. Don't go too high - this *will* +# thrash your IO! +#export PARALLEL_MAKE_IMAGE=4 + # Set this to force the Release file(s) to say "stable". Used in first # Etch builds to allow us to build before the archive updated #EARLY_BUILD_HACK=1 diff --git a/Makefile b/Makefile index 19fc4ab0..211bd339 100755 --- a/Makefile +++ b/Makefile @@ -497,6 +497,12 @@ image-trees: ok genlist images: ok $(OUT) $(BDIR)/checksum-check $(Q)$(make_image) "$(BDIR)" "$(ARCHES)" "$(OUT)" "$(DEBVERSION)" "$(MIRROR)" "$(MKISOFS)" "$(MKISOFS_OPTS)" "$(JIGDO_OPTS)" "$(jigdo_cleanup)" +parallel_images: $(subst volid,image,$(notdir $(wildcard $(BDIR)/*.volid))) + echo $^ + +%.image: ok $(OUT) $(BDIR)/checksum-check + $(Q)CD=$(subst .image,,$@) $(make_image) "$(BDIR)" "$(ARCHES)" "$(OUT)" "$(DEBVERSION)" "$(MIRROR)" "$(MKISOFS)" "$(MKISOFS_OPTS)" "$(JIGDO_OPTS)" "$(jigdo_cleanup)" + check-number-given: @test -n "$(CD)" || (echo "Give me a CD= parameter !" && false) diff --git a/build.sh b/build.sh index fabaf473..a1df121d 100755 --- a/build.sh +++ b/build.sh @@ -80,7 +80,12 @@ else fi echo "Building $NUMJIGDOS jigdos and $NUMISOS isos for $ARCHES $DISKTYPE" -make $IMAGETARGET +if [ "$IMAGETARGET" = "official_images" ] && [ ! -z "$PARALLEL_MAKE_IMAGE" ]; then + make ok init packagelists image-trees + make -j $PARALLEL_MAKE_IMAGE parallel_images +else + make $IMAGETARGET +fi if [ "$IMAGESUMS"x = 1x ]; then make imagesums diff --git a/debian/changelog b/debian/changelog index a6acd9fe..c0539b50 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,14 @@ debian-cd (3.1.32) UNRELEASED; urgency=medium + [ Holger Levsen ] * Update standards version to 4.5.1, no changes needed. - -- Holger Levsen Thu, 19 Nov 2020 11:24:03 +0100 + [ Steve McIntyre ] + * Add support for running the final make_image step in parallel to + make best use of larger machines with SSD storage. Use + PARALLEL_MAKE_IMAGE= to specify how many to build in parallel. + + -- Steve McIntyre <93sam@debian.org> sat, 12 Dec 2020 03:12:36 +0100 debian-cd (3.1.31) unstable; urgency=medium