From 21ce30d63d34ab92aa427227669acd8d68690c0f Mon Sep 17 00:00:00 2001 From: Steve McIntyre <93sam@debian.org> Date: Fri, 1 Jul 2011 12:36:59 +0000 Subject: [PATCH] Add configuration for the snapshot.d.o URL --- CONF.sh | 5 +++++ Makefile | 4 ++-- debian/CONF.sh | 5 +++++ tools/make_image | 8 +++++--- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CONF.sh b/CONF.sh index d21678cd..e1267ca0 100644 --- a/CONF.sh +++ b/CONF.sh @@ -324,6 +324,11 @@ for INCL in $JIGDO_INCLUDE; do JIGDO_OPTS="$JIGDO_OPTS -jigdo-force-md5 $INCL" done +# Base link for snapshot.debian.org or similar +# "SNAPDATETIME" will be replaced at runtime with the correct data +# Leave this unset to not add this entry +export SNAPURL=http://snapshot.debian.org/archive/debian/SNAPDATETIME/ + # File with list of packages to include when fetching modules for the # first stage installer (debian-installer). One package per line. # Lines starting with '#' are comments. The package order is diff --git a/Makefile b/Makefile index 8afbc680..13f5db56 100755 --- a/Makefile +++ b/Makefile @@ -147,8 +147,8 @@ ifeq ($(FORCE_FIRMWARE),1) endif endif $(BDIR)/DATE: - $(Q)date '+%Y%m%d' > $(BDIR)/DATE - $(Q)date '+%Y%m%dT%H%M%SZ' > $(BDIR)/DATE-zulu + $(Q)date -u '+%Y%m%d' > $(BDIR)/DATE + $(Q)date -u '+%Y%m%dT%H%M%SZ' > $(BDIR)/DATE-zulu ifdef MIRROR LATEST_DB := $(MIRROR)/$(shell $(which_deb) $(MIRROR) $(CODENAME) debootstrap) diff --git a/debian/CONF.sh b/debian/CONF.sh index d21678cd..e1267ca0 100644 --- a/debian/CONF.sh +++ b/debian/CONF.sh @@ -324,6 +324,11 @@ for INCL in $JIGDO_INCLUDE; do JIGDO_OPTS="$JIGDO_OPTS -jigdo-force-md5 $INCL" done +# Base link for snapshot.debian.org or similar +# "SNAPDATETIME" will be replaced at runtime with the correct data +# Leave this unset to not add this entry +export SNAPURL=http://snapshot.debian.org/archive/debian/SNAPDATETIME/ + # File with list of packages to include when fetching modules for the # first stage installer (debian-installer). One package per line. # Lines starting with '#' are comments. The package order is diff --git a/tools/make_image b/tools/make_image index 15ac047d..443413b7 100755 --- a/tools/make_image +++ b/tools/make_image @@ -129,13 +129,15 @@ do # If we've made jigdo files, tweak them with extra info now if [ "$JIGDO_WANTED" = 1 ] ; then - SNAPSSHOT_DATE=`cat $DIR/DATE-zulu` - SNAPSHOTURL="http://snapshot.debian.org/archive/debian/$SNAPSHOT_DATE/" + SNAPSHOT_DATE=`cat $DIR/DATE-zulu` + if [ "$SNAPURL"x != ""x ] ; then + SNAPSHOTURL=`echo "$SNAPURL" | sed "s/SNAPDATETIME/$SNAPSHOT_DATE/g"` + fi $JIGDO_CLEANUP $OUT/$OUTFILE.jigdo \ $OUTFILE.iso $DIR/CD$n \ "`echo "$JIGDOTEMPLATEURL" | sed -e 's|%ARCH%|$ARCH|g'`$OUTFILE.template" \ "$DISKINFO" \ - $SNAPSHOTURL \ + "$SNAPSHOTURL" \ $JIGDOFALLBACKURLS if [ "$ISO_WANTED" = 1 ] ; then # Make sure that the ISO is as new/newer than the jigdo file; #587774