aboutsummaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/aarch64.diff18
-rw-r--r--debian/patches/glibc-version.patch40
-rw-r--r--debian/patches/series2
3 files changed, 60 insertions, 0 deletions
diff --git a/debian/patches/aarch64.diff b/debian/patches/aarch64.diff
new file mode 100644
index 00000000..655bcf54
--- /dev/null
+++ b/debian/patches/aarch64.diff
@@ -0,0 +1,18 @@
+Description: Build for AArch64, using the ARM configuration. Fixes FTBFS on arm64.
+ Inspired by Matthias Klose's initial patch fixing this problem.
+Author: Simon Quigley <tsimonq2@ubuntu.com>
+Bug-Debian: http://bugs.debian.org/779465
+Last-Update: 2017-06-19
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -29,6 +29,8 @@ elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MA
+ set(HARDINFO_ARCH "parisc")
+ elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "sparc{32,64}")
+ set(HARDINFO_ARCH "sparc")
++elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "aarch64*")
++ set(HARDINFO_ARCH "aarch64")
+ elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "arm.*")
+ set(HARDINFO_ARCH "arm")
+ elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "ia64")
diff --git a/debian/patches/glibc-version.patch b/debian/patches/glibc-version.patch
new file mode 100644
index 00000000..92c1b252
--- /dev/null
+++ b/debian/patches/glibc-version.patch
@@ -0,0 +1,40 @@
+Description: Fix checking for GLIBC version
+ Use ldconfig -V instead of trying to call libc.so.6 directly, and update the
+ string mangling in the process.
+Author: Mathieu Trudel-Lapierre <cyphermox@ubuntu.com>
+Bug-Ubuntu: https://pad.lv/1473142
+Last-Update: 2017-06-19
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/modules/computer/os.c
++++ b/modules/computer/os.c
+@@ -27,8 +27,7 @@ get_libc_version(void)
+ FILE *libc;
+ gchar buf[256], *tmp, *p;
+ char *libc_paths[] = {
+- "/lib/ld-uClibc.so.0", "/lib64/ld-uClibc.so.0",
+- "/lib/libc.so.6", "/lib64/libc.so.6"
++ "ldconfig -V"
+ };
+ int i;
+
+@@ -47,15 +46,13 @@ get_libc_version(void)
+ (void)fgets(buf, 256, libc);
+ if (pclose(libc)) goto err;
+
+- tmp = strstr(buf, "version ");
+- if (!tmp) goto err;
++ buf[strlen(buf) - 1] = '\0';
+
+- p = strchr(tmp, ',');
+- if (p) *p = '\0';
+- else goto err;
++ tmp = strstr(buf, " ");
++ if (!tmp) goto err;
+
+ return g_strdup_printf(_("GNU C Library version %s (%sstable)"),
+- strchr(tmp, ' ') + 1,
++ tmp + 1,
+ strstr(buf, " stable ") ? "" : _("un"));
+ err:
+ return g_strdup(_("Unknown"));
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 00000000..52041061
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+aarch64.diff
+glibc-version.patch