From 0aa7015f37eee8849aa9b0c162e5375de1271019 Mon Sep 17 00:00:00 2001 From: joey Date: Wed, 7 Nov 2001 17:14:27 +0000 Subject: [PATCH] * Thanks to the excellent work of Mark A. Hershberger , alien now supports converting to and from Solaris "pkg" packages (which are really SysV packages). You probably need to run it on Solaris for this to work, though. This brings the number of possible conversions alien can do up from 12 to a monstrous 20! * Mark also had to patch Deb.pm a bit so the by-hand deb extraction could work with solaris's ar and tar. * Documented the EMAIL environment variable. Closes: #116754 * Threw out a lot of old patches, circa 1999. Probably useless today. * When converting to debs, move files as follows, if possible, for better FHS compliance: /usr/man => /usr/share/man /usr/info => /usr/share/info /usr/doc' => /usr/share/doc * Also moves files as follows, to avoid possibly confusing dpkg with installing over symlinks (?). Closes: #40012 /usr/bin/X11 should be /usr/X11R6/bin /usr/lib/X11 should be /usr/X11R6/lib/X11 /usr/include/X11 should be /usr/X11R6/include/X11 * Reverse these moves in the cleantree stage. * Debian users who have installed alien packages in the past may want to re-convert and reinstall them, to take advantage of the new FHS conversions. --- Alien/Package/Deb.pm | 23 +++++++++++++++++------ debian/changelog | 4 +++- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Alien/Package/Deb.pm b/Alien/Package/Deb.pm index ec783b4..927eb12 100644 --- a/Alien/Package/Deb.pm +++ b/Alien/Package/Deb.pm @@ -97,9 +97,19 @@ sub getcontrolfile { return `dpkg-deb --info $file $controlfile 2>/dev/null`; } else { - # Have to handle old debs without a leading ./ and - # new ones with it. - return `ar p $file control.tar.gz | gzip -dc | tar Oxf - $controlfile ./$controlfile 2>/dev/null` + # Solaris tar doesn't support O + sub tar_out { + my $file = shift; + + return "(mkdir /tmp/tar_out.$$ &&". + " cd /tmp/tar_out.$$ &&". + # Have to handle old debs without a leading ./ and + # new ones with it. + " tar xf - $file ./$file &&". + " cat $file; cd /; rm -rf /tmp/tar_out.$$)"; + } + my $getcontrol = "ar -p $file control.tar.gz | gzip -dc | ".tar_out($controlfile)." 2>/dev/null"; + return `$getcontrol` } } @@ -115,7 +125,8 @@ sub scan { my $file=$this->filename; my @control=$this->getcontrolfile('control'); - + die "Control file couldn't be read!" + if @control == 0; # Parse control file and extract fields. Use a translation table # to map between the debian names and the internal field names, # which more closely resemble those used by rpm (for historical @@ -170,7 +181,7 @@ sub scan { } else { @filelist=map { chomp; s:\./::; "/$_" } - `ar p $file data.tar.gz | gzip -dc | tar tf -`; + `ar -p $file data.tar.gz | gzip -dc | tar tf -`; } $this->filelist(\@filelist); @@ -198,7 +209,7 @@ sub unpack { or die "Unpacking of `$file' failed: $!"; } else { - system("ar p $file data.tar.gz | gzip -dc | (cd ".$this->unpacked_tree."; tar xpf -)") == 0 + system("ar -p $file data.tar.gz | gzip -dc | (cd ".$this->unpacked_tree."; tar xpf -)") == 0 or die "Unpacking of `$file' failed: $!"; } diff --git a/debian/changelog b/debian/changelog index c7f9fda..5f3953a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,12 @@ -alien (7.30pre) unstable; urgency=low +alien (7.30) unstable; urgency=low * Thanks to the excellent work of Mark A. Hershberger , alien now supports converting to and from Solaris "pkg" packages (which are really SysV packages). You probably need to run it on Solaris for this to work, though. This brings the number of possible conversions alien can do up from 12 to a monstrous 20! + * Mark also had to patch Deb.pm a bit so the by-hand deb extraction could + work with solaris's ar and tar. * Documented the EMAIL environment variable. Closes: #116754 * Threw out a lot of old patches, circa 1999. Probably useless today. * When converting to debs, move files as follows, if possible, for better