Please find attached the debian debdiff that I believe should be
applied, the launchpad link containing too much of them.
diff -Nru pocl-1.6/debian/changelog pocl-1.6/debian/changelog
--- pocl-1.6/debian/changelog	2021-02-16 11:00:57.000000000 +0100
+++ pocl-1.6/debian/changelog	2021-09-21 06:37:50.000000000 +0200
@@ -1,3 +1,9 @@
+pocl (1.6-6) unstable; urgency=medium
+
+  * Handle getconf "undefined" return value (LP: #1942895)
+
+ -- Alexandre Ghiti <alexandre.gh...@canonical.com>  Tue, 21 Sep 2021 06:37:50 +0200
+
 pocl (1.6-5) unstable; urgency=medium
 
   * Stop building libllvmopencl.so which is no longer used since 0.14.
diff -Nru pocl-1.6/debian/patches/getconf_undefined.patch pocl-1.6/debian/patches/getconf_undefined.patch
--- pocl-1.6/debian/patches/getconf_undefined.patch	1970-01-01 01:00:00.000000000 +0100
+++ pocl-1.6/debian/patches/getconf_undefined.patch	2021-09-21 06:37:09.000000000 +0200
@@ -0,0 +1,21 @@
+Description: Handle getconf undefined return value 
+Author: Alexandre Ghiti <alexandre.gh...@canonical.com>
+Origin: upstream, https://github.com/pocl/pocl/commit/9bd3b404a2ac307b0f238970381c4265a5b734f4
+Bug: https://bugs.launchpad.net/ubuntu/+source/pocl/+bug/1942895 
+Applied-Upstream: https://github.com/pocl/pocl/commit/9bd3b404a2ac307b0f238970381c4265a5b734f4
+Last-Update: 2021-09-21
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -419,6 +419,10 @@
+         message(WARNING "getconf exited with nonzero status!")
+         set(CL_SIZE 0)
+       else()
++        # getconf may in rare conditions return "undefined" value
++        if (CL_SIZE STREQUAL "undefined\n")
++          set(CL_SIZE 0)
++        endif()
+         # getconf sometimes just returns zero
+         if(NOT (CL_SIZE EQUAL 0))
+           string(STRIP "${CL_SIZE}" CL_SIZE)
diff -Nru pocl-1.6/debian/patches/series pocl-1.6/debian/patches/series
--- pocl-1.6/debian/patches/series	2021-02-16 11:00:57.000000000 +0100
+++ pocl-1.6/debian/patches/series	2021-09-21 06:37:38.000000000 +0200
@@ -23,3 +23,4 @@
 timeout.patch
 use-system-CL-headers.patch
 1001-stop-building-libllvmopencl.so-which-is-no-longer-us.patch
+getconf_undefined.patch

Reply via email to