Accepting request 377634 from home:jloeser:branches:devel:libraries:c_c++
version update to 1.1.16 (FATE#319556) OBS-URL: https://build.opensuse.org/request/show/377634 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libservicelog?expand=0&rev=31
This commit is contained in:
parent
12e746ecd5
commit
54e90967b1
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:981c85cef132153fde7da0635fd65f487d1f90adf0e929cef54b5ecc9d43230d
|
|
||||||
size 392259
|
|
3
libservicelog-1.1.16.tar.gz
Normal file
3
libservicelog-1.1.16.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:5933496afca2c63a7e2f771f1f1b3684d92075cdb108acb9bb7e45ba882ee790
|
||||||
|
size 396055
|
@ -1,308 +0,0 @@
|
|||||||
Index: libservicelog-1.1.13/src/addl_data.c
|
|
||||||
===================================================================
|
|
||||||
--- libservicelog-1.1.13.orig/src/addl_data.c
|
|
||||||
+++ libservicelog-1.1.13/src/addl_data.c
|
|
||||||
@@ -25,6 +25,7 @@
|
|
||||||
#include <sys/utsname.h>
|
|
||||||
#include <sqlite3.h>
|
|
||||||
#include "slog_internal.h"
|
|
||||||
+#include <inttypes.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Each time a new table to contain additional data for a new type of event
|
|
||||||
@@ -66,7 +67,7 @@ insert_addl_data_os(servicelog *slog, st
|
|
||||||
version = os->version;
|
|
||||||
|
|
||||||
snprintf(buf, 1024, "INSERT OR REPLACE INTO os (event_id, version, subsystem, "
|
|
||||||
- "driver, device) VALUES (%llu, '%s', '%s', '%s', '%s');",
|
|
||||||
+ "driver, device) VALUES (%" PRIu64 ", '%s', '%s', '%s', '%s');",
|
|
||||||
event->id, version, os->subsystem, os->driver, os->device);
|
|
||||||
rc = sqlite3_exec(slog->db, buf, NULL, NULL, NULL);
|
|
||||||
if (rc != SQLITE_OK)
|
|
||||||
@@ -95,7 +96,7 @@ insert_addl_data_rtas(servicelog *slog,
|
|
||||||
"platform_id, creator_id, subsystem_id, pel_severity, "
|
|
||||||
"event_type, event_subtype, kernel_id, addl_word1, "
|
|
||||||
"addl_word2, addl_word3, addl_word4, addl_word5, addl_word6, "
|
|
||||||
- "addl_word7, addl_word8) VALUES (%llu, %u, %u, '%c', %u, %u, "
|
|
||||||
+ "addl_word7, addl_word8) VALUES (%" PRIu64 ", %u, %u, '%c', %u, %u, "
|
|
||||||
"%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u);", event->id,
|
|
||||||
rtas->action_flags, rtas->platform_id, rtas->creator_id,
|
|
||||||
rtas->subsystem_id, rtas->pel_severity, rtas->event_type,
|
|
||||||
@@ -127,7 +128,7 @@ insert_addl_data_enclosure(servicelog *s
|
|
||||||
encl = (struct sl_data_enclosure *)event->addl_data;
|
|
||||||
|
|
||||||
snprintf(buf, 1024, "INSERT OR REPLACE INTO enclosure (event_id, enclosure_model, "
|
|
||||||
- "enclosure_serial) VALUES (%llu, '%s', '%s');", event->id,
|
|
||||||
+ "enclosure_serial) VALUES (%" PRIu64 ", '%s', '%s');", event->id,
|
|
||||||
encl->enclosure_model, encl->enclosure_serial);
|
|
||||||
rc = sqlite3_exec(slog->db, buf, NULL, NULL, NULL);
|
|
||||||
if (rc != SQLITE_OK)
|
|
||||||
@@ -154,7 +155,7 @@ insert_addl_data_bmc(servicelog *slog, s
|
|
||||||
|
|
||||||
snprintf(buf, 1024, "INSERT OR REPLACE INTO bmc (event_id, sel_id, sel_type, "
|
|
||||||
"generator, version, sensor_type, sensor_number, event_class, "
|
|
||||||
- "event_type, direction) VALUES (%llu, %u, %u, %u, %u, %u, %u, "
|
|
||||||
+ "event_type, direction) VALUES (%" PRIu64 ", %u, %u, %u, %u, %u, %u, "
|
|
||||||
"%u, %u, %d);", event->id, bmc->sel_id, bmc->sel_type,
|
|
||||||
bmc->generator, bmc->version, bmc->sensor_type,
|
|
||||||
bmc->sensor_number, bmc->event_class, bmc->event_type,
|
|
||||||
Index: libservicelog-1.1.13/src/event.c
|
|
||||||
===================================================================
|
|
||||||
--- libservicelog-1.1.13.orig/src/event.c
|
|
||||||
+++ libservicelog-1.1.13/src/event.c
|
|
||||||
@@ -31,6 +31,7 @@
|
|
||||||
#include <sys/utsname.h>
|
|
||||||
#include <sqlite3.h>
|
|
||||||
#include "slog_internal.h"
|
|
||||||
+#include <inttypes.h>
|
|
||||||
|
|
||||||
static char *severity_text[] = { "", "DEBUG", "INFO", "EVENT", "WARNING",
|
|
||||||
"ERROR_LOCAL", "ERROR", "FATAL" };
|
|
||||||
@@ -102,7 +103,7 @@ put_blob(sqlite3 *db, char *table, uint6
|
|
||||||
char query[80];
|
|
||||||
sqlite3_stmt *stmt;
|
|
||||||
|
|
||||||
- snprintf(query, 80, "UPDATE %s SET %s = ? WHERE id = %llu",
|
|
||||||
+ snprintf(query, 80, "UPDATE %s SET %s = ? WHERE id = %" PRIu64,
|
|
||||||
table, column, row);
|
|
||||||
|
|
||||||
do {
|
|
||||||
@@ -334,7 +335,7 @@ servicelog_event_log(servicelog *slog, s
|
|
||||||
|
|
||||||
snprintf(buf, SQL_MAXLEN, "INSERT INTO callouts (event_id, "
|
|
||||||
"priority, type, procedure, location, fru, "
|
|
||||||
- "serial, ccin) VALUES (%llu, '%c', %d, '%s', "
|
|
||||||
+ "serial, ccin) VALUES (%" PRIu64", '%c', %d, '%s', "
|
|
||||||
"'%s', '%s', '%s', '%s');", event_id,
|
|
||||||
callout->priority, callout->type, proc, loc,
|
|
||||||
fru, serial, ccin);
|
|
||||||
@@ -426,7 +427,7 @@ servicelog_event_get(servicelog *slog, u
|
|
||||||
{
|
|
||||||
char query[30];
|
|
||||||
|
|
||||||
- snprintf(query, 30, "id=%llu", event_id);
|
|
||||||
+ snprintf(query, 30, "id=%" PRIu64, event_id);
|
|
||||||
return servicelog_event_query(slog, query, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -584,7 +585,7 @@ servicelog_event_query(servicelog *slog,
|
|
||||||
while (e) {
|
|
||||||
/* Retrieve any callouts associated with this event */
|
|
||||||
snprintf(buf, 512, "SELECT * FROM callouts WHERE "
|
|
||||||
- "event_id = %llu", e->id);
|
|
||||||
+ "event_id = %" PRIu64, e->id);
|
|
||||||
rc = sqlite3_exec(slog->db, buf, build_callout, &(e->callouts),
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
@@ -594,7 +595,7 @@ servicelog_event_query(servicelog *slog,
|
|
||||||
retrieve_fcn = addl_data_fcns[e->type].retrieve;
|
|
||||||
|
|
||||||
snprintf(buf, 512, "SELECT * FROM %s WHERE "
|
|
||||||
- "event_id = %llu", table, e->id);
|
|
||||||
+ "event_id = %" PRIu64, table, e->id);
|
|
||||||
|
|
||||||
rc = sqlite3_exec(slog->db, buf, retrieve_fcn, e, &err);
|
|
||||||
if (rc != SQLITE_OK) {
|
|
||||||
@@ -620,7 +621,7 @@ servicelog_event_close(servicelog *slog,
|
|
||||||
if (slog == NULL)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
- snprintf(buf, 80, "UPDATE events SET closed=1 WHERE id=%llu",
|
|
||||||
+ snprintf(buf, 80, "UPDATE events SET closed=1 WHERE id=%" PRIu64,
|
|
||||||
event_id);
|
|
||||||
|
|
||||||
rc = sqlite3_exec(slog->db, buf, NULL, NULL, &err);
|
|
||||||
@@ -644,8 +645,8 @@ servicelog_event_repair(servicelog *slog
|
|
||||||
if (slog == NULL)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
- snprintf(buf, 80, "UPDATE events SET closed=1, repair=%llu "
|
|
||||||
- "WHERE id=%llu", repair_id, event_id);
|
|
||||||
+ snprintf(buf, 80, "UPDATE events SET closed=1, repair=% " PRIu64
|
|
||||||
+ "WHERE id=%" PRIu64, repair_id, event_id);
|
|
||||||
|
|
||||||
rc = sqlite3_exec(slog->db, buf, NULL, NULL, &err);
|
|
||||||
if (rc != SQLITE_OK) {
|
|
||||||
@@ -665,7 +666,7 @@ delete_row(servicelog *slog, const char
|
|
||||||
int rc;
|
|
||||||
char buf[80], *err;
|
|
||||||
|
|
||||||
- snprintf(buf, 80, "DELETE FROM %s WHERE %s=%llu", table, id_column, id);
|
|
||||||
+ snprintf(buf, 80, "DELETE FROM %s WHERE %s=%" PRIu64, table, id_column, id);
|
|
||||||
rc = sqlite3_exec(slog->db, buf, NULL, NULL, &err);
|
|
||||||
if (rc != SQLITE_OK) {
|
|
||||||
snprintf(slog->error, SL_MAX_ERR, "DELETE error (%d): %s",
|
|
||||||
@@ -753,7 +754,7 @@ servicelog_event_print(FILE *str, struct
|
|
||||||
struct tm time;
|
|
||||||
|
|
||||||
/* just print param/value pairs */
|
|
||||||
- count += fprintf(str, "ServicelogID: %llu\n",
|
|
||||||
+ count += fprintf(str, "ServicelogID: %" PRIu64 "\n",
|
|
||||||
event->id);
|
|
||||||
localtime_r(&(event->time_logged), &time);
|
|
||||||
count += fprintf(str, "LogTime: %02d/%02d/%04d "
|
|
||||||
@@ -802,7 +803,7 @@ servicelog_event_print(FILE *str, struct
|
|
||||||
count += fprintf(str, "CallHomeStatus: %d\n",
|
|
||||||
event->call_home_status);
|
|
||||||
count += fprintf(str, "Closed: %d\n", event->closed);
|
|
||||||
- count += fprintf(str, "RepairID: %llu\n",
|
|
||||||
+ count += fprintf(str, "RepairID: %" PRIu64 "\n",
|
|
||||||
event->repair);
|
|
||||||
while (callout != NULL) {
|
|
||||||
count += fprintf(str, "Callout: %c %d %s %s %s "
|
|
||||||
Index: libservicelog-1.1.13/src/v29_compat.c
|
|
||||||
===================================================================
|
|
||||||
--- libservicelog-1.1.13.orig/src/v29_compat.c
|
|
||||||
+++ libservicelog-1.1.13/src/v29_compat.c
|
|
||||||
@@ -22,6 +22,7 @@
|
|
||||||
#include "slog_internal.h"
|
|
||||||
#define EXCLUDE_SERVICELOG_COMPAT_DECLS
|
|
||||||
#include "../servicelog-1/libservicelog.h"
|
|
||||||
+#include <inttypes.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Error returns:
|
|
||||||
@@ -63,7 +64,7 @@ convert_key_to_v29(servicelog *log, uint
|
|
||||||
*key32 = (uint32_t) key64;
|
|
||||||
if (*key32 != key64) {
|
|
||||||
snprintf(log->error, SL_MAX_ERR,
|
|
||||||
- "v1+ %s ID %lld truncated to 32 bits", key_type, key64);
|
|
||||||
+ "v1+ %s ID %" PRIu64 "truncated to 32 bits", key_type, key64);
|
|
||||||
return EDOM;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
@@ -488,7 +489,7 @@ find_repaired_events(servicelog *log, ui
|
|
||||||
{
|
|
||||||
char query[40];
|
|
||||||
|
|
||||||
- sprintf(query, "repair=%lld", repair_id);
|
|
||||||
+ sprintf(query, "repair=%" PRIu64, repair_id);
|
|
||||||
return servicelog_event_query(log, query, events);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1057,7 +1058,7 @@ _convert_v1_sl_notify_to_v29(struct v29_
|
|
||||||
v29nfy_gram_fini();
|
|
||||||
if (parse_result != 0 || semantic_errors != 0) {
|
|
||||||
snprintf(log->error, SL_MAX_ERR, "can't translate "
|
|
||||||
- "match string '%s' for v1+ sl_notify %llu "
|
|
||||||
+ "match string '%s' for v1+ sl_notify % "PRIu64
|
|
||||||
"to v0.2.9 sl_notify", v1->match, v1->id);
|
|
||||||
return ENOTSUP;
|
|
||||||
}
|
|
||||||
Index: libservicelog-1.1.13/src/repair_action.c
|
|
||||||
===================================================================
|
|
||||||
--- libservicelog-1.1.13.orig/src/repair_action.c
|
|
||||||
+++ libservicelog-1.1.13/src/repair_action.c
|
|
||||||
@@ -31,6 +31,7 @@
|
|
||||||
#include <sys/utsname.h>
|
|
||||||
#include <sqlite3.h>
|
|
||||||
#include "slog_internal.h"
|
|
||||||
+#include <inttypes.h>
|
|
||||||
|
|
||||||
static void
|
|
||||||
add_to_list(servicelog *slog, struct sl_event **events, uint64_t id)
|
|
||||||
@@ -284,7 +285,7 @@ servicelog_repair_get(servicelog *slog,
|
|
||||||
{
|
|
||||||
char query[30];
|
|
||||||
|
|
||||||
- snprintf(query, 30, "id=%llu", repair_id);
|
|
||||||
+ snprintf(query, 30, "id=%" PRIu64, repair_id);
|
|
||||||
return servicelog_repair_query(slog, query, repair);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -408,7 +409,7 @@ servicelog_repair_delete(servicelog *slo
|
|
||||||
if (slog == NULL)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
- snprintf(buf, 80, "DELETE FROM repair_actions WHERE id=%llu",
|
|
||||||
+ snprintf(buf, 80, "DELETE FROM repair_actions WHERE id=%" PRIu64,
|
|
||||||
repair_id);
|
|
||||||
|
|
||||||
rc = sqlite3_exec(slog->db, buf, NULL, NULL, &err);
|
|
||||||
@@ -445,7 +446,7 @@ servicelog_repair_print(FILE *str, struc
|
|
||||||
if (verbosity < 0) {
|
|
||||||
struct tm time;
|
|
||||||
|
|
||||||
- count += fprintf(str, "ServicelogID: %llu\n",
|
|
||||||
+ count += fprintf(str, "ServicelogID: %" PRIu64 "\n",
|
|
||||||
repair->id);
|
|
||||||
localtime_r(&(repair->time_logged), &time);
|
|
||||||
count += fprintf(str, "LogTime: %02d/%02d/%04d "
|
|
||||||
Index: libservicelog-1.1.13/src/notify.c
|
|
||||||
===================================================================
|
|
||||||
--- libservicelog-1.1.13.orig/src/notify.c
|
|
||||||
+++ libservicelog-1.1.13/src/notify.c
|
|
||||||
@@ -30,6 +30,7 @@
|
|
||||||
#include <sys/utsname.h>
|
|
||||||
#include <sqlite3.h>
|
|
||||||
#include "slog_internal.h"
|
|
||||||
+#include <inttypes.h>
|
|
||||||
|
|
||||||
static char *notify_text[] = { "EVENT", "REPAIR" };
|
|
||||||
|
|
||||||
@@ -163,7 +164,7 @@ servicelog_notify_get(servicelog *slog,
|
|
||||||
{
|
|
||||||
char query[30];
|
|
||||||
|
|
||||||
- snprintf(query, 30, "id=%llu", notify_id);
|
|
||||||
+ snprintf(query, 30, "id=%" PRIu64, notify_id);
|
|
||||||
return servicelog_notify_query(slog, query, notify);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -311,7 +312,7 @@ servicelog_notify_update(servicelog *slo
|
|
||||||
format_text_to_insert(notify->command, command, DESC_MAXLEN);
|
|
||||||
|
|
||||||
snprintf(buf, SQL_MAXLEN, "UPDATE notifications SET notify=%d, "
|
|
||||||
- "command='%s', method=%d, match='%s') WHERE id=%llu",
|
|
||||||
+ "command='%s', method=%d, match='%s') WHERE id=%" PRIu64,
|
|
||||||
notify->notify, command, notify->method,
|
|
||||||
notify->match, notify_id);
|
|
||||||
rc = sqlite3_exec(slog->db, buf, NULL, NULL, &err);
|
|
||||||
@@ -337,7 +338,7 @@ servicelog_notify_delete(servicelog *slo
|
|
||||||
if (slog == NULL)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
- snprintf(buf, 80, "DELETE FROM notifications WHERE id=%llu",
|
|
||||||
+ snprintf(buf, 80, "DELETE FROM notifications WHERE id=%" PRIu64,
|
|
||||||
notify_id);
|
|
||||||
|
|
||||||
rc = sqlite3_exec(slog->db, buf, NULL, NULL, &err);
|
|
||||||
@@ -373,7 +374,7 @@ servicelog_notify_print(FILE *str, struc
|
|
||||||
if (verbosity < 0) {
|
|
||||||
struct tm time;
|
|
||||||
|
|
||||||
- count += fprintf(str, "ServicelogID: %llu\n",
|
|
||||||
+ count += fprintf(str, "ServicelogID: %" PRIu64 "\n",
|
|
||||||
notify->id);
|
|
||||||
localtime_r(&(notify->time_logged), &time);
|
|
||||||
count += fprintf(str, "LogTime: %02d/%02d/%04d "
|
|
||||||
@@ -471,7 +472,7 @@ run_notification_tool(struct sl_notify *
|
|
||||||
id = repair->id;
|
|
||||||
|
|
||||||
if (notify->method == SL_METHOD_NUM_VIA_CMD_LINE)
|
|
||||||
- snprintf(cmd, DESC_MAXLEN + 10, "%s %llu",
|
|
||||||
+ snprintf(cmd, DESC_MAXLEN + 10, "%s %" PRIu64,
|
|
||||||
notify->command, id);
|
|
||||||
else {
|
|
||||||
/* need pipes to pass in stdin */
|
|
||||||
@@ -536,7 +537,7 @@ run_notification_tool(struct sl_notify *
|
|
||||||
|
|
||||||
if (notify->method == SL_METHOD_NUM_VIA_STDIN) {
|
|
||||||
close(pipe_fd[0]);
|
|
||||||
- snprintf(buf, 128, "%llu", id);
|
|
||||||
+ snprintf(buf, 128, "%" PRIu64, id);
|
|
||||||
write(pipe_fd[1], buf, strlen(buf));
|
|
||||||
close(pipe_fd[1]);
|
|
||||||
}
|
|
||||||
@@ -635,9 +636,9 @@ check_notify(void *d, int argc, char **a
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!notify.match || strlen(notify.match) == 0)
|
|
||||||
- snprintf(query, 1024, "id=%llu", data->id);
|
|
||||||
+ snprintf(query, 1024, "id=%" PRIu64, data->id);
|
|
||||||
else
|
|
||||||
- snprintf(query, 1024, "(%s) AND id=%llu", notify.match,
|
|
||||||
+ snprintf(query, 1024, "(%s) AND id=%" PRIu64, notify.match,
|
|
||||||
data->id);
|
|
||||||
|
|
||||||
if (data->notify == SL_NOTIFY_EVENTS) {
|
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 22 16:15:16 UTC 2016 - jloeser@suse.com
|
||||||
|
|
||||||
|
- version update to 1.1.16 (FATE#319556)
|
||||||
|
- see libservicelog-1.1.16/ChangeLog for changes
|
||||||
|
|
||||||
|
- removed patches:
|
||||||
|
* libservicelog-printf_types.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 4 13:26:49 UTC 2014 - jengelh@inai.de
|
Thu Sep 4 13:26:49 UTC 2014 - jengelh@inai.de
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libservicelog
|
# spec file for package libservicelog
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
Name: libservicelog
|
Name: libservicelog
|
||||||
%define lname libservicelog-1_1-1
|
%define lname libservicelog-1_1-1
|
||||||
Version: 1.1.15
|
Version: 1.1.16
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Servicelog Database and Library
|
Summary: Servicelog Database and Library
|
||||||
License: LGPL-2.0+
|
License: LGPL-2.0+
|
||||||
@ -31,7 +31,6 @@ Source0: http://downloads.sourceforge.net/linux-diag/%{name}-%{version}.t
|
|||||||
Source1: baselibs.conf
|
Source1: baselibs.conf
|
||||||
Source2: libservicelog-rpmlintrc
|
Source2: libservicelog-rpmlintrc
|
||||||
PreReq: %{_sbindir}/groupadd
|
PreReq: %{_sbindir}/groupadd
|
||||||
Patch2: libservicelog-printf_types.patch
|
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: librtas-devel
|
BuildRequires: librtas-devel
|
||||||
@ -72,7 +71,6 @@ Contains header files for building with libservicelog.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch2 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fiv
|
autoreconf -fiv
|
||||||
|
Loading…
Reference in New Issue
Block a user