summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-04-25 11:46:36 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-04-29 14:44:09 +0200
commit22a65b8bfd3d8d5ad2c30229c51e003f3a9256bd (patch)
tree928e29c5c1c0dc508457a4e608d738b0488dede1 /t
parent27d7764739d28bee8c7b0c2f0f43c54beaabb26d (diff)
downloadurpmi-22a65b8bfd3d8d5ad2c30229c51e003f3a9256bd.tar
urpmi-22a65b8bfd3d8d5ad2c30229c51e003f3a9256bd.tar.gz
urpmi-22a65b8bfd3d8d5ad2c30229c51e003f3a9256bd.tar.bz2
urpmi-22a65b8bfd3d8d5ad2c30229c51e003f3a9256bd.tar.xz
urpmi-22a65b8bfd3d8d5ad2c30229c51e003f3a9256bd.zip
cpan-testers: fix failing to build some rpms on FreeBSD
unset %__os_install_post fixes to fix FreeBSD failures (RT#131162) %__os_install_post cause build failures on FreeBSD due to rpm not being adapted: such as http://www.cpantesters.org/cpan/report/0a319070-86d8-11ea-a1f7-ec411f24ea8f: + /usr/local/lib/rpm/brp-compress /usr/local + /usr/local/lib/rpm/brp-strip /usr/bin/strip + /usr/local/lib/rpm/brp-strip-static-archive /usr/bin/strip xargs: illegal option -- d usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements] [-S replsize]] [-J replstr] [-L number] [-n number [-x]] [-P maxprocs] [-s size] [utility [argument ...]] error: Bad exit status from /usr/home/cpansand/.cpan/build/2020042509/urpmi-v8.121.15-0/t/tmp/rpm-tmp.P9J8JW (%install) Stripping also often fails on FreeBSD: /usr/bin/strip: unable to copy file '...BUILDROOT/arch_to_noarch-1-1.x86_64/usr/lib/test-arch_to_noarch/ldconfig' reason: Permission denied As a side effect, it also fixes: Error: Could not execute /usr/local/lib/rpm/elfdeps: file or directory not found
Diffstat (limited to 't')
-rw-r--r--t/02create_pkgs.t4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/02create_pkgs.t b/t/02create_pkgs.t
index 63a8fc0f..fe118250 100644
--- a/t/02create_pkgs.t
+++ b/t/02create_pkgs.t
@@ -81,7 +81,9 @@ sub rpmbuild {
my $dir = getcwd();
my ($target) = $spec =~ m!-(i586|x86_64)\.spec$!;
- system_("rpmbuild --quiet --define 'rpm_version %(rpm -q --queryformat \"%{VERSION}\" rpm|sed -e \"s/\\\\.//g\")' --define '_topdir $dir/tmp' --define '_tmppath $dir/tmp' -bb --clean --nodeps ".($target ? "--target $target" : "")." $spec");
+ # unsetting %__os_install_post fixes failure to build on FreeBSD:
+ my $nopost = " --define '__os_install_post %nil'";
+ system_("rpmbuild --quiet --define 'rpm_version %(rpm -q --queryformat \"%{VERSION}\" rpm|sed -e \"s/\\\\.//g\")' --define '_topdir $dir/tmp' --define '_tmppath $dir/tmp' -bb --clean --nodeps $nopost ".($target ? "--target $target" : "")." $spec");
my ($name) = $spec =~ m!([^/]*)\.spec$!;