import libtalloc-2.1.16-3.el8

This commit is contained in:
CentOS Sources 2019-11-05 15:53:35 -05:00 committed by Andrew Lukoshko
parent 9cafd48d40
commit b9b3a2b405
4 changed files with 19 additions and 190 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/talloc-2.1.14.tar.gz
SOURCES/talloc-2.1.16.tar.gz

View File

@ -1 +1 @@
9d563b768148b620bdae1c97b36cfc30928a1044 SOURCES/talloc-2.1.14.tar.gz
69fe815888eddcbe2fb6fc3270ff9e977461000d SOURCES/talloc-2.1.16.tar.gz

View File

@ -1,117 +0,0 @@
From 9673dcd70489c1c9df22aa0eb7a98afbccc0ced3 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Mon, 3 Sep 2018 10:35:08 +0200
Subject: [PATCH 1/2] waf: Check for -fstack-protect-strong support
The -fstack-protector* flags are compiler only flags, don't pass them to
the linker.
https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13601
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 38e97f8b52e85bdfcf2d74a4fb3c848fa46ba371)
---
buildtools/wafsamba/samba_autoconf.py | 36 ++++++++++++++-------------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index c4391d0c4dc..bfd6f9710db 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -674,23 +674,25 @@ def SAMBA_CONFIG_H(conf, path=None):
return
# we need to build real code that can't be optimized away to test
- if conf.check(fragment='''
- #include <stdio.h>
-
- int main(void)
- {
- char t[100000];
- while (fgets(t, sizeof(t), stdin));
- return 0;
- }
- ''',
- execute=0,
- ccflags='-fstack-protector',
- ldflags='-fstack-protector',
- mandatory=False,
- msg='Checking if toolchain accepts -fstack-protector'):
- conf.ADD_CFLAGS('-fstack-protector')
- conf.ADD_LDFLAGS('-fstack-protector')
+ stack_protect_list = ['-fstack-protector-strong', '-fstack-protector']
+ for stack_protect_flag in stack_protect_list:
+ flag_supported = conf.check(fragment='''
+ #include <stdio.h>
+
+ int main(void)
+ {
+ char t[100000];
+ while (fgets(t, sizeof(t), stdin));
+ return 0;
+ }
+ ''',
+ execute=0,
+ ccflags=[ '-Werror', '-Wp,-D_FORTIFY_SOURCE=2', stack_protect_flag],
+ mandatory=False,
+ msg='Checking if compiler accepts %s' % (stack_protect_flag))
+ if flag_supported:
+ conf.ADD_CFLAGS('-Wp,-D_FORTIFY_SOURCE=2 %s' % (stack_protect_flag))
+ break
if Options.options.debug:
conf.ADD_CFLAGS('-g', testflags=True)
--
2.18.0
From 5cfefc8d4c7fc4aba5b1dc2b7ea6f02c126d4070 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Mon, 3 Sep 2018 10:49:52 +0200
Subject: [PATCH 2/2] waf: Add -fstack-clash-protection
https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13601
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit fc4df251c88365142515a81bea1120b2b84cc4a0)
---
buildtools/wafsamba/samba_autoconf.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index bfd6f9710db..f2b3ec8db8d 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -694,6 +694,23 @@ def SAMBA_CONFIG_H(conf, path=None):
conf.ADD_CFLAGS('-Wp,-D_FORTIFY_SOURCE=2 %s' % (stack_protect_flag))
break
+ flag_supported = conf.check(fragment='''
+ #include <stdio.h>
+
+ int main(void)
+ {
+ char t[100000];
+ while (fgets(t, sizeof(t), stdin));
+ return 0;
+ }
+ ''',
+ execute=0,
+ ccflags=[ '-Werror', '-fstack-clash-protection'],
+ mandatory=False,
+ msg='Checking if compiler accepts -fstack-clash-protection')
+ if flag_supported:
+ conf.ADD_CFLAGS('-fstack-clash-protection')
+
if Options.options.debug:
conf.ADD_CFLAGS('-g', testflags=True)
--
2.18.0

View File

@ -1,11 +1,5 @@
%if 0%{?fedora} || 0%{?rhel} > 7
%global with_python3 1
%else
%global with_python3 0
%endif
Name: libtalloc
Version: 2.1.14
Version: 2.1.16
Release: 3%{?dist}
Group: System Environment/Daemons
Summary: The talloc library
@ -16,16 +10,15 @@ Source: https://www.samba.org/ftp/talloc/talloc-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: libxslt
BuildRequires: docbook-style-xsl
BuildRequires: python2-devel
%if 0%{?with_python3}
BuildRequires: python3-devel
%endif
BuildRequires: doxygen
Provides: bundled(libreplace)
Obsoletes: python2-talloc < %{version}-%{release}
Obsoletes: python2-talloc-devel < %{version}-%{release}
Obsoletes: python2-talloc-debuginfo < %{version}-%{release}
# Patches
Patch0001: fstack_flags.patch
%description
A library that implements a hierarchical allocator with destructors.
@ -38,31 +31,6 @@ Requires: libtalloc = %{version}-%{release}
%description devel
Header files needed to develop programs that link against the Talloc library.
%package -n python2-talloc
Group: Development/Libraries
Summary: Python bindings for the Talloc library
Requires: libtalloc = %{version}-%{release}
Provides: pytalloc%{?_isa} = %{version}-%{release}
Provides: pytalloc = %{version}-%{release}
Obsoletes: pytalloc < 2.1.3
%{?python_provide:%python_provide python2-talloc}
%description -n python2-talloc
Python 2 libraries for creating bindings using talloc
%package -n python2-talloc-devel
Group: Development/Libraries
Summary: Development libraries for python2-talloc
Requires: python2-talloc = %{version}-%{release}
Provides: pytalloc-devel%{?_isa} = %{version}-%{release}
Provides: pytalloc-devel = %{version}-%{release}
Obsoletes: pytalloc-devel < 2.1.3
%{?python_provide:%python_provide python2-talloc-devel}
%description -n python2-talloc-devel
Development libraries for python2-talloc
%if 0%{?with_python3}
%package -n python3-talloc
Group: Development/Libraries
Summary: Python bindings for the Talloc library
@ -80,28 +48,15 @@ Requires: python3-talloc = %{version}-%{release}
%description -n python3-talloc-devel
Development libraries for python3-talloc
%endif
%prep
%autosetup -n talloc-%{version} -p1
%build
%if 0%{?with_python3}
PY3_CONFIG_FLAGS=--extra-python=%{__python3}
%else
PY3_CONFIG_FLAGS=""
%endif
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1217376
export python_LDFLAGS=""
# https://bugzilla.redhat.com/show_bug.cgi?id=1597315 - libtalloc uses
# Python 2 to build
pathfix.py -n -p -i %{__python2} buildtools/bin/waf
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
export PYTHON=%{__python2}
%configure --disable-rpath \
--disable-rpath-install \
--bundled-libraries=NONE \
@ -113,16 +68,9 @@ make %{?_smp_mflags} V=1
doxygen doxy.config
%check
# https://bugzilla.redhat.com/show_bug.cgi?id=1597315 - libtalloc uses
# Python 2 to build
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
make %{?_smp_mflags} check
%install
# https://bugzilla.redhat.com/show_bug.cgi?id=1597315 - libtalloc uses
# Python 2 to build
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
make install DESTDIR=$RPM_BUILD_ROOT
# Shared libraries need to be marked executable for
@ -145,16 +93,6 @@ cp -a doc/man/* $RPM_BUILD_ROOT/%{_mandir}
%{_mandir}/man3/talloc*.3.gz
%{_mandir}/man3/libtalloc*.3.gz
%files -n python2-talloc
%{_libdir}/libpytalloc-util.so.*
%{python2_sitearch}/talloc.so
%files -n python2-talloc-devel
%{_includedir}/pytalloc.h
%{_libdir}/pkgconfig/pytalloc-util.pc
%{_libdir}/libpytalloc-util.so
%if 0%{?with_python3}
%files -n python3-talloc
%{_libdir}/libpytalloc-util.cpython*.so.*
%{python3_sitearch}/talloc.cpython*.so
@ -163,17 +101,25 @@ cp -a doc/man/* $RPM_BUILD_ROOT/%{_mandir}
%{_includedir}/pytalloc.h
%{_libdir}/pkgconfig/pytalloc-util.cpython-*.pc
%{_libdir}/libpytalloc-util.cpython*.so
%endif
%ldconfig_scriptlets
%ldconfig_scriptlets -n python2-talloc
%if 0%{?with_python3}
%ldconfig_scriptlets -n python3-talloc
%endif
%changelog
* Tue Apr 30 2019 Jakub Hrozek <jhrozek@redhat.com> - 2.1.16-3
- Also obsolete python2-libtalloc-debuginfo
- Resolves: rhbz#1567136 - libtalloc: Drop Python 2 subpackage from RHEL 8
* Tue Apr 30 2019 Jakub Hrozek <jhrozek@redhat.com> - 2.1.16-2
- Remove python2 libraries on upgrade
- Resolves: rhbz#1567136 - libtalloc: Drop Python 2 subpackage from RHEL 8
* Wed Apr 3 2019 Jakub Hrozek <jhrozek@redhat.com> - 2.1.16-1
- Resolves: rhbz#1684577 - Rebase libtalloc to version 2.1.16 for Samba
- Resolves: rhbz#1597315 - libtalloc uses Python 2 to build
- Resolves: rhbz#1567136 - libtalloc: Drop Python 2 subpackage from RHEL 8
* Tue Sep 18 2018 Jakub Hrozek <jhrozek@redhat.com> - 2.1.14-3
- Resolves: rhbz#1624136 - Review annocheck distro flag failures in libtalloc