New upstream release 1.3.13

removed Group fields (new packaging policy)
%defattr() is no longer needed
This commit is contained in:
Lukas Slebodnik 2017-04-28 12:47:24 +02:00
parent b3602e5e96
commit e87a4fb37b
8 changed files with 230 additions and 257 deletions

1
.gitignore vendored
View File

@ -15,3 +15,4 @@
/tdb-1.3.10.tar.gz
/tdb-1.3.11.tar.gz
/tdb-1.3.12.tar.gz
/tdb-1.3.13.tar.gz

View File

@ -1,99 +0,0 @@
From b7ae41e6ca133e08f1dc62bd49436f51f490f46b Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@redhat.com>
Date: Tue, 6 Dec 2016 18:07:18 +0100
Subject: [PATCH 1/4] lib replace: Fix detection of features
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
If configure script is executed with stricter cflags
"-Werrorr=implicit-function-declaration -Werror=implicit-int"
then detection of few features will fail.
Checking for C99 vsnprintf : not found
Checking for HAVE_SHARED_MMAP : not found
Checking for HAVE_MREMAP : not found
lib/replace/test/shared_mmap.c:18:1:
error: return type defaults to int [-Werror=implicit-int]
main()
^~~~
lib/replace/test/shared_mmap.c: In function main:
lib/replace/test/shared_mmap.c:25:16:
error: implicit declaration of function exit
[-Werror=implicit-function-declaration]
if (fd == -1) exit(1);
^~~~
lib/replace/test/shared_mmap.c:25:16:
warning: incompatible implicit declaration of built-in function exit
lib/replace/test/shared_mmap.c:25:16:
note: include <stdlib.h> or provide a declaration of exit
Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
---
lib/replace/test/shared_mmap.c | 5 ++++-
lib/replace/test/shared_mremap.c | 5 ++++-
lib/replace/test/snprintf.c | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/lib/replace/test/shared_mmap.c b/lib/replace/test/shared_mmap.c
index 50dad8d69648a6993e64d3d0433576319e1ad462..9d6e3fc95aa5d0981df1530582236ba826d1a432 100644
--- a/lib/replace/test/shared_mmap.c
+++ b/lib/replace/test/shared_mmap.c
@@ -4,6 +4,9 @@
#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -15,7 +18,7 @@
#define MAP_FILE 0
#endif
-main()
+int main(void)
{
int *buf;
int i;
diff --git a/lib/replace/test/shared_mremap.c b/lib/replace/test/shared_mremap.c
index 05032ad12e3aa0feb755207ea032216e0665fe0a..08040e2e595f356155f4fb5977b3637b1e76aefb 100644
--- a/lib/replace/test/shared_mremap.c
+++ b/lib/replace/test/shared_mremap.c
@@ -3,6 +3,9 @@
#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -18,7 +21,7 @@
#define MAP_FAILED (int *)-1
#endif
-main()
+int main(void)
{
int *buf;
int fd;
diff --git a/lib/replace/test/snprintf.c b/lib/replace/test/snprintf.c
index d06630bcc98d54033fdb5c7e62ecb91eae13e01b..77473f067b26589330d8d1a602d3334332795837 100644
--- a/lib/replace/test/snprintf.c
+++ b/lib/replace/test/snprintf.c
@@ -26,4 +26,4 @@ void foo(const char *format, ...)
printf("1");
exit(0);
}
-main() { foo("hello"); }
+int main(void) { foo("hello"); }
--
2.11.1

View File

@ -1,45 +0,0 @@
From f4c0a750d4adebcf2342a44e85f04526c34268c8 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@redhat.com>
Date: Tue, 6 Dec 2016 18:07:36 +0100
Subject: [PATCH 2/4] WAF: Fix detection of linker features
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Following check of linker feature failed with strict CFLAGS
"-Werrorr=implicit-function-declaration -Werror=implicit-int"
Checking for rpath library support : not found
Checking for -Wl,--version-script support : not found
../main.c: In function main:
../main.c:1:26: error: implicit declaration of function lib_func
[-Werror=implicit-function-declaration]
int main(void) {return !(lib_func() == 42);}
^~~~~~~~
Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
---
buildtools/wafsamba/samba_conftests.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py
index 045f858e9cdaae7ee5754a2c7fbef6642a7fee59..c9f8fdc0131838b44dc92196fa95c6b2f7aea506 100644
--- a/buildtools/wafsamba/samba_conftests.py
+++ b/buildtools/wafsamba/samba_conftests.py
@@ -286,7 +286,9 @@ def CHECK_LIBRARY_SUPPORT(conf, rpath=False, version_script=False, msg=None):
os.makedirs(subdir)
Utils.writef(os.path.join(subdir, 'lib1.c'), 'int lib_func(void) { return 42; }\n')
- Utils.writef(os.path.join(dir, 'main.c'), 'int main(void) {return !(lib_func() == 42);}\n')
+ Utils.writef(os.path.join(dir, 'main.c'),
+ 'int lib_func(void);\n'
+ 'int main(void) {return !(lib_func() == 42);}\n')
bld = Build.BuildContext()
bld.log = conf.log
--
2.11.1

View File

@ -1,47 +0,0 @@
From be12f82cf1ca652b06995e84971c878621315d24 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@redhat.com>
Date: Tue, 6 Dec 2016 18:07:43 +0100
Subject: [PATCH 3/4] WAF: Fix detection os sysname ...
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Detection of sysname failed with stricter CFLAGS
"-Werrorr=implicit-function-declaration -Werror=implicit-int"
Checking uname sysname type : not found
Checking uname machine type : not found
Checking uname release type : not found
Checking uname version type : not found
../test.c: In function main:
../test.c:8:32: error: implicit declaration of function printf
[-Werror=implicit-function-declaration]
printf("%s", n.sysname);
^~~~~~
../test.c:8:32: warning: incompatible implicit declaration
of built-in function printf
../test.c:8:32: note: include <stdio.h> or provide a declaration of printf
Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
---
buildtools/wafsamba/samba_conftests.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py
index c9f8fdc0131838b44dc92196fa95c6b2f7aea506..72e432164984c7faa9bc93745d401b5c38849d37 100644
--- a/buildtools/wafsamba/samba_conftests.py
+++ b/buildtools/wafsamba/samba_conftests.py
@@ -438,6 +438,7 @@ def CHECK_UNAME(conf):
ret = True
for v in "sysname machine release version".split():
if not conf.CHECK_CODE('''
+ int printf(const char *format, ...);
struct utsname n;
if (uname(&n) == -1) return -1;
printf("%%s", n.%s);
--
2.11.1

View File

@ -1,45 +0,0 @@
From 59abfcb7945103cd4031abac86d51cd51ce052ca Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@redhat.com>
Date: Tue, 6 Dec 2016 18:07:50 +0100
Subject: [PATCH 4/4] WAF: Fix detection of IPv6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Detection of IPv6 failed with strict CFLAGS due to missing
header file.
Checking for HAVE_IPV6 : not found
../test.c: In function main:
../test.c:226:34: error: implicit declaration of function
if_nametoindex [-Werror=implicit-function-declaration]
int idx = if_nametoindex("iface1");
^~~~~~~~~~~~~~
Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jan 2 18:03:20 CET 2017 on sn-devel-144
---
lib/replace/wscript | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 1dfd90293ea6835a22510242e063bf3d2a20d263..ea0d5d09b895a7a119eb783f803ff5b9019e37df 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -189,7 +189,7 @@ def configure(conf):
''',
define='HAVE_IPV6',
lib='nsl socket',
- headers='sys/socket.h netdb.h netinet/in.h')
+ headers='sys/socket.h netdb.h netinet/in.h net/if.h')
if conf.CONFIG_SET('HAVE_SYS_UCONTEXT_H') and conf.CONFIG_SET('HAVE_SIGNAL_H'):
conf.CHECK_CODE('''
--
2.11.1

View File

@ -5,9 +5,8 @@
%endif
Name: libtdb
Version: 1.3.12
Release: 5%{?dist}
Group: System Environment/Daemons
Version: 1.3.13
Release: 1%{?dist}
Summary: The tdb library
License: LGPLv3+
URL: http://tdb.samba.org/
@ -23,16 +22,11 @@ BuildRequires: python3-devel
Provides: bundled(libreplace)
# Patches
Patch0001: 0001-lib-replace-Fix-detection-of-features.patch
Patch0002: 0002-WAF-Fix-detection-of-linker-features.patch
Patch0003: 0003-WAF-Fix-detection-os-sysname.patch
Patch0004: 0004-WAF-Fix-detection-of-IPv6.patch
%description
A library that implements a trivial database.
%package devel
Group: Development/Libraries
Summary: Header files need to link the Tdb library
Requires: libtdb = %{version}-%{release}
Requires: pkgconfig
@ -41,7 +35,6 @@ Requires: pkgconfig
Header files needed to develop programs that link against the Tdb library.
%package -n tdb-tools
Group: Development/Libraries
Summary: Developer tools for the Tdb library
Requires: libtdb = %{version}-%{release}
@ -49,7 +42,6 @@ Requires: libtdb = %{version}-%{release}
Tools to manage Tdb files
%package -n python2-tdb
Group: Development/Libraries
Summary: Python bindings for the Tdb library
Requires: libtdb = %{version}-%{release}
%{?python_provide:%python_provide python2-tdb}
@ -59,7 +51,6 @@ Python bindings for libtdb
%if 0%{?with_python3}
%package -n python3-tdb
Group: Development/Libraries
Summary: Python3 bindings for the Tdb library
Requires: libtdb = %{version}-%{release}
%{?python_provide:%python_provide python3-tdb}
@ -70,10 +61,6 @@ Python3 bindings for libtdb
%prep
%setup -q -n tdb-%{version}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%build
%if 0%{?with_python3}
@ -100,18 +87,15 @@ find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} \;
rm -f $RPM_BUILD_ROOT%{_libdir}/libtdb.a
%files
%defattr(-,root,root,-)
%{_libdir}/libtdb.so.*
%files devel
%defattr(-,root,root)
%doc docs/README
%{_includedir}/tdb.h
%{_libdir}/libtdb.so
%{_libdir}/pkgconfig/tdb.pc
%files -n tdb-tools
%defattr(-,root,root,-)
%{_bindir}/tdbbackup
%{_bindir}/tdbdump
%{_bindir}/tdbtool
@ -122,13 +106,11 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libtdb.a
%{_mandir}/man8/tdbrestore.8*
%files -n python2-tdb
%defattr(-,root,root,-)
%{python_sitearch}/tdb.so
%{python_sitearch}/_tdb_text.py*
%if 0%{?with_python3}
%files -n python3-tdb
%defattr(-,root,root,-)
%{python3_sitearch}/__pycache__/_tdb_text.cpython*.py[co]
%{python3_sitearch}/tdb.cpython*.so
%{python3_sitearch}/_tdb_text.py
@ -149,6 +131,11 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libtdb.a
%endif
%changelog
* Fri Apr 28 2017 Lukas Slebodnik <lslebodn@redhat.com> - 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 <lslebodn@redhat.com> - 1.3.12-5
- rhbz#1401175 - Missing symbol versioning provided by libtdb.so
- Fix configure time detection with -Werror=implicit-function-declaration

221
pok.diff Normal file
View File

@ -0,0 +1,221 @@
--- libtdb.spec.orig 2017-04-05 13:08:31.109005187 +0200
+++ libtdb.spec 2017-04-21 11:17:34.078002142 +0200
@@ -1,117 +1,96 @@
%if 0%{?fedora}
-%global with_python3 1
-%else
-%global with_python3 0
+%bcond_without python3
%endif
-Name: libtdb
-Version: 1.3.12
-Release: 5%{?dist}
-Group: System Environment/Daemons
-Summary: The tdb library
-License: LGPLv3+
-URL: http://tdb.samba.org/
-Source: http://samba.org/ftp/tdb/tdb-%{version}.tar.gz
-
-BuildRequires: libxslt
-BuildRequires: docbook-style-xsl
-BuildRequires: python2-devel
-%if 0%{?with_python3}
-BuildRequires: python3-devel
+Summary: The tdb library
+Name: libtdb
+Version: 1.3.12
+Release: 6%{?dist}
+License: LGPLv3+
+URL: http://tdb.samba.org/
+Source0: http://samba.org/ftp/tdb/tdb-%{version}.tar.gz
+Patch0001: 0001-lib-replace-Fix-detection-of-features.patch
+Patch0002: 0002-WAF-Fix-detection-of-linker-features.patch
+Patch0003: 0003-WAF-Fix-detection-os-sysname.patch
+Patch0004: 0004-WAF-Fix-detection-of-IPv6.patch
+BuildRequires: docbook-style-xsl
+BuildRequires: libxslt
+BuildRequires: python2-devel
+%if %{with python3}
+BuildRequires: python3-devel
+BuildConflicts: libattr-devel
%endif
-
-Provides: bundled(libreplace)
-
-# Patches
-Patch0001: 0001-lib-replace-Fix-detection-of-features.patch
-Patch0002: 0002-WAF-Fix-detection-of-linker-features.patch
-Patch0003: 0003-WAF-Fix-detection-os-sysname.patch
-Patch0004: 0004-WAF-Fix-detection-of-IPv6.patch
+Provides: bundled(libreplace)
%description
-A library that implements a trivial database.
+This is a simple database API. It was inspired by the realisation that in
+Samba we have several ad-hoc bits of code that essentially implement small
+databases for sharing structures between parts of Samba. As I was about to
+add another I realised that a generic database module was called for to
+replace all the ad-hoc bits.
+
+I based the interface on gdbm. I couldn't use gdbm as we need to be able to
+have multiple writers to the databases at one time.
%package devel
-Group: Development/Libraries
-Summary: Header files need to link the Tdb library
-Requires: libtdb = %{version}-%{release}
-Requires: pkgconfig
+Summary: Header files need to link the Tdb library
+Requires: libtdb = %{version}-%{release}
%description devel
Header files needed to develop programs that link against the Tdb library.
%package -n tdb-tools
-Group: Development/Libraries
-Summary: Developer tools for the Tdb library
-Requires: libtdb = %{version}-%{release}
+Summary: Developer tools for the Tdb library
+Requires: libtdb = %{version}-%{release}
%description -n tdb-tools
-Tools to manage Tdb files
+Tools to manage Tdb files.
%package -n python2-tdb
-Group: Development/Libraries
-Summary: Python bindings for the Tdb library
-Requires: libtdb = %{version}-%{release}
+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
+Python bindings for libtdb.
-%if 0%{?with_python3}
%package -n python3-tdb
-Group: Development/Libraries
-Summary: Python3 bindings for the Tdb library
-Requires: libtdb = %{version}-%{release}
+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
+Python3 bindings for libtdb.
%prep
-%setup -q -n tdb-%{version}
-%patch0001 -p1
-%patch0002 -p1
-%patch0003 -p1
-%patch0004 -p1
+%autosetup -p1 -n tdb-%{version}
%build
-%if 0%{?with_python3}
-PY3_CONFIG_FLAGS=--extra-python=%{__python3}
-%else
-PY3_CONFIG_FLAGS=""
-%endif
+%configure \
+ --bundled-libraries=NONE \
+ --builtin-libraries=replace \
+ --disable-rpath \
+ %{?with_python3:--extra-python=%{__python3}} \
+ --pedantic
-%configure --disable-rpath \
- --bundled-libraries=NONE \
- --builtin-libraries=replace \
- $PY3_CONFIG_FLAGS
-
-make %{?_smp_mflags} V=1
+%{make_build}
%install
+%{make_install}
-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
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
%files
-%defattr(-,root,root,-)
%{_libdir}/libtdb.so.*
%files devel
-%defattr(-,root,root)
%doc docs/README
%{_includedir}/tdb.h
%{_libdir}/libtdb.so
%{_libdir}/pkgconfig/tdb.pc
%files -n tdb-tools
-%defattr(-,root,root,-)
%{_bindir}/tdbbackup
%{_bindir}/tdbdump
%{_bindir}/tdbtool
@@ -122,33 +101,34 @@
%{_mandir}/man8/tdbrestore.8*
%files -n python2-tdb
-%defattr(-,root,root,-)
%{python_sitearch}/tdb.so
%{python_sitearch}/_tdb_text.py*
-%if 0%{?with_python3}
+%if %{with python3}
%files -n python3-tdb
-%defattr(-,root,root,-)
%{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
+* Sun Apr 16 2017 Tomasz Kłoczko <kloczek@fedoraproject.org> - 1.3.12-6
+- added libattr-devel to BuildConflicts (as long libattr-devel is installed libtdb
+ will be build automatically with libattr support)
+- added use %bcond, %%autosetup, %%{make_build} and %{make_install} macros
+- %%defattr() is no longer needed
+- removed Group fields (new packaging policy)
+- executing /sbin/ldconfig in python %%post/%%postun packages is not needed
+ (those packages are not providing libraries but loadable modules)
+- removed delete static libtdb.a in %%install (is not needed)
+- removed not needed pkgconfig from devel subpackage (is not needed)
+- spec indented and other minor cleanups
+- better %%description
+- added --pedantic to expose more compile time warnings in distribution build logs
+- added %%check section to fire tdb test suite. Those tests are running quite long
+ and if you are working on this package please use --nocheck build option to
+ not fire those tests
+
* Tue Feb 14 2017 Lukas Slebodnik <lslebodn@redhat.com> - 1.3.12-5
- rhbz#1401175 - Missing symbol versioning provided by libtdb.so
- Fix configure time detection with -Werror=implicit-function-declaration

View File

@ -1 +1 @@
d9627e7aacd535a8251401f914bb6924 tdb-1.3.12.tar.gz
SHA512 (tdb-1.3.13.tar.gz) = d12382a2f75e56d62d151df3390b3ae41c7502d67582812ec6da30913b13feb7ee98572ab5ad5b5ed3bceb41666c3154855727cf5ce249ef583c033819c05f0f