Compare commits

...

No commits in common. 'c9' and 'i10cs' have entirely different histories.
c9 ... i10cs

2
.gitignore vendored

@ -1 +1 @@
SOURCES/libffi-3.4.2.tar.gz
SOURCES/libffi-3.4.4.tar.gz

@ -1 +1 @@
460882cfdb52a2bd13fc08edc540b242ae421033 SOURCES/libffi-3.4.2.tar.gz
ecc58fb89aac4329b34dd019fe337d291b47c799 SOURCES/libffi-3.4.4.tar.gz

@ -0,0 +1,44 @@
From ce077e5565366171aa1b4438749b0922fce887a4 Mon Sep 17 00:00:00 2001
From: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
Date: Thu, 2 Feb 2023 14:46:29 +0000
Subject: [PATCH] Forward declare open_temp_exec_file (#764)
It's defined in closures.c and used in tramp.c.
Also declare it as an hidden symbol, as it should be.
Co-authored-by: serge-sans-paille <sguelton@mozilla.com>
---
include/ffi_common.h | 4 ++++
src/tramp.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/include/ffi_common.h b/include/ffi_common.h
index 2bd31b03d..c53a79493 100644
--- a/include/ffi_common.h
+++ b/include/ffi_common.h
@@ -128,6 +128,10 @@ void *ffi_data_to_code_pointer (void *data) FFI_HIDDEN;
static trampoline. */
int ffi_tramp_is_present (void *closure) FFI_HIDDEN;
+/* Return a file descriptor of a temporary zero-sized file in a
+ writable and executable filesystem. */
+int open_temp_exec_file(void) FFI_HIDDEN;
+
/* Extended cif, used in callback from assembly routine */
typedef struct
{
diff --git a/src/tramp.c b/src/tramp.c
index 7e005b054..5f19b557f 100644
--- a/src/tramp.c
+++ b/src/tramp.c
@@ -39,6 +39,10 @@
#ifdef __linux__
#define _GNU_SOURCE 1
#endif
+
+#include <ffi.h>
+#include <ffi_common.h>
+
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

@ -1,13 +0,0 @@
diff -rup a/src/closures.c b/src/closures.c
--- a/src/closures.c 2021-06-27 14:03:12.000000000 -0400
+++ b/src/closures.c 2023-04-06 23:37:18.742954529 -0400
@@ -432,6 +432,9 @@ selinux_enabled_check (void)
char *buf = NULL;
size_t len = 0;
+ if (access ("/etc/sysconfig/libffi-force-shared-memory-check-first", F_OK) >= 0)
+ return 0;
+
if (statfs ("/selinux", &sfs) >= 0
&& (unsigned int) sfs.f_type == 0xf97cff8cU)
return 1;

@ -3,16 +3,19 @@
%global multilib_arches %{ix86} x86_64
Name: libffi
Version: 3.4.2
Release: 8%{?dist}
Version: 3.4.4
Release: 9%{?dist}
Summary: A portable foreign function interface library
License: MIT
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/v3.4.4/libffi-3.4.4.tar.gz
Source1: ffi-multilib.h
Source2: ffitarget-multilib.h
Patch1: libffi-3.4.2-rh2152228.patch
# error: implicit declaration of function 'open_temp_exec_file'
# https://github.com/libffi/libffi/pull/764
Patch0: 0001-Forward-declare-open_temp_exec_file.patch
BuildRequires: make
BuildRequires: gcc
@ -58,8 +61,7 @@ The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
%patch1 -p1
%autosetup -p1
%build
# For now we disable the static templates to avoid ghc and
@ -67,7 +69,7 @@ developing applications that use %{name}.
# 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
%configure --disable-static
%make_build
%check
@ -105,7 +107,7 @@ install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/ffitarget.h
%license LICENSE
%doc README.md
%{_libdir}/libffi.so.8
%{_libdir}/libffi.so.8.1.0
%{_libdir}/libffi.so.8.1.2
%files devel
%{_libdir}/pkgconfig/*.pc
@ -115,36 +117,64 @@ install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/ffitarget.h
%{_infodir}/libffi.info.*
%changelog
* Fri Apr 07 2023 DJ Delorie <dj@redhat.com> - 3.4.2-8
- Use /etc/sysconfig/libffi-force-shared-memory-check-first to
override selinux permissions check for shared memory access (#2152228)
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 3.4.4-9
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 3.4.4-8
- Rebuilt for MSVSphere 10
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.4.4-8
- Bump release for June 2024 mass rebuild
* 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
* Thu Aug 26 2021 Carlos O'Donell <codonell@redhat.com> - 3.4.2-7
- Remove compat-libffi3.1 subpackage to complete SONAME transition.
Related: rhbz#1891914
* Tue May 02 2023 DJ Delorie <dj@redhat.com> - 3.4.4-3
- Enable static trampolines
* Wed Aug 18 2021 Carlos O'Donell <carlos@redhat.com> - 3.4.2-6
- Rebuilt for libffi 3.4.2 SONAME transition. Related: rhbz#1891914
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.4.2-5
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Oct 28 2022 DJ Delorie <dj@redhat.com> - 3.4.4-1
- Rebase to libffi 3.4.4.
* Thu Jul 29 2021 Carlos O'Donell <carlos@redhat.com> - 3.4.2-4
- Drop pkgconf support for compat-libffi3.1.
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jul 27 2021 Carlos O'Donell <carlos@redhat.com> - 3.4.2-3
- Add temporary compat-libffi3.1 for library transition.
* 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
* Mon Jun 28 2021 Carlos O'Donell <carlos@redhat.com> - 3.4.2-1
- Rebase to libffi 3.4.2.
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.1-29
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save