소스 검색

Merged in changes from 1.9.10 to 1.9.11 branch.

Adam Heath 25 년 전
부모
커밋
17a0e907f9

+ 37 - 0
ChangeLog

@@ -1,3 +1,40 @@
+Wed Jun 20 11:28:25 CDT 2001 Adam Heath <doogie@debian.org>
+
+  * Merged in changes from 1.9.10 to 1.9.11 branch.
+
+    + scripts/dpkg-source.pl: Fix typo.
+    + scripts/dpkg-buildpackage.sh: Option -a implies option -d.
+      Set ARCH correctly to host architecture, rather than build arch.
+    + scripts/dpkg-gencontrol.pl: Error if an illegal package name is used.
+    + scripts/cl-debian.pl: Change list of allowed urgencies to: low, medium,
+      high, and critcial.
+    + scripts/dpkg-scanpackages.pl: warn instead of die when find returns
+      an error(which happens if there is a dangling symlink, because we use
+      -follow).
+    + scripts/dpkg-source.pl: Apply patch from Colin Watson:
+      * Reset SIGPIPE to DEFAULT when forking gzip.
+      * set LANG to C before execing cpio, as we parse its output.
+      * In checktarcpio() and checktarsane(), use the previously open pipes,
+        instead of the opening files on disk(which was the old, ancient way).
+      * Improve the output parsing of tar in checktarsane().
+    + scripts/dpkg-source.pl: When both arch: all and arch: <arch> packages
+      exist in debian/control, don't promote the source arch: to any, but
+      only list all and <arch>.
+    + scripts/dpkg-source.pl: Make it work with GNU md5sum.
+    + scripts/dpkg-source.1: Document -nc for dpkg-buildpackage.
+    + scripts/dpkg-genchanges.pl: Set the Architecture to 'source' only when
+      doing source only uploads in the generated changes files.
+    + scripts/dpkg-shlibdeps.pl: Fix infinite directory recursion thru
+      symlinks.
+    + doc/deb.5: Changed see-also reference to deb-old(5).
+    + scripts/{Makefile.in,dpkg-architecture.1}: Removed the manpage, and
+      generate it from the script now.
+    + scripts/dpkg-architecture.pl: Apply patch to correctly check the output
+      of gcc on hurd.
+    + scripts/dpkg-checkbuilddeps.pl: Fix logic error that kept everything
+      but Build-Deps from working.
+    + scripts/dpkg-checkbuilddeps.pl: Trim trailing spaces from packages.
+
 Sat Jun 16 18:52:17 CDT 2001 Adam Heath <doogie@debian.org>
 Sat Jun 16 18:52:17 CDT 2001 Adam Heath <doogie@debian.org>
 
 
   * Merge changes from v1_9_10 tag:
   * Merge changes from v1_9_10 tag:

+ 41 - 0
debian/changelog

@@ -5,6 +5,47 @@ dpkg (1.10) unstable; urgency=low
 
 
  -- Wichert Akkerman <wakkerma@debian.org>  UNRELEASED
  -- Wichert Akkerman <wakkerma@debian.org>  UNRELEASED
 
 
+dpkg (1.9.11) unstable; urgency=low
+
+  * The "Hang on to your hats, it gets bumpy from here." release.
+  * Trim trailing spaces from package names when checking builddeps.
+    Closes: #101304.
+  * Apply patch from bug to fix logic error that kept everything but
+    Build-Deps from working in checkbuilddeps.  Closes: #101511.
+  * Apply patch to correctly check the output of gcc on hurd, for
+    dpkg-architecture. Closes: #99874.
+  * The internal pod docs in dpkg-architecture were updated to reflect
+    that -f was no longer implied when -q was given, but the build system
+    wasn't generating new documentation.  Closes: #100997.
+  * deb(5) now has a see-also for deb-old(5).  Closes: #99620.
+  * Fix dpkg-shlibdeps infinite directory recursion thru symlinks.
+    Closes: #97622.
+  * Set the Architecture to 'source' only when doing source only uploads
+    in the generated changes files.  Closes: #100144.
+  * Document -nc in the dpkg-buildpackage manpage.  Closes: #101038.
+  * Make dpkg-source work with GNU md5sum.  Closes: #97666.
+  * in dpkg-source, when both arch: all and arch: <arch> packages exist in
+    debian/control, don't promote the source arch: to any, but only list
+    all and <arch>.  Closes: #94608
+  * Apply patch from Colin Watson:  Closes: #89679
+    * Reset SIGPIPE to DEFAULT when forking gzip.
+    * set LANG to C before execing cpio, as we parse its output.
+    * In checktarcpio() and checktarsane(), use the previously open pipes,
+      instead of the opening files on disk(which was the old, ancient way).
+    * Improve the output parsing of tar in checktarsane().
+  * warn instead of die when find returns an error(which happens if there
+    is a dangling symlink, because we use -follow).  Closes: #51479.
+  * Change list of allowed urgencies in debian/changelog to: low, medium,
+    high, and critcial.  Closes: #94475.
+  * Error out if an illegal package name is used in dpkg-gencontrol.pl.
+    Closes: #61211
+  * Apply patch from Marcus Brinkmann to dpkg-buildpackage:  Closes:
+    #98201.
+    * Option -a implies option -d.
+    * Set ARCH correctly to host architecture, rather than build arch.
+
+ -- Adam Heath <doogie@debian.org>  Tue, 19 Jun 2001 22:15:25 -0500
+
 dpkg (1.9.10) unstable; urgency=low
 dpkg (1.9.10) unstable; urgency=low
 
 
   * Fix [arch] parsing, and handle extra spaces better.  Closes: #100512,
   * Fix [arch] parsing, and handle extra spaces better.  Closes: #100512,

