From 3380ff73077a465d831e59ee54843e17b0100a6b9dc5fad77eee3558c00ffc03 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 7 Feb 2014 15:08:18 +0000 Subject: [PATCH 1/3] Feed specfile through spec-beautifier OBS-URL: https://build.opensuse.org/package/show/server:database/libdbi-drivers?expand=0&rev=3 --- libdbi-drivers.spec | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/libdbi-drivers.spec b/libdbi-drivers.spec index 0381f65..2a331b8 100644 --- a/libdbi-drivers.spec +++ b/libdbi-drivers.spec @@ -23,13 +23,13 @@ Release: 0 Summary: Database drivers for libdbi License: LGPL-2.1+ Group: System/Libraries -Url: http://libdbi-drivers.sf.net/ +URL: http://libdbi-drivers.sf.net/ Source: http://downloads.sf.net/libdbi-drivers/%name-%version.tar.gz Patch1: sqlite3.diff Patch2: badcode.diff Patch3: libdl.diff -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRoot: %_tmppath/%name-%version-build BuildRequires: autoconf BuildRequires: automake BuildRequires: gettext @@ -48,7 +48,7 @@ separately from the library itself. %package dbd-mysql Summary: MySQL driver for libdbi Group: System/Libraries -Requires: libdbi%{libdbi_sover} = %version +Requires: libdbi%libdbi_sover = %version %description dbd-mysql This driver provides connectivity to MySQL database servers through @@ -59,7 +59,7 @@ code. %package dbd-pgsql Summary: PostgreSQL driver for libdbi Group: System/Libraries -Requires: libdbi%{libdbi_sover} = %version +Requires: libdbi%libdbi_sover = %version Requires: postgresql >= 7.0.3 %description dbd-pgsql @@ -71,7 +71,7 @@ code. %package dbd-sqlite3 Summary: SQLite3 driver for libdbi Group: System/Libraries -Requires: libdbi%{libdbi_sover} = %version +Requires: libdbi%libdbi_sover = %version Requires: sqlite %description dbd-sqlite3 @@ -87,7 +87,7 @@ does not require recompilation or rewriting source code. chmod 644 COPYING # Fake the __DATE__ so we do not needelessly rebuild -FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y') +FAKE_BUILDDATE=$(LC_ALL=C date -u -r %_sourcedir/%name.changes '+%%b %%e %%Y') sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" drivers/*/*.c %build @@ -97,13 +97,13 @@ autoreconf -fi --with-pgsql \ --with-sqlite3 \ --with-dbi-incdir=%_includedir/dbi \ - --with-dbi-libdir=%{_libdir} \ + --with-dbi-libdir=%_libdir \ --disable-static \ --disable-docs make %{?_smp_mflags} %install -make DESTDIR=$RPM_BUILD_ROOT install +make DESTDIR=%buildroot install find "%buildroot" -type f -name "*.la" -delete %check @@ -112,19 +112,19 @@ make check || : %files dbd-mysql %defattr(-,root,root) %doc COPYING -%dir %{_libdir}/dbd -%{_libdir}/dbd/libdbdmysql.so +%dir %_libdir/dbd +%_libdir/dbd/libdbdmysql.so %files dbd-pgsql %defattr(-,root,root) %doc COPYING -%dir %{_libdir}/dbd -%{_libdir}/dbd/libdbdpgsql.so +%dir %_libdir/dbd +%_libdir/dbd/libdbdpgsql.so %files dbd-sqlite3 %defattr(-,root,root) %doc COPYING -%dir %{_libdir}/dbd -%{_libdir}/dbd/libdbdsqlite3.so +%dir %_libdir/dbd +%_libdir/dbd/libdbdsqlite3.so %changelog From 8e918b4c0265cd007763ec2fe600c2c405ed37b58779b4d6a25de2ed6f2addf3 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 17 Apr 2014 15:13:59 +0000 Subject: [PATCH 2/3] libdbi-drivers-0.9.0-40-gb48dd7e OBS-URL: https://build.opensuse.org/package/show/server:database/libdbi-drivers?expand=0&rev=4 --- badcode.diff | 32 ---------------- libdbi-drivers-0.9.0.g40.tar.xz | 3 ++ libdbi-drivers-0.9.0.tar.gz | 3 -- libdbi-drivers.changes | 7 ++++ libdbi-drivers.spec | 67 +++++++++++++++++++++------------ libdl.diff | 26 ------------- sqlite3.diff | 25 ------------ 7 files changed, 52 insertions(+), 111 deletions(-) delete mode 100644 badcode.diff create mode 100644 libdbi-drivers-0.9.0.g40.tar.xz delete mode 100644 libdbi-drivers-0.9.0.tar.gz delete mode 100644 libdl.diff delete mode 100644 sqlite3.diff diff --git a/badcode.diff b/badcode.diff deleted file mode 100644 index a65b7f6..0000000 --- a/badcode.diff +++ /dev/null @@ -1,32 +0,0 @@ -From: Jan Engelhardt -Date: 2013-09-07 22:51:05.518210575 +0200 - -build: resolve rpmlint aborting due to bad code - -gcc: -src/constraint.c:167:32: warning: initialization makes pointer from integer without a cast [enabled by default] -src/constraint.c:168:5: warning: passing argument 1 of 'matches' makes pointer from integer without a cast [enabled by default] -src/constraint.c:168:5: note: expected 'const void *' but argument is of type 'intptr_t' - -rpmlint: -E: libdbi-drivers 64bit-portability-issue src/constraint.c:167, 168 - ---- - tests/cgreen/src/constraint.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: libdbi-drivers-0.9.0/tests/cgreen/src/constraint.c -=================================================================== ---- libdbi-drivers-0.9.0.orig/tests/cgreen/src/constraint.c -+++ libdbi-drivers-0.9.0/tests/cgreen/src/constraint.c -@@ -164,8 +164,8 @@ static void test_want_double(Constraint - } - - static int compare_using_matcher(Constraint *constraint, intptr_t actual) { -- int (*matches)(const void*) = constraint->expected; -- return matches(actual); -+ int (*matches)(const void*) = (void *)(intptr_t)constraint->expected; -+ return matches((void *)actual); - } - - static void test_with_matcher(Constraint *constraint, const char *function, const char* matcher_name, intptr_t matcher_function, const char *test_file, int test_line, TestReporter *reporter) { diff --git a/libdbi-drivers-0.9.0.g40.tar.xz b/libdbi-drivers-0.9.0.g40.tar.xz new file mode 100644 index 0000000..1c6e249 --- /dev/null +++ b/libdbi-drivers-0.9.0.g40.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7be9cea29cf5dc41a0bdbe1fc809bad264f051f293ddd2da291f3bf861ef1608 +size 252392 diff --git a/libdbi-drivers-0.9.0.tar.gz b/libdbi-drivers-0.9.0.tar.gz deleted file mode 100644 index a103fe9..0000000 --- a/libdbi-drivers-0.9.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:43d2eacd573a4faff296fa925dd97fbf2aedbf1ae35c6263478210c61004c854 -size 1829864 diff --git a/libdbi-drivers.changes b/libdbi-drivers.changes index 85fba15..f6b1816 100644 --- a/libdbi-drivers.changes +++ b/libdbi-drivers.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Apr 17 14:57:46 UTC 2014 - jengelh@inai.de + +- Update to new git snapshot 0.9.0+git40 +* Support the new datetimex API from libdbi-0.9.0+git21 +* dbd_sqlite3: resolve a stack buffer overflow + ------------------------------------------------------------------- Thu Feb 6 11:50:13 UTC 2014 - fcrozat@suse.com diff --git a/libdbi-drivers.spec b/libdbi-drivers.spec index 2a331b8..a3bc138 100644 --- a/libdbi-drivers.spec +++ b/libdbi-drivers.spec @@ -1,7 +1,7 @@ # # spec file for package libdbi-drivers # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,29 +16,38 @@ # -%define libdbi_sover 1 Name: libdbi-drivers -Version: 0.9.0 +Version: 0.9.0.g40 +#Snapshot: libdbi-drivers-0.9.0-40-gb48dd7e Release: 0 Summary: Database drivers for libdbi License: LGPL-2.1+ -Group: System/Libraries +Group: Productivity/Databases/Servers URL: http://libdbi-drivers.sf.net/ -Source: http://downloads.sf.net/libdbi-drivers/%name-%version.tar.gz -Patch1: sqlite3.diff -Patch2: badcode.diff -Patch3: libdl.diff -BuildRoot: %_tmppath/%name-%version-build +#Source: http://downloads.sf.net/libdbi-drivers/%name-%version.tar.gz +Source: %name-%version.tar.xz +BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake BuildRequires: gettext -BuildRequires: libdbi-devel +BuildRequires: libdbi-devel >= 0.9.0.g21 BuildRequires: libtool BuildRequires: mysql-devel BuildRequires: openjade BuildRequires: postgresql-devel +BuildRequires: sqlite2-devel BuildRequires: sqlite3-devel +BuildRequires: xz +%define build_doc 0 +%if %build_doc +# Only needed when doc is not already prebuilt +BuildRequires: docbook-dsssl-stylesheets +BuildRequires: openjade +BuildRequires: texlive-collection-fontsrecommended +BuildRequires: texlive-jadetex +BuildRequires: texlive-pdftex-bin +%endif %description libdbi implements a database-independent abstraction layer in C, @@ -48,7 +57,6 @@ separately from the library itself. %package dbd-mysql Summary: MySQL driver for libdbi Group: System/Libraries -Requires: libdbi%libdbi_sover = %version %description dbd-mysql This driver provides connectivity to MySQL database servers through @@ -59,8 +67,6 @@ code. %package dbd-pgsql Summary: PostgreSQL driver for libdbi Group: System/Libraries -Requires: libdbi%libdbi_sover = %version -Requires: postgresql >= 7.0.3 %description dbd-pgsql This driver provides connectivity to PostgreSQL database servers @@ -68,20 +74,26 @@ through the libdbi database independent abstraction layer. Switching a program's driver does not require recompilation or rewriting source code. -%package dbd-sqlite3 -Summary: SQLite3 driver for libdbi +%package dbd-sqlite +Summary: SQLite (old) driver for libdbi Group: System/Libraries -Requires: libdbi%libdbi_sover = %version -Requires: sqlite -%description dbd-sqlite3 +%description dbd-sqlite This driver provides connectivity to SQLite database servers through the libdbi database independent abstraction layer. Switching a program's driver does not require recompilation or rewriting source code. +%package dbd-sqlite3 +Summary: SQLite3 driver for libdbi +Group: System/Libraries + +%description dbd-sqlite3 +This driver provides connectivity to SQLite 3.x database servers through the +libdbi database independent abstraction layer. Switching a program's driver +does not require recompilation or rewriting source code. + %prep -%setup -q -%patch -P 1 -P 2 -P 3 -p1 +%setup -qn %name #ensure license doesn't have a executable permission chmod 644 COPYING @@ -95,15 +107,15 @@ autoreconf -fi %configure \ --with-mysql \ --with-pgsql \ - --with-sqlite3 \ - --with-dbi-incdir=%_includedir/dbi \ - --with-dbi-libdir=%_libdir \ + --with-sqlite3 --with-sqlite \ + --with-dbi-incdir="%_includedir/dbi" \ + --with-dbi-libdir="%_libdir" \ --disable-static \ - --disable-docs + --docdir="%_docdir/%name" --disable-docs make %{?_smp_mflags} %install -make DESTDIR=%buildroot install +make install DESTDIR="%buildroot" find "%buildroot" -type f -name "*.la" -delete %check @@ -121,6 +133,11 @@ make check || : %dir %_libdir/dbd %_libdir/dbd/libdbdpgsql.so +%files dbd-sqlite +%defattr(-,root,root) +%dir %_libdir/dbd +%_libdir/dbd/libdbdsqlite.so + %files dbd-sqlite3 %defattr(-,root,root) %doc COPYING diff --git a/libdl.diff b/libdl.diff deleted file mode 100644 index 7cb5cf7..0000000 --- a/libdl.diff +++ /dev/null @@ -1,26 +0,0 @@ -From: Jan Engelhardt -Date: 2013-09-11 14:33:49.545836772 +0200 - -build: add missing libraries to link line - -test_dbi_dlopen.o: In function `main': -test_dbi_dlopen.c:41: undefined reference to `dlopen' -test_dbi_dlopen.c:45: undefined reference to `dlopen' -test_dbi_dlopen.c:61: undefined reference to `dlsym' -test_dbi_dlopen.c:63: undefined reference to `dlerror' ---- - tests/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -Index: libdbi-drivers-0.9.0/tests/Makefile.am -=================================================================== ---- libdbi-drivers-0.9.0.orig/tests/Makefile.am -+++ libdbi-drivers-0.9.0/tests/Makefile.am -@@ -11,6 +11,7 @@ test_dbi_SOURCES = test_dbi.c - test_dbi_LDADD = $(top_srcdir)/tests/cgreen/libcgreen.a -L@libdir@ -lm -ldbi @LIBADD_LIBDBI@ - test_dbi_dlopen_SOURCES = test_dbi_dlopen.c - test_dbi_dlopen_LDFLAGS = @LIBADD_LIBDBI@ -+test_dbi_dlopen_LDADD = -ldl - libtest_dbi_plugin_la_SOURCES = test_dbi_plugin.c - libtest_dbi_plugin_la_LIBADD = @LIBADD_LIBDBI@ - libtest_dbi_plugin_la_LDFLAGS = -module -rpath /nowhere diff --git a/sqlite3.diff b/sqlite3.diff deleted file mode 100644 index 2811025..0000000 --- a/sqlite3.diff +++ /dev/null @@ -1,25 +0,0 @@ -From: Jan Engelhardt -Date: 2013-09-04 12:52:32.851115468 +0200 - -build: resolve link failure in sqlite3 module - -The sqlite3 backend fails to link because the wrong library name is -used. (Ideally, libdbi-drivers should use PKG_CHECK_MODULES instead.) - ---- - acinclude.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: libdbi-drivers-0.9.0/acinclude.m4 -=================================================================== ---- libdbi-drivers-0.9.0.orig/acinclude.m4 -+++ libdbi-drivers-0.9.0/acinclude.m4 -@@ -310,7 +310,7 @@ if test "$ac_sqlite3" = "yes"; then - AC_SEARCH_LIBS_VAR([sqlite3_exec], sqlite3, , , , SQLITE3_LIBS) - SQLITE3_LDFLAGS="" - else -- SQLITE3_LIBS=-lsqlite -+ SQLITE3_LIBS=-lsqlite3 - SQLITE3_LDFLAGS=-L$ac_sqlite3_libdir - fi - From b06c853960779d57109b25a2c27a064cd53f90e6b1bd0976718bf6fcbe18b1c4 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 26 Apr 2014 08:11:24 +0000 Subject: [PATCH 3/3] Changelog items OBS-URL: https://build.opensuse.org/package/show/server:database/libdbi-drivers?expand=0&rev=5 --- libdbi-drivers.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/libdbi-drivers.changes b/libdbi-drivers.changes index f6b1816..d8ac486 100644 --- a/libdbi-drivers.changes +++ b/libdbi-drivers.changes @@ -4,6 +4,7 @@ Thu Apr 17 14:57:46 UTC 2014 - jengelh@inai.de - Update to new git snapshot 0.9.0+git40 * Support the new datetimex API from libdbi-0.9.0+git21 * dbd_sqlite3: resolve a stack buffer overflow +- Remove sqlite3.diff, badcode.diff, libdl.diff: merged upstream ------------------------------------------------------------------- Thu Feb 6 11:50:13 UTC 2014 - fcrozat@suse.com