From 5db3fb3cd8d20bccf121232991bfb90d7a85a9e4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 07 2019 12:23:27 +0000 Subject: import libtdb-1.3.16-3.el8 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7ae7ea6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/tdb-1.3.16.tar.gz diff --git a/.libtdb.metadata b/.libtdb.metadata new file mode 100644 index 0000000..6f15ff6 --- /dev/null +++ b/.libtdb.metadata @@ -0,0 +1 @@ +13b369b92d4cdc8057d90fc2b79657c9f5b72ec6 SOURCES/tdb-1.3.16.tar.gz diff --git a/SOURCES/fstack_flags.patch b/SOURCES/fstack_flags.patch new file mode 100644 index 0000000..93991ef --- /dev/null +++ b/SOURCES/fstack_flags.patch @@ -0,0 +1,117 @@ +From 9673dcd70489c1c9df22aa0eb7a98afbccc0ced3 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +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 +Reviewed-by: Andrew Bartlett +(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 +- +- 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 ++ ++ 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 +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 +Reviewed-by: Andrew Bartlett +(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 ++ ++ 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 + diff --git a/SPECS/libtdb.spec b/SPECS/libtdb.spec new file mode 100644 index 0000000..725b6c0 --- /dev/null +++ b/SPECS/libtdb.spec @@ -0,0 +1,367 @@ +%if 0%{?fedora} || 0%{?rhel} > 7 +%global with_python3 1 +%else +%global with_python3 0 +%endif + +Name: libtdb +Version: 1.3.16 +Release: 3%{?dist} +Summary: The tdb library +License: LGPLv3+ +URL: http://tdb.samba.org/ +Source: http://samba.org/ftp/tdb/tdb-%{version}.tar.gz + +BuildRequires: gcc +BuildRequires: libxslt +BuildRequires: docbook-style-xsl +BuildRequires: python2-devel +%if 0%{?with_python3} +BuildRequires: python3-devel +%endif + +Provides: bundled(libreplace) + +# Patches +Patch0001: fstack_flags.patch + +%description +A library that implements a trivial database. + +%package devel +Summary: Header files need to link the Tdb library +Requires: libtdb = %{version}-%{release} +Requires: pkgconfig + +%description devel +Header files needed to develop programs that link against the Tdb library. + +%package -n tdb-tools +Summary: Developer tools for the Tdb library +Requires: libtdb = %{version}-%{release} + +%description -n tdb-tools +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 +Summary: Python3 bindings for the Tdb library +Requires: libtdb = %{version}-%{release} +%{?python_provide:%python_provide python3-tdb} + +%description -n python3-tdb +Python3 bindings for libtdb +%endif + +%prep +%autosetup -n tdb-%{version} -p1 + +%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 \ + --bundled-libraries=NONE \ + --builtin-libraries=replace \ + $PY3_CONFIG_FLAGS + +make %{?_smp_mflags} V=1 + +%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 + +%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 + +# Shared libraries need to be marked executable for +# rpmbuild to strip them and include them in debuginfo +find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} \; + +rm -f $RPM_BUILD_ROOT%{_libdir}/libtdb.a + +%files +%{_libdir}/libtdb.so.* + +%files devel +%doc docs/README +%{_includedir}/tdb.h +%{_libdir}/libtdb.so +%{_libdir}/pkgconfig/tdb.pc + +%files -n tdb-tools +%{_bindir}/tdbbackup +%{_bindir}/tdbdump +%{_bindir}/tdbtool +%{_bindir}/tdbrestore +%{_mandir}/man8/tdbbackup.8* +%{_mandir}/man8/tdbdump.8* +%{_mandir}/man8/tdbtool.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 +%{python3_sitearch}/__pycache__/_tdb_text.cpython*.py[co] +%{python3_sitearch}/tdb.cpython*.so +%{python3_sitearch}/_tdb_text.py +%endif + +%post -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 + +%postun -n python3-tdb -p /sbin/ldconfig +%endif + +%changelog +* Thu Sep 20 2018 Jakub Hrozek - 1.3.16-3 +- Resolves: rhbz#1624137 - Review annocheck distro flag failures in libtdb + +* Thu Jul 12 2018 Jakub Hrozek - 1.3.16-2 +- Use pathfix.py to select python2 instead of pytho + +* Thu Jul 12 2018 Jakub Hrozek - 1.3.16-1 +- New upstream release 1.3.16 +- Use RHEL_ALLOW_PYTHON2_FOR_BUILD=1 until libtalloc uses waf3 +- Patch the waf script to explicitly call python2 as "env python" doesn't + yield py2 anymore + +* Tue Jun 19 2018 Miro Hrončok - 1.3.15-5 +- Rebuilt for Python 3.7 + +* Wed Feb 07 2018 Fedora Release Engineering - 1.3.15-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Jan 20 2018 Björn Esser - 1.3.15-3 +- Rebuilt for switch to libxcrypt + +* Thu Nov 30 2017 Lukas Slebodnik - 1.3.15-2 +- Update spec file conditionals + +* Sat Aug 26 2017 Lukas Slebodnik - 1.3.15-1 +- New upstream release 1.3.15 + +* Thu Aug 03 2017 Fedora Release Engineering - 1.3.14-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.3.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Jul 3 2017 Lukas Slebodnik - 1.3.14-1 +- New upstream release 1.3.14 +- run unittests + +* Fri Apr 28 2017 Lukas Slebodnik - 1.3.13-1 +- New upstream release 1.3.13 +- removed Group fields (new packaging policy) +- %%defattr() is no longer needed + +* Tue Feb 14 2017 Lukas Slebodnik - 1.3.12-5 +- rhbz#1401175 - Missing symbol versioning provided by libtdb.so +- Fix configure time detection with -Werror=implicit-function-declaration + -Werror=implicit-int +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Fri Feb 10 2017 Fedora Release Engineering - 1.3.12-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 19 2016 Miro Hrončok - 1.3.12-3 +- Rebuild for Python 3.6 + +* Tue Dec 6 2016 Adam Williamson - 1.3.12-2 +- rebuild with reverted redhat-rpm-config to fix missing library symbols + +* Fri Dec 2 2016 Jakub Hrozek - 1.3.12-1 +- New upstream release 1.3.12 + +* Tue Aug 30 2016 Jakub Hrozek - 1.3.11-1 +- New upstream release 1.3.11 + +* Thu Jul 28 2016 Jakub Hrozek - 1.3.10-1 +- New upstream release 1.3.10 + +* Tue Jul 19 2016 Fedora Release Engineering - 1.3.9-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Wed Apr 27 2016 Jakub Hrozek - 1.3.9-1 +- New upstream release 1.3.9 + +* Thu Feb 04 2016 Fedora Release Engineering - 1.3.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Nov 11 2015 Fedora Release Engineering - 1.3.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Wed Nov 11 2015 Jakub Hrozek - 1.3.8-1 +- New upstream release 1.3.8 + +* Tue Nov 10 2015 Fedora Release Engineering - 1.3.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Wed Jul 22 2015 Jakub Hrozek - 1.3.7-1 +- New upstream release 1.3.7 +- Build Python3 bindings + +* Wed Jun 17 2015 Fedora Release Engineering - 1.3.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Jun 14 2015 Jakub Hrozek - 1.3.6-1 +- New upstream release 1.3.6 + +* Wed Apr 29 2015 Jakub Hrozek - 1.3.5-1 +- New upstream release 1.3.5 + +* Mon Jan 5 2015 Jakub Hrozek - 1.3.4-1 +- New upstream release 1.3.4 + +* Fri Dec 5 2014 Jakub Hrozek - 1.3.3-1 +- New upstream release 1.3.3 + +* Thu Sep 18 2014 Jakub Hrozek - 1.3.1-1 +- New upstream release 1.3.1 + +* Sun Aug 17 2014 Fedora Release Engineering - 1.3.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.3.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 23 2014 Adam Williamson - 1.3.0-2 +- add a missing include to tdb.h (fixes builds against libtdb) (BSO #10625) + +* Fri May 23 2014 Jakub Hrozek - 1.3.0-1 +- New upstream release 1.3.0 + +* Thu Mar 20 2014 Jakub Hrozek - 1.2.13-1 +- New upstream release 1.2.13 + +* Sat Aug 03 2013 Fedora Release Engineering - 1.2.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jun 04 2013 Jakub Hrozek - 1.2.12-1 +- New upstream release 1.2.12 + +* Thu Feb 14 2013 Fedora Release Engineering - 1.2.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Dec 01 2012 Jakub Hrozek - 1.2.11-1 +- New upstream release 1.2.11 + +* Thu Jul 19 2012 Fedora Release Engineering - 1.2.10-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue May 22 2012 Stephen Gallagher - 1.2.10-15 +- New upstream release 1.2.10 +- Remove upstreamed patches +- Provides functionality for the upcoming Samba 4 beta + +* Fri Jan 13 2012 Fedora Release Engineering - 1.2.9-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Dec 01 2011 Stephen Gallagher - 1.2.9-13 +- Add patch to ignore --disable-silent-rules +- Include README documentation + +* Wed Nov 23 2011 Stephen Gallagher - 1.2.9-12 +- Add explicit mention of the bundled libreplace +- https://fedorahosted.org/fpc/ticket/120 + + +* Wed Nov 09 2011 Stephen Gallagher - 1.2.9-11 +- Rebuild for F17 due to bz#744766 + +* Tue Apr 5 2011 Simo Sorce - 1.2.9-9 +- Add patch to limit database expansion, was causing OOMs in SSSD in some + extreme situations. + +* Tue Feb 08 2011 Fedora Release Engineering - 1.2.9-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Jan 14 2011 Stephen Gallagher - 1.2.9-8 +- Actually fix the verbosity + +* Fri Jan 14 2011 Stephen Gallagher - 1.2.9-7 +- Let rpmbuild strip binaries, make build more verbose. +- Original patch by Ville Skyttä + +* Wed Jan 12 2011 Stephen Gallagher - 1.2.9-6 +- Install python bindings into the correct location + +* Tue Jan 11 2011 Stephen Gallagher - 1.2.9-5 +- Run ldconfig on python-tdb + +* Tue Jan 11 2011 Stephen Gallagher - 1.2.9-4 +- Do not delete a necessary file during %%install + +* Tue Jan 11 2011 Stephen Gallagher - 1.2.9-3 +- Bump release to rebuild with the correct sources in place + +* Tue Jan 11 2011 Stephen Gallagher - 1.2.9-2 +- Bump build to rebuild with sources in place + +* Tue Jan 11 2011 Stephen Gallagher - 1.2.9-1 +- New upstream bugfix release +- Adds a new tdbrestore utility +- Convert to new WAF build-system +- Add python bindings in new python-tdb subpackage + +* Wed Feb 24 2010 Simo Sorce - 1.2.1-3 +- add missing build require + +* Wed Feb 24 2010 Simo Sorce - 1.2.1-2 +- Fix spec file +- Package manpages too + +* Wed Feb 24 2010 Simo Sorce - 1.2.1-1 +- New upstream bugfix release + +* Tue Dec 15 2009 Simo Sorce - 1.2.0-1 +- New upstream release + +* Sat Jul 25 2009 Fedora Release Engineering - 1.1.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jun 17 2009 Simo Sorce - 1.1.5-1 +- Original tarballs had a screw-up, rebuild with new fixed tarballs from + upstream. + +* Tue Jun 16 2009 Simo Sorce - 1.1.5-0 +- New upstream release + +* Wed May 6 2009 Simo Sorce - 1.1.3-15 +- First public independent release from upstream