aboutsummaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/fix-ppc64el-ftbfs.patch18
-rw-r--r--debian/patches/glibc-version.patch40
-rw-r--r--debian/patches/make-build-reproducable.patch31
-rw-r--r--debian/patches/series3
4 files changed, 92 insertions, 0 deletions
diff --git a/debian/patches/fix-ppc64el-ftbfs.patch b/debian/patches/fix-ppc64el-ftbfs.patch
new file mode 100644
index 00000000..cf0516fb
--- /dev/null
+++ b/debian/patches/fix-ppc64el-ftbfs.patch
@@ -0,0 +1,18 @@
+Description: Fix FTBFS on ppc64el.
+ This is a proper fix adding support for ppc64el in CMakeLists.txt.
+Author: Frédéric Bonnard <frediz@linux.vnet.ibm.com>
+Bug-Debian: https://bugs.debian.org/865776
+Last-Update: 2017-07-05
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -21,7 +21,7 @@ if(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHE
+ set(HARDINFO_ARCH "x86")
+ elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "x86_64")
+ set(HARDINFO_ARCH "x86_64")
+-elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "ppc{32,64}")
++elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "(ppc32|ppc64|ppc64le)")
+ set(HARDINFO_ARCH "ppc")
+ elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "mips")
+ set(HARDINFO_ARCH "mips")
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/make-build-reproducable.patch b/debian/patches/make-build-reproducable.patch
new file mode 100644
index 00000000..5ad40597
--- /dev/null
+++ b/debian/patches/make-build-reproducable.patch
@@ -0,0 +1,31 @@
+Description: Make HardInfo reproducable.
+ This patch removes the "Compiled on:" text when running "hardinfo --version"
+ because it does not show any useful information at the moment, and causes
+ HardInfo to fail reproducibility tests.
+Author: Simon Quigley <tsimonq2@ubuntu.com>
+Bug-Debian: https://bugs.debian.org/833379
+Reviewed-by: Mattia Rizzolo <mattia@debian.org>
+Last-Update: 2017-07-14
+--- a/config.h.cmake
++++ b/config.h.cmake
+@@ -5,9 +5,6 @@
+
+ #define ARCH "ARCH_@HARDINFO_ARCH@"
+ #define OS "@HARDINFO_OS@"
+-#define PLATFORM OS "-" ARCH
+-#define KERNEL "@CMAKE_SYSTEM_VERSION@"
+-#define HOSTNAME ""
+ #define ARCH_@HARDINFO_ARCH@
+
+ #define LIBDIR "@CMAKE_INSTALL_LIBDIR@"
+--- a/hardinfo/hardinfo.c
++++ b/hardinfo/hardinfo.c
+@@ -55,7 +55,7 @@ int main(int argc, char **argv)
+ " Compiled on: %s %s (%s)\n"),
+ RELEASE ? _("Yes") : "No (" VERSION ")", ARCH,
+ ENABLE_BINRELOC ? _("Yes") : _("No"),
+- PREFIX, LIBPREFIX, PLATFORM, KERNEL, HOSTNAME);
++ PREFIX, LIBPREFIX, "", "", "");
+
+ DEBUG(" Debugging is enabled.");
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 00000000..0f96bc2c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+make-build-reproducable.patch
+fix-ppc64el-ftbfs.patch
+glibc-version.patch