diff --git a/configure.patch b/configure.patch new file mode 100644 index 0000000000000000000000000000000000000000..e1a2af0357d794889f2174a691e78dc82ad8d953 --- /dev/null +++ b/configure.patch @@ -0,0 +1,12 @@ +diff -Nrup a/m4/fault.m4 b/m4/fault.m4 +--- a/m4/fault.m4 2014-01-02 15:26:46.000000000 -0700 ++++ b/m4/fault.m4 2020-01-17 15:40:41.420148995 -0700 +@@ -49,7 +49,7 @@ static int zero_fd; + # define SIGSEGV_FAULT_ADDRESS_ROUNDOFF_BITS 0UL + #endif + unsigned long page; +-int handler_called = 0; ++volatile int handler_called = 0; + void sigsegv_handler ($5) + { + void *fault_address = (void *) ($6); diff --git a/libsigsegv-2.14.tar.gz b/libsigsegv-2.14.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..406219a7ddcc5aa1b0d399bdcb1f31148819641d Binary files /dev/null and b/libsigsegv-2.14.tar.gz differ diff --git a/libsigsegv.spec b/libsigsegv.spec new file mode 100644 index 0000000000000000000000000000000000000000..7674294dd448ca7ec76e5f01ddfc8187228ca44d --- /dev/null +++ b/libsigsegv.spec @@ -0,0 +1,88 @@ +%define anolis_release 1 + +Name: libsigsegv +Version: 2.14 +Release: 1.%{anolis_release}%{?dist} +Summary: Library for handling page faults in user mode + +License: GPLv2+ +URL: https://www.gnu.org/software/libsigsegv/ +Source0: http://ftp.gnu.org/gnu/libsigsegv/libsigsegv-%{version}.tar.gz +Patch0: configure.patch + +BuildRequires: automake libtool +BuildRequires: gcc +BuildRequires: make + +%description +This is a library for handling page faults in user mode. A page fault +occurs when a program tries to access to a region of memory that is +currently not available. Catching and handling a page fault is a useful +technique for implementing: + - pageable virtual memory + - memory-mapped access to persistent databases + - generational garbage collectors + - stack overflow handlers + - distributed shared memory + +%package devel +Summary: Development libraries and header files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +%description devel +%{summary}. + +%package static +Summary: Static libraries for %{name} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +%description static +%{summary}. + + +%prep +%autosetup -p1 + + +%build +# for patch1, rpaths +autoreconf -ivf + +%configure \ + --enable-shared \ + --disable-silent-rules \ + --enable-static + +%make_build + + +%install +%make_install + +# remove libtool archives +find %{buildroot} -type f -name "*.la" -delete + + +%check +make check + + +%ldconfig_scriptlets + +%files +%license COPYING +%doc AUTHORS NEWS README +%{_libdir}/libsigsegv.so.2* + +%files devel +%{_libdir}/libsigsegv.so +%{_includedir}/sigsegv.h + +%files static +%{_libdir}/libsigsegv.a + + +%changelog +* Thu Mar 03 2022 Hongwei Qin - 2.14-1.1 +- Init for Anolis OS 23 + +* Fri Jan 07 2022 Rex Dieter - 2.14-1 +- 2.14