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

Bug#757013: marked as done (crosshurd: Update deb(5) format support)



Your message dated Tue, 19 Aug 2014 18:03:55 +0000
with message-id <E1XJnlD-0005WQ-4l@franck.debian.org>
and subject line Bug#757013: fixed in crosshurd 1.7.47
has caused the Debian Bug report #757013,
regarding crosshurd: Update deb(5) format support
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.)


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

Hi!

As part of an effort [S] to try to get as much tools to understand
the current .deb format (see deb(5)), I'm attaching a patch series
updating the crosshurd code accessing the .deb archives.

 [S] <https://wiki.debian.org/Teams/Dpkg/DebSupport>

I've only tested running crosshurd for the hurd, but not the second
stage (running native-install), as I don't have a setup ready for this
right now.

(I'm including two other patches that update the dpkg and dpkg-deb
usage, strictly speaking not necessary for the .deb format support
though, just cleanup on the way.)

Thanks,
Guillem
From acfa29c106e43aba8a55e8c3ce9d6d65110cce72 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Mon, 4 Aug 2014 14:14:52 +0200
Subject: [PATCH 2/4] Use dpkg-deb instead of manually extracting the deb
 packages

There is no point in accessing the .deb files manually, we are assuming
dpkg-deb, dpkg and apt to be around anyway.

This automatically gives support for the latest deb(5) format.
---
 functions | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/functions b/functions
index 1e1f885..3fe312f 100644
--- a/functions
+++ b/functions
@@ -43,12 +43,7 @@ extract () { (
     p="$(($p + 1))"
     progress "$p" "$#" "Extracting packages"
     info "Extracting $pkg..."
-    if ar -t ./$pkg | grep -q data.tar.gz
-    then
-	ar -p ./$pkg data.tar.gz | zcat | tar -xf -
-    else
-	ar -p ./$pkg data.tar.xz | xzcat | tar -xf -
-    fi
+    dpkg-deb --extract ./$pkg .
   done
   sync
 ); }
@@ -74,11 +69,7 @@ apt_debfor () {
 x_feign_install () {
         local pkg="$1"
         local deb="$(debfor $pkg)"
-        local ver="$(
-            ar -p "$TARGET/$deb" control.tar.gz | zcat |
-                tar -O -xf - control ./control 2>/dev/null |
-                sed -ne 's/^Version: *//Ip' | head -n 1
-        )"
+        local ver="$(dpkg-deb --field "$TARGET/$deb" Version)"
  
         mkdir -p "$TARGET/var/lib/dpkg/info"
  
-- 
2.0.1.570.gc6b0718

From b6bbcc6292a13ebb48d1f2705094f5e48eada15e Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Mon, 4 Aug 2014 14:17:05 +0200
Subject: [PATCH 3/4] Use dpkg-deb --field instead of parsing dpkg-deb -I
 output

---
 dpkg-hurd                     | 2 +-
 makehurddir.sh                | 2 +-
 native-install/native-install | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dpkg-hurd b/dpkg-hurd
index b764744..449c726 100755
--- a/dpkg-hurd
+++ b/dpkg-hurd
@@ -77,7 +77,7 @@ case ${1} in
 
 	action="${1}"
 	file="${2}"
-	name=`dpkg --info ${file} | grep '^ Package:' - | sed -e "s/ Package: //"`
+	name=`dpkg-deb --field ${file} Package`
 
 	[ -f ${file} ] || err "file \`${file}' does not exist"
 
diff --git a/makehurddir.sh b/makehurddir.sh
index 4f3670e..d29d881 100755
--- a/makehurddir.sh
+++ b/makehurddir.sh
@@ -33,7 +33,7 @@ if [ $retval != 0 ]; then
 fi
 
 extract `(cd $TARGET/var/cache/apt/archives && \
-	for i in *.deb; do dpkg --info $i | grep ^\ Priority:.required \
+	for i in *.deb; do dpkg-deb --field $i Priority | grep ^required \
 	&& echo $i; done) | cut -d _ -f 1`
 
 if [ -e $TARGET/var/cache/apt/archives/gnumach-image-1.4-486_* ] ; then
diff --git a/native-install/native-install b/native-install/native-install
index 4e935c8..21dc92c 100755
--- a/native-install/native-install
+++ b/native-install/native-install
@@ -149,7 +149,7 @@ fi
 
 # install required packages
 for i in /var/cache/apt/archives/*.deb ; do 
-	dpkg --info $i | grep ^\ Priority:.required > /dev/null \
+	dpkg-deb --field $i Priority | grep ^required > /dev/null \
 	&& dpkg --force-depends --skip-same-version --unpack $i
 done
 dpkg --force-depends --skip-same-version --unpack /var/cache/apt/archives/insserv_*.deb
-- 
2.0.1.570.gc6b0718

From 91272b0a89964aa8ac2c73ae8716b2b8b9f90c24 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Mon, 4 Aug 2014 14:17:36 +0200
Subject: [PATCH 4/4] Use dpkg-deb --build instead of dpkg --build

We avoid the wrapper.
---
 dpkg-hurd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dpkg-hurd b/dpkg-hurd
index 449c726..5aa693b 100755
--- a/dpkg-hurd
+++ b/dpkg-hurd
@@ -100,7 +100,7 @@ case ${1} in
 	done
 
 	# Now repack the file.
-	dpkg --build temp_build/${name}
+	dpkg-deb --build temp_build/${name}
 
 	# Move old prerm and postrm scripts out of the way.
 	for f in prerm postrm
-- 
2.0.1.570.gc6b0718


--- End Message ---
--- Begin Message ---
Source: crosshurd
Source-Version: 1.7.47

We believe that the bug you reported is fixed in the latest version of
crosshurd, 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 757013@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Samuel Thibault <sthibault@debian.org> (supplier of updated crosshurd 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: SHA512

Format: 1.8
Date: Tue, 19 Aug 2014 19:40:28 +0200
Source: crosshurd
Binary: crosshurd
Architecture: source all
Version: 1.7.47
Distribution: unstable
Urgency: medium
Maintainer: GNU Hurd Maintainers <debian-hurd@lists.debian.org>
Changed-By: Samuel Thibault <sthibault@debian.org>
Description:
 crosshurd  - Install a Debian system
Closes: 757013 757014
Changes:
 crosshurd (1.7.47) unstable; urgency=medium
 .
   [ Guillem Jover ]
   * Switch from libparted0debian1 to libparted2 (Closes: Bug#757014).
   * Use dpkg-deb instead of manually extracting packages and information
     (Closes: Bug#757013).
Checksums-Sha1:
 cb61cc2c4ecace5aa9be2d501fcb43e6e49cae4c 1501 crosshurd_1.7.47.dsc
 8deb32f3d18c7d5067e26cd0b77ef124c420928c 21071 crosshurd_1.7.47.tar.gz
 af41e5fa2b800f28c76020072f6995916c976b0f 20366 crosshurd_1.7.47_all.deb
Checksums-Sha256:
 03da2003fe4e7053654bc2a8666a77437426b2753e0d0e9215fb76efb30a2b94 1501 crosshurd_1.7.47.dsc
 ddca98d408fcabe9d70b4c0decb74578e287bb20a1c4652ccaf743d7c71b1929 21071 crosshurd_1.7.47.tar.gz
 5310f63de5c313fd25dccaef625cd3e22dd79346a4ede9789254a3bc2e20d382 20366 crosshurd_1.7.47_all.deb
Files:
 f275129bea0d258d5010e49aa6f655ac 20366 misc extra crosshurd_1.7.47_all.deb
 d16f91a3ec55fd3d74566a9ccab4d6f9 1501 misc extra crosshurd_1.7.47.dsc
 10af3d510c4c965c103f1d6a028948b4 21071 misc extra crosshurd_1.7.47.tar.gz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJT85ACAAoJEBH0lP5vGG7NL4MP/1jb/m60b6obbpnYzlyygkcu
jeRU2cAmaAqqkl2FhR5z3qEtLlRgkCGtmHKNMjbWk5qw2rIKiJaL4WOfqowsaHjl
77mNYkXXg/jmujSI7+1r38JHYeCeZjSqKD9dZACQRkKeYnQ0jujMYVLzXprQ0Jzc
jKQAZ1idr8CB/2nmGoEbkyCc8TyhuNKrAXEoFf9zclG7YMfrcZ98sID93nkVMrym
aeHzkpw6vmUXRO+ECi6cjPlWtMDNR+b4JIwvNoKL3HixqwdNCLD6bGJIhLmE5F2G
tkE4agYAy6yQ6DKLCylfHXEja/BlTzer4DzfcFu08mvq0pP9f++RvoEs+yWUjO93
eXW/TKSA/0b1dwmG5/pXrKmZYHq6jzuZXepwXlEpGwyirPAVtaIt/eXhwSfRwdIe
R2koy9pmyYgMtxWH0eobXoCgrclTIv6iA3oHzdzSqnFiw8Zsy0uGNEvh4wMNqyCp
g4xNVyyFWgsEu5DbMpXbRoXuL3ZqYzOvgZBwmast13WmfidRw2w+ZbmV9ps0uycJ
SmpR0NdCqbmxZF1KoMzeWEsvUdppB3Tu25YkriJpQrELuvP2DrrEqL5z8EZ1eJEd
+scRKwLAXEcxAY959uyK8YyXsHWhAuMObMbFQQL4Jn4lkaKf2Apu5k7rRkoM4J2x
2UBLv0grjCeBEWjR8rm4
=Mcff
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: