Bug#1035567: debootstrap: Does not support APT repositories with modern split arch:all support

2023-05-05 Thread Matthias Klumpp
Package: debootstrap
X-Debbugs-Cc: m...@debian.org
Version: 1.0.128+nmu2
Severity: normal
Tags: patch

Dear Maintainer,
currently debootstrap fails to work with APT repositories that have
arch:all split out exclusively into a separate Packages file, instead
of having arch:all merged into every arch:any Packages file in archive
metadata.
APT has already been supporting the new scheme for multiple releases,
so it would be nice if debootstrap supported it too (so far, it is the
only tool I found that doesn't do that). This would enable us in
PureOS to use the new APT repository style, as well as potentially
other derivatives and Debian itself in future as well.

The APT repository format (for both styles and the current
"compatibility mode" that the Debian archive runs on) is described
here: https://wiki.debian.org/DebianRepository/Format#Architectures

I attached a patch which implements support for this feature in
debootstrap. So far it has been working find for bootstrapping both
Debian (with the "compatibility" archive metadata mode) as well as a
PureOS scratch repository which uses the newer-style APT repository
mode.

You can also review this patch as MR @ Salsa:
https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/92

Thank you for considering!
I've set this bug as "normal", since I do consider bringing
debootstrap on-par with what features APT supports for a while as
important, but feel free to reduce it to "whishlist" priority if you
think that is more appropriate for a feature request like this.

With kind regards,
Matthias Klumpp

-- 
I welcome VSRE emails. See http://vsre.info/
From 5dd4cef1a5a03dc180eb2ec1d2bfc97023f74d2b Mon Sep 17 00:00:00 2001
From: Matthias Klumpp 
Date: Sun, 23 Apr 2023 22:30:02 +0200
Subject: [PATCH] Implement support for repos with modern-style arch:all
 support

This implements support for modern APT repositories which have arch:any
and arch:all packages in separate Packages files, as outlined in the
Debian
repository documentation:
https://wiki.debian.org/DebianRepository/Format#Architectures
---
 functions | 274 +-
 1 file changed, 168 insertions(+), 106 deletions(-)

diff --git a/functions b/functions
index 0ff5379..8bffbc6 100644
--- a/functions
+++ b/functions
@@ -557,6 +557,24 @@ extract_release_components () {
 	fi
 }
 
+repo_supports_arch_all () {
+	local a no_arch_all_support
+	local reldest="$1"; shift
+	TMPARCHS="$(sed -n 's/Architectures: *//p' "$reldest")"
+	ARCH_ALL_SUPPORTED=0
+	for a in $TMPARCHS ; do
+		if [ "$a" = "all" ]; then
+			ARCH_ALL_SUPPORTED=1
+			break
+		fi
+	done
+
+	no_arch_all_support=$(grep "^No-Support-for-Architecture-all: Packages$" "$reldest" || true)
+	if [ "$no_arch_all_support" != "" ]; then
+		ARCH_ALL_SUPPORTED=0
+	fi
+}
+
 CODENAME=""
 validate_suite () {
 	local reldest suite s
@@ -667,7 +685,7 @@ download_release_sig () {
 download_release_indices () {
 	local m1 inreldest reldest relsigdest totalpkgs \
 	  subpath xzi bz2i gzi normi i ext \
-	  donepkgs pkgdest acquirebyhash s c m
+	  donepkgs pkgdest acquirebyhash archs s c a m
 	m1="${MIRRORS%% *}"
 	for s in $SUITE $EXTRA_SUITES; do
 		inreldest="$TARGET/$($DLDEST rel "$s" "$m1" "dists/$s/InRelease")"
@@ -680,70 +698,80 @@ download_release_indices () {
 
 		extract_release_components "$reldest"
 
+		repo_supports_arch_all "$reldest"
+
+		archs="$ARCH"
+		if [ $ARCH_ALL_SUPPORTED -eq 1 ]; then
+			archs="all $ARCH"
+		fi
+
 		acquirebyhash=$(grep "^Acquire-By-Hash: yes$" "$reldest" || true)
-		totalpkgs=0
-		for c in $COMPONENTS; do
-			subpath="$c/binary-$ARCH/Packages"
-			xzi="$(get_release_checksum "$reldest" "$subpath.xz")"
-			bz2i="$(get_release_checksum "$reldest" "$subpath.bz2")"
-			gzi="$(get_release_checksum "$reldest" "$subpath.gz")"
-			normi="$(get_release_checksum "$reldest" "$subpath")"
-			if [ "$normi" != "" ]; then
-i="$normi"
-			elif in_path bunzip2 && [ "$bz2i" != "" ]; then
-i="$bz2i"
-			elif in_path unxz && [ "$xzi" != "" ]; then
-i="$xzi"
-			elif in_path gunzip && [ "$gzi" != "" ]; then
-i="$gzi"
-			fi
-			if [ "$i" != "" ]; then
-totalpkgs=$(( $totalpkgs + ${i#* } ))
-			else
-mv "$reldest" "$reldest.malformed"
-error 1 MISSINGRELENTRY "Invalid Release file, no entry for %s" "$subpath"
-			fi
-		done
 
-		donepkgs=0
-		progress 0 $totalpkgs DOWNPKGS "D

Re: dep11 files missing for bookworm (non-free-firmware)

2023-02-11 Thread Matthias Klumpp
Hi!

Am Sa., 11. Feb. 2023 um 16:44 Uhr schrieb Cyril Brulebois :
> Steve McIntyre  (2023-02-11):
> > As part of the nff changes, debian-cd now looks for dep11 metadata to
> > help work out what firmware might be needed. We have that working for
> > all other arches, but *not* mipsel. Builds are failing looking for
> >
> > /dists/bookworm/main/dep11/Components-mipsel.yml.gz
> >
> > Please fix up archive config so this works.
>
> The problem is the configuration on mekeel (appstream.d.o), see
> /srv/appstream.debian.org/workspace/asgen-config.json
>
> I'd suggest proposing a patch for Matthias to apply.

Looks like we simply didn't generate data for that architecture. I've
added it to the list, as data should be created for all architectures
that Debian supports officially.
See 
https://salsa.debian.org/pkgutopia-team/debian-asgen-config/-/commit/6de08ba2795f39b7171315d580201f1040afd9b7

It will take a few hours, depending on how the archive syncs up even a
day, for changes to take effect.

Cheers,
Matthias

-- 
I welcome VSRE emails. See http://vsre.info/



Re: DEP-11 metadata for non-free-firmware?

2023-01-29 Thread Matthias Klumpp
Hi!

Sorry for the delayed reply, I had some health things to deal with last week.

Am Mo., 23. Jan. 2023 um 17:41 Uhr schrieb Cyril Brulebois :
>
> Hi again,
>
> Cyril Brulebois  (2023-01-19):
> > Sorry for the noise. I missed there were several rsync calls on the
> > dak side, and at least dak needs patching…
> >
> >   https://salsa.debian.org/ftp-team/dak/-/merge_requests/267
>
> This was merged and works fine for sid, but for some reason, we're
> missing files for bookworm. Configuration changes from earlier this
> month look good though (/srv/appstream.debian.org):
>
>  - Add the non-free-firmware archive component
>  - Retire buster & stretch, add non-free-firmware processing for dev suites
>
> (in passing, workspace/asgen-config.json lacks armel for sid)
>
> Looking at the logs, the machinery is indeed looking at bookworm/nff,
> except it doesn't find anything new/interesting there, e.g.:
>
> 2023-01-23 14:21:22 - INFO: Skipping bookworm/non-free-firmware [amd64], 
> no interesting new packages since last update.
>
> Shouldn't we have placeholders (with just metadata) anyway? Like we have
> currently for sid/nff, e.g. for amd64[1]:
> [...]

So, long story short: A DEP-11 metadata file is only created if the
archive component that it's built for actually has metadata (any file
in /usr/share/metainfo or /usr/share/applications). If there is no
metadata, no file is created, not even an empty one.
The reason why "sid" has one is because I forced the creation of an
empty file, since having nothing there completely broke tracker.d.o
and we needed a quick fix (and I also thought it was a permanent one).
Looks like I misjudged that and also other parts of our infrastructure
rely on the files' existence.

So, Ideally other tools should be fixed to not break if the file isn't
there, or only break if the file *was* there and vanished (because
that shouldn't happen), or I could make a change on the generator to
always generate a file, even if no input data is present, depending on
what seems like the better way to go.

Cheers,
Matthias

-- 
I welcome VSRE emails. See http://vsre.info/



Re: No input (was: Black screen / X issue fixed)

2017-08-18 Thread Matthias Klumpp
2017-08-19 5:06 GMT+02:00 Cyril Brulebois :
> Cyril Brulebois  (2017-08-13):
>> This is fun: the bug is “fixed” in that the language selection screen
>> pops up properly, but it's not actually possible to get any input (incl.
>> VT switching) into the installer. I'll look into this once I'm back from
>> DebConf.
>
> And here's the culprit/bug report:
>   https://bugs.debian.org/872598

Thank you for discovering this! Let's hope this can be addressed soon :-)
I'll look into udev later (when I am not falling asleep any minute)

Cheers,
Matthias

-- 
I welcome VSRE emails. See http://vsre.info/



Bug#771687: debootstrap: Please add support for the Tanglu derivative

2015-11-11 Thread Matthias Klumpp
2015-11-11 18:15 GMT+01:00 Cyril Brulebois <k...@debian.org>:
> Hi,
>
> Matthias Klumpp <m...@debian.org> (2015-08-30):
>> It's been a while (almost 6 months) since the last patch, and we meanwhile
>> released chromodoris and are working on the next release, dasyatis.
>> I updated the patch to reflect that change.
>> Would be cool if it could get included in the official debootstrap package
>> at Debian!
>
> Sorry it took so long to get back to you.

No worries :)

> Having patched debootstrap locally, having fetched the
> tanglu-archive-keyring, and extracted the key locally, I can't actually
> run debootstrap:
>> (sid-amd64-devel)kibi@wodi:/tmp$ sudo debootstrap 
>> --keyring=fooobar/usr/share/keyrings/tanglu-archive-keyring.gpg staging 
>> staging
>> I: Retrieving Release
>> I: Retrieving Release.gpg
>> I: Checking Release signature
>> I: Valid Release signature (key id EAE6F073DA970B71C7A8403F4D9C621E119AE60F)
>> I: Retrieving Packages
>> I: Validating Packages
>> I: Resolving dependencies of required packages...
>> I: Resolving dependencies of base packages...
>> I: Checking component main on http://archive.tanglu.org/tanglu...
>> E: Couldn't find these debs: tanglu-minimal
>
> I can push my current changes to master though, so that you can tweak
> stuff as needed. What do you think?

The "staging" suite is an incomplete suite, just like Debian
experimental (so it might not make sense anymore to have it
bootstrapable).
Try the "dasyatis" suite instead, which is the current development
target and next stable release - that should work.

> I suppose it would probably make sense to have tanglu-archive-keyring in
> Debian, the same way we have ubuntu-archive-keyring and a few others.

If that's the normal procedure, I'll polish the package a little and
then upload it to Debian. Thanks for the suggestion, that would make
bootstrapping on Debian and other derivatives even easier.

Cheers,
Matthias


-- 
I welcome VSRE emails. See http://vsre.info/



Bug#771687: debootstrap: Please add support for the Tanglu derivative

2015-08-30 Thread Matthias Klumpp
Hi!
It's been a while (almost 6 months) since the last patch, and we meanwhile
released chromodoris and are working on the next release, dasyatis.
I updated the patch to reflect that change.
Would be cool if it could get included in the official debootstrap package
at Debian!
Cheers,
Matthias
Author: Matthias Klumpp matth...@tenstral.net

Add Tanglu support

diff --git a/debian/rules b/debian/rules
index a7d5eee..d7274e1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,8 @@
 
 ifeq (0,$(shell dpkg-vendor --derives-from Ubuntu; echo $$?))
   KEYRING := ubuntu-keyring
+else ifeq (0,$(shell dpkg-vendor --derives-from Tanglu; echo $$?))
+  KEYRING := tanglu-archive-keyring
 else
   KEYRING := debian-archive-keyring
 endif
@@ -30,6 +32,7 @@ override_dh_auto_install:
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/feisty \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/*.buildd \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/*.fakechroot \
+		debian/debootstrap-udeb/usr/share/debootstrap/scripts/staging \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/stable \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/testing \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/unstable
diff --git a/scripts/aequorea b/scripts/aequorea
new file mode 100644
index 000..fddd777
--- /dev/null
+++ b/scripts/aequorea
@@ -0,0 +1,202 @@
+mirror_style release
+download_style apt
+finddebs_style from-indices
+variants - buildd fakechroot minbase scratchbox
+keyring /usr/share/keyrings/tanglu-archive-keyring.gpg
+default_mirror http://archive.tanglu.org/tanglu
+
+if doing_variant fakechroot; then
+	test $FAKECHROOT = true || error 1 FAKECHROOTREQ This variant requires fakechroot environment to be started
+fi
+
+case $ARCH in
+	alpha|ia64) LIBC=libc6.1 ;;
+	kfreebsd-*) LIBC=libc0.1 ;;
+	hurd-*) LIBC=libc0.3 ;;
+	*)  LIBC=libc6 ;;
+esac
+
+work_out_debs () {
+	required=$(get_debs Priority: required)
+
+	if doing_variant - || doing_variant fakechroot; then
+		#required=$required $(get_debs Priority: important)
+		#  ^^ should be getting debconf here somehow maybe
+		base=$(get_debs Priority: important)
+
+		# we want the Tanglu minimal dependency set to be installed
+		base=$base tanglu-minimal
+	elif doing_variant buildd || doing_variant scratchbox; then
+		base=apt build-essential
+	elif doing_variant minbase; then
+		base=apt
+	fi
+
+	if doing_variant fakechroot; then
+		# ldd.fake needs binutils
+		required=$required binutils
+	fi
+
+	case $MIRRORS in
+	https://*)
+		base=$base apt-transport-https ca-certificates
+		;;
+	esac
+}
+
+first_stage_install () {
+	extract $required
+
+	mkdir -p $TARGET/var/lib/dpkg
+	: $TARGET/var/lib/dpkg/status
+	: $TARGET/var/lib/dpkg/available
+
+	setup_etc
+	if [ ! -e $TARGET/etc/fstab ]; then
+		echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM'  $TARGET/etc/fstab
+		chown 0:0 $TARGET/etc/fstab; chmod 644 $TARGET/etc/fstab
+	fi
+
+	x_feign_install () {
+		local pkg=$1
+		local deb=$(debfor $pkg)
+		local ver=$(extract_deb_field $TARGET/$deb Version)
+
+		mkdir -p $TARGET/var/lib/dpkg/info
+
+		echo \
+Package: $pkg
+Version: $ver
+Maintainer: unknown
+Status: install ok installed  $TARGET/var/lib/dpkg/status
+
+		touch $TARGET/var/lib/dpkg/info/${pkg}.list
+	}
+
+	x_feign_install dpkg
+}
+
+second_stage_install () {
+	setup_devices
+
+	x_core_install () {
+		smallyes '' | in_target dpkg --force-depends --install $(debfor $@)
+	}
+
+	p () {
+		baseprog=$(($baseprog + ${1:-1}))
+	}
+
+	if doing_variant fakechroot; then
+		setup_proc_fakechroot
+	elif doing_variant scratchbox; then
+		true
+	else
+		setup_proc
+		in_target /sbin/ldconfig
+	fi
+
+	DEBIAN_FRONTEND=noninteractive
+	DEBCONF_NONINTERACTIVE_SEEN=true
+	export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN
+
+	baseprog=0
+	bases=7
+
+	p; progress $baseprog $bases INSTCORE Installing core packages #1
+	info INSTCORE Installing core packages...
+
+	p; progress $baseprog $bases INSTCORE Installing core packages #2
+	ln -sf mawk $TARGET/usr/bin/awk
+	x_core_install base-passwd
+	x_core_install base-files
+	p; progress $baseprog $bases INSTCORE Installing core packages #3
+	x_core_install dpkg
+
+	if [ ! -e $TARGET/etc/localtime ]; then
+		ln -sf /usr/share/zoneinfo/UTC $TARGET/etc/localtime
+	fi
+
+	if doing_variant fakechroot; then
+		install_fakechroot_tools
+	fi
+
+	p; progress $baseprog $bases INSTCORE Installing core packages #4
+	x_core_install $LIBC
+
+	p; progress $baseprog $bases INSTCORE Installing core packages #5
+	x_core_install perl-base
+
+	p; progress $baseprog $bases INSTCORE Installing core packages #6
+	rm $TARGET/usr/bin/awk
+	x_core_install mawk
+
+	p; progress $baseprog $bases INSTCORE Installing core packages #7
+	if doing_variant -; then
+		x_core_install debconf
+	fi
+
+	baseprog=0
+	bases=$(set -- $required; echo $#)
+
+	info UNPACKREQ Unpacking required packages...
+
+	exec 71
+
+	smallyes '' |
+		(repeatn 5 in_target_failmsg

Re: Bug#782475: Bug#787542: libudev1-udeb depends on missing libcap2

2015-06-07 Thread Matthias Klumpp
2015-06-07 18:59 GMT+02:00 Christian Kastner deb...@kvr.at:
 [...]
 Sorry for the delay, I was AFK until just now.

 I've prepared a quick upload consisting of only Matthias' patch, minus
 the superfluous d/shlibs.local as discussed in Michael's follow-up to
 the patch.

 I do still need a sponsor, though. For whomever is willing to act as
 such, a source package can be obtained from the following link,

 http://www.kvr.at/debian/pool/main/libc/libcap2/libcap2_2.24-9.dsc

 or, alternatively, via the git repo

 git://anonscm.debian.org/collab-maint/libcap2.git

 using gbp.

 Please let me know if there is anything else I can do.

Looks fine to me and builds  works fine as well :) - I could sponsor
the package this evening, if there are no objections.
Since this has to go through NEW, we probably want to get some
ftpmaster into the loop to get the package processed faster than
usual...
Cheers,
Matthias

-- 
I welcome VSRE emails. See http://vsre.info/


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/CAKNHny-JoCz2ds7OvA=ukdch2c37-fkqbhwmdneg_qg_1mm...@mail.gmail.com



Re: Bug#787542: libudev1-udeb depends on missing libcap2

2015-06-02 Thread Matthias Klumpp
2015-06-02 18:11 GMT+02:00 Cyril Brulebois k...@debian.org:
 Package: libudev1-udeb
 Version: 218-1
 Severity: grave
 Tags: d-i
 Justification: renders package unusable

 (Please keep debian-boot@lists.debian.org cc'ed.)

 Hi,

 libudev1-udeb depends on missing libcap2. I suspect the easiest would be
 to drop libcap2 support from the udeb build. An alternative would be to
 try and add a udeb in libcap2. I'd rather have the former happen, so
 that we could think of releasing an alpha 1 for d-i soonish. The latter
 can happen afterwards if relevant/wished for etc.

 Would be better with a coffee, but iterating over debsnap's output for
 amd64 binaries, this dependency seems to have present since 218-1.

FYI, a while ago I reported this bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782475
We are using the new libcap2-udeb in Tanglu already for a while[1],
without experiencing any problems, so adding it to Debian might be a
good idea.
(Removing it from udev would be a pretty invasive change, as far as I
remember when looking at it back then)

Cheers,
Matthias

[1]: http://packages.tanglu.org/chromodoris/libcap2-udeb

-- 
I welcome VSRE emails. See http://vsre.info/


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/caknhny-gbh6ruvxq8dfdeg6q8rnmf+7zz3d++yjk5ihy5y5...@mail.gmail.com



Bug#771687: debootstrap: Please add support for the Tanglu derivative

2015-04-28 Thread Matthias Klumpp
Hi!
Sorry for the delay - I attached a new patch with the whitespace
changes removed.
Cheers,
Matthias

-- 
I welcome VSRE emails. See http://vsre.info/
Author: Matthias Klumpp matth...@tenstral.net

Add Tanglu support

diff --git a/debian/rules b/debian/rules
index a7d5eee..d7274e1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,8 @@
 
 ifeq (0,$(shell dpkg-vendor --derives-from Ubuntu; echo $$?))
   KEYRING := ubuntu-keyring
+else ifeq (0,$(shell dpkg-vendor --derives-from Tanglu; echo $$?))
+  KEYRING := tanglu-archive-keyring
 else
   KEYRING := debian-archive-keyring
 endif
@@ -30,6 +32,7 @@ override_dh_auto_install:
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/feisty \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/*.buildd \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/*.fakechroot \
+		debian/debootstrap-udeb/usr/share/debootstrap/scripts/staging \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/stable \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/testing \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/unstable
diff --git a/scripts/aequorea b/scripts/aequorea
new file mode 100644
index 000..fddd777
--- /dev/null
+++ b/scripts/aequorea
@@ -0,0 +1,202 @@
+mirror_style release
+download_style apt
+finddebs_style from-indices
+variants - buildd fakechroot minbase scratchbox
+keyring /usr/share/keyrings/tanglu-archive-keyring.gpg
+default_mirror http://archive.tanglu.org/tanglu
+
+if doing_variant fakechroot; then
+	test $FAKECHROOT = true || error 1 FAKECHROOTREQ This variant requires fakechroot environment to be started
+fi
+
+case $ARCH in
+	alpha|ia64) LIBC=libc6.1 ;;
+	kfreebsd-*) LIBC=libc0.1 ;;
+	hurd-*) LIBC=libc0.3 ;;
+	*)  LIBC=libc6 ;;
+esac
+
+work_out_debs () {
+	required=$(get_debs Priority: required)
+
+	if doing_variant - || doing_variant fakechroot; then
+		#required=$required $(get_debs Priority: important)
+		#  ^^ should be getting debconf here somehow maybe
+		base=$(get_debs Priority: important)
+
+		# we want the Tanglu minimal dependency set to be installed
+		base=$base tanglu-minimal
+	elif doing_variant buildd || doing_variant scratchbox; then
+		base=apt build-essential
+	elif doing_variant minbase; then
+		base=apt
+	fi
+
+	if doing_variant fakechroot; then
+		# ldd.fake needs binutils
+		required=$required binutils
+	fi
+
+	case $MIRRORS in
+	https://*)
+		base=$base apt-transport-https ca-certificates
+		;;
+	esac
+}
+
+first_stage_install () {
+	extract $required
+
+	mkdir -p $TARGET/var/lib/dpkg
+	: $TARGET/var/lib/dpkg/status
+	: $TARGET/var/lib/dpkg/available
+
+	setup_etc
+	if [ ! -e $TARGET/etc/fstab ]; then
+		echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM'  $TARGET/etc/fstab
+		chown 0:0 $TARGET/etc/fstab; chmod 644 $TARGET/etc/fstab
+	fi
+
+	x_feign_install () {
+		local pkg=$1
+		local deb=$(debfor $pkg)
+		local ver=$(extract_deb_field $TARGET/$deb Version)
+
+		mkdir -p $TARGET/var/lib/dpkg/info
+
+		echo \
+Package: $pkg
+Version: $ver
+Maintainer: unknown
+Status: install ok installed  $TARGET/var/lib/dpkg/status
+
+		touch $TARGET/var/lib/dpkg/info/${pkg}.list
+	}
+
+	x_feign_install dpkg
+}
+
+second_stage_install () {
+	setup_devices
+
+	x_core_install () {
+		smallyes '' | in_target dpkg --force-depends --install $(debfor $@)
+	}
+
+	p () {
+		baseprog=$(($baseprog + ${1:-1}))
+	}
+
+	if doing_variant fakechroot; then
+		setup_proc_fakechroot
+	elif doing_variant scratchbox; then
+		true
+	else
+		setup_proc
+		in_target /sbin/ldconfig
+	fi
+
+	DEBIAN_FRONTEND=noninteractive
+	DEBCONF_NONINTERACTIVE_SEEN=true
+	export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN
+
+	baseprog=0
+	bases=7
+
+	p; progress $baseprog $bases INSTCORE Installing core packages #1
+	info INSTCORE Installing core packages...
+
+	p; progress $baseprog $bases INSTCORE Installing core packages #2
+	ln -sf mawk $TARGET/usr/bin/awk
+	x_core_install base-passwd
+	x_core_install base-files
+	p; progress $baseprog $bases INSTCORE Installing core packages #3
+	x_core_install dpkg
+
+	if [ ! -e $TARGET/etc/localtime ]; then
+		ln -sf /usr/share/zoneinfo/UTC $TARGET/etc/localtime
+	fi
+
+	if doing_variant fakechroot; then
+		install_fakechroot_tools
+	fi
+
+	p; progress $baseprog $bases INSTCORE Installing core packages #4
+	x_core_install $LIBC
+
+	p; progress $baseprog $bases INSTCORE Installing core packages #5
+	x_core_install perl-base
+
+	p; progress $baseprog $bases INSTCORE Installing core packages #6
+	rm $TARGET/usr/bin/awk
+	x_core_install mawk
+
+	p; progress $baseprog $bases INSTCORE Installing core packages #7
+	if doing_variant -; then
+		x_core_install debconf
+	fi
+
+	baseprog=0
+	bases=$(set -- $required; echo $#)
+
+	info UNPACKREQ Unpacking required packages...
+
+	exec 71
+
+	smallyes '' |
+		(repeatn 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE Failure while unpacking required packages.  This will be attempted up to five times.  \
+		dpkg --status-fd 8 --force-depends --unpack

Bug#771687: debootstrap: Please add support for the Tanglu derivative

2014-12-01 Thread Matthias Klumpp
Package: debootstrap
Version: 1.0.66
Severity: wishlist
Tags: patch

Hi!
Could you please add support for the Tanglu[1] Debian derivative?
This includes three suites at time:
 * Aequorea
 * Bartholomea
 * Chromodoris
I have a patch attached which adds Tanglu support.
I also attched a second patch which we apply at Tanglu, which just adds a nicer
message if debootstrap is failing to create device nodes.
You might want to consider that one as well (if wanted, I could also file a
separate bug for it).
Thank you for your work on Debootstrap!
Cheers,
Matthias

[1]: http://tanglu.org

-- System Information:
Debian Release: jessie/sid
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Versions of packages debootstrap depends on:
ii  wget  1.16-1b1

Versions of packages debootstrap recommends:
ii  gnupg   1.4.18-4
ii  tanglu-archive-keyring  2013.02

debootstrap suggests no packages.
Author: Matthias Klumpp matth...@tenstral.net

Add Tanglu support

diff --git a/debian/rules b/debian/rules
index a7d5eee..d7274e1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,8 @@
 
 ifeq (0,$(shell dpkg-vendor --derives-from Ubuntu; echo $$?))
   KEYRING := ubuntu-keyring
+else ifeq (0,$(shell dpkg-vendor --derives-from Tanglu; echo $$?))
+  KEYRING := tanglu-archive-keyring
 else
   KEYRING := debian-archive-keyring
 endif
@@ -14,10 +16,10 @@ override_dh_auto_build:
 
 override_dh_auto_install:
 	dh_auto_build
-	
+
 	$(MAKE) install DESTDIR=$(CURDIR)/debian/debootstrap
 	$(MAKE) install DESTDIR=$(CURDIR)/debian/debootstrap-udeb
-	
+
 	# remove scripts not needed by d-i
 	-rm -f debian/debootstrap-udeb/usr/share/debootstrap/scripts/potato \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/woody \
@@ -30,6 +32,7 @@ override_dh_auto_install:
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/feisty \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/*.buildd \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/*.fakechroot \
+		debian/debootstrap-udeb/usr/share/debootstrap/scripts/staging \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/stable \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/testing \
 		debian/debootstrap-udeb/usr/share/debootstrap/scripts/unstable
diff --git a/scripts/aequorea b/scripts/aequorea
new file mode 100644
index 000..fddd777
--- /dev/null
+++ b/scripts/aequorea
@@ -0,0 +1,202 @@
+mirror_style release
+download_style apt
+finddebs_style from-indices
+variants - buildd fakechroot minbase scratchbox
+keyring /usr/share/keyrings/tanglu-archive-keyring.gpg
+default_mirror http://archive.tanglu.org/tanglu
+
+if doing_variant fakechroot; then
+	test $FAKECHROOT = true || error 1 FAKECHROOTREQ This variant requires fakechroot environment to be started
+fi
+
+case $ARCH in
+	alpha|ia64) LIBC=libc6.1 ;;
+	kfreebsd-*) LIBC=libc0.1 ;;
+	hurd-*) LIBC=libc0.3 ;;
+	*)  LIBC=libc6 ;;
+esac
+
+work_out_debs () {
+	required=$(get_debs Priority: required)
+
+	if doing_variant - || doing_variant fakechroot; then
+		#required=$required $(get_debs Priority: important)
+		#  ^^ should be getting debconf here somehow maybe
+		base=$(get_debs Priority: important)
+
+		# we want the Tanglu minimal dependency set to be installed
+		base=$base tanglu-minimal
+	elif doing_variant buildd || doing_variant scratchbox; then
+		base=apt build-essential
+	elif doing_variant minbase; then
+		base=apt
+	fi
+
+	if doing_variant fakechroot; then
+		# ldd.fake needs binutils
+		required=$required binutils
+	fi
+
+	case $MIRRORS in
+	https://*)
+		base=$base apt-transport-https ca-certificates
+		;;
+	esac
+}
+
+first_stage_install () {
+	extract $required
+
+	mkdir -p $TARGET/var/lib/dpkg
+	: $TARGET/var/lib/dpkg/status
+	: $TARGET/var/lib/dpkg/available
+
+	setup_etc
+	if [ ! -e $TARGET/etc/fstab ]; then
+		echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM'  $TARGET/etc/fstab
+		chown 0:0 $TARGET/etc/fstab; chmod 644 $TARGET/etc/fstab
+	fi
+
+	x_feign_install () {
+		local pkg=$1
+		local deb=$(debfor $pkg)
+		local ver=$(extract_deb_field $TARGET/$deb Version)
+
+		mkdir -p $TARGET/var/lib/dpkg/info
+
+		echo \
+Package: $pkg
+Version: $ver
+Maintainer: unknown
+Status: install ok installed  $TARGET/var/lib/dpkg/status
+
+		touch $TARGET/var/lib/dpkg/info/${pkg}.list
+	}
+
+	x_feign_install dpkg
+}
+
+second_stage_install () {
+	setup_devices
+
+	x_core_install () {
+		smallyes '' | in_target dpkg --force-depends --install $(debfor $@)
+	}
+
+	p () {
+		baseprog=$(($baseprog + ${1:-1}))
+	}
+
+	if doing_variant fakechroot; then
+		setup_proc_fakechroot
+	elif doing_variant scratchbox; then
+		true
+	else
+		setup_proc
+		in_target /sbin/ldconfig
+	fi
+
+	DEBIAN_FRONTEND=noninteractive
+	DEBCONF_NONINTERACTIVE_SEEN=true
+	export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN
+
+	baseprog=0
+	bases=7
+
+	p; progress $baseprog $bases INSTCORE Installing core packages #1
+	info INSTCORE Installing core packages...
+
+	p; progress $baseprog $bases INSTCORE

Re: Bug#757650: override: sysvinit:admin/optional sysvinit-core:admin/extra

2014-08-11 Thread Matthias Klumpp
2014-08-11 23:32 GMT+02:00 Michael Biebl bi...@debian.org:
 Am 11.08.2014 23:15, schrieb Cyril Brulebois:
 Michael Biebl bi...@debian.org (2014-08-11):

 A minimal installation should still pull sysvinit-core as it is the
 first alternative in init.

 Since that's not happening I'm going to guess that systemd-sysv's
 priority being higher than sysvinit-core's might be the important (no
 pun intended) difference here. I'll try to confirm/infirm that later on.

 Ansgar just confirmed that it is indeed the prio bump to important he
 made yesterday which causes debootstrap to pull in systemd-sysv by default.
 According to Ansgar, debootstrap installs everything having prio
 important or higher.
We have exactly the same behaviour in the Tanglu Debian-derivative,
which is using systemd for some time now.
However, d-i has some issues there (insserv loop, which nobody was
able to resolve yet) - we are not really sure about the cause yet, but
since systemd was by far the biggest difference between Tanglu and
Debian so far, the init transition might be playing a role there.
I will try as well to build d-i on Debian this week, to rule out any
systemd-sideeffects.
Cheers,
Matthias

-- 
I welcome VSRE emails. See http://vsre.info/


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/CAKNHny_bmTdj-9dyNnUwhk1DP2=byAqZ6CUsDs9xo5DCxC=f...@mail.gmail.com



Bug#667703: Mostly solved (was Re: Filed (Re: Preinstalled package manager(s) for PCs (wheezy)))

2012-06-27 Thread Matthias Klumpp
Hi!
How odd that I didn't notice that bug... (I'm the GPK/PK maintainer)
Well, I think pulling in Synaptic on KDE might be a bad idea, probably
KDE desktop packages should pull in Apper instead, a KDE package
manager based on PackageKit and fully integrated into the KDE desktop.
It does not provide all functions of Synaptic, but for most users it
will be good enough and KDE can avoid pulling in many GNOME packages.
About the GNOME side: I already splitted up the GNOME-PackageKit
package, but I didn't upload the changes to unstable. Splitting the
package means that you will be able to install some components of GPK
(the update manager, software manager and helper tools) independently
from each other. This might be useful in the current situation. (so
only the parts of GPK which are needed are present and people can use
Synaptic for other things. E.g. the update-manager can bes used with
Synaptic, and people don't have two package managers installed)
Don't think uploading the splitted version at time would be a good
idea, so I think the current solution is okay, if the GNOME team wants
it. (which seems to be the case)
Thanks for the attention :-)
Cheers,
   Matthias

2012/6/27 Filipus Klutiero chea...@gmail.com:
 On 2012-04-05 20:20, Filipus Klutiero wrote:

 This didn't generate as much feedback as I hoped, but I filed a ticket
 asking task-desktop to install synaptic:
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667703


 Joey Hess changed tasks to bring Synaptic in KDE, LXDE and Xfce. Only the
 GNOME situation is unchanged (Josselin Mouette alleged that gnome already
 pulls in Synaptic).
 tasksel 3.10 should migrate to testing shortly.


 --
 To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact
 listmas...@lists.debian.org
 Archive: http://lists.debian.org/4feb27ee.7060...@gmail.com




-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAKNHny8vr06Ug7yX-3HfVxTSKdNzDxiDBUe67rfgGmF0=5t...@mail.gmail.com