Compare commits
37 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45b9541de4 | ||
|
|
0cba045b21 | ||
|
|
9915d8c0eb | ||
|
|
47999d7394 | ||
|
|
6a2317105a | ||
|
|
fbf3b77c41 | ||
|
|
136a084f89 | ||
|
|
336b1a6022 | ||
|
|
3b93042570 | ||
|
|
bbfe6044bc | ||
|
|
62132c1260 | ||
|
|
1782ee5d69 | ||
|
|
ddf7b4cbe3 | ||
|
|
9c9f6a4b92 | ||
|
|
b1fac7a4b7 | ||
|
|
95f8efdc74 | ||
|
|
fa2107f4e0 | ||
|
|
6e5f455b1a | ||
|
|
f5f2a00867 | ||
|
|
44990d68e6 | ||
|
|
42d1ff7394 | ||
|
|
c6d6ad650b | ||
|
|
18bec18c13 | ||
|
|
a7063fb8f9 | ||
|
|
586a259cea | ||
|
|
6d176a7c52 | ||
|
|
4c5c11f73d | ||
|
|
09778f4c43 | ||
|
|
94901f4732 | ||
|
|
53030a5c0c | ||
|
|
acfefabea4 | ||
|
|
53606fd875 | ||
|
|
5df3302f45 | ||
|
|
87574daa5c | ||
|
|
69db68caf1 | ||
|
|
91a1b2a09e | ||
|
|
ed0518c208 |
11 changed files with 209 additions and 122 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -4,3 +4,9 @@ libffi-3.0.9.tar.gz
|
|||
/libffi-3.0.13.tar.gz
|
||||
/libffi-3.1.tar.gz
|
||||
/libffi-3.4.2.tar.gz
|
||||
/libffi-3.4.4.tar.gz
|
||||
/libffi-3.4.6.tar.gz
|
||||
/libffi-3.4.7.tar.gz
|
||||
/libffi-3.4.8.tar.gz
|
||||
/libffi-3.5.1.tar.gz
|
||||
/libffi-3.5.2.tar.gz
|
||||
|
|
|
|||
150
libffi.spec
150
libffi.spec
|
|
@ -3,13 +3,45 @@
|
|||
%global multilib_arches %{ix86} x86_64
|
||||
|
||||
Name: libffi
|
||||
Version: 3.4.2
|
||||
Release: 2%{?dist}
|
||||
Version: 3.5.2
|
||||
Release: 1%{?dist}
|
||||
Summary: A portable foreign function interface library
|
||||
License: MIT
|
||||
# No license change for 3.5.2
|
||||
# No license change for 3.5.1
|
||||
# No license change for 3.4.8
|
||||
# No license change for 3.4.7
|
||||
# No license change for 3.4.6
|
||||
# The following SPDX licenses are extracted from the sources using
|
||||
# ScanCode 32.0.8 on build libffi-3.4.4-7.fc40:
|
||||
#
|
||||
# MIT - Most of the project sources (Required)
|
||||
# CC-PDDC - src/dlmalloc.c (Required)
|
||||
# mit OR gpl-3.0 - ltmain.sh (Ignored)
|
||||
# mit OR gpl-1.0-plus - ltmain.sh (Ignored)
|
||||
# gpl-2.0-plus WITH libtool-exception-2.0 - ltmain.sh, libtool.m4, configure (Ignored, not shipped)
|
||||
# warranty-disclaimer - ltmain.sh (Ignored)
|
||||
# unknown-license-reference - ltmain.sh (Ignored)
|
||||
# gpl-2.0-plus - Used by build system only (Ignored)
|
||||
# gpl-2.0 - Used by build system only (Ignored)
|
||||
# free-unknown - config.guess, config.sub (Ignored)
|
||||
# fsf-ap - Used by build system only (Ignored)
|
||||
# fsf-free - Used by build system only (Ignored)
|
||||
# fsf-unlimited - Used by build system only (Ignored)
|
||||
# fsf-unlimited-no-warranty - Used by build system only (Ignored)
|
||||
# gpl-1.0-plus - False positive in texinfo.tex (Ignored)
|
||||
# gpl-3.0-plus WITH tex-exception - texinfo.tex used in libffi-devel docs (Required)
|
||||
# gpl-2.0-plus WITH autoconf-simple-exception-2.0 - Used by build system only (Ignored)
|
||||
# gpl-3.0 - Used by build system only (Ignored)
|
||||
# gpl-3.0-plus - Used by the testsuite only (Ignored)
|
||||
# gpl-3.0-plus WITH autoconf-exception-2.0 - Used by build system only (Ignored)
|
||||
# gpl-3.0-plus WITH autoconf-simple-exception - Used by build system only (Ignored)
|
||||
# mpl-1.1 OR gpl-2.0-plus OR lgpl-2.1-plus - Not used in build (Ignored)
|
||||
# public-domain - Used by build system only (Ignored)
|
||||
# x11-xconsortium - Used by build system only (Ignored)
|
||||
License: MIT AND CC-PDDC AND (GPL-3.0-or-later WITH Texinfo-exception)
|
||||
URL: http://sourceware.org/libffi
|
||||
|
||||
Source0: https://github.com/libffi/libffi/releases/download/v3.4.2/libffi-3.4.2.tar.gz
|
||||
Source0: https://github.com/libffi/libffi/releases/download/v%{version}/libffi-%{version}.tar.gz
|
||||
Source1: ffi-multilib.h
|
||||
Source2: ffitarget-multilib.h
|
||||
|
||||
|
|
@ -47,7 +79,6 @@ layer of a fully featured foreign function interface. A layer must
|
|||
exist above `libffi' that handles type conversions for values passed
|
||||
between the two languages.
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
|
@ -57,21 +88,14 @@ Requires: pkgconfig
|
|||
The %{name}-devel package contains libraries and header files for
|
||||
developing applications that use %{name}.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
|
||||
# Prevent rebuild within the mass rebuild.
|
||||
exit 1
|
||||
|
||||
# For now we disable the static templates to avoid ghc and
|
||||
# gobject-introspection failures:
|
||||
# https://gitlab.haskell.org/ghc/ghc/-/issues/20051
|
||||
# https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/283
|
||||
# We need to get these fixes into Fedora before we can reeanble them.
|
||||
%configure --disable-static --disable-exec-static-tramp
|
||||
# --disable-multi-os-directory is used because otherwise, on riscv64, the
|
||||
# library is installed under ${_libdir}/lp64d, which we don't want. Other
|
||||
# architectures don't have the same problem so they're unaffected.
|
||||
%configure --disable-static --disable-multi-os-directory
|
||||
%make_build
|
||||
|
||||
%check
|
||||
|
|
@ -81,6 +105,7 @@ exit 1
|
|||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
||||
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
||||
|
||||
|
|
@ -107,7 +132,8 @@ install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/ffitarget.h
|
|||
%files
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{_libdir}/*.so.*
|
||||
%{_libdir}/libffi.so.8
|
||||
%{_libdir}/libffi.so.8.2.0
|
||||
|
||||
%files devel
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
|
|
@ -117,6 +143,94 @@ install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/ffitarget.h
|
|||
%{_infodir}/libffi.info.*
|
||||
|
||||
%changelog
|
||||
* Fri Sep 5 2025 DJ Delorie <dj@redhat.com> - 3.5.2-1
|
||||
- Rebase to libffi 3.5.1.
|
||||
|
||||
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Fri Jun 13 2025 DJ Delorie <dj@redhat.com> - 3.5.1-1
|
||||
- Rebase to libffi 3.5.1.
|
||||
|
||||
* Wed May 07 2025 DJ Delorie <dj@redhat.com> - 3.4.8-1
|
||||
- Rebase to libffi 3.4.8.
|
||||
|
||||
* Fri Apr 04 2025 Andrea Bolognani <abologna@redhat.com> - 3.4.7-4
|
||||
- Fix riscv64 build (thanks David Abdurachmanov and Rich Jones)
|
||||
|
||||
* Thu Mar 27 2025 DJ Delorie <dj@redhat.com> - 3.4.7-3
|
||||
- Regenerate configure for previous patch(#2313598)
|
||||
|
||||
* Thu Mar 06 2025 DJ Delorie <dj@redhat.com> - 3.4.7-2
|
||||
- Add PPC64 static trampoline support (#2313598)
|
||||
|
||||
* Tue Feb 18 2025 DJ Delorie <dj@redhat.com> - 3.4.7-1
|
||||
- Rebase to libffi 3.4.7.
|
||||
|
||||
* Wed Jan 22 2025 DJ Delorie <dj@redhat.com> - 3.4.6-5
|
||||
- Fix FTBFS due to C23 compiler (#2340729)
|
||||
|
||||
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.6-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Wed Aug 21 2024 Carlos O'Donell <carlos@redhat.com> 3.4.6-3
|
||||
- Fix AArch64 BTI enablement issues (#2305877)
|
||||
|
||||
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.6-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Mon Mar 18 2024 DJ Delorie <dj@redhat.com> - 3.4.6-1
|
||||
- Rebase to libffi 3.4.6.
|
||||
|
||||
* Thu Feb 29 2024 Carlos O'Donell <carlos@redhat.com> - 3.4.4-8
|
||||
- Analyze libffi-3.4.4-7.fc40 sources for license information
|
||||
- Migrate License field to SPDX identifiers for
|
||||
https://docs.fedoraproject.org/en-US/legal/allowed-licenses/
|
||||
https://docs.fedoraproject.org/en-US/legal/update-existing-packages
|
||||
(#2222084)
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.4-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.4-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Tue Jan 02 2024 Florian Weimer <fweimer@redhat.com> - 3.4.4-5
|
||||
- Add missing declaration of open_temp_exec_file
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.4-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Tue May 02 2023 DJ Delorie <dj@redhat.com> - 3.4.4-3
|
||||
- Enable static trampolines
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.4-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Fri Oct 28 2022 DJ Delorie <dj@redhat.com> - 3.4.4-1
|
||||
- Rebase to libffi 3.4.4.
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.2-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Mon Jan 31 2022 Dan Horák <dan[at]danny.cz> - 3.4.2-8
|
||||
- Fix handling Float128 structs on ppc64le (#2045797)
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.2-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Sat Jan 08 2022 Miro Hrončok <mhroncok@redhat.com> - 3.4.2-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34
|
||||
|
||||
* Wed Sep 15 2021 Carlos O'Donell <codonell@redhat.com> - 3.4.2-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34
|
||||
|
||||
* Wed Sep 15 2021 Carlos O'Donell <carlos@redhat.com> - 3.4.2-4
|
||||
- Harmonize spec file layout with downstream.
|
||||
|
||||
* Wed Aug 11 2021 Carlos O'Donell <carlos@redhat.com> - 3.4.2-3
|
||||
- Rebuild package and bump NEVRA.
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
6
plans/gating.fmf
Normal file
6
plans/gating.fmf
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
summary: Gating testplan for libffi
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (libffi-3.4.2.tar.gz) = 31bad35251bf5c0adb998c88ff065085ca6105cf22071b9bd4b5d5d69db4fadf16cadeec9baca944c4bb97b619b035bb8279de8794b922531fddeb0779eb7fb1
|
||||
SHA512 (libffi-3.5.2.tar.gz) = 76974a84e3aee6bbd646a6da2e641825ae0b791ca6efdc479b2d4cbcd3ad607df59cffcf5031ad5bd30822961a8c6de164ac8ae379d1804acd388b1975cdbf4d
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
---
|
||||
# This first play always runs on the local staging system
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-beakerlib
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- testsuite
|
||||
required_packages:
|
||||
- libffi
|
||||
- libffi-devel
|
||||
- gcc
|
||||
- dejagnu
|
||||
- rpm-build
|
||||
- gcc-c++
|
||||
- strace
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2010 Red Hat, Inc.
|
||||
# Copyright (c) 2010 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
|
|
@ -28,7 +28,7 @@ export TESTVERSION=1.0
|
|||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE dynamic_linking.patch dynamic_linking-dg.patch
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
|
|
@ -51,9 +51,9 @@ $(METADATA): Makefile
|
|||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Runs upstream testsuite" >> $(METADATA)
|
||||
@echo "Type: Sanity" >> $(METADATA)
|
||||
@echo "TestTime: 19m" >> $(METADATA)
|
||||
@echo "TestTime: 35m" >> $(METADATA)
|
||||
@echo "RunFor: libffi" >> $(METADATA)
|
||||
@echo "Requires: libffi libffi-devel gcc dejagnu rpm-build gcc-c++ texinfo strace" >> $(METADATA)
|
||||
@echo "Requires: libffi libffi-devel libtool gcc dejagnu rpm-build gcc-c++ texinfo strace" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv3" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
--- testsuite/lib/libffi-dg.exp 2008-02-14 19:45:33.000000000 -0500
|
||||
+++ testsuite/lib/libffi-dg.exp 2015-02-13 13:32:08.422053435 -0500
|
||||
@@ -110,7 +110,7 @@
|
||||
}
|
||||
verbose "gccdir $gccdir"
|
||||
|
||||
- set ld_library_path "."
|
||||
+ set ld_library_path ""
|
||||
append ld_library_path ":${gccdir}"
|
||||
|
||||
set compiler "${gccdir}/xgcc"
|
||||
@@ -127,16 +127,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
- # add the library path for libffi.
|
||||
- append ld_library_path ":${blddirffi}/.libs"
|
||||
-
|
||||
verbose "ld_library_path: $ld_library_path"
|
||||
|
||||
# Point to the Libffi headers in libffi.
|
||||
set libffi_include "${blddirffi}/include"
|
||||
verbose "libffi_include $libffi_include"
|
||||
|
||||
- set libffi_dir "${blddirffi}/.libs"
|
||||
+ set libffi_dir "/usr/LIBRARY_DIR"
|
||||
verbose "libffi_dir $libffi_dir"
|
||||
if { $libffi_dir != "" } {
|
||||
set libffi_dir [file dirname ${libffi_dir}]
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
--- testsuite/lib/libffi.exp 2013-03-16 07:19:39.000000000 -0400
|
||||
+++ testsuite/lib/libffi.exp 2014-10-22 11:10:42.449143642 -0400
|
||||
@@ -118,7 +118,7 @@
|
||||
}
|
||||
verbose "gccdir $gccdir"
|
||||
|
||||
- set ld_library_path "."
|
||||
+ set ld_library_path ""
|
||||
append ld_library_path ":${gccdir}"
|
||||
|
||||
set compiler "${gccdir}/xgcc"
|
||||
@@ -142,16 +142,13 @@
|
||||
|
||||
}
|
||||
|
||||
- # add the library path for libffi.
|
||||
- append ld_library_path ":${blddirffi}/.libs"
|
||||
-
|
||||
verbose "ld_library_path: $ld_library_path"
|
||||
|
||||
# Point to the Libffi headers in libffi.
|
||||
set libffi_include "${blddirffi}/include"
|
||||
verbose "libffi_include $libffi_include"
|
||||
|
||||
- set libffi_dir "${blddirffi}/.libs"
|
||||
+ set libffi_dir "/usr/LIBRARY_DIR"
|
||||
verbose "libffi_dir $libffi_dir"
|
||||
if { $libffi_dir != "" } {
|
||||
set libffi_dir [file dirname ${libffi_dir}]
|
||||
33
tests/testsuite/main.fmf
Normal file
33
tests/testsuite/main.fmf
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
summary: Runs upstream testsuite
|
||||
description: ''
|
||||
enabled: true
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1031159
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=839210
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1006261
|
||||
tag:
|
||||
- CI-Tier-1
|
||||
- RHEL6
|
||||
- Tier1
|
||||
- rhel-buildroot
|
||||
tier: '1'
|
||||
contact: mcermak@redhat.com
|
||||
component:
|
||||
- libffi
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- libffi
|
||||
- libffi-devel
|
||||
- libtool
|
||||
- gcc
|
||||
- dejagnu
|
||||
- rpm-build
|
||||
- gcc-c++
|
||||
- texinfo
|
||||
- strace
|
||||
duration: 35m
|
||||
extra-nitrate: TC#0063644
|
||||
extra-summary: /tools/libffi/Sanity/testsuite
|
||||
extra-task: /tools/libffi/Sanity/testsuite
|
||||
id: 2d3a499f-1f59-40f0-a76c-1c73569d0512
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2010 Red Hat, Inc.
|
||||
# Copyright (c) 2010 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include rhts environment
|
||||
. /usr/lib/beakerlib/beakerlib.sh
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGES=(libffi libffi-devel gcc dejagnu rpm-build gcc-c++)
|
||||
|
||||
|
|
@ -39,39 +39,41 @@ rlJournalStart
|
|||
fi
|
||||
done;
|
||||
|
||||
rlRun "TmpDir=`mktemp -d`" 0 "Creating tmp directory"
|
||||
rlRun "cp *.patch $TmpDir/"
|
||||
rlRun "TmpDir=$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlFetchSrcForInstalled libffi
|
||||
rlRun "rpm -ivh libffi*.src.rpm"
|
||||
rlRun "popd"
|
||||
rlRun "specfile=$(rpm --eval='%_specdir')/libffi.spec"
|
||||
rlRun "rpmbuild -bp $specfile"
|
||||
rlRun "rpmbuild -bp --undefine specpartsdir $specfile"
|
||||
rlRun "builddir=$(rpm --eval='%_builddir')"
|
||||
rlRun "pushd $builddir/libffi-*/"
|
||||
rlRun "pushd $(dirname "$(find $builddir -name configure)")"
|
||||
rlRun "./configure"
|
||||
rlRUn "make"
|
||||
rlRun "make"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "Run testsuite"
|
||||
|
||||
# patching the testsuite to test the installed libraries instead of the built ones
|
||||
if [ -e /usr/lib64/libffi.so ]; then
|
||||
export LD_LIBRARY_PATH=/usr/lib64
|
||||
perl -i -pe 's/LIBRARY_DIR/lib64/' $TmpDir/dynamic_linking.patch
|
||||
perl -i -pe 's/LIBRARY_DIR/lib64/' $TmpDir/dynamic_linking-dg.patch
|
||||
else
|
||||
export LD_LIBRARY_PATH=/usr/lib
|
||||
perl -i -pe 's/LIBRARY_DIR/lib/' $TmpDir/dynamic_linking.patch
|
||||
perl -i -pe 's/LIBRARY_DIR/lib/' $TmpDir/dynamic_linking-dg.patch
|
||||
fi
|
||||
test -e testsuite/lib/libffi.exp && rlRun "patch testsuite/lib/libffi.exp < $TmpDir/dynamic_linking.patch"
|
||||
test -e testsuite/lib/libffi-dg.exp && rlRun "patch testsuite/lib/libffi-dg.exp < $TmpDir/dynamic_linking-dg.patch"
|
||||
set -xe
|
||||
# Patch the testsuite to run with the installed libffi libraries, not
|
||||
# with the ones built from the rpm.
|
||||
# Do not add the current dir or the build dir to ld_library_path
|
||||
sed -i 's/set ld_library_path "."/set ld_library_path ""/' testsuite/lib/libffi*.exp
|
||||
sed -i '/append ld_library_path.*blddirffi/d' testsuite/lib/libffi*.exp
|
||||
# Set ld_library_path to the system libdir (typically /usr/lib or /usr/lib64)
|
||||
MYLIBDIR=$(rpm --eval '%{_libdir}')
|
||||
sed -i 's;set libffi_dir.*"[^"]*";set libffi_dir "'"${MYLIBDIR}"'";' testsuite/lib/libffi*.exp
|
||||
grep -F -e 'set ld_library_path' -e 'set libffi_dir' testsuite/lib/libffi.exp
|
||||
# As of upstream commit 40a7682 the link flags hardcode the library dir so we need to edit that too
|
||||
# by removing the explicit library seach path to the built libraries.
|
||||
# https://github.com/libffi/libffi/commit/40a7682#diff-b4e449eb85934de2bdcf9ee0ac320872a7d09d60df6a24e3f066d7d74f6ddfd0R345
|
||||
sed -i 's;set libffi_link_flags "-L[^"]*";set libffi_link_flags "";' testsuite/lib/libffi*.exp
|
||||
set +xe
|
||||
rlLog "Checking whether we test really the installed libraries."
|
||||
strace -F -e open,openat,stat -o strace.log -- make check
|
||||
LIBFFI_SO_CALLS=`cat strace.log | grep libffi.so | grep -v ENOENT | grep -v 'usr/lib' | grep -v '\"\/lib' | grep -v 'unfinished' | wc -l`
|
||||
rlAssertGreater "The just built libraries should not be used, everything should be taken from /usr" 5 $LIBFFI_SO_CALLS
|
||||
rlRun "cat strace.log | grep libffi.so | grep usr"
|
||||
# Count library calls from places different than the libdir we want (MYLIBDIR)
|
||||
LIBFFI_SO_CALLS=$(cat strace.log | grep libffi.so | grep -v ENOENT | grep -v "/usr" | grep -v '"/lib' | grep -c -v 'unfinished')
|
||||
rlAssertGreater "The just built libraries should not be used, everything should be taken from /usr" 5 "$LIBFFI_SO_CALLS"
|
||||
rlRun "cat strace.log | grep libffi.so | grep /usr"
|
||||
rlRun "cat strace.log | grep libffi.so | grep rpmbuild" 1
|
||||
rlRun "make check" 0 "RUNNING THE TESTSUITE"
|
||||
rlRun "popd"
|
||||
|
|
@ -79,7 +81,7 @@ rlJournalStart
|
|||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "ls -al $TmpDir"
|
||||
rlBundleLogs logs $(find . -name 'libffi.sum') $(find . -name 'libffi.log')
|
||||
rlBundleLogs logs "$(find . -name 'libffi.sum')" "$(find . -name 'libffi.log')"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue