[Simple-cdd-devel] New feature, splitting mirror and build passes

Enrico Zini enrico at enricozini.org
Thu Feb 26 15:12:30 UTC 2015


Hello,

I needed to build 4 different images for a project (client and server,
for i386 and amd64, as separate images), so I have split the mirror and
build passes.

It is now possible to create a big mirror, and then build several images
out of it:

  SIMPLE_CDD=${SIMPLE_CDD:-"build-simple-cdd"}
  WANTED_PROFILES="client server"
  WANTED_DISTS="wheezy jessie"
  WANTED_ARCHES="i386 amd64"
  
  for dist in $WANTED_DISTS
  do
          # Build mirror
          echo "Building $dist mirror..."
          # Use a separate mirror directory
          export simple_cdd_mirror=$(readlink -f ./mirror-$dist)
          # Export the list of architectures we want ot mirror
          export ARCHES="$WANTED_ARCHES"
          $SIMPLE_CDD \
                  --logfile="mirror-$dist.log" \
                  --profiles "myproject,client,server" \
                  --dist "$dist" --mirror-only
  
          for profile in $WANTED_PROFILES
          do
                  for arch in $WANTED_ARCHES
                  do
                          ISONAME="myproject-$profile-$dist-$arch.iso"
                          if [ -f "$ISONAME" ]
                          then
                                  echo "$ISONAME already built"
                                  continue
                          fi
                          echo "Building ${ISONAME}..."
                          export ARCHES="$arch"
                          OUTPUT_ISO=$($SIMPLE_CDD \
                                  --logfile="$ISONAME.log" \
                                  --profiles "myproject,$profile" \
                                  --dist "$dist" "$@")
                          mv "$OUTPUT_ISO" "$ISONAME"
                  done
          done
  done
  
  echo "Done."

Or even just to create a big mirror and that's it: build-simple-cdd can
now be used as a mirror management tool, able to merge different
distributions, include local packages and even download the extra mirror
bits like debian-installer and documentation files.

Exciting!


Enrico

-- 
GPG key: 4096R/E7AD5568 2009-05-08 Enrico Zini <enrico at enricozini.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/simple-cdd-devel/attachments/20150226/fc75aa06/attachment.sig>


More information about the Simple-cdd-devel mailing list