import apr-1.6.3-12.el8

This commit is contained in:
CentOS Sources 2021-10-05 09:16:59 -04:00 committed by Stepan Oksanichenko
parent 8dd5ff6d12
commit 755ec0d365
2 changed files with 41 additions and 2 deletions

View File

@ -1,3 +1,6 @@
Add $APR_DEEPBIND to enable use of RTLD_DEEPBIND in apr_dso_open().
--- apr-1.4.8/dso/unix/dso.c.deepbind --- apr-1.4.8/dso/unix/dso.c.deepbind
+++ apr-1.4.8/dso/unix/dso.c +++ apr-1.4.8/dso/unix/dso.c
@@ -38,6 +38,8 @@ @@ -38,6 +38,8 @@
@ -22,3 +25,36 @@
#ifdef _AIX #ifdef _AIX
if (strchr(path + 1, '(') && path[strlen(path) - 1] == ')') if (strchr(path + 1, '(') && path[strlen(path) - 1] == ')')
{ {
--- apr-1.7.0/README.deepbind.deepbind
+++ apr-1.7.0/README.deepbind
@@ -0,0 +1,30 @@
+This distribution of APR contains a modification of the behaviour of
+the apr_dso_open() function which allows users enable the
+"RTLD_DEEPBIND" flag when dlopen() is called.
+
+If the "APR_DEEPBIND" environment variable is set at runtime, the
+RTLD_DEEPBIND flag is always added to the flags passed to dlopen().
+
+With normal use of dlopen(), dynamically loaded objects will use
+global symbols in preference to any symbols defined within the object.
+Using RTLD_DEEPBIND reverses this binding order. See the dlopen(3)
+man page for more information.
+
+This can be useful with Apache httpd, where two different modules are
+loaded like:
+
+1. mod_foo.so uses library "libfoo.so"
+ libfoo.so defines a function "SomeSym"
+2. mod_bar.so uses library "libbar.so"
+ libbar.so defines a different "SomeSym" function
+
+By default, mod_bar or mod_foo would use the "SomeSym" definition from
+the "wrong" library depending on the load order. If RTLD_DEEPBIND is
+used, the "SomeSym" definition will always be mapped to the definition
+from the corresponding dependent library. This can avoid symbol
+conflicts.
+
+There are some risks with using RTLD_DEEPBIND, in particular potential
+issues with modules written in C++. It is not recommended to enable
+$APR_DEEPBIND unless it solves a specific problem and after thorough
+testing of the configuration.

View File

@ -6,7 +6,7 @@
Summary: Apache Portable Runtime library Summary: Apache Portable Runtime library
Name: apr Name: apr
Version: 1.6.3 Version: 1.6.3
Release: 11%{?dist} Release: 12%{?dist}
# ASL 2.0: everything # ASL 2.0: everything
# ISC: network_io/apr-1.4.6/network_io/unix/inet_?to?.c # ISC: network_io/apr-1.4.6/network_io/unix/inet_?to?.c
# BSD with advertising: strings/apr_snprintf.c, strings/apr_fnmatch.c, # BSD with advertising: strings/apr_snprintf.c, strings/apr_fnmatch.c,
@ -122,7 +122,7 @@ popd
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc CHANGES LICENSE NOTICE %doc CHANGES LICENSE NOTICE README*
%{_libdir}/libapr-%{aprver}.so.* %{_libdir}/libapr-%{aprver}.so.*
%files devel %files devel
@ -141,6 +141,9 @@ popd
%{_datadir}/aclocal/*.m4 %{_datadir}/aclocal/*.m4
%changelog %changelog
* Wed Jun 23 2021 Joe Orton <jorton@redhat.com> - 1.6.3-12
- document $APR_DEEPBIND env var (#1886222)
* Thu Jun 11 2020 Joe Orton <jorton@redhat.com> - 1.6.3-11 * Thu Jun 11 2020 Joe Orton <jorton@redhat.com> - 1.6.3-11
- only enable RTLD_DEEPBIND if $APR_DEEPBIND is set in env (#1845912) - only enable RTLD_DEEPBIND if $APR_DEEPBIND is set in env (#1845912)