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

Bug#739136: marked as done (debootstrap: Sync deb support with latest dpkg-deb)



Your message dated Tue, 06 May 2014 09:18:59 +0000
with message-id <E1WhbWd-00030f-Re@franck.debian.org>
and subject line Bug#739136: fixed in debootstrap 1.0.60
has caused the Debian Bug report #739136,
regarding debootstrap: Sync deb support with latest dpkg-deb
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
739136: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739136
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: debootstrap
Version: 1.0.59
Severity: wishlist
Tags: patch

Hi!

When using the fallback code instead of dpkg-deb the implementation
is missing support for uncompressed data.tar and control.tar and
control.tar.xz. Although this should not be needed in Debian for
the base system, it might be needed by downstreams, or when a user
includes a package manually. And I think it does not harm to have
deb support in sync with what dpkg-deb supports.

The attached two patches implement this. Although I've only tested
the functions in isolation, not as part of a debootstrap run with
such packages.

Thanks,
Guillem
From 009dc7588934809654a1eac28d66e323601215f8 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Tue, 30 Jul 2013 18:18:42 +0200
Subject: [PATCH 1/2] Add uncompressed data.tar deb member support

These are currently not accepted by the Debian archive, but have been
supported since dpkg 1.10.24, and they do not incur any additional
dependency from the host system. This is mostly for completeness' sake,
as Debian base packages with uncompressed data.tar members are probably
not going to be used at all.
---
 functions | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/functions b/functions
index 4e3955a..8fc0bee 100644
--- a/functions
+++ b/functions
@@ -813,12 +813,13 @@ extract_ar_deb_field () {
 
 extract_ar_deb_data () {
 	local pkg="$1"
-	local tarball=$(ar -t "$pkg" | grep "^data.tar.[bgx]z")
+	local tarball=$(ar -t "$pkg" | grep "^data.tar")
 
 	case "$tarball" in
 		data.tar.gz) cat_cmd=zcat ;;
 		data.tar.bz2) cat_cmd=bzcat ;;
 		data.tar.xz) cat_cmd=xzcat ;;
+		data.tar) cat_cmd=cat ;;
 		*) error 1 UNKNOWNDATACOMP "Unknown compression type for %s in %s" "$tarball" "$pkg" ;;
 	esac
 
-- 
1.9.0.rc3.244.g3497008

From aa3e446f3f87cec655dd66929c85050f6776c812 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Thu, 23 Jan 2014 20:14:11 +0100
Subject: [PATCH 2/2] Add uncompressed and xz control.tar deb member support

These are currently not accepted by the Debian archive, but are
supported since dpkg 1.17.6, and they do not incur any additional
dependency from the host system. This is mostly for completeness'
sake, as Debian base packages with uncompressed or xz control.tar
members are probably not going to be used at all.
---
 functions | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/functions b/functions
