Bug#557296: debootstrap: Use dpkg-deb instead of ar when available

2009-11-27 Thread Guillem Jover
Hi!

On Sun, 2009-11-22 at 19:53:29 -0200, Otavio Salvador wrote:
> debootstrap don't _need_ to support all features of all valid .debs
> but the features accepted in base packages. This doesn't mean we
> shouldn't add features when possible but it is not a requirement for
> debootstrap POV.

One of my initial arguments was that debootstrap can be easily used
with stuff other than Debian, were those policies/restrictions might
not apply.

> On Sun, Nov 22, 2009 at 4:51 AM, Guillem Jover  wrote:
> > Right. Additionally an option could be added to explicitly choose the
> > extractor, to ease testing.
> 
> This indeed is a possible solution to be easier to test it. As Frans
> pointed out d-i is one "tester" of "basic *nix tools backend" already.

I went ahead and implemented it as a separate patch, take it if you
want, or leave it out if you wish.

> > The extractor choosed could be output to avoid that kind of situation.
> > I can amend the patch adding that if desired.
> 
> Ok, you convinced me. Could you amend the patch and send it for review?

I'm attaching the three patches, the first one has not changed, but
adding it for convenience.

thanks,
guillem
>From 0f78dd071235cbcbc9d2d27a74a76c673e06b4a8 Mon Sep 17 00:00:00 2001
From: Guillem Jover 
Date: Fri, 20 Nov 2009 19:51:44 +0100
Subject: [PATCH 1/3] Refactor deb extractors into two new functions

---
 functions   |   43 ++
 scripts/debian/potato   |6 +
 scripts/debian/sarge|6 +
 scripts/debian/sarge.buildd |6 +
 scripts/debian/sarge.fakechroot |6 +
 scripts/debian/sid  |6 +
 scripts/debian/woody|6 +
 scripts/debian/woody.buildd |6 +
 scripts/ubuntu/breezy   |6 +
 scripts/ubuntu/dapper   |6 +
 scripts/ubuntu/edgy |6 +
 scripts/ubuntu/feisty   |6 +
 scripts/ubuntu/gutsy|6 +
 scripts/ubuntu/hoary|6 +
 scripts/ubuntu/hoary.buildd |6 +
 scripts/ubuntu/warty|6 +
 scripts/ubuntu/warty.buildd |6 +
 17 files changed, 45 insertions(+), 94 deletions(-)

diff --git a/functions b/functions
index e832d70..66021e8 100644
--- a/functions
+++ b/functions
@@ -717,27 +717,42 @@ get_debs () {
 
  extraction
 
+extract_deb_field () {
+	local pkg="$1"
+	local field="$2"
+
+	ar -p "$pkg" control.tar.gz | zcat |
+	tar -O -xf - control ./control 2>/dev/null |
+	grep -i "^$field:" | sed -e 's/[^:]*: *//' | head -n 1
+}
+
+extract_deb_data () {
+	local pkg="$1"
+	local tarball=$(ar -t "$pkg" | grep "^data.tar.[bgx]z")
+
+	case "$tarball" in
+		data.tar.gz) cat_cmd=zcat ;;
+		data.tar.bz2) cat_cmd=bzcat ;;
+		data.tar.xz) cat_cmd=xzcat ;;
+		*) error 1 UNKNOWNDATACOMP "Unknown compression type for %s in %s" "$tarball" "$pkg" ;;
+	esac
+
+	if type $cat_cmd >/dev/null 2>&1; then
+		ar -p "$pkg" data.tar.gz | $cat_cmd | tar -xf -
+	else
+		error 1 UNPACKCMDUNVL "The $cat_cmd is not available on the system"
+	fi
+}
+
 extract () { (
 	cd "$TARGET"
-	local p=0 tarball cat_cmd
+	local p=0 cat_cmd
 	for pkg in $(debfor "$@"); do
 		p="$(($p + 1))"
 		progress "$p" "$#" EXTRACTPKGS "Extracting packages"
 		packagename="$(echo "$pkg" | sed 's,^.*/,,;s,_.*$,,')"
 		info EXTRACTING "Extracting %s..." "$packagename"
-		tarball=$(ar -t "./$pkg" | grep "^data.tar.[bgx]z")
-		case "$tarball" in
-			data.tar.gz) cat_cmd=zcat ;;
-			data.tar.bz2) cat_cmd=bzcat ;;
-			data.tar.xz) cat_cmd=xzcat ;;
-			*) error 1 UNKNOWNDATACOMP "Unknown compression type for %s in %s" "$tarball" "$pkg" ;;
-		esac
-
-		if type $cat_cmd >/dev/null 2>&1; then
-			ar -p "./$pkg" data.tar.gz | $cat_cmd | tar -xf -
-		else
-			error 1 UNPACKCMDUNVL "The $cat_cmd is not available on the system"
-		fi
+		extract_deb_data "./$pkg"
 	done
 ); }
 
diff --git a/scripts/debian/potato b/scripts/debian/potato
index 3204c7d..304cbe0 100644
--- a/scripts/debian/potato
+++ b/scripts/debian/potato
@@ -43,11 +43,7 @@ first_stage_install () {
 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 |
-grep -i ^Version: | sed -e 's/[^:]*: *//' | head -n 1
-)"
+local ver="$(extract_deb_field "$TARGET/$deb" Version)"
 
 mkdir -p "$TARGET/var/lib/dpkg/info"
 
diff --git a/scripts/debian/sarge b/scripts/debian/sarge
index e49a490..252e180 100644
--- a/scripts/debian/sarge
+++ b/scripts/debian/sarge
@@ -111,11 +111,7 @@ first_stage_install () {
 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

Processed: Re: Bug#558229: Policy violation §12.3: postinst requires files in /usr/share/doc.

2009-11-27 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> severity 558229 serious
Bug #558229 [console-setup] Policy violation §12.3: postinst requires files in 
/usr/share/doc.
Severity set to 'serious' from 'normal'

> thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#558229: Policy violation §12.3: postinst requires files in /usr/share/doc.

2009-11-27 Thread Christian Perrier
severity 558229 serious
thanks

Quoting Trent W. Buck (trentb...@gmail.com):
> Package: console-setup
> Version: 1.49
> Severity: normal
> 
> When installing the emdebian "gripped" version of 1.49:
> 
> > Setting up console-setup (1.49em1) ...
> > cat: /usr/share/doc/console-setup/examples/console-setup: No such file or 
> > directory
> 
> Relying on the existence of files in /usr/share/doc being installed
> appears to be a policy violation:


You seem to be right. In such case, this bug should be RC.

The file in /usr/share/doc is apparently meant to be a kind of
template.

Either it should be installed in something like
/usr/share/console-setup or the postinst script should handle the
absence of the file in a clean way:

- test if the file is here
- if it isn't, use a small config file created on the file by "cat <

signature.asc
Description: Digital signature


Processed: Re: Updating Tasksel translation - howto?

2009-11-27 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> tags 540822 pending
Bug #540822 [tasksel] tasksel: [INTL:sk] Slovak translation
Added tag(s) pending.
> tags 545312 pending
Bug #545312 [tasksel] tasksel: [INTL:ru] Russian program translation update
Added tag(s) pending.
> thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



base-installer 1.103 MIGRATED to testing

2009-11-27 Thread Debian testing watch
FYI: The status of the base-installer source package
in Debian's testing distribution has changed.

  Previous version: 1.102
  Current version:  1.103

-- 
This email is automatically generated once a day.  As the installation of
new packages into testing happens multiple times a day you will receive
later changes on the next day.
See http://release.debian.org/testing-watch/ for more information.


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#509799: Patch

2009-11-27 Thread Martin Michlmayr
* Gaudenz Steinlin  [2009-11-26 18:56]:
> Why not just ask the user if d-i should mark the partition as bootable?
> I'm not sure if this is easily implementable, but if it is, I think this
> would be user friendlier than the proposed solution.
> 
> E.g something along the lines of: Your boot partition is not marked as
> bootable. Should it be marked as bootable?

I don't really know why this is not being done.  I just implemented it
the way other such prompts are done in d-i.  Maybe someone who knows
more about partman can comment on Gaudenz's question.

-- 
Martin Michlmayr
http://www.cyrius.com/



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: Suggestion: Change the link names on http://www.debian.org/releases/stable/debian-installer/

2009-11-27 Thread Alexander Reichle-Schmehl
Hi!

* Gerfried Fuchs  [091127 11:43]:
>  One suggestion that is pretty easy to implement and also should be
> helpful straight ahead: Why not make amd64 and i386 appear in *bold*
> letters?

Would it be to much to ask to replace the single "amd64" with "amd64 /
Intel EM64-T" (or however it's called) on the webpages?  That might
reduce the "your ia64 image doesn't boot on my intel box" complaints.

Best Regards,
  Alexander


signature.asc
Description: Digital signature


Re: Suggestion: Change the link names on http://www.debian.org/releases/stable/debian-installer/

2009-11-27 Thread Gerfried Fuchs
* Frans Pop  [2009-11-27 00:27:07 CET]:
> On Thursday 26 November 2009, Matthew Wilcox wrote:
> > Why should users have to learn what Debian's internal name for their
> > architecture is? 
> 
> Because that is what they see/need when they look at the sources.list or 
> package names?

 I have no powerpc in my sources.list, and package names don't carry
powerpc for me neither.

 On the other hand, enabling users to learn isn't a bad thing in itself.
If it is additional, we shouldn't depend too much on educating our users
- offering it is enough.

 One suggestion that is pretty easy to implement and also should be
helpful straight ahead: Why not make amd64 and i386 appear in *bold*
letters? That way they stand out and people are more likely to
recoginize and choose them. Ordering and discussions on renaming one way
or another might confuse, having it clearly standing out is a concept
that everyone should easy be able to understand.

 You can afterwards continue to discuss wether allcaps or lowercase or
the arch part from the package filename is the best option. ;)

 So long! :)
