Accepting request 90023 from home:k0da:ppc

- update to 1.1.11
  - new build requires librtas-devel pkg-config
  - reworked patches
  - Drop libservicelog.warnings.patch,
	libservicelog.sqlite-include.patch
	libservicelog-sqlite_fixes.patch 
  - Fix package description typo
  - ppc,ppc64 exclusive package as it is requires librtas

OBS-URL: https://build.opensuse.org/request/show/90023
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libservicelog?expand=0&rev=10
This commit is contained in:
Dirk Mueller 2011-11-03 12:20:54 +00:00 committed by Git OBS Bridge
parent d09eb4e800
commit c912222f0e
10 changed files with 61 additions and 261 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f4b882e68e059b509156429044d876e6278462d7b4f35a0d8f9818bf7b562b40
size 403827

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9023cb83ae2acc5a4d037fcde2a2570af8e99f19148711949087cc512ec0301a
size 575947

View File

@ -1,20 +1,16 @@
Index: src/servicelog-1.pc.in
===================================================================
--- src/servicelog-1.pc.in.orig 2008-03-06 01:24:51.000000000 +0100
+++ src/servicelog-1.pc.in 2010-04-14 19:58:24.503511195 +0200
@@ -6,5 +6,5 @@ includedir=@includedir@
--- src/servicelog-1.pc.in.orig 2011-11-02 12:51:24.000000000 +0100
+++ src/servicelog-1.pc.in 2011-11-02 12:52:56.000000000 +0100
@@ -6,5 +6,5 @@
Name: servicelog
Description: Library for access to the system servicelog
Version: @VERSION@
-Libs: -L${libdir} -lsqlite3 -l@GENERIC_LIBRARY_NAME@-@GENERIC_API_VERSION@
-Cflags: -I${includedir}/@GENERIC_LIBRARY_NAME@-@GENERIC_API_VERSION@
+Libs: @LIBS_LIBDIR@ -lsqlite3 -l@GENERIC_LIBRARY_NAME@
-Libs: -L${libdir} -lsqlite3 -l@GENERIC_PACKAGE_NAME@
-Cflags: -I${includedir}/@GENERIC_PACKAGE_NAME@-@GENERIC_API_VERSION@
+Libs: @LIBS_LIBDIR@ -lsqlite3 -l@GENERIC_PACKAGE_NAME@
+Cflags: -I${includedir}/servicelog-@GENERIC_API_VERSION@
Index: configure.ac
===================================================================
--- configure.ac.orig 2008-08-17 00:15:33.000000000 +0200
+++ configure.ac 2010-04-14 20:00:54.851453776 +0200
@@ -70,5 +70,15 @@ AC_FUNC_STAT
--- configure.ac.orig 2011-11-02 12:54:39.000000000 +0100
+++ configure.ac 2011-11-02 12:56:44.000000000 +0100
@@ -74,5 +74,15 @@
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([memset strerror strtoull uname])
@ -27,6 +23,6 @@ Index: configure.ac
+fi
+AC_MSG_RESULT(${use_libdir})
+AC_SUBST(LIBS_LIBDIR)
+
+
AC_CONFIG_FILES([Makefile src/Makefile libservicelog.spec src/servicelog-1.pc])
AC_OUTPUT

View File

@ -1,8 +1,6 @@
Index: src/event.c
===================================================================
--- src/event.c.orig 2010-03-24 15:19:20.000000000 +0100
+++ src/event.c 2010-04-14 19:25:11.475501395 +0200
@@ -100,7 +100,7 @@ put_blob(sqlite3 *db, char *table, uint6
--- src/event.c.orig 2011-11-02 13:02:09.000000000 +0100
+++ src/event.c 2011-11-02 13:01:05.000000000 +0100
@@ -101,7 +101,7 @@
char query[80];
sqlite3_stmt *stmt;
@ -11,12 +9,12 @@ Index: src/event.c
table, column, row);
do {
@@ -577,7 +577,7 @@ servicelog_event_query(servicelog *slog,
while (e) {
/* Retrieve any callouts associated with this event */
snprintf(buf, 512, "SELECT * FROM callouts WHERE "
- "event_id = %lld", e->id);
+ "event_id = %llu", e->id);
rc = sqlite3_exec(slog->db, buf, build_callout, &(e->callouts),
&err);
@@ -588,7 +588,7 @@
retrieve_fcn = addl_data_fcns[e->type].retrieve;
snprintf(buf, 512, "SELECT * FROM %s WHERE "
- "event_id = %lld", table, e->id);
+ "event_id = %llu", table, e->id);
rc = sqlite3_exec(slog->db, buf, retrieve_fcn, e, &err);
if (rc != SQLITE_OK) {

View File

@ -1,125 +0,0 @@
diff -uNrp libservicelog-1.0.1/src/event.c libservicelog-1.0.1-new/src/event.c
--- libservicelog-1.0.1/src/event.c 2008-08-17 21:18:30.000000000 -0700
+++ libservicelog-1.0.1-new/src/event.c 2009-03-02 05:06:04.000000000 -0800
@@ -250,7 +250,7 @@ servicelog_event_log(servicelog *slog, s
if (rc != SQLITE_OK) {
snprintf(slog->error, SL_MAX_ERR, "SQL error (%d): %s",
rc, err);
- free(err);
+ sqlite3_free(err);
return 2;
}
@@ -271,7 +271,7 @@ servicelog_event_log(servicelog *slog, s
if (rc != SQLITE_OK) {
snprintf(slog->error, SL_MAX_ERR, "INSERT error (%d): "
"%s", rc, err);
- free(err);
+ sqlite3_free(err);
goto rollback;
}
@@ -292,7 +292,7 @@ servicelog_event_log(servicelog *slog, s
if (rc != SQLITE_OK) {
snprintf(slog->error, SL_MAX_ERR,
"INSERT error (%d)", rc);
- free(err);
+ sqlite3_free(err);
goto rollback;
}
}
@@ -337,7 +337,7 @@ servicelog_event_log(servicelog *slog, s
if (rc != SQLITE_OK) {
snprintf(slog->error, SL_MAX_ERR,
"INSERT error (%d): %s", rc, err);
- free(err);
+ sqlite3_free(err);
goto rollback;
}
callout = callout->next;
@@ -620,7 +620,7 @@ servicelog_event_close(servicelog *slog,
if (rc != SQLITE_OK) {
snprintf(slog->error, SL_MAX_ERR, "UPDATE error (%d): %s",
rc, err);
- free(err);
+ sqlite3_free(err);
return 2;
}
@@ -644,7 +644,7 @@ servicelog_event_repair(servicelog *slog
if (rc != SQLITE_OK) {
snprintf(slog->error, SL_MAX_ERR, "UPDATE error (%d): %s",
rc, err);
- free(err);
+ sqlite3_free(err);
return 2;
}
@@ -667,7 +667,7 @@ servicelog_event_delete(servicelog *slog
if (rc != SQLITE_OK) {
snprintf(slog->error, SL_MAX_ERR, "DELETE error (%d): %s",
rc, err);
- free(err);
+ sqlite3_free(err);
return 2;
}
diff -uNrp libservicelog-1.0.1/src/notify.c libservicelog-1.0.1-new/src/notify.c
--- libservicelog-1.0.1/src/notify.c 2008-08-18 09:22:10.000000000 -0700
+++ libservicelog-1.0.1-new/src/notify.c 2009-03-02 05:07:18.000000000 -0800
@@ -106,7 +106,7 @@ servicelog_notify_log(servicelog *slog,
if (rc != SQLITE_OK) {
snprintf(slog->error, SL_MAX_ERR, "INSERT error (%d): %s",
rc, err);
- free(err);
+ sqlite3_free(err);
return 2;
}
@@ -276,7 +276,7 @@ servicelog_notify_update(servicelog *slo
if (rc != SQLITE_OK) {
snprintf(slog->error, SL_MAX_ERR, "INSERT error (%d): %s",
rc, err);
- free(err);
+ sqlite3_free(err);
return 2;
}
@@ -301,7 +301,7 @@ servicelog_notify_delete(servicelog *slo
if (rc != SQLITE_OK) {
snprintf(slog->error, SL_MAX_ERR, "DELETE error (%d): %s",
rc, err);
- free(err);
+ sqlite3_free(err);
return 2;
}
diff -uNrp libservicelog-1.0.1/src/repair_action.c libservicelog-1.0.1-new/src/repair_action.c
--- libservicelog-1.0.1/src/repair_action.c 2008-08-01 10:16:03.000000000 -0700
+++ libservicelog-1.0.1-new/src/repair_action.c 2009-02-27 12:22:57.000000000 -0800
@@ -106,14 +106,14 @@ servicelog_repair_log(servicelog *slog,
/* update the "repair_actions" table */
snprintf(buf, 1024, "INSERT INTO repair_actions (time_repair, "
"procedure, location, platform, machine_serial, "
- "machine_model, notes) VALUES ('%s', '%s', '%s' '%s', '%s', "
+ "machine_model, notes) VALUES ('%s', '%s', '%s', '%s', '%s', "
"'%s', '%s');", timebuf, repair->procedure, repair->location,
uname_buf.machine, serialbuf, modelbuf, repair->notes);
rc = sqlite3_exec(slog->db, buf, NULL, NULL, &err);
if (rc != SQLITE_OK) {
snprintf(slog->error, SL_MAX_ERR, "INSERT error (%d): %s",
rc, err);
- free(err);
+ sqlite3_free(err);
return 2;
}
@@ -295,7 +295,7 @@ servicelog_repair_delete(servicelog *slo
if (rc != SQLITE_OK) {
snprintf(slog->error, SL_MAX_ERR, "DELETE error (%d): %s",
rc, err);
- free(err);
+ sqlite3_free(err);
return 2;
}

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Wed Nov 2 12:31:42 UTC 2011 - dvaleev@suse.com
- update to 1.1.11
- new build requires librtas-devel pkg-config
- reworked patches
- Drop libservicelog.warnings.patch,
libservicelog.sqlite-include.patch
libservicelog-sqlite_fixes.patch
- Fix package description typo
- ppc,ppc64 exclusive package as it is requires librtas
-------------------------------------------------------------------
Tue Apr 20 20:41:19 UTC 2010 - dimstar@opensuse.org
- Fix build: use %__rm instead of %rm.
-------------------------------------------------------------------
Mon Apr 19 10:50:30 UTC 2010 - pth@novell.com

View File

@ -1,11 +1,7 @@
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,5 +19,5 @@ library_includedir = ${includedir}/servi
library_include_HEADERS = servicelog-1/servicelog.h
--- Makefile.am.orig 2011-11-02 12:25:32.000000000 +0100
+++ Makefile.am 2011-11-02 12:25:49.000000000 +0100
@@ -19,5 +19,5 @@
library_include_HEADERS = servicelog-1/servicelog.h servicelog-1/libservicelog.h
install-exec-hook:
- install -D --mode=754 --group=service servicelog.db \

View File

@ -18,28 +18,26 @@
Name: libservicelog
Version: 1.0.1
Release: 8
Version: 1.1.11
Release: 1
Summary: Servicelog Database and Library
Requires: libservicelog-library
BuildRequires: sqlite-devel
BuildRequires: sqlite3-devel librtas-devel pkg-config
Group: System/Libraries
License: LGPLv2.0+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://linux-diag.sourceforge.net/servicelog/
ExclusiveArch: ppc ppc64
Source0: http://downloads.sourceforge.net/linux-diag/%{name}-%{version}.tar.bz2
Source1: baselibs.conf
Source2: libservicelog-rpmlintrc
Patch0: libservicelog.install.patch
Patch1: libservicelog.warnings.patch
Patch2: libservicelog.sqlite-include.patch
Patch3: libservicelog-sqlite_fixes.patch
Patch4: libservicelog-pkgconfig.patch
Patch5: libservicelog-printf_types.patch
%description
The libservicelgo package contains a library to create and maintain a
database for storing events related to system service. This database
The libservicelog package contains a library to create and maintain a
database for storing events related to system service. This database
allows for the logging of serviceable and informational events, and for
the logging of service procedures that have been performed upon the
system.
@ -51,15 +49,15 @@ Authors:
Mike Strosaker <strosake@austin.ibm.com>
Nathan Fontenot <nfont@austin.ibm.com>
%package -n libservicelog-1_0-1
%package -n libservicelog-1_1-1
License: LGPLv2.0+
Summary: Servicelog Database and Library
Group: System/Libraries
Provides: libservicelog-library
%description -n libservicelog-1_0-1
The libservicelgo package contains a library to create and maintain a
database for storing events related to system service. This database
%description -n libservicelog-1_1-1
The libservicelog package contains a library to create and maintain a
database for storing events related to system service. This database
allows for the logging of serviceable and informational events, and for
the logging of service procedures that have been performed upon the
system.
@ -76,6 +74,7 @@ License: LGPLv2.0+
Summary: Development files for libservicelog
Group: Development/Libraries/Other
Requires: %{name} = %{version} glibc-devel
Requires: libservicelog-1_1-1
%description devel
Contains header files for building with libservicelog.
@ -89,10 +88,7 @@ Authors:
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch0
%patch4
%patch5
@ -104,16 +100,16 @@ make %{?jobs:-j%jobs}
%install
%{makeinstall}
%rm -f %{buildroot}%{_libdir}/*.la
%__rm -f %{buildroot}%{_libdir}/*.la
%clean
%pre
/usr/sbin/groupadd -r service || echo groupadd service failed
%post -n libservicelog-1_0-1 -p /sbin/ldconfig
%post -n libservicelog-1_1-1 -p /sbin/ldconfig
%postun -n libservicelog-1_0-1 -p /sbin/ldconfig
%postun -n libservicelog-1_1-1 -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
@ -121,7 +117,7 @@ make %{?jobs:-j%jobs}
%attr( 754, root, service ) %dir /var/lib/servicelog
%attr( 644, root, service ) /var/lib/servicelog/servicelog.db
%files -n libservicelog-1_0-1
%files -n libservicelog-1_1-1
%defattr(-,root,root,-)
%{_libdir}/lib*.so.*
# dlopen object

View File

@ -1,27 +0,0 @@
do not required sqlite, it is linked statically
---
servicelog-1/servicelog.h | 1 -
src/Makefile.am | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
--- a/servicelog-1/servicelog.h
+++ b/servicelog-1/servicelog.h
@@ -24,7 +24,6 @@
#include <stdint.h>
#include <time.h>
-#include <sqlite3.h>
#ifdef __cplusplus
extern "C" {
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -27,7 +27,7 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = servicelog-1.pc
libservicelog_la_LDFLAGS = -module -version-info \
- @GENERIC_API_VERSION@ -release @GENERIC_RELEASE@
+ @GENERIC_API_VERSION@ -release @GENERIC_RELEASE@ $(AM_LDFLAGS)
AM_CFLAGS = -Wall -g -DDEST_DIR='"${exec_prefix}"'
AM_LDFLAGS = -lsqlite3

View File

@ -1,51 +0,0 @@
strptime man page is incorrect
_GNU_SOURCE defines also _XOPEN_SOURCE
---
src/event.c | 2 +-
src/notify.c | 1 +
src/repair_action.c | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
--- a/src/event.c
+++ b/src/event.c
@@ -18,12 +18,12 @@
* Licence along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
-#define _XOPEN_SOURCE
#include <time.h>
#include <grp.h>
#include <sys/types.h>
--- a/src/notify.c
+++ b/src/notify.c
@@ -18,6 +18,7 @@
* Licence along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
--- a/src/repair_action.c
+++ b/src/repair_action.c
@@ -18,12 +18,12 @@
* Licence along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
-#define _XOPEN_SOURCE
#include <time.h>
#include <grp.h>
#include <sys/types.h>