[debian-edu-commits] debian-edu/ 01/02: Make sure d-i set up the same APT sources we would get after running cfengine, to allow our cfengine rules to be removed. Use http.debian.net as the default mirror.

Petter Reinholdtsen pere at moszumanska.debian.org
Tue Oct 7 07:53:12 UTC 2014


This is an automated email from the git hooks/post-receive script.

pere pushed a commit to branch master
in repository debian-edu-install.

commit b520dda46ee4d03f5d23a250126e03c7fcdd7c50
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Tue Oct 7 09:52:19 2014 +0200

    Make sure d-i set up the same APT sources we would get after running cfengine, to allow our cfengine rules to be removed.  Use http.debian.net as the default mirror.
---
 apt-setup/generators/70debian-edu-install | 25 +++++++++++++++----------
 debian/changelog                          |  8 ++++++++
 preseed-values/defaults.common            |  8 ++++++++
 3 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/apt-setup/generators/70debian-edu-install b/apt-setup/generators/70debian-edu-install
index ccb8db2..a3943d3 100644
--- a/apt-setup/generators/70debian-edu-install
+++ b/apt-setup/generators/70debian-edu-install
@@ -77,14 +77,6 @@ else
     educodename="$DISTRIBUTION"
 fi
 
-# if a country is selected for mirror, then I guess we can continue
-# without adding an official mirror
-db_get mirror/country || true
-if [ "$RET" != "enter information manually" ] ; then 
-    disable_exception
-    exit 0
-fi
-
 edu-etcvcs commit
 
 # We need to check for a local repository if we are using http as source
@@ -92,14 +84,26 @@ if [ "$PROTOCOL" = "http" ] ; then
     log "OK found http_protocol"
     db_get mirror/http/directory || true
     DIRECTORY="$RET"
+    echo >> $file
     if wget -qO - http://$MIRROR$DIRECTORY/dists/$codename/Release | grep -q " local/binary" ; then 
-	log "OK, Found local/binary, adding local to $file"
+        log "OK, Found local/binary, adding local to $file"
+        echo >> $file
         echo "deb http://$MIRROR$DIRECTORY $codename local" >> $file
     else
-	log "Hmm, did not find any local/binary"
+        log "Hmm, did not find any local/binary"
+        echo "#deb http://$MIRROR$DIRECTORY $codename local" >> $file
     fi
 fi
 
+# if a country is selected for mirror, then I guess we can continue
+# without adding an official mirror
+db_get mirror/country || true
+if [ "$RET" != "enter information manually" ] ; then 
+    log "Mirror is country specific, not touching official mirror."
+    disable_exception
+    exit 0
+fi
+
 echo "# you can replace http.debian.net with ftp.no.debian.org or any other" >> $file
 echo "# debian mirror:" >> $file
 echo "deb http://http.debian.net/debian $codename $dists" >> $file
@@ -108,3 +112,4 @@ echo "deb http://ftp.skolelinux.no/skolelinux $educodename local" >> $file
 edu-etcvcs commit
 
 disable_exception
+exit 0
diff --git a/debian/changelog b/debian/changelog
index fb96a66..9eff638 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+debian-edu-install (1.807) UNRELEASED; urgency=low
+
+  * Make sure d-i set up the same APT sources we would get after
+    running cfengine, to allow our cfengine rules to be removed.  Use
+    http.debian.net as the default mirror.
+
+ -- Petter Reinholdtsen <pere at debian.org>  Tue, 07 Oct 2014 09:49:52 +0200
+
 debian-edu-install (1.806) unstable; urgency=high
 
   * Not using eatmydata is a warning, not an error.
diff --git a/preseed-values/defaults.common b/preseed-values/defaults.common
index d20fafd..680e4a5 100644
--- a/preseed-values/defaults.common
+++ b/preseed-values/defaults.common
@@ -57,3 +57,11 @@ hddtemp hddtemp/daemon boolean false
 # question showing up for some languages.
 dictionaries-common dictionaries-common/default-wordlist select Manual symlink setting
 dictionaries-common dictionaries-common/default-ispell select Manual symlink setting
+
+# Set up APT sources, see also our
+# /usr/lib/apt-setup/generators/70debian-edu-install script.  This
+# remove the need to set up APT sources using cfengine.
+choose-mirror-bin mirror/http/hostname string http.debian.net
+choose-mirror-bin mirror/http/directory string /debian/
+apt-mirror-setup apt-setup/non-free boolean true
+apt-mirror-setup apt-setup/contrib boolean true

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-install.git



More information about the debian-edu-commits mailing list