Rhonda


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#558229: Policy violation §12.3: postinst requires files in /usr/share/doc.

2009-11-27 Thread Trent W. Buck
Package: console-setup
Version: 1.49
Severity: normal

When installing the emdebian "gripped" version of 1.49:

> Setting up console-setup (1.49em1) ...
> cat: /usr/share/doc/console-setup/examples/console-setup: No such file or 
> directory

Relying on the existence of files in /usr/share/doc being installed
appears to be a policy violation:

> 12.3. Additional documentation
> --
>
> [...]  Packages must not require the existence of any files in
> `/usr/share/doc/' in order to function [1].  Any files that are
> referenced by programs but are also useful as stand alone
> documentation should be installed under `/usr/share//' with
> symbolic links from `/usr/share/doc/'. [...]
>
> [1] The system administrator should be able to delete files in
> `/usr/share/doc/' without causing any programs to break.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/1 CPU core)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages console-setup depends on:
ii  console-terminus  4.30-2em1  Fixed-width fonts for fast reading
ii  debconf [debconf-2.0] 1.5.28em1  Debian configuration management sy
ii  keyboard-configuration1.49   system-wide keyboard preferences
ii  xkb-data  1.6-1em1   X Keyboard Extension (XKB) configu

Versions of packages console-setup recommends:
ii  kbd   1.15-4 Linux console font and keytable ut

Versions of packages console-setup suggests:
ii  locales 2.10.1-7em1  GNU C Library: National Language (
ii  lsb-base4.0-0ubuntu3 Linux Standard Base 4.0 init scrip

-- debconf information:
* console-setup/variant: USA
  console-setup/codeset47: . Combined - Latin; Slavic Cyrillic; Greek
  console-setup/unsupported_options: true
  console-setup/fontsize-text: 12x6
* console-setup/compose: No compose key
  debian-installer/console-setup-udeb/title:
  console-setup/other:
  console-setup/ctrl_alt_bksp: false
  console-setup/modelcode: pc105
  console-setup/switch: No temporary switch
  console-setup/unsupported_config_layout: true
  console-setup/use_system_font:
  console-setup/fontsize: 12x6
  console-setup/unsupported_layout: true
* console-setup/charmap: UTF-8
  console-setup/layoutcode: us
  console-setup/fontface47: Terminus
  console-setup/fontsize-text47: 12x6
  console-setup/optionscode: ctrl:nocaps
  debian-installer/console-setup/title:
* console-setup/unsupported_config_options: true
  console-setup/charmap47: UTF-8
* console-setup/layout: USA
  console-setup/variantcode:
  console-setup/codesetcode: Uni2
* console-setup/dont_ask_layout:
* console-setup/altgr: The default for the keyboard layout
* console-setup/ttys: /dev/tty[1-6]
* console-setup/model: Generic 105-key (Intl) PC
* console-setup/fontsize-fb: 12x6
  console-setup/fontsize-fb47: 12x6
* console-setup/codeset: . Combined - Latin; Slavic Cyrillic; Greek
  console-setup/toggle: No toggling
* console-setup/fontface: Terminus



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org