+ 1 - 1
doc/deb.5

@@ -69,7 +69,7 @@ inserted before
 with names starting with something other than underscores, or will
 with names starting with something other than underscores, or will
 (more likely) cause the major version number to be increased.
 (more likely) cause the major version number to be increased.
 .SH SEE ALSO
 .SH SEE ALSO
-.BR deb (5),
+.BR deb-old (5),
 .BR dpkg-deb (1),
 .BR dpkg-deb (1),
 .BR deb-control (5),
 .BR deb-control (5),
 .IR "Debian Packaging Manual".
 .IR "Debian Packaging Manual".

+ 9 - 4
scripts/Makefile.in

@@ -14,7 +14,7 @@ SBIN_SCRIPTS		= update-rc.d update-alternatives install-info \
 			  dpkg-divert dpkg-statoverride cleanup-info
 			  dpkg-divert dpkg-statoverride cleanup-info
 
 
 MAN1PAGES		= dpkg-name.1 dpkg-source.1 822-date.1 \
 MAN1PAGES		= dpkg-name.1 dpkg-source.1 822-date.1 \
-			  dpkg-architecture.1 dpkg-checkbuilddeps.1
+			  dpkg-checkbuilddeps.1
 MAN8PAGES		= update-rc.d.8 update-alternatives.8 install-info.8  \
 MAN8PAGES		= update-rc.d.8 update-alternatives.8 install-info.8  \
 			  cleanup-info.8 dpkg-scanpackages.8 dpkg-scansources.8 \
 			  cleanup-info.8 dpkg-scanpackages.8 dpkg-scansources.8 \
 			  dpkg-divert.8 dpkg-statoverride.8
 			  dpkg-divert.8 dpkg-statoverride.8
@@ -25,10 +25,12 @@ SCRIPTLIBS		= controllib.pl
 
 
 GEN_MAN8PAGES		= dpkg-scansources.8
 GEN_MAN8PAGES		= dpkg-scansources.8
 
 
+GEN_MAN1PAGES		= dpkg-architecture.1
+
 MAN_SOURCE_ALIASES	= dpkg-gencontrol.1 dpkg-genchanges.1 dpkg-buildpackage.1 \
 MAN_SOURCE_ALIASES	= dpkg-gencontrol.1 dpkg-genchanges.1 dpkg-buildpackage.1 \
 			  dpkg-distaddfile.1 dpkg-parsechangelog.1 dpkg-shlibdeps.1
 			  dpkg-distaddfile.1 dpkg-parsechangelog.1 dpkg-shlibdeps.1
 
 
-GENFILES		= $(CHANGELOG_PARSERS) $(BIN_SCRIPTS) $(SBIN_SCRIPTS) $(GEN_MAN8PAGES)
+GENFILES		= $(CHANGELOG_PARSERS) $(BIN_SCRIPTS) $(SBIN_SCRIPTS) $(GEN_MAN1PAGES) $(GEN_MAN8PAGES)
 
 
 .PHONY: all
 .PHONY: all
 all:: $(GENFILES)
 all:: $(GENFILES)
@@ -74,7 +76,7 @@ install-program:
 .PHONY: install-doc
 .PHONY: install-doc
 install-doc:
 install-doc:
 	$(mkinstalldirs) $(DESTDIR)/$(man1dir)
 	$(mkinstalldirs) $(DESTDIR)/$(man1dir)
-	set -e ; for i in $(MAN1PAGES) ; do \
+	set -e ; for i in $(MAN1PAGES) $(GEN_MAN1PAGES) ; do \
 		if test -f $$i ; then d= ; else d="$(srcdir)/" ; fi ; \
 		if test -f $$i ; then d= ; else d="$(srcdir)/" ; fi ; \
 		$(INSTALL_DATA) $$d$$i $(DESTDIR)/$(man1dir) ; \
 		$(INSTALL_DATA) $$d$$i $(DESTDIR)/$(man1dir) ; \
 	done
 	done
@@ -89,9 +91,12 @@ install-doc:
 	done
 	done
 
 
 
 
-%.8: %.pl
+%.8: $(srcdir)/%.pl
 	pod2man --section=8 $^ > $@
 	pod2man --section=8 $^ > $@
 
 
+%.1: $(srcdir)/%.pl
+	pod2man --section=1 $^ > $@
+
 %: %.pl
 %: %.pl
 	$(SED) -e "s:^#![:space:]*/usr/bin/perl:#! $(PERL):; \
 	$(SED) -e "s:^#![:space:]*/usr/bin/perl:#! $(PERL):; \
 		s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(dpkglibdir)\":; \
 		s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(dpkglibdir)\":; \

+ 1 - 1
scripts/cl-debian.pl

@@ -45,7 +45,7 @@ $i=100;grep($fieldimps{$_}=$i--,
           qw(Source Version Distribution Urgency Maintainer Date Closes
           qw(Source Version Distribution Urgency Maintainer Date Closes
 	     Changes));
 	     Changes));
 $i=1;grep($urgencies{$_}=$i++,
 $i=1;grep($urgencies{$_}=$i++,
-          qw(low medium routine high urgent emergency));
+          qw(low medium high critical));
 
 
 $expect='first heading';
 $expect='first heading';
 
 

+ 1 - 1
scripts/dpkg-architecture.pl

@@ -131,7 +131,7 @@ if ($?>>8) {
     $gcc = '';
     $gcc = '';
 } else {
 } else {
     $gcc =~ s!^.*gcc-lib/([^/]*)/(?:egcs-)?\d+(?:[.\da-z]*)/libgcc.*$!$1!s;
     $gcc =~ s!^.*gcc-lib/([^/]*)/(?:egcs-)?\d+(?:[.\da-z]*)/libgcc.*$!$1!s;
-    if (defined $1) {
+    if (defined $1 and $1 ne '') {
 	$gcc = $1;
 	$gcc = $1;
     } else {
     } else {
 	&warn("Couldn't determine gcc system type, falling back to default (native compilation)");
 	&warn("Couldn't determine gcc system type, falling back to default (native compilation)");

+ 3 - 3
scripts/dpkg-buildpackage.sh

@@ -23,7 +23,7 @@ Options: -r<gain-root-command>
          -spgp         the sign-command is called like PGP 
          -spgp         the sign-command is called like PGP 
          -us           unsigned source
          -us           unsigned source
          -uc           unsigned changes
          -uc           unsigned changes
-         -a<arch>      Debian architecture we build for
+         -a<arch>      Debian architecture we build for (implies -d)
          -b            binary-only, do not build source } also passed to
          -b            binary-only, do not build source } also passed to
          -B            binary-only, no arch-indep files } dpkg-genchanges
          -B            binary-only, no arch-indep files } dpkg-genchanges
          -S            source only, no binary files     } 
          -S            source only, no binary files     } 
@@ -82,7 +82,7 @@ do
 	-us)	signsource=: ;;
 	-us)	signsource=: ;;
 	-uc)	signchanges=: ;;
 	-uc)	signchanges=: ;;
 	-ap)	usepause="true";;
 	-ap)	usepause="true";;
-	-a*)    targetarch="$value" ;;
+	-a*)    targetarch="$value"; checkbuilddep=false ;;
 	-si)	sourcestyle=-si ;;
 	-si)	sourcestyle=-si ;;
 	-sa)	sourcestyle=-sa ;;
 	-sa)	sourcestyle=-sa ;;
 	-sd)	sourcestyle=-sd ;;
 	-sd)	sourcestyle=-sd ;;
@@ -142,7 +142,7 @@ else mustsetvar maintainer "`dpkg-parsechangelog | sed -n 's/^Maintainer: //p'`"
 eval `dpkg-architecture -a${targetarch} -t${targetgnusystem} -s -f`
 eval `dpkg-architecture -a${targetarch} -t${targetgnusystem} -s -f`
 
 
 if [ x$sourceonly = x ]; then
 if [ x$sourceonly = x ]; then
-	mustsetvar arch "`dpkg-architecture -a${targetarch} -t${targetgnusystem} -qDEB_BUILD_ARCH`" "build architecture"
+	mustsetvar arch "`dpkg-architecture -a${targetarch} -t${targetgnusystem} -qDEB_HOST_ARCH`" "host architecture"
 else
 else
 	arch=source
 	arch=source
 fi
 fi

+ 13 - 12
scripts/dpkg-checkbuilddeps.pl

@@ -37,17 +37,17 @@ close CONTROL;
 
 
 my $dep_regex=qr/\s*((.|\n\s+)*)\s/; # allow multi-line
 my $dep_regex=qr/\s*((.|\n\s+)*)\s/; # allow multi-line
 if ($cdata =~ /^Build-Depends:$dep_regex/mi) {
 if ($cdata =~ /^Build-Depends:$dep_regex/mi) {
-		push @unmet, build_depends($1, @status);
-	}
-elsif ($cdata =~ /^Build-Conflicts:$dep_regex/mi) {
-		push @conflicts, build_conflicts($1, @status);
-	}
-elsif (! $binary_only && $cdata =~ /^Build-Depends-Indep:$dep_regex/mi) {
-		push @unmet, build_depends($1, @status);
-	}
-elsif (! $binary_only && $cdata =~ /^Build-Conflicts-Indep:$dep_regex/mi) {
-		push @conflicts, build_conflicts($1, @status);
-	}
+	push @unmet, build_depends($1, @status);
+}
+if ($cdata =~ /^Build-Conflicts:$dep_regex/mi) {
+	push @conflicts, build_conflicts($1, @status);
+}
+if (! $binary_only && $cdata =~ /^Build-Depends-Indep:$dep_regex/mi) {
+	push @unmet, build_depends($1, @status);
+}
+if (! $binary_only && $cdata =~ /^Build-Conflicts-Indep:$dep_regex/mi) {
+	push @conflicts, build_conflicts($1, @status);
+}
 
 
 if (@unmet) {
 if (@unmet) {
 	print STDERR "$me: Unmet build dependencies: ";
 	print STDERR "$me: Unmet build dependencies: ";
@@ -129,7 +129,8 @@ sub check_line {
 		my @possibles=();
 		my @possibles=();
 ALTERNATE:	foreach my $alternate (split(/\s*\|\s*/, $dep)) {
 ALTERNATE:	foreach my $alternate (split(/\s*\|\s*/, $dep)) {
 			my ($package, $rest)=split(/\s*(?=[[(])/, $alternate, 2);
 			my ($package, $rest)=split(/\s*(?=[[(])/, $alternate, 2);
-	
+			$package =~ s/\s*$//;
+
 			# Check arch specifications.
 			# Check arch specifications.
 			if (defined $rest && $rest=~m/\[(.*?)\]/) {
 			if (defined $rest && $rest=~m/\[(.*?)\]/) {
 				my $arches=lc($1);
 				my $arches=lc($1);

+ 8 - 4
scripts/dpkg-genchanges.pl

@@ -190,10 +190,14 @@ for $_ (keys %fi) {
 	    } elsif (s/^X[BS]*C[BS]*-//i) {
 	    } elsif (s/^X[BS]*C[BS]*-//i) {
 		$f{$_}= $v;
 		$f{$_}= $v;
 	    } elsif (m/^Architecture$/) {
 	    } elsif (m/^Architecture$/) {
-		if ($v eq 'any' || grep($_ eq $arch, split(/\s+/, $v))) {
-		    $v= $arch;
-		} elsif ($v ne 'all') {
-		    $v= '';
+		if (not $sourceonly) {
+		    if ($v eq 'any' || grep($_ eq $arch, split(/\s+/, $v))) {
+			$v= $arch;
+		    } elsif ($v ne 'all') {
+			$v= '';
+		    }
+		} else {
+		    $v = '';
 		}
 		}
 		push(@archvalues,$v) unless !$v || $archadded{$v}++;
 		push(@archvalues,$v) unless !$v || $archadded{$v}++;
 	    } elsif (m/^(Package|Essential|Pre-Depends|Depends|Provides)$/ ||
 	    } elsif (m/^(Package|Essential|Pre-Depends|Depends|Provides)$/ ||

+ 2 - 0
scripts/dpkg-gencontrol.pl

@@ -56,6 +56,8 @@ while (@ARGV) {
     $_=shift(@ARGV);
     $_=shift(@ARGV);
     if (m/^-p([-+0-9a-z.]+)$/) {
     if (m/^-p([-+0-9a-z.]+)$/) {
         $oppackage= $1;
         $oppackage= $1;
+    } elsif (m/^-p([-+0-9a-zA-Z.]+)$/) {
+        &usageerr("Illegal package name \`$1'");
     } elsif (m/^-c/) {
     } elsif (m/^-c/) {
         $controlfile= $';
         $controlfile= $';
     } elsif (m/^-l/) {
     } elsif (m/^-l/) {

+ 1 - 1
scripts/dpkg-scanpackages.pl

@@ -126,7 +126,7 @@ while (<F>) {
     $pfilename{$p}= $fn;
     $pfilename{$p}= $fn;
 }
 }
 close(F);
 close(F);
-$? and die "find exited with $?\n";
+$? and warn "find exited with $?\n";
 
 
 select(STDERR); $= = 1000; select(STDOUT);
 select(STDERR); $= = 1000; select(STDOUT);
 
 

+ 1 - 1
scripts/dpkg-shlibdeps.pl

@@ -142,7 +142,7 @@ sub searchdir {
 	    if ( -f "$dir/$_/DEBIAN/shlibs" ) {
 	    if ( -f "$dir/$_/DEBIAN/shlibs" ) {
 		push(@curshlibs, "$dir/$_/DEBIAN/shlibs");
 		push(@curshlibs, "$dir/$_/DEBIAN/shlibs");
 		next;
 		next;
-	    } elsif ( $_ !~ /^\./ && -d "$dir/$_" ) {
+	    } elsif ( $_ !~ /^\./ && -d "$dir/$_" && ! -l "$dir/$_" ) {
 		&searchdir("$dir/$_");
 		&searchdir("$dir/$_");
 	    }
 	    }
 	}
 	}

+ 3 - 0
scripts/dpkg-source.1

@@ -607,6 +607,9 @@ Check build dependencies and conflicts; abort if unsatisfied.
 .TP
 .TP
 .B -d
 .B -d
 Do not check build dependencies and conflicts.
 Do not check build dependencies and conflicts.
+.TP
+.B -nc
+Do not clean the source tree(imlies -b).
 .SH DPKG-DISTADDFILE ARGUMENTS
 .SH DPKG-DISTADDFILE ARGUMENTS
 .B dpkg-distaddfile
 .B dpkg-distaddfile
 does not take any non-common options.  It takes three non-option
 does not take any non-common options.  It takes three non-option

+ 7 - 10
scripts/dpkg-source.pl

@@ -146,16 +146,12 @@ if ($opmode eq 'build') {
                         @sourcearch= ('any');
                         @sourcearch= ('any');
                     }
                     }
                 } else {
                 } else {
-                    if (grep($sourcearch[0] eq $_, 'any','all')) {
-                        @sourcearch= ('any');
-                    } else {
                         for $a (split(/\s+/,$v)) {
                         for $a (split(/\s+/,$v)) {
                             &error("architecture $a only allowed on its own".
                             &error("architecture $a only allowed on its own".
                                    " (list for package $p is \`$a')")
                                    " (list for package $p is \`$a')")
                                    if grep($a eq $_, 'any','all');
                                    if grep($a eq $_, 'any','all');
                             push(@sourcearch,$a) unless $archadded{$a}++;
                             push(@sourcearch,$a) unless $archadded{$a}++;
                         }
                         }
-                    }
                 }
                 }
                 $f{'Architecture'}= join(' ',@sourcearch);
                 $f{'Architecture'}= join(' ',@sourcearch);
             } elsif (s/^X[BC]*S[BC]*-//i) {
             } elsif (s/^X[BC]*S[BC]*-//i) {
@@ -723,6 +719,7 @@ sub checkstats {
     (@s= stat(STDIN)) || &syserr("cannot fstat $dscdir/$f");
     (@s= stat(STDIN)) || &syserr("cannot fstat $dscdir/$f");
     $s[7] == $size{$f} || &error("file $f has size $s[7] instead of expected $size{$f}");
     $s[7] == $size{$f} || &error("file $f has size $s[7] instead of expected $size{$f}");
     $m= `md5sum`; $? && subprocerr("md5sum $f"); $m =~ s/\n$//;
     $m= `md5sum`; $? && subprocerr("md5sum $f"); $m =~ s/\n$//;
+    $m =~ s/ *-$//; # Remove trailing spaces and -, to work with GNU md5sum
     $m =~ m/^[0-9a-f]{32}$/ || &failure("md5sum of $f gave bad output \`$m'");
     $m =~ m/^[0-9a-f]{32}$/ || &failure("md5sum of $f gave bad output \`$m'");
     $m eq $md5sum{$f} || &error("file $f has md5sum $m instead of expected $md5sum{$f}");
     $m eq $md5sum{$f} || &error("file $f has md5sum $m instead of expected $md5sum{$f}");
     open(STDIN,"</dev/null") || &syserr("reopen stdin from /dev/null");
     open(STDIN,"</dev/null") || &syserr("reopen stdin from /dev/null");
@@ -756,6 +753,7 @@ sub checktarcpio {
     &forkgzipread ("$tarfileread");
     &forkgzipread ("$tarfileread");
     if (! defined ($c2 = open (CPIO,"-|"))) { &syserr ("fork for cpio"); }
     if (! defined ($c2 = open (CPIO,"-|"))) { &syserr ("fork for cpio"); }
     if (!$c2) {
     if (!$c2) {
+	$ENV{'LANG'} = 'C';
         open (STDIN,"<&GZIP") || &syserr ("reopen gzip for cpio");
         open (STDIN,"<&GZIP") || &syserr ("reopen gzip for cpio");
         &cpiostderr;
         &cpiostderr;
         exec ('cpio','-0t');
         exec ('cpio','-0t');
@@ -764,7 +762,6 @@ sub checktarcpio {
     close (GZIP);
     close (GZIP);
 
 
     $/ = "\0";
     $/ = "\0";
-    open (CPIO, "<cpiolog");
     while (defined ($fn = <CPIO>)) {
     while (defined ($fn = <CPIO>)) {
 
 
         $fn =~ s/\0$//;
         $fn =~ s/\0$//;
@@ -841,7 +838,6 @@ sub checktarsane {
     close (GZIP);
     close (GZIP);
 
 
     my $efix= 0;
     my $efix= 0;
-    open (TAR, "<tarlog");
     while (<TAR>) {
     while (<TAR>) {
 
 
         chomp;
         chomp;
@@ -857,15 +853,15 @@ sub checktarsane {
                    "unknown or forbidden type \`".substr($_,0,1)."'");
                    "unknown or forbidden type \`".substr($_,0,1)."'");
         my $type = $&;
         my $type = $&;
 
 
-        if ($mode =~ /^l/) { $_ =~ s/ -\> .*//; }
+        if ($mode =~ /^l/) { $_ =~ s/ -> .*//; }
         s/ link to .+//;
         s/ link to .+//;
 
 
-	if (length ($_) <= 48) { 
+	my @tarfields = split(' ', $_, 6);
+	if (@tarfields < 6) { 
 	    &error ("tarfile \`$tarfileread' contains incomplete entry \`$_'\n");
 	    &error ("tarfile \`$tarfileread' contains incomplete entry \`$_'\n");
 	}
 	}
 
 
-	my $tarfn = substr ($_, 48, length ($_) - 48);
-	$tarfn = deoctify ($tarfn);
+	my $tarfn = deoctify ($tarfields[5]);
 
 
 	# store printable name of file for error messages
 	# store printable name of file for error messages
 	my $pname = $tarfn;
 	my $pname = $tarfn;
@@ -1022,6 +1018,7 @@ sub forkgzipwrite {
 
 
 sub forkgzipread {
 sub forkgzipread {
 #print STDERR "forkgzipread $_[0]\n";
 #print STDERR "forkgzipread $_[0]\n";
+    local $SIG{PIPE} = 'DEFAULT';
     open(GZIPFILE,"< $_[0]") || &syserr("read file $_[0]");
     open(GZIPFILE,"< $_[0]") || &syserr("read file $_[0]");
     pipe(GZIP,GZIPWRITE) || &syserr("pipe for gunzip");
     pipe(GZIP,GZIPWRITE) || &syserr("pipe for gunzip");
     defined($cgz= fork) || &syserr("fork for gunzip");
     defined($cgz= fork) || &syserr("fork for gunzip");