diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-04-25 11:46:36 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-04-29 14:44:09 +0200 |
commit | 22a65b8bfd3d8d5ad2c30229c51e003f3a9256bd (patch) | |
tree | 928e29c5c1c0dc508457a4e608d738b0488dede1 | |
parent | 27d7764739d28bee8c7b0c2f0f43c54beaabb26d (diff) | |
download | urpmi-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
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | t/02create_pkgs.t | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -5,6 +5,7 @@ o check that web server has actually started o describe more tests to help pinpoint regressions o do not fail test when libnss.so is not found in Debian 9 or FreeBSD + o fix failing to build some rpms on FreeBSD o fix test with rpm < 4.13 on CentOS7 o make sure genhdlist2 works o perform some file conflict tests only on Mageia 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$!; |