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

Bug#514237: marked as done (debian-cd: Support non-i386 mirrors, and support D-I modules in non-main)



Your message dated Thu, 12 Feb 2009 11:02:03 +0000
with message-id <E1LXZKV-0001ek-Cx@ries.debian.org>
and subject line Bug#514237: fixed in debian-cd 3.1.1
has caused the Debian Bug report #514237,
regarding debian-cd: Support non-i386 mirrors, and support D-I modules in non-main
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.)


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

This patch adds two features to debian-cd, filed as a single bug/patch, per
Steve McIntyre's suggestion on the mailing list:
 1) It no longer requires the existence of the i386 architecture in the
    mirror to build non-i386 CD images.
 2) It no longer requires that all D-I modules (udebs) exist in the 'main'
    component

I have tested this patch to work when building the following combinations of
CDs from a mirror with binary-i386, binary-amd64, and source archs:
binary-i386
binary-i386 + source
binary-amd64
binary-amd64 + source
binary-i386 + binary-amd64
binary-i386 + binary-amd64 + source
source

I have also tested it to build the following CDs from a mirror with only
binary-amd64 and source archs:
binary-amd64
binary-amd64 + source
source

I have not tested with any other architectures, or CD combinations but I
beleive this patch should work with any architecture(s).


*** /home/jonhall/non-i386.patch
Index: debian-cd/tools/update_tasks
===================================================================
--- debian-cd/tools/update_tasks	(revision 7407)
+++ debian-cd/tools/update_tasks	(revision 7487)
@@ -1,5 +1,6 @@
 #!/bin/sh
 set -e
+ARCHES="alpha arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc amd64"
 
 if [ -z "$CODENAME" ]; then
     echo "update_tasks: codename not specified" >&2
@@ -149,10 +150,14 @@
     }' | sort -s -n -k1 | cut -d: -f2 >> $file
 }
 
-# We need to gunzip a copy of the appropriate Packages.gz file
-# Assume i386, use the $CODENAME main Packages file
+# We need to gunzip a copy of the appropriate Packages.gz file(s)
+# Find an arch that exists in our mirror...
+for arch in $ARCHES; do
+    if [ -e $MIRROR/dists/$CODENAME/main/binary-$arch ]; then break; fi
+done
 TMP_PKG=$TDIR/Packages
-zcat $MIRROR/dists/$CODENAME/main/binary-i386/Packages.gz > $TMP_PKG
+zcat $MIRROR/dists/$CODENAME/main/binary-$arch/Packages.gz > $TMP_PKG
+[ -n "$LOCAL" ] && zcat $MIRROR/dists/$CODENAME/local/binary-$arch/Packages.gz >> $TMP_PKG
 
 # Now grab the appropriate tasksel package
 TASKSEL_DEB=$MIRROR/`mawk '
Index: debian-cd/tools/make_disc_trees.pl
===================================================================
--- debian-cd/tools/make_disc_trees.pl	(revision 7407)
+++ debian-cd/tools/make_disc_trees.pl	(revision 7487)
@@ -735,7 +735,7 @@
     }	
 
     $pdir = "$dir/dists/$codename/$dist";
-    if ($section eq "debian-installer") {
+    if ($section and $section eq "debian-installer") {
         $pdir = "$dir/dists/$codename/$dist/debian-installer";
     }
     return $pdir;
Index: debian-cd/tools/generate_di_list
===================================================================
--- debian-cd/tools/generate_di_list	(revision 7407)
+++ debian-cd/tools/generate_di_list	(revision 7487)
@@ -24,32 +24,38 @@
 EOF
 
 my @common_excludes = read_exclude("exclude-udebs");
-
+my $mirror_path = "$ENV{MIRROR}/dists/$ENV{DI_CODENAME}";
+opendir COMP, $mirror_path;
+my @components = grep { -d "$mirror_path/$_" and $_ !~ /^\./ } readdir COMP;
+close COMP;
 foreach my $arch (@ARCHES) {
-	my $packagefile="$ENV{MIRROR}/dists/$ENV{DI_CODENAME}/main/debian-installer/binary-$arch/Packages.gz";
-	unless (-f $packagefile) {
-		print "Missing package file for arch $arch.\n";
-		next;
-	}
 	(my $cpparch = $arch) =~ s/-/_/g;
-	print OUT "#ifdef ARCH_$cpparch\n";
-	my @exclude = @common_excludes;
-	push @exclude, read_exclude("exclude-udebs-$arch")
-		if -e exclude_path("exclude-udebs-$arch");
-UDEB:	foreach my $udeb (map { chomp; $_ } `zcat $packagefile | awk '/^Package:/ {print \$2}'`) {
-		foreach my $pattern (@exclude) {
-			if ($udeb =~ /^$pattern$/) {
-				next UDEB;
-			}
+	my $output = '';
+	for my $component ( @components ) {
+		my $packagefile="$mirror_path/$component/debian-installer/binary-$arch/Packages.gz";
+		unless ( -f $packagefile ) {
+			print "Missing package file for $component/$arch.\n";
+			next;
 		}
-		print OUT "$udeb\n";
+		my @exclude = @common_excludes;
+		push @exclude, read_exclude("exclude-udebs-$arch")
+			if -e exclude_path("exclude-udebs-$arch");
+		foreach my $udeb (map { chomp; $_ } `zcat $packagefile | awk '/^Package:/ {print \$2}'`) {
+			$output .= "$udeb\n" unless grep { $udeb =~ /^${_}$/ } @exclude;
+		}
 	}
+	next unless $output;
+	print OUT "#ifdef ARCH_$cpparch\n";
+	print OUT $output;
 	print OUT "#endif /* ARCH_$cpparch */\n";
 }
 
 sub read_exclude {
 	my $file=exclude_path(shift);
-	open (IN, "<$file") || warn "failed to read exclude file $file";
+	unless ( open (IN, "<$file") ) {
+	   warn "failed to read exclude file $file";
+	   return;
+	}
 	my @ret;
 	while (<IN>) {
 		chomp;
Index: debian-cd/tools/which_deb
===================================================================
--- debian-cd/tools/which_deb	(revision 7407)
+++ debian-cd/tools/which_deb	(revision 7487)
@@ -6,6 +6,9 @@
 # the archive to meet a requirement in the debian-cd build
 
 use strict;
+use List::Util qw{first};
+my @ARCHES=qw{alpha arm armel hppa hurd-i386 i386 ia64 mips mipsel
+              powerpc s390 sparc amd64};
 
 my ($mirror, $codename, $pkg, $pth, $output);
 
@@ -13,8 +16,14 @@
 $codename = shift;
 $pkg = shift;
 $output = shift;
-$pth = "$mirror/dists/$codename/main";
+$pth = "$mirror/dists/$codename/";
+opendir COMP, $pth;
+my @components = grep { -d "$pth/$_" and $_ !~ /^\./ } readdir COMP;
+close COMP;
 
+die "No components present in $pth\n"
+    unless @components;
+
 if (!defined ($output)) {
     $output = "binary";
 }
@@ -26,24 +35,26 @@
     my $old_split = $/;
     my $match;
     my $result = "";
-    
-    my $pgz = "$pth/binary-$arch/Packages.gz";
 
-    $/ = ''; # Browse by paragraph    
+    $/ = ''; # Browse by paragraph
 
-    if (-e $pgz) {
-        open(PFILE, "zcat $pgz |") or
-            die "Failed to read Packages file $pgz";
+    for my $component ( @components ) {
+        my $pgz = "$pth/$component/binary-$arch/Packages.gz";
 
-        while (defined($match = <PFILE>)) {
-            if (($match =~ /^Package: \Q$pkgname\E$/m)) {
-                $result = $match;
-                close PFILE;
-                return $result;
+        if (-e $pgz) {
+            open(PFILE, "zcat $pgz |") or
+                die "Failed to read Packages file $pgz";
+
+            while (defined($match = <PFILE>)) {
+                if (($match =~ /^Package: \Q$pkgname\E$/m)) {
+                    $result = $match;
+                    close PFILE;
+                    return $result;
+                }
             }
+            # Fell through
+            close PFILE;
         }
-        # Fell through
-        close PFILE;
     }
     return "";
 }
@@ -54,24 +65,26 @@
     my $old_split = $/;
     my $match;
     my $result = "";
-    
-    my $pgz = "$pth/source/Sources.gz";
 
-    $/ = ''; # Browse by paragraph    
+    $/ = ''; # Browse by paragraph
 
-    if (-e $pgz) {
-        open(PFILE, "zcat $pgz |") or
-            die "Failed to read Sources file $pgz";
+    for my $component ( @components ) {
+        my $pgz = "$pth/$component/source/Sources.gz";
 
-        while (defined($match = <PFILE>)) {
-            if (($match =~ /^Package: \Q$pkgname\E$/m)) {
-                $result = $match;
-                close PFILE;
-                return $result;
+        if (-e $pgz) {
+            open(PFILE, "zcat $pgz |") or
+                die "Failed to read Sources file $pgz";
+
+            while (defined($match = <PFILE>)) {
+                if (($match =~ /^Package: \Q$pkgname\E$/m)) {
+                    $result = $match;
+                    close PFILE;
+                    return $result;
+                }
             }
+            # Fell through
+            close PFILE;
         }
-        # Fell through
-        close PFILE;
     }
     return "";
 }
@@ -81,20 +94,23 @@
 my $srcname = "";
 
 if ($pkg eq "debootstrap") {
-    $pkgdata = grab_bin_info($pth, "i386", $pkg);
+    first { $pkgdata = grab_bin_info($pth, $_, $pkg) } @ARCHES;
 
 } elsif ($pkg eq "silo") {
     $pkgdata = grab_bin_info($pth, "sparc", $pkg);
 
 } elsif ($pkg eq "syslinux") {
-    $pkgdata = grab_bin_info($pth, "i386", "syslinux-common");
-    if (length($pkgdata) < 3) {        
-        $pkgdata = grab_bin_info($pth, "i386", "syslinux");
+    first { $pkgdata = grab_bin_info($pth, $_, "syslinux-common") } @ARCHES;
+    if (length($pkgdata) < 3) {
+        first { $pkgdata = grab_bin_info($pth, $_, "syslinux") } @ARCHES;
     }
 } elsif ($pkg eq "yaboot") {
     $pkgdata = grab_bin_info($pth, "powerpc", $pkg);
 }
 
+die "Could not locate $pkg\n"
+    unless $pkgdata;
+
 if (length($pkgdata) > 2) {
     if ($output eq "binary") {
         $pkgdata =~ m/^Filename: (\S+)/m and $bin_deb = $1;


-- System Information:
Debian Release: 5.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages debian-cd depends on:
ii  apt                     0.7.20           Advanced front-end for dpkg
ii  bc                      1.06.94-3        The GNU bc arbitrary precision cal
ii  cpp                     4:4.3.2-2        The GNU C preprocessor (cpp)
ii  curl                    7.18.2-8         Get a file from an HTTP, HTTPS or 
ii  dctrl-tools [grep-dctrl 2.13.1           Command-line tools to process Debi
ii  genisoimage             9:1.1.9-1        Creates ISO-9660 CD-ROM filesystem
ii  libcompress-zlib-perl   2.012-1          Perl module for creation and manip
ii  lynx                    2.8.7dev9-2.1    Text-mode WWW Browser (transitiona
ii  lynx-cur                2.8.7dev9-2.1    Text-mode WWW Browser with NLS sup
ii  make                    3.81-5           The GNU version of the "make" util
ii  perl [libdigest-md5-per 5.10.0-19        Larry Wall's Practical Extraction 
ii  tofrodos                1.7.8.debian.1-1 Converts DOS <-> Unix text files, 

Versions of packages debian-cd recommends:
ii  hfsutils                   3.2.6-11      Tools for reading and writing Maci
ii  netpbm                     2:10.0-12     Graphics conversion tools
ii  syslinux-common            2:3.71+dfsg-5 Kernel loader which uses a FAT, ex

debian-cd suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Source: debian-cd
Source-Version: 3.1.1

We believe that the bug you reported is fixed in the latest version of
debian-cd, which is due to be installed in the Debian FTP archive:

debian-cd_3.1.1.dsc
  to pool/main/d/debian-cd/debian-cd_3.1.1.dsc
debian-cd_3.1.1.tar.gz
  to pool/main/d/debian-cd/debian-cd_3.1.1.tar.gz
debian-cd_3.1.1_all.deb
  to pool/main/d/debian-cd/debian-cd_3.1.1_all.deb



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 514237@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Steve McIntyre <93sam@debian.org> (supplier of updated debian-cd 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@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 12 Feb 2009 09:13:24 +0000
Source: debian-cd
Binary: debian-cd
Architecture: source all
Version: 3.1.1
Distribution: unstable
Urgency: high
Maintainer: Debian CD Group <debian-cd@lists.debian.org>
Changed-By: Steve McIntyre <93sam@debian.org>
Description: 
 debian-cd  - Tools for building (Official) Debian CD set
Closes: 513421 513497 513498 514237
Changes: 
 debian-cd (3.1.1) unstable; urgency=high
 .
   [ Frans Pop ]
   * sparc: remove bogus default "append=cdrom" line from silo.conf template.
   * sparc: ensure the default 'install' option also gets KERNEL_PARAMS set.
   * start_new_disc: fix a typo so that DISC_PKG_HOOK might work. Thanks to
     Jonathan Hall for the patch. Closes: #513421
   * boot-x86: drop support for no longer really useful ISOLINUX_DEFAULT
     environment variable (see #512303 for discussion).
   * x86: clean up compatibility code that was needed for D-I Lenny RC1
     isolinux configuration files.
 .
   [ Otavio Salvador ]
   * do not exclude libaio1-udeb from CDs.
 .
   [ Steve McIntyre ]
   * Merge patches from Jonathan Hall:
     + Add better support for extra components, improve non-i386 mirror
       support (Closes: 514237)
     + tools/update_tasks no longer assumes i386 for all builds (Closes: #513497)
     + tools/which_deb no longer assumes i386 for all builds (Closes: #513498)
   * For source-only builds, don't do any task updates as they're not
     useful anyway.
   * Last high-urgency upload, ready for Lenny!
Checksums-Sha1: 
 d0efa0fb05871ffe6cddd3d85ad98abfa3e0cc34 1005 debian-cd_3.1.1.dsc
 dc451ff34b68918ed01b7777df2179a330e7d116 599004 debian-cd_3.1.1.tar.gz
 e607df77c64330c39effea451fce99d9e9ce34e3 603606 debian-cd_3.1.1_all.deb
Checksums-Sha256: 
 081aec7d0ea6fdad5e6ef305754cbbb2b5e4c115852fe90f06161690c26e0690 1005 debian-cd_3.1.1.dsc
 7c33d5c7466118f00863c63ace12a307f00fc89bcba37e7645a625238b89d9db 599004 debian-cd_3.1.1.tar.gz
 f49c832268d4a1b4b1e05f15666079819e0674b54231ff56d2c8eb8ded395599 603606 debian-cd_3.1.1_all.deb
Files: 
 615fac22d5a44ac6a417248f8fcde005 1005 admin extra debian-cd_3.1.1.dsc
 d58375a5f60972431ac6fe198ee62c52 599004 admin extra debian-cd_3.1.1.tar.gz
 59907a0b49cc78a784ccbe6e78c08d19 603606 admin extra debian-cd_3.1.1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFJk/3mfDt5cIjHwfcRAqu2AKCMcbnDVgtKZg9wN1YDF+xyp6xMfQCeO9c2
WKEBaX3pubtqEAaqAU0FlSo=
=k9u5
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: