import libtdb-1.3.18-2.el8
This commit is contained in:
parent
b07307d388
commit
394dab7801
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/tdb-1.3.16.tar.gz
|
SOURCES/tdb-1.3.18.tar.gz
|
||||||
|
@ -1 +1 @@
|
|||||||
13b369b92d4cdc8057d90fc2b79657c9f5b72ec6 SOURCES/tdb-1.3.16.tar.gz
|
c9fcb58d34d372441d856bdfbb106c34c27ab02f SOURCES/tdb-1.3.18.tar.gz
|
||||||
|
@ -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
|
|
||||||
|
|
@ -1,12 +1,6 @@
|
|||||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
||||||
%global with_python3 1
|
|
||||||
%else
|
|
||||||
%global with_python3 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: libtdb
|
Name: libtdb
|
||||||
Version: 1.3.16
|
Version: 1.3.18
|
||||||
Release: 3%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: The tdb library
|
Summary: The tdb library
|
||||||
License: LGPLv3+
|
License: LGPLv3+
|
||||||
URL: http://tdb.samba.org/
|
URL: http://tdb.samba.org/
|
||||||
@ -15,15 +9,14 @@ Source: http://samba.org/ftp/tdb/tdb-%{version}.tar.gz
|
|||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: libxslt
|
BuildRequires: libxslt
|
||||||
BuildRequires: docbook-style-xsl
|
BuildRequires: docbook-style-xsl
|
||||||
BuildRequires: python2-devel
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
%endif
|
|
||||||
|
Obsoletes: python2-tdb < %{version}-%{release}
|
||||||
|
Obsoletes: python2-tdb-debuginfo < %{version}-%{release}
|
||||||
|
|
||||||
Provides: bundled(libreplace)
|
Provides: bundled(libreplace)
|
||||||
|
|
||||||
# Patches
|
# Patches
|
||||||
Patch0001: fstack_flags.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A library that implements a trivial database.
|
A library that implements a trivial database.
|
||||||
@ -43,15 +36,6 @@ Requires: libtdb = %{version}-%{release}
|
|||||||
%description -n tdb-tools
|
%description -n tdb-tools
|
||||||
Tools to manage Tdb files
|
Tools to manage Tdb files
|
||||||
|
|
||||||
%package -n python2-tdb
|
|
||||||
Summary: Python bindings for the Tdb library
|
|
||||||
Requires: libtdb = %{version}-%{release}
|
|
||||||
%{?python_provide:%python_provide python2-tdb}
|
|
||||||
|
|
||||||
%description -n python2-tdb
|
|
||||||
Python bindings for libtdb
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%package -n python3-tdb
|
%package -n python3-tdb
|
||||||
Summary: Python3 bindings for the Tdb library
|
Summary: Python3 bindings for the Tdb library
|
||||||
Requires: libtdb = %{version}-%{release}
|
Requires: libtdb = %{version}-%{release}
|
||||||
@ -59,43 +43,21 @@ Requires: libtdb = %{version}-%{release}
|
|||||||
|
|
||||||
%description -n python3-tdb
|
%description -n python3-tdb
|
||||||
Python3 bindings for libtdb
|
Python3 bindings for libtdb
|
||||||
%endif
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n tdb-%{version} -p1
|
%autosetup -n tdb-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?with_python3}
|
|
||||||
PY3_CONFIG_FLAGS=--extra-python=%{__python3}
|
|
||||||
%else
|
|
||||||
PY3_CONFIG_FLAGS=""
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1597319 - libtdb uses Python2
|
|
||||||
# to build
|
|
||||||
pathfix.py -n -p -i %{__python2} buildtools/bin/waf
|
|
||||||
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
|
||||||
export PYTHON=%{__python2}
|
|
||||||
|
|
||||||
%configure --disable-rpath \
|
%configure --disable-rpath \
|
||||||
--bundled-libraries=NONE \
|
--bundled-libraries=NONE \
|
||||||
--builtin-libraries=replace \
|
--builtin-libraries=replace
|
||||||
$PY3_CONFIG_FLAGS
|
|
||||||
|
|
||||||
make %{?_smp_mflags} V=1
|
make %{?_smp_mflags} V=1
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1597319 - libtdb uses Python2
|
|
||||||
# to build
|
|
||||||
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
|
||||||
|
|
||||||
make %{?_smp_mflags} check
|
make %{?_smp_mflags} check
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1597319 - libtdb uses Python2
|
|
||||||
# to build
|
|
||||||
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
|
||||||
|
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Shared libraries need to be marked executable for
|
# Shared libraries need to be marked executable for
|
||||||
@ -123,32 +85,29 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libtdb.a
|
|||||||
%{_mandir}/man8/tdbtool.8*
|
%{_mandir}/man8/tdbtool.8*
|
||||||
%{_mandir}/man8/tdbrestore.8*
|
%{_mandir}/man8/tdbrestore.8*
|
||||||
|
|
||||||
%files -n python2-tdb
|
|
||||||
%{python2_sitearch}/tdb.so
|
|
||||||
%{python2_sitearch}/_tdb_text.py*
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%files -n python3-tdb
|
%files -n python3-tdb
|
||||||
%{python3_sitearch}/__pycache__/_tdb_text.cpython*.py[co]
|
%{python3_sitearch}/__pycache__/_tdb_text.cpython*.py[co]
|
||||||
%{python3_sitearch}/tdb.cpython*.so
|
%{python3_sitearch}/tdb.cpython*.so
|
||||||
%{python3_sitearch}/_tdb_text.py
|
%{python3_sitearch}/_tdb_text.py
|
||||||
%endif
|
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
%post -n python2-tdb -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%postun -n python2-tdb -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%post -n python3-tdb -p /sbin/ldconfig
|
%post -n python3-tdb -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -n python3-tdb -p /sbin/ldconfig
|
%postun -n python3-tdb -p /sbin/ldconfig
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 30 2019 Jakub Hrozek <jhrozek@redhat.com> - 1.3.18.2
|
||||||
|
- Obsolete the python2 packages on upgrade
|
||||||
|
- Resolves: rhbz#1567138 - libtdb: Drop Python 2 subpackage from RHEL 8
|
||||||
|
|
||||||
|
* Wed Apr 24 2019 Jakub Hrozek <jhrozek@redhat.com> - 1.3.18.1
|
||||||
|
- Resolves: rhbz#1684579 - Rebase libtdb to version 1.3.18 for Samba
|
||||||
|
- Resolves: rhbz#1597319 - libtdb uses Python 2 to build
|
||||||
|
- Resolves: rhbz#1567138 - libtdb: Drop Python 2 subpackage from RHEL 8
|
||||||
|
|
||||||
* Thu Sep 20 2018 Jakub Hrozek <jhrozek@redhat.com> - 1.3.16-3
|
* Thu Sep 20 2018 Jakub Hrozek <jhrozek@redhat.com> - 1.3.16-3
|
||||||
- Resolves: rhbz#1624137 - Review annocheck distro flag failures in libtdb
|
- Resolves: rhbz#1624137 - Review annocheck distro flag failures in libtdb
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user