From 9c28b11e6c996ff0e72c682afcee3dd6023e3121 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Wed, 8 Jul 2009 13:11:50 -0400 Subject: [PATCH] Fix support for recent versions of rpm Recent versions of rpm (such as 4.7.0) ignore the buildroot setting in the spec file. Use the --buildroot option to ensure the correct buildroot is used. --- Alien/Package/Rpm.pm | 4 +++- debian/changelog | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Alien/Package/Rpm.pm b/Alien/Package/Rpm.pm index 52e5832..e432aa0 100644 --- a/Alien/Package/Rpm.pm +++ b/Alien/Package/Rpm.pm @@ -419,7 +419,9 @@ sub build { } $opts.=" $ENV{RPMBUILDOPT}" if exists $ENV{RPMBUILDOPT}; - my $command="cd $dir; $buildcmd -bb $opts ".$this->name."-".$this->version."-".$this->release.".spec"; + my $pwd=`pwd`; + chomp $pwd; + my $command="cd $dir; $buildcmd --buildroot=$pwd/$dir -bb $opts ".$this->name."-".$this->version."-".$this->release.".spec"; my $log=$this->runpipe(1, "$command 2>&1"); if ($?) { die "Package build failed. Here's the log of the command ($command):\n", $log; diff --git a/debian/changelog b/debian/changelog index b23fb57..8844806 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +alien (8.78) UNRELEASED; urgency=low + + * Add support for rpm 4.7.0, which ignores the buildroot setting in the + spec file, by passing --buildroot. (Thanks, Pavel Roskin) + + -- Joey Hess Wed, 08 Jul 2009 13:50:12 -0400 + alien (8.77) unstable; urgency=low * Don't allow whitespace in package version when parsing debian/changelog.