Package: release.debian.org
Severity: normal
Tags: stretch
User: release.debian@packages.debian.org
Usertags: pu
Hello,
I would like to upload a fix for FTBFS (#880233) to stretch.
The same fix has been in sid earlier:
diff --git a/debian/changelog b/debian/changelog
index 4da7159..aee9b20 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+openbsc (0.15.0-2+deb9u1) stretch; urgency=medium
+
+ * debian/patches/dbi.patch:
+- Fix FTBFS with patch (from sid) (Closes: #880233)
+
+ -- Ruben Undheim Tue, 04 Sep 2018 20:25:16 +0200
+
openbsc (0.15.0-2) unstable; urgency=medium
* debian/control:
diff --git a/debian/patches/dbi.patch b/debian/patches/dbi.patch
new file mode 100644
index 000..a4331d5
--- /dev/null
+++ b/debian/patches/dbi.patch
@@ -0,0 +1,179 @@
+Description: take care of new libdbi version with newly activated error handler
+ patch inspired by #2677 at https://osmocom.org/issues/2667
+Author: Thorsten Alteholz
+Index: openbsc-0.15.0/openbsc/src/libmsc/db.c
+===
+--- openbsc-0.15.0.orig/openbsc/src/libmsc/db.c2017-12-06
16:17:40.0 +0100
openbsc-0.15.0/openbsc/src/libmsc/db.c 2017-12-07 09:44:19.285698593
+0100
+@@ -309,7 +309,8 @@
+"Failed fetch messages from the old SMS table (upgrade
from rev 3).\n");
+ goto rollback;
+ }
+- while (dbi_result_next_row(result)) {
++ while (dbi_result_has_next_row(result)
++ && dbi_result_next_row(result)) {
+ sms = sms_from_result_v3(result);
+ if (db_sms_store(sms) != 0) {
+ LOGP(DDB, LOGL_ERROR, "Failed to store message to the
new SMS table(upgrade from rev 3).\n");
+@@ -379,7 +380,8 @@
+ if (!result)
+ return -EINVAL;
+
+- if (!dbi_result_next_row(result)) {
++if (!dbi_result_has_next_row(result)
++|| !dbi_result_next_row(result)) {
+ dbi_result_free(result);
+ return -EINVAL;
+ }
+@@ -558,7 +560,8 @@
+ if (!result)
+ return -EIO;
+
+- if (!dbi_result_next_row(result)) {
++if (!dbi_result_has_next_row(result)
++|| !dbi_result_next_row(result)) {
+ dbi_result_free(result);
+ return -ENOENT;
+ }
+@@ -604,7 +607,8 @@
+ if (!result)
+ return -EIO;
+
+- if (!dbi_result_next_row(result)) {
++if (!dbi_result_has_next_row(result)
++|| !dbi_result_next_row(result)) {
+ dbi_result_free(result);
+ return -ENOENT;
+ }
+@@ -690,7 +694,8 @@
+ if (!result)
+ return -EIO;
+
+- if (!dbi_result_next_row(result)) {
++if (!dbi_result_has_next_row(result)
++|| !dbi_result_next_row(result)) {
+ dbi_result_free(result);
+ return -ENOENT;
+ }
+@@ -880,7 +885,8 @@
+ LOGP(DDB, LOGL_ERROR, "Failed to query Subscriber.\n");
+ return NULL;
+ }
+- if (!dbi_result_next_row(result)) {
++if (!dbi_result_has_next_row(result)
++|| !dbi_result_next_row(result)) {
+ DEBUGP(DDB, "Failed to find the Subscriber. '%u' '%s'\n",
+ field, id);
+ dbi_result_free(result);
+@@ -916,7 +922,8 @@
+ LOGP(DDB, LOGL_ERROR, "Failed to query Subscriber: %llu\n",
subscr->id);
+ return -EIO;
+ }
+- if (!dbi_result_next_row(result)) {
++if (!dbi_result_has_next_row(result)
++|| !dbi_result_next_row(result)) {
+ DEBUGP(DDB, "Failed to find the Subscriber. %llu\n",
+ subscr->id);
+ dbi_result_free(result);
+@@ -1104,7 +,8 @@
+ return -1;
+ }
+
+- while (dbi_result_next_row(result)) {
++ while (dbi_result_has_next_row(result)
++ && dbi_result_next_row(result)) {
+ struct gsm_subscriber *subscr;
+
+ subscr = subscr_alloc();
+@@ -1182,8 +1190,10 @@
+ return -EIO;
+ }
+
+- while (dbi_result_next_row(result))
++ while (dbi_result_has_next_row(result)
++ && dbi_result_next_row(result)) {
+ callback(priv, dbi_result_get_ulonglong(result, "id"));
++ }
+
+ dbi_result_free(result);
+ return 0;
+@@ -1221,7 +1231,8 @@
+ dbi_result_free(result);
+ continue;
+ }
+- if (!dbi_result_next_row(result)) {
++ if (!dbi_result_has_next_row(result)
++ || !dbi_result_next_row(result)) {
+ dbi_result_free(result);
+ DEBUGP(DDB, "Allocated TMSI %u for IMSI %s.\n",
+ subscriber->tmsi, subscriber->imsi);
+@@ -1253,7 +1264,8 @@
+