[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: More cdebconf improvements



Hi again,

On 17/11/15 00:07, Cyril Brulebois wrote:
> Regis Boudin <regis@boudin.name> (2015-11-16):
>> That's a different patch indeed, which I won't push without a minimum of
>> coordination as it changes the API/ABI of the plugin inteface. Also the
>> patch is more intrusive, and I would probably need to review it again
>> before pushing it.
> 
> OK, thanks for confirming/clarifying. Feel free to push to a
> pu/$something branch once you have polished it for review and
> coordination.

So, I've split the patchinto several bits, which I pushed under
pu/qflags. The most critical commit is
2cebed019dde395db6432ed1232db144da3c004b, which converts question.flags
from uint to a linked list of strings. The reason being that there is no
limit in the spec to which flags might or might not exist, nor is there
such limitation in the perl implementation. This is what caused #666530.
As we discussed at Debconf, the main issue with this patch is that it
changes the API/ABI for the plugins. Fortunately, the plugins
(cdebconf-terminal and cdebconf-entropy) don't use this parameter in the
structure, so a simple binNMU would be enough.

It also breaks the text db format ; but I don't believe this one is
actually used anyway, as it's only build for non-d-i, is not the one
used by default, and I doubt anyone has bothered changing it.

Besides the missing debconf-apt-progress, this is the only remaining
difference with the perl implementation I'm aware of.

For curious people, I've attached my patch to debootstrap, which checks
for the DEBOOTSTRAP_USE_CDEBCONF environment veriable to run cdebconf
instead of debconf from the beginning.

I think that's enough rambling for now. As usual, any comments/feedback
is very welcome. And don't worry too much if I'm not very responsive, as
I'll be moving a lot over the next month.

Regis
From ea2b242f48749e42f373ed46b4afbcbea9b90299 Mon Sep 17 00:00:00 2001
From: Regis Boudin <regis@boudin.name>
Date: Thu, 26 Apr 2012 20:52:50 +0200
Subject: [PATCH] Check environment variable to force use of cdebconf

If DEBOOTSTRAP_USE_CDEBCONF is set, force cdebconf as part of the required
packages, and set DEBCONF_USE_CDEBCONF during bootstrap
---
 scripts/sid | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/scripts/sid b/scripts/sid
index bf3404f..3509e61 100644
--- a/scripts/sid
+++ b/scripts/sid
@@ -18,6 +18,10 @@ esac
 work_out_debs () {
 	required="$(get_debs Priority: required)"
 
+	if [ "$DEBOOTSTRAP_USE_CDEBCONF" ]; then
+		required="$required cdebconf"
+	fi
+
 	if doing_variant - || doing_variant fakechroot; then
 		#required="$required $(get_debs Priority: important)"
 		#  ^^ should be getting debconf here somehow maybe
@@ -96,6 +100,13 @@ second_stage_install () {
 	DEBCONF_NONINTERACTIVE_SEEN=true
 	export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN
 
+	if [ "$DEBOOTSTRAP_USE_CDEBCONF" ]; then
+		DEBCONF_USE_CDEBCONF=1
+		export DEBCONF_USE_CDEBCONF
+	else
+		unset DEBCONF_USE_CDEBCONF
+	fi
+
 	baseprog=0
 	bases=7
 
@@ -199,6 +210,10 @@ echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/
 	mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
 	rm -f "$TARGET/usr/sbin/policy-rc.d"
 
+	if [ "$DEBOOTSTRAP_USE_CDEBCONF" ]; then
+		echo "DEBCONF_USE_CDEBCONF=1" > "$TARGET/etc/profile.d/use_cdebconf.sh"
+	fi
+
 	progress $bases $bases CONFBASE "Configuring base system"
 	info BASESUCCESS "Base system installed successfully."
 }
-- 
2.6.2


Reply to: