* Added -v to enable verbose mode, which lists each shell command

as it is run. Also added --veryverbose for verbose with command
     output too.
   * Use -V for version. (-v used to be documented, but never worked)
This commit is contained in:
joey
2003-05-14 22:14:29 +00:00
parent cbe19ea395
commit 7e6421c8e4
13 changed files with 274 additions and 157 deletions

View File

@@ -9,6 +9,7 @@ Alien::Package - an object that represents a package
package Alien::Package;
use strict;
use vars qw($AUTOLOAD);
our $verbose=0;
=head1 DESCRIPTION
@@ -143,22 +144,6 @@ yet. It will be set at unpack time.
=over 4
=item new
Returns a new object of this class. Optionally, you can pass in named
parameters that specify the values of any fields in the class.
=cut
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my $this=bless ({}, $class);
$this->init;
$this->$_(shift) while $_=shift; # run named parameters as methods
return $this;
}
=item init
This is called by new(). It's a handy place to set fields, etc, without
@@ -168,20 +153,6 @@ having to write your own new() method.
sub init {}
=item checkfile
This is a class method. Pass it a filename, and it will return true if it
looks like the file is a package of the type handled by the class.
=cut
sub checkfile {
my $this=shift;
my $file=shift;
return ''; # children override this.
}
=item install
Simply installs a package file. The filename is passed.
@@ -241,7 +212,7 @@ sub scan {
my $file=$this->filename;
if (! -e $file) {
die "`$file' does not exist; cannot read.";
die "$file does not exist; cannot read.";
}
}
@@ -260,12 +231,12 @@ sub unpack {
my $this=shift;
my $workdir = $this->name."-".$this->version;
mkdir($workdir, 0755) ||
$this->do("mkdir $workdir") or
die "unable to mkdir $workdir: $!";
# If the parent directory is suid/sgid, mkdir will make the root
# directory of the package inherit those bits. That is a bad thing,
# so explicitly force perms to 755.
chmod 0755, $workdir;
$this->do("chmod 755 $workdir");
$this->unpacked_tree($workdir);
}
@@ -325,10 +296,10 @@ sub DESTROY {
return if (! defined $this->unpacked_tree || $this->unpacked_tree eq '');
# This should never happen, but it pays to check.
if ($this->unpacked_tree eq '/') {
die "alien internal error: unpacked_tree is set to `/'. Please file a bug report!";
die "alien internal error: unpacked_tree is set to '/'. Please file a bug report!";
}
(system('rm', '-rf', $this->unpacked_tree) == 0)
or die "unable to delete temporary directory `".$this->unpacked_tree."`: $!";
$this->do('rm', '-rf', $this->unpacked_tree)
or die "unable to delete temporary directory '".$this->unpacked_tree."': $!";
$this->unpacked_tree('');
}
@@ -355,6 +326,117 @@ sub AUTOLOAD {
=back
=head1 CLASS DATA
=over 4
=item $Alien::Package::verbose
If set to a nonzero value, the shell commands that are run should be output.
If set to a value greater than 1, any output of the commands should also be
output.
=back
=head1 CLASS METHODS
These methods can be called on either an object or on the class itself.
=cut
=over 4
=item new
Returns a new object of this class. Optionally, you can pass in named
parameters that specify the values of any fields in the class.
=cut
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my $this=bless ({}, $class);
$this->init;
$this->$_(shift) while $_=shift; # run named parameters as methods
return $this;
}
=item checkfile
Pass it a filename, and it will return true if it looks like the file is
a package of the type handled by the class.
=cut
sub checkfile {
my $this=shift;
my $file=shift;
return ''; # children override this.
}
=item do
Runs a shell command. Is verbose or not depending on the value of
$Alien::Package::verbose. Returns true if the command succeeds,
false on failure.
=cut
sub do {
my $whatever=shift;
my @command=@_;
if ($Alien::Package::verbose) {
print "\t@command\n";
}
my $pid=fork;
if (!$pid) {
# child
if ($Alien::Package::verbose < 2) {
# just closing it won't do
open(STDOUT, ">/dev/null");
}
exec(@command);
exit 1;
}
else {
# parent
return (waitpid($pid, 0) > 0);
}
}
=item runpipe
This is similar to backticks, but honors $Alien::Package::verbose, logging
the command run if asked to. The output of the command returned.
=cut
sub runpipe {
my $whatever=shift;
my @command=@_;
if ($Alien::Package::verbose) {
print "\t@command\n";
}
if (wantarray) {
my @ret=`@command`;
if ($Alien::Package::verbose >= 2) {
print @ret;
}
return @ret;
}
else {
my $ret=`@command`;
if ($Alien::Package::verbose >= 2) {
print $ret."\n";
}
return $ret;
}
}
=back
=head1 AUTHOR
Joey Hess <joey@kitenet.net>

View File

@@ -87,7 +87,7 @@ sub install {
my $this=shift;
my $deb=shift;
(system("dpkg", "--no-force-overwrite", "-i", $deb) == 0)
$this->do("dpkg", "--no-force-overwrite", "-i", $deb)
or die "Unable to install";
}
@@ -107,7 +107,7 @@ sub test {
return map { s/\n//; $_ }
grep {
! /unknown-section alien/
} `lintian $deb`;
} $this->runpipe("lintian $deb");
}
else {
return "lintian not available, so not testing";
@@ -127,7 +127,7 @@ sub getcontrolfile {
my $file=$this->filename;
if ($this->have_dpkg_deb) {
return `dpkg-deb --info $file $controlfile 2>/dev/null`;
return $this->runpipe("dpkg-deb --info $file $controlfile 2>/dev/null");
}
else {
# Solaris tar doesn't support O
@@ -140,7 +140,7 @@ sub getcontrolfile {
" 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`
return $this->runpipe($getcontrol);
}
}
@@ -205,15 +205,15 @@ sub scan {
$this->conffiles(\@conffiles);
# Read in the list of all files.
# Note that tar doesn't supply a leading `/', so we have to add that.
# Note that tar doesn't supply a leading '/', so we have to add that.
my @filelist;
if ($this->have_dpkg_deb) {
@filelist=map { chomp; s:\./::; "/$_" }
`dpkg-deb --fsys-tarfile $file | tar tf -`;
$this->runpipe("dpkg-deb --fsys-tarfile $file | tar tf -");
}
else {
@filelist=map { chomp; s:\./::; "/$_" }
`ar -p $file data.tar.gz | gzip -dc | tar tf -`;
$this->runpipe("ar -p $file data.tar.gz | gzip -dc | tar tf -");
}
$this->filelist(\@filelist);
@@ -237,12 +237,12 @@ sub unpack {
my $file=$this->filename;
if ($this->have_dpkg_deb) {
(system("dpkg-deb", "-x", $file, $this->unpacked_tree) == 0)
or die "Unpacking of `$file' failed: $!";
$this->do("dpkg-deb", "-x", $file, $this->unpacked_tree)
or die "Unpacking of '$file' failed: $!";
}
else {
(system("ar -p $file data.tar.gz | gzip -dc | (cd ".$this->unpacked_tree."; tar xpf -)") == 0)
or die "Unpacking of `$file' failed: $!";
$this->do("ar -p $file data.tar.gz | gzip -dc | (cd ".$this->unpacked_tree."; tar xpf -)")
or die "Unpacking of '$file' failed: $!";
}
return 1;
@@ -293,20 +293,20 @@ sub prep {
my $this=shift;
my $dir=$this->unpacked_tree || die "The package must be unpacked first!";
mkdir("$dir/debian", 0755) ||
$this->do("mkdir $dir/debian") ||
die "mkdir $dir/debian failed: $!";
# Use a patch file to debianize?
if (defined $this->patchfile) {
# The -f passed to zcat makes it pass uncompressed files
# through without error.
(system("zcat -f ".$this->patchfile." | (cd $dir; patch -p1)") == 0)
$this->do("zcat -f ".$this->patchfile." | (cd $dir; patch -p1)")
or die "patch error: $!";
# Look for .rej files.
die "patch failed with .rej files; giving up"
if `find $dir -name "*.rej"`;
system('find', '.', '-name', '*.orig', '-exec', 'rm', '{}', ';');
chmod 0755, "$dir/debian/rules";
if $this->runpipe("find $dir -name \"*.rej\"");
$this->do('find', '.', '-name', '*.orig', '-exec', 'rm', '{}', ';');
$this->do("chmod", 755, "$dir/debian/rules");
# It's possible that the patch file changes the debian
# release or version. Parse changelog to detect that.
@@ -406,6 +406,9 @@ binary-arch: build
dh_clean -k
dh_installdirs
dh_installdocs
dh_installchangelogs
# Copy the packages's files.
find . -maxdepth 1 -mindepth 1 -not -name debian -print0 | \\
xargs -0 -r -i cp -a {} debian/\$(PACKAGE)
@@ -414,8 +417,8 @@ binary-arch: build
# If you need to move files around in debian/\$(PACKAGE) or do some
# binary patching, do it here
#
dh_installdocs
dh_installchangelogs
# This has been known to break on some wacky binaries.
# dh_strip
dh_compress
@@ -431,7 +434,7 @@ binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
EOF
close OUT;
chmod 0755,"$dir/debian/rules";
$this->do("chmod", 755, "$dir/debian/rules");
# Save any scripts.
if ($this->usescripts) {
@@ -456,10 +459,10 @@ EOF
if (-d "$dir/$olddir" && ! -e "$dir/$dirtrans{$olddir}") {
# Ignore failure..
my ($dirbase)=$dirtrans{$olddir}=~/(.*)\//;
system("install", "-d", "$dir/$dirbase");
system("mv", "$dir/$olddir", "$dir/$dirtrans{$olddir}");
$this->do("install", "-d", "$dir/$dirbase");
$this->do("mv", "$dir/$olddir", "$dir/$dirtrans{$olddir}");
if (-d "$dir/$olddir") {
system("rmdir", "-p", "$dir/$olddir");
$this->do("rmdir", "-p", "$dir/$olddir");
}
}
else {
@@ -479,7 +482,7 @@ sub build {
my $this=shift;
chdir $this->unpacked_tree;
my $log=`debian/rules binary 2>&1`;
my $log=$this->runpipe("debian/rules binary 2>&1");
if ($?) {
die "Package build failed. Here's the log:\n", $log;
}
@@ -503,15 +506,15 @@ sub cleantree {
if (! -e "$dir/$olddir" && -d "$dir/$dirtrans{$olddir}") {
# Ignore failure.. (should I?)
my ($dirbase)=$dir=~/(.*)\//;
system("install", "-d", "$dir/$dirbase");
system("mv", "$dir/$dirtrans{$olddir}", "$dir/$olddir");
$this->do("install", "-d", "$dir/$dirbase");
$this->do("mv", "$dir/$dirtrans{$olddir}", "$dir/$olddir");
if (-d "$dir/$dirtrans{$olddir}") {
system("rmdir", "-p", "$dir/$dirtrans{$olddir}");
$this->do("rmdir", "-p", "$dir/$dirtrans{$olddir}");
}
}
}
system("rm", "-rf", "$dir/debian");
$this->do("rm", "-rf", "$dir/debian");
}
=item package
@@ -643,7 +646,7 @@ Returns the date, in rfc822 format.
sub date {
my $this=shift;
my $date=`822-date`;
my $date=$this->runpipe("822-date");
chomp $date;
if (!$date) {
die "822-date did not return a valid result. You probably need to install the dpkg-dev debian package";
@@ -673,7 +676,7 @@ sub email {
close MAILNAME;
}
if (!$mailname) {
$mailname=`hostname -f`;
$mailname=$this->runpipe("hostname -f");
chomp $mailname;
}
return "$login\@$mailname";

View File

@@ -15,10 +15,6 @@ use base qw(Alien::Package::Rpm);
This is an object class that represents a lsb package. It is derived from
Alien::Package::Rpm.
=head1 FIELDS
=over 4
=head1 METHODS
=over 4
@@ -34,7 +30,7 @@ sub checkfile {
my $this=shift;
my $file=shift;
return unless $file =~ m/^lsb-.*\.rpm$/;
my @deps=`LANG=C rpm -qp -R $file`;
my @deps=$this->runpipe("LANG=C rpm -qp -R $file");
return 1 if grep { s/\s+//g; $_ eq 'lsb' } @deps;
return;
}

View File

@@ -104,7 +104,7 @@ sub install {
my $pkg=shift;
if (-x "/usr/sbin/pkgadd") {
(system("/usr/sbin/pkgadd", "-d .", "$pkg") == 0)
$this->do("/usr/sbin/pkgadd", "-d .", "$pkg")
or die "Unable to install";
}
else {
@@ -124,7 +124,7 @@ sub scan {
my $file=$this->filename;
my $tdir="pkg-scan-tmp.$$";
mkdir($tdir, 0755) || die "Error making $tdir: $!\n";
$this->do("mkdir", $tdir) || die "Error making $tdir: $!\n";
my $pkgname;
if (-x "/usr/bin/pkginfo" && -x "/usr/bin/pkgtrans") {
@@ -137,7 +137,7 @@ sub scan {
close INFO;
# Extract the files
(system("/usr/bin/pkgtrans -i $file $tdir $pkgname") == 0)
$this->do("/usr/bin/pkgtrans -i $file $tdir $pkgname")
|| die "Error running pkgtrans: $!\n";
open(INFO, "$tdir/$pkgname/pkginfo")
@@ -205,7 +205,7 @@ sub scan {
if -e "$file/".scripttrans()->{$script};
}
system ("rm -rf $tdir");
$this->do("rm -rf $tdir");
return 1;
}
@@ -230,8 +230,8 @@ sub unpack {
if (-x "/usr/bin/pkgtrans") {
my $workdir = $this->name."-".$this->version;;
mkdir($workdir, 0755) || die "unable to mkdir $workdir: $!\n";
(system("/usr/bin/pkgtrans $file $workdir $pkgname") == 0)
$this->do("mkdir", $workdir) || die "unable to mkdir $workdir: $!\n";
$this->do("/usr/bin/pkgtrans $file $workdir $pkgname")
|| die "unable to extract $file: $!\n";
rename("$workdir/$pkgname", "$ {workdir}_1")
|| die "unable rename $workdir/$pkgname: $!\n";
@@ -257,7 +257,7 @@ sub prep {
# grep {/^\./} readdir DIR;
# closedir DIR;
(system("cd $dir; find . -print | pkgproto > ./prototype") == 0)
$this->do("cd $dir; find . -print | pkgproto > ./prototype")
|| die "error during pkgproto: $!\n";
open(PKGPROTO, ">>$dir/prototype")
@@ -280,7 +280,7 @@ sub prep {
close PKGINFO;
print PKGPROTO "i pkginfo=./pkginfo\n";
mkdir("$dir/install", 0755) || die "unable to mkdir $dir/install: $!";
$this->do("mkdir", "$dir/install") || die "unable to mkdir $dir/install: $!";
open(COPYRIGHT, ">$dir/install/copyright")
|| die "error creating copyright: $!\n";
print COPYRIGHT $this->copyright;
@@ -295,7 +295,7 @@ sub prep {
open (OUT, ">$out") || die "$out: $!";
print OUT $data;
close OUT;
chmod 0755, $out;
$this->do("chmod", 755, $out);
print PKGPROTO "i $script=$out\n";
}
close PKGPROTO;
@@ -311,14 +311,14 @@ sub build {
my $this = shift;
my $dir = $this->unpacked_tree;
(system("cd $dir; pkgmk -r / -d .") == 0)
$this->do("cd $dir; pkgmk -r / -d .")
|| die "Error during pkgmk: $!\n";
my $pkgname = $this->converted_name;
my $name = $this->name."-".$this->version.".pkg";
(system("pkgtrans $dir $name $pkgname") == 0)
$this->do("pkgtrans $dir $name $pkgname")
|| die "Error during pkgtrans: $!\n";
rename "$dir/$name", $name;
$this->do("mv", "$dir/$name", $name);
return $name;
}

View File

@@ -23,6 +23,8 @@ Alien::Package.
Relocatable rpm packages have a prefixes field.
=back
=head1 METHODS
=over 4
@@ -51,7 +53,7 @@ sub install {
my $this=shift;
my $rpm=shift;
(system("rpm -ivh ".(exists $ENV{RPMINSTALLOPT} ? $ENV{RPMINSTALLOPT} : '').$rpm) == 0)
$this->do("rpm -ivh ".(exists $ENV{RPMINSTALLOPT} ? $ENV{RPMINSTALLOPT} : '').$rpm)
or die "Unable to install";
}
@@ -81,23 +83,23 @@ sub scan {
# Use --queryformat to pull out all the fields we need.
foreach my $field (keys(%fieldtrans)) {
$_=`LANG=C rpm -qp --queryformat \%{$field} $file`;
$_=$this->runpipe("LANG=C rpm -qp --queryformat \%{$field} $file");
$field=$fieldtrans{$field};
$_='' if $_ eq '(none)';
$this->$field($_);
}
# Get the conffiles list.
$this->conffiles([map { chomp; $_ } `LANG=C rpm -qcp $file`]);
$this->conffiles([map { chomp; $_ } $this->runpipe("LANG=C rpm -qcp $file")]);
if (defined $this->conffiles->[0] &&
$this->conffiles->[0] eq '(contains no files)') {
$this->conffiles([]);
}
$this->binary_info(scalar `rpm -qpi $file`);
$this->binary_info(scalar $this->runpipe("rpm -qpi $file"));
# Get the filelist.
$this->filelist([map { chomp; $_ } `LANG=C rpm -qpl $file`]);
$this->filelist([map { chomp; $_ } $this->runpipe("LANG=C rpm -qpl $file")]);
if (defined $this->filelist->[0] &&
$this->filelist->[0] eq '(contains no files)') {
$this->filelist([]);
@@ -145,8 +147,8 @@ sub unpack {
$this->SUPER::unpack(@_);
my $workdir=$this->unpacked_tree;
(system("rpm2cpio ".$this->filename." | (cd $workdir; cpio --extract --make-directories --no-absolute-filenames --preserve-modification-time) 2>/dev/null") == 0)
or die "Unpacking of `".$this->filename."' failed";
$this->do("rpm2cpio ".$this->filename." | (cd $workdir; cpio --extract --make-directories --no-absolute-filenames --preserve-modification-time) 2>&1")
or die "Unpacking of '".$this->filename."' failed";
# If the package is relocatable. We'd like to move it to be under
# the $this->prefixes directory. However, it's possible that that
@@ -168,12 +170,12 @@ sub unpack {
foreach (split m:/:, $this->prefixes) {
if ($_ ne '') { # this keeps us from using anything but relative paths.
$collect.="/$_";
mkdir($collect,0755) || die "unable to mkdir $collect: $!";
$this->do("mkdir", $collect) || die "unable to mkdir $collect: $!";
}
}
# Now move all files in the package to the directory we made.
if (@filelist) {
(system("mv", @filelist, "$workdir/".$this->prefixes) == 0)
$this->do("mv", @filelist, "$workdir/".$this->prefixes)
or die "error moving unpacked files into the default prefix directory: $!";
}
}
@@ -185,7 +187,7 @@ sub unpack {
# Note that the next section overrides these default permissions,
# if override data exists in the rpm permissions info. And such
# data should always exist, so this is probably a no-op.
system("find $workdir -type d -perm 700 -print0 | xargs --no-run-if-empty -0 chmod 700");
$this->do("find $workdir -type d -perm 700 -print0 | xargs --no-run-if-empty -0 chmod 700");
# rpm files have two sets of permissions; the set in the cpio
# archive, and the set in the control data; which override them.
@@ -215,9 +217,11 @@ sub unpack {
}
next unless -e "$workdir/$file"; # skip broken links
if ($> == 0) {
chown($uid, $gid, "$workdir/$file") || die "failed chowning $file to $uid\:$gid\: $!";
$this->do("chown", "$uid:$gid", "$workdir/$file")
|| die "failed chowning $file to $uid\:$gid\: $!";
}
chmod($mode, "$workdir/$file") || die "failed changing mode of $file to $mode\: $!";
$this->do("chmod", sprintf("%lo", $mode), "$workdir/$file")
|| die "failed changing mode of $file to $mode\: $!";
}
$this->owninfo(\%owninfo);
@@ -339,7 +343,7 @@ sub build {
# Ask rpm how it's set up. We want to know what architecture it
# will output, and where it will place rpms.
my ($rpmarch, $rpmdir);
foreach (`rpm --showrc`) {
foreach ($this->runpipe("rpm --showrc")) {
chomp;
if (/^build arch\s+:\s(.*)$/) {
$rpmarch=$1;
@@ -381,7 +385,7 @@ sub build {
$opts.=" $ENV{RPMBUILDOPTS}" if exists $ENV{RPMBUILDOPTS};
my $command="cd $dir; $buildcmd -bb $opts ".$this->name."-".$this->version."-".$this->release.".spec";
my $log=`$command 2>&1`;
my $log=$this->runpipe("$command 2>&1");
if ($?) {
die "Package build failed. Here's the log of the command ($command):\n", $log;
}

View File

@@ -85,7 +85,7 @@ Holds the compression type used in the slp file.
Holds the slp package format version of the slp file.
=item
=back
=head1 METHODS
@@ -114,7 +114,7 @@ sub install {
my $this=shift;
my $slp=shift;
(system("slpi", $slp) == 0)
$this->do("slpi", $slp)
or die "Unable to install";
}
@@ -163,7 +163,7 @@ sub scan {
# Read in the file list.
my @filelist;
# FIXME: support gzip files too!
foreach (`bzip2 -d < $file | tar -tf -`) {
foreach ($this->runpipe("bzip2 -d < $file | tar -tf -")) {
chomp;
s:^\./:/:;
$_="/$_" unless m:^/:;
@@ -176,7 +176,7 @@ sub scan {
$this->distribution('Stampede');
$this->origformat('slp');
$this->changelogtext('');
$this->binary_info(`ls -l $file`);
$this->binary_info($this->runpipe("ls -l $file"));
return 1;
}
@@ -195,10 +195,10 @@ sub unpack {
my $compresstype=$this->compresstype;
if ($compresstype == 0) {
system("bzip2 -d < $file | (cd ".$this->unpacked_tree."; tar xpf -)")
$this->do("bzip2 -d < $file | (cd ".$this->unpacked_tree."; tar xpf -)")
}
elsif ($compresstype == 1) {
system("gzip -dc $file | (cd ".$this->unpacked_tree."; tar xpf -)")
$this->do("gzip -dc $file | (cd ".$this->unpacked_tree."; tar xpf -)")
}
else {
die "package uses an unknown compression type, $compresstype (please file a bug report)";
@@ -250,7 +250,7 @@ sub build {
# something like that, becuase it results in a tar file where all
# the files in it start with "./", which is consitent with how
# normal stampede files look.
(system("(cd ".$this->unpacked_tree."; tar cf - ./*) | bzip2 - > $slp") == 0)
$this->do("(cd ".$this->unpacked_tree."; tar cf - ./*) | bzip2 - > $slp")
or die "package build failed: $!";
# Now append the footer.

View File

@@ -66,7 +66,7 @@ sub install {
my $tgz=shift;
if (-x "/sbin/installpkg") {
(system("/sbin/installpkg", "$tgz") == 0)
$this->do("/sbin/installpkg", "$tgz")
or die "Unable to install";
}
else {
@@ -111,7 +111,7 @@ sub scan {
$this->group("unknown");
$this->origformat('tgz');
$this->changelogtext('');
$this->binary_info(`ls -l $file`);
$this->binary_info($this->runpipe("ls -l $file"));
# Now figure out the conffiles. Assume anything in etc/ is a
# conffile.
@@ -145,7 +145,7 @@ sub scan {
# Now get the scripts.
foreach my $script (keys %{scripttrans()}) {
$this->$script(`tar Oxzf $file install/${scripttrans()}{$script} 2>/dev/null`);
$this->$script($this->runpipe("tar Oxzf $file install/${scripttrans()}{$script} 2>/dev/null"));
}
return 1;
@@ -162,10 +162,10 @@ sub unpack {
$this->SUPER::unpack(@_);
my $file=$this->filename;
(system("cat $file | (cd ".$this->unpacked_tree."; tar zxpf -)") == 0)
or die "Unpacking of `$file' failed: $!";
$this->do("cat $file | (cd ".$this->unpacked_tree."; tar zxpf -)")
or die "Unpacking of '$file' failed: $!";
# Delete the install directory that has slackware info in it.
system("cd ".$this->unpacked_tree."; rm -rf ./install");
$this->do("cd ".$this->unpacked_tree."; rm -rf ./install");
return 1;
}
@@ -194,7 +194,7 @@ sub prep {
open (OUT, ">$out") || die "$out: $!";
print OUT $data;
close OUT;
chmod 0755, $out;
$this->do("chmod", 755, $out);
}
}
}
@@ -209,7 +209,7 @@ sub build {
my $this=shift;
my $tgz=$this->name."-".$this->version.".tgz";
(system("cd ".$this->unpacked_tree."; tar czf ../$tgz .") == 0)
$this->do("cd ".$this->unpacked_tree."; tar czf ../$tgz .")
or die "Package build failed";
return $tgz;