[cut-team] [PATCH] Add support for the rolling repository (testing only)

Jérémy Bobbio lunar at debian.org
Wed Jul 27 12:28:10 UTC 2011


---

Hello folks working on CUT/rolling!

This is a (v1) patch against apt-setup that will add the
rolling.debian.net repository to testing installations.

You'll notice that `apt-setup/use-rolling` defaults to true. In case
that patch is added to d-i proper, it would probably make sense to make
it false by default and installers for CUT/rolling would actually
preseed it to `true`

The patch has been tested and should work. The repository is
still rejected by d-i right now because the signature against the
Release file is too old, so this might hide other issues.

The `apt-setup/use-rolling` template really needs better wording.

Please note that I have worked on that patch as a proof-of-concept on
how rolling could be integrated on the debian-installer. I am willing to
do a little more work on that patch, but not much. That's why I am
actually sending it to this mailling-list instead of debian-boot.

Cheers and digital meat follows:

 debian/apt-setup-udeb.install   |    2 +
 debian/apt-setup-udeb.templates |   20 +++++++++++
 debian/changelog                |    6 +++
 generators/93rolling            |   71 +++++++++++++++++++++++++++++++++++++++
 keys/debian-rolling.key         |   31 +++++++++++++++++
 5 files changed, 130 insertions(+), 0 deletions(-)
 create mode 100755 generators/93rolling
 create mode 100644 keys/debian-rolling.key

diff --git a/debian/apt-setup-udeb.install b/debian/apt-setup-udeb.install
index 882e2f9..47c9396 100644
--- a/debian/apt-setup-udeb.install
+++ b/debian/apt-setup-udeb.install
@@ -5,3 +5,5 @@ generators/60local usr/lib/apt-setup/generators
 generators/90services-select usr/lib/apt-setup/generators
 generators/91security usr/lib/apt-setup/generators
 generators/92volatile usr/lib/apt-setup/generators
+generators/93rolling usr/lib/apt-setup/generators
+keys/debian-rolling.key usr/lib/apt-setup/keys
diff --git a/debian/apt-setup-udeb.templates b/debian/apt-setup-udeb.templates
index 4c4d524..c60ac0d 100644
--- a/debian/apt-setup-udeb.templates
+++ b/debian/apt-setup-udeb.templates
@@ -32,6 +32,11 @@ Type: text
 # :sl1:
 _Description: Scanning the volatile updates repository...
 
+Template: apt-setup/progress/rolling
+Type: text
+# :sl1:
+_Description: Scanning the rolling updates repository...
+
 Template: apt-setup/local/key-error
 Type: select
 Default: Retry
@@ -65,6 +70,12 @@ Default: volatile.debian.org
 Description: for internal use; can be preseeded
  Host to use for volatile updates
 
+Template: apt-setup/rolling_host
+Type: string
+Default: rolling.debian.net
+Description: for internal use; can be preseeded
+ Host to use for volatile updates
+
 Template: apt-setup/service-failed
 Type: error
 # :sl2:
@@ -98,3 +109,12 @@ _Description: Services to use:
  relatively frequently and where not having the latest version could reduce
  the usability of the software. An example is the virus signatures for a virus
  scanner. This service is only available for stable and oldstable releases.
+
+Template: apt-setup/use-rolling
+Type: boolean
+Default: true
+# :sl3:
+# XXX: this should really really be refined
+_Description: Add rolling update repository?
+ Your installation is using the 'testing' suite of Debian. You should
+ add the 'rolling' repository to make it even more usable. Yay!
diff --git a/debian/changelog b/debian/changelog
index 85b9ec6..c565d05 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+apt-setup (1:0.55.0~rolling1) UNRELEASED; urgency=low
+
+  * Add support for the rolling repository (testing only).
+
+ -- Jérémy Bobbio <lunar at debian.org>  Tue, 26 Jul 2011 17:32:19 +0200
+
 apt-setup (1:0.55) unstable; urgency=low
 
   [ Samuel Thibault ]
diff --git a/generators/93rolling b/generators/93rolling
new file mode 100755
index 0000000..d134ca4
--- /dev/null
+++ b/generators/93rolling
@@ -0,0 +1,71 @@
+#!/bin/sh
+set -e
+
+. /usr/share/debconf/confmodule
+
+file="$1"
+
+chroot=
+if [ "$ROOT" ]; then
+	chroot=chroot
+fi
+
+if ! db_get mirror/suite || [ -z "$RET" ]; then
+        db_get cdrom/suite
+fi
+suite="$RET"
+
+# Rolling is only meant for testing
+if [ "$suite" != testing ]; then
+        db_set apt-setup/use-rolling false
+        exit
+fi
+
+db_input medium apt-setup/use-rolling || true
+if ! db_go; then
+	exit 10 # back up
+fi
+
+db_get apt-setup/use-rolling
+if [ "$RET" = false ]; then
+	exit
+fi
+
+db_get apt-setup/rolling_host
+host="$RET"
+[ "$host" ] || exit
+
+# To determine if non-free and contrib should be included, grep
+# the file to see if they are listed in it.
+sections="main"
+for section in contrib non-free; do
+	if grep -q '^[^#]* '$section $ROOT/etc/apt/sources.list.new; then
+		sections="$sections $section"
+	fi
+done
+
+echo "deb http://${host}/ rolling $sections" >> $file
+
+# Add the repository signature key
+cat /usr/lib/apt-setup/keys/debian-rolling.key | $chroot $ROOT apt-key add -
+
+# Don't test mirror if no network selected in netcfg
+if db_get netcfg/dhcp_options && \
+   [ "$RET" = "Do not configure the network at this time" ]; then
+	CODE=9
+else
+	CODE=0
+	export ASV_TIMEOUT="-o Acquire::http::Timeout=30"
+	if ! apt-setup-verify --from $PROGRESS_FROM --to $PROGRESS_TO $file; then
+		db_subst apt-setup/service-failed HOST "$host"
+		db_input critical apt-setup/service-failed || true
+		if ! db_go; then
+			exit 10 # back up
+		fi
+		CODE=9
+	fi
+fi
+
+echo "deb-src http://${host}/ rolling $sections" >> $file
+
+exit $CODE
diff --git a/keys/debian-rolling.key b/keys/debian-rolling.key
new file mode 100644
index 0000000..ae4eb6b
--- /dev/null
+++ b/keys/debian-rolling.key
@@ -0,0 +1,31 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.10 (GNU/Linux)
+
+mQINBE3qGrkBEADP4QpbvRWscxFjZa9QMS2g2CevH+wNXkAkvdCvEpkl7utMDxIT
+tWULqEMBqi8JKWowJff/NBO2vgk7xzvfRBNyZULxoTORjSZfP6NnQSrcQNFwXhuv
+YDR4YzL5b3W1T9nF6jbEsdZGKqAyB0tYs99+7UURPD82eGus2g6CnKGanfMl0G9o
+vdgjxo4rlA5opeGyFAl+qn489PvPlEmuKLxq2w7YIpKBtutUSY8Y02LGX8mI8cAO
+ZP0kO1sfZRsiLSuIt2OQiPEZzBKLXct7fga7X9Bd/2CNvZN6qtB67TXf3V1vReWW
+miTcVAuwSA8F0gS54jbvdpy1kwq2KpHOy/DNVdAZjPwh7oAlxXElTwXl/5E02qud
+TbtHSr+xt42GDSifOjfEVOiRmBGU476a+rzQlk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XU5t3
+gw8eMRNKkG23G3P/wLaGS64SHl6FKhdpp2H5XCbpHfGWLcH+XuIR6iohPUrrH5WE
+KEBBZzaefWukYIhGBBARAgAGBQJN6hshAAoJEK0pWuHXX4UzAQwAoK2FQKT4o1Sd
+yHo4VcQ7AdopWzdAAKCZ6kpRHjLhmT5GzjW9RwvaIJUJZQ==
+=249I
+-----END PGP PUBLIC KEY BLOCK-----

-- 
Jérémy Bobbio                        .''`. 
lunar at debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/cut-team/attachments/20110727/7a720778/attachment.pgp>


More information about the cut-team mailing list