index 8fc0bee..0d48390 100644
--- a/functions
+++ b/functions
@@ -805,10 +805,22 @@ extract_dpkg_deb_data () {
 extract_ar_deb_field () {
 	local pkg="$1"
 	local field="$2"
+	local tarball=$(ar -t "$pkg" | grep "^control\.tar")
 
-	ar -p "$pkg" control.tar.gz | zcat |
-	    tar -O -xf - control ./control 2>/dev/null |
-	    grep -i "^$field:" | sed -e 's/[^:]*: *//' | head -n 1
+	case "$tarball" in
+		control.tar.gz) cat_cmd=zcat ;;
+		control.tar.xz) cat_cmd=xzcat ;;
+		control.tar) cat_cmd=cat ;;
+		*) error 1 UNKNOWNCONTROLCOMP "Unknown compression type for %s in %s" "$tarball" "$pkg" ;;
+	esac
+
+	if type $cat_cmd >/dev/null 2>&1; then
+		ar -p "$pkg" "$tarball" | $cat_cmd |
+		    tar -O -xf - control ./control 2>/dev/null |
+		    grep -i "^$field:" | sed -e 's/[^:]*: *//' | head -n 1
+	else
+		error 1 UNPACKCMDUNVL "Extracting %s requires the %s command, which is not available" "$pkg" "$cat_cmd"
+	fi
 }
 
 extract_ar_deb_data () {
-- 
1.9.0.rc3.244.g3497008


--- End Message ---
--- Begin Message ---
Source: debootstrap
Source-Version: 1.0.60

We believe that the bug you reported is fixed in the latest version of
debootstrap, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 739136@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Colin Watson <cjwatson@debian.org> (supplier of updated debootstrap package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 06 May 2014 09:37:34 +0100
Source: debootstrap
Binary: debootstrap debootstrap-udeb
Architecture: source all
Version: 1.0.60
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Colin Watson <cjwatson@debian.org>
Description: 
 debootstrap - Bootstrap a basic Debian system
 debootstrap-udeb - Bootstrap the Debian system (udeb)
Closes: 739136
Changes: 
 debootstrap (1.0.60) unstable; urgency=medium
 .
   [ Adam Conrad ]
   * Add (Ubuntu) utopic as a symlink to gutsy.
 .
   [ Guillem Jover ]
   * Sync deb support with latest dpkg-deb (closes: #739136):
     - Add uncompressed data.tar deb member support.
     - Add uncompressed and xz control.tar deb member support.
Checksums-Sha1: 
 10bb121a4471c5a2465b5366998b3863d76740ac 1865 debootstrap_1.0.60.dsc
 73e0fb8342c5349a492998f01feb88f585d95bd9 49612 debootstrap_1.0.60.tar.xz
 dada7e3e10f179a352d511166ca6c529c72120a5 56394 debootstrap_1.0.60_all.deb
 88a1bea0c5de80c1cd28b4d6db8f5dcffbcebc02 18196 debootstrap-udeb_1.0.60_all.udeb
Checksums-Sha256: 
 6e0ed2b19b105a878cc1b73f03fc4e3874292055e3322032f2ace5d82a888eae 1865 debootstrap_1.0.60.dsc
 886b140a6801012aba3f502d1f50f5b8e94fc032965400a6c2da19437a75dd4b 49612 debootstrap_1.0.60.tar.xz
 04c70b8390a595fa1c756b82425ecf86a694207120f0a749267f22c6a8f79ea2 56394 debootstrap_1.0.60_all.deb
 6e5fd8800a42d3914abe641c2b6cafc2df0c9da6e8a192868b4a7437401bd4c1 18196 debootstrap-udeb_1.0.60_all.udeb
Files: 
 c5d76a54d58e9567bda7958a7140bc30 56394 admin extra debootstrap_1.0.60_all.deb
 a0f3612302a0a27db2456a3c0470078f 18196 debian-installer extra debootstrap-udeb_1.0.60_all.udeb
 0a94f0cf46a3ba0cf9803b563cb3884c 1865 admin extra debootstrap_1.0.60.dsc
 733b25517e36ca7cbb66c121dc8f9ff4 49612 admin extra debootstrap_1.0.60.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Colin Watson <cjwatson@debian.org> -- Debian developer

iQIVAwUBU2ikDzk1h9l9hlALAQhlbg/7BpKzG2YeJzSMRdpOKYMwWrGsDv6nn11T
SNJHg4oWoKazXPxw1X1xaCu/AYYOEKaIglxcYYfkwvd71xxO4EHscPHZ7iqmwExE
r/U3RPuMy0gC88eri0qjdBTgvu2fAxHLBN420OM3KCjS2vzzoWhICT9vmsTtkPNC
joNN1a+zEOCzsm4tcRPZSA4s7pK6JWXMQsONlscUDXVeso0Acs4rS/8alhM4KR5N
HpC9m3O/MulohE8uDLQASKicuwoGYg3j3kxLJsZtZrb5L5H3DpR0A2ht3vFObH1r
mM3kyfHiwLRWV63WBlvgRGNxr3sqJAXcew8pQCvY8qWwNDBD6eN0VRSc0CJ4ac2O
RLSDdvKVVdmr1RlH27vvpLwFjbcjm+t5xw1qnFqwyOgTYc1GEgeLG8m78sum+7yh
2O+agCE+cf230rStN0hWQM8f3h0LEQhIRQOvfiL0LOkV6u1/pDAN1FzAxv2S8DLC
xsXSO2TTWFSDfrVH4GvceZ2/zpruw1GWyIdwVRvZ9ZZvu5tQhw8U0Zyg17QUJJsp
lPd5K+2XmqWzva4gnWoEQ6RjdQTMZS0m9+XYqguYFIAymV9H9pk2pwnk6SngDhti
31R+3JbLOTRz8EVD+hCHrDCfBeGbbAdeWOcaf9fzMzev+LBqeLU+HwaClML/5WPl
q4J3Z+A6vQU=
=9YCD
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: