[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#907981: stretch-pu: package openbsc/0.15.0-2



Package: release.debian.org
Severity: normal
Tags: stretch
User: release.debian.org@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 <ruben.undheim@gmail.com>  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 0000000..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 <debian@alteholz.de>
+Index: openbsc-0.15.0/openbsc/src/libmsc/db.c
+===================================================================
+--- openbsc-0.15.0.orig/openbsc/src/libmsc/db.c	2017-12-06 16:17:40.000000000 +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 +1111,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 @@
+ 			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);
+ 			break;
+ 		}
+@@ -1294,7 +1306,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);
+ 			break;
+ 		}
+@@ -1355,7 +1368,8 @@
+ 			LOGP(DDB, LOGL_ERROR, "Failed to query Equipment by IMEI.\n");
+ 			return 1;
+ 		}
+-		if (!dbi_result_next_row(result)) {
++		if (!dbi_result_has_next_row(result)
++		    || !dbi_result_next_row(result)) {
+ 			LOGP(DDB, LOGL_ERROR, "Failed to find the Equipment.\n");
+ 			dbi_result_free(result);
+ 			return 1;
+@@ -1512,7 +1526,8 @@
+ 	if (!result)
+ 		return NULL;
+ 
+-	if (!dbi_result_next_row(result)) {
++        if (!dbi_result_has_next_row(result)
++            || !dbi_result_next_row(result)) {
+ 		dbi_result_free(result);
+ 		return NULL;
+ 	}
+@@ -1541,7 +1556,8 @@
+ 	if (!result)
+ 		return NULL;
+ 
+-	if (!dbi_result_next_row(result)) {
++        if (!dbi_result_has_next_row(result)
++            || !dbi_result_next_row(result)) {
+ 		dbi_result_free(result);
+ 		return NULL;
+ 	}
+@@ -1571,7 +1587,8 @@
+ 	if (!result)
+ 		return NULL;
+ 
+-	if (!dbi_result_next_row(result)) {
++        if (!dbi_result_has_next_row(result)
++            || !dbi_result_next_row(result)) {
+ 		dbi_result_free(result);
+ 		return NULL;
+ 	}
+@@ -1600,7 +1617,8 @@
+ 	if (!result)
+ 		return NULL;
+ 
+-	if (!dbi_result_next_row(result)) {
++        if (!dbi_result_has_next_row(result)
++            || !dbi_result_next_row(result)) {
+ 		dbi_result_free(result);
+ 		return NULL;
+ 	}
diff --git a/debian/patches/series b/debian/patches/series
index 43f03e8..ea6ec47 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ set_version_explicitly.patch
 correct_spelling_errors.patch
 fix_failing_test.patch
 gnutls.patch
+dbi.patch



Best regards,
Ruben


Reply to: