From e5e942ae0913070342a9a4827bb89a1c28f73d12 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 3 Mar 2015 06:26:25 -0500 Subject: [PATCH] pakfire: Support aarch64 --- pakfire/pakfire.nm | 2 +- pakfire/patches/9999-64-bit-marker.patch | 28 ++++++++++++++++ .../patches/9999-capabilities-ENOSYS.patch | 32 +++++++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 pakfire/patches/9999-64-bit-marker.patch create mode 100644 pakfire/patches/9999-capabilities-ENOSYS.patch diff --git a/pakfire/pakfire.nm b/pakfire/pakfire.nm index 45a1c2505..f8f99730a 100644 --- a/pakfire/pakfire.nm +++ b/pakfire/pakfire.nm @@ -5,7 +5,7 @@ name = pakfire version = 0.9.26 -release = 3 +release = 4 maintainer = Michael Tremer groups = System/Packaging diff --git a/pakfire/patches/9999-64-bit-marker.patch b/pakfire/patches/9999-64-bit-marker.patch new file mode 100644 index 000000000..b9004054c --- /dev/null +++ b/pakfire/patches/9999-64-bit-marker.patch @@ -0,0 +1,28 @@ +diff --git a/src/scripts/find-common b/src/scripts/find-common +index 22ce747..d2fc80c 100644 +--- a/src/scripts/find-common ++++ b/src/scripts/find-common +@@ -1,13 +1,3 @@ + #!/bin/bash + + . ${BASEDIR}/functions-common +- +-# Find marker for 64 bit binaries. +-case "$(uname -m)" in +- i?86|x86_64) +- mark64="()(64bit)" +- ;; +- *) +- mark64="" +- ;; +-esac +diff --git a/src/scripts/functions-constants b/src/scripts/functions-constants +index 80256f9..99e4b7a 100644 +--- a/src/scripts/functions-constants ++++ b/src/scripts/functions-constants +@@ -19,3 +19,5 @@ done + ORPHAN_CANDIDATES="${ORPHAN_CANDIDATES} /usr/lib/pkgconfig" + ORPHAN_CANDIDATES="${ORPHAN_CANDIDATES} /usr/lib/python*" + ++# Mark for 64bit ++mark64="()(64bit)" diff --git a/pakfire/patches/9999-capabilities-ENOSYS.patch b/pakfire/patches/9999-capabilities-ENOSYS.patch new file mode 100644 index 000000000..2372342bf --- /dev/null +++ b/pakfire/patches/9999-capabilities-ENOSYS.patch @@ -0,0 +1,32 @@ +diff --git a/src/_pakfire/capabilities.c b/src/_pakfire/capabilities.c +index 4cd8e09..756ec16 100644 +--- a/src/_pakfire/capabilities.c ++++ b/src/_pakfire/capabilities.c +@@ -38,16 +38,19 @@ get_capabilities(PyObject *self, PyObject *args) { + + cap_d = cap_get_file(filename); + if (cap_d == NULL) { +- if (errno == EOPNOTSUPP) { ++ switch (errno) { + /* Return nothing, if the operation is not supported. */ +- Py_RETURN_NONE; +- } else if (errno != ENODATA) { +- snprintf(exception, STRING_SIZE - 1, "Failed to get capabilities of file %s (%s).", +- filename, strerror(errno)); +- PyErr_SetString(PyExc_RuntimeError, exception); +- return NULL; ++ case EOPNOTSUPP: ++ case ENODATA: ++ case ENOSYS: ++ Py_RETURN_NONE; ++ ++ default: ++ snprintf(exception, STRING_SIZE - 1, "Failed to get capabilities of file %s (%s).", ++ filename, strerror(errno)); ++ PyErr_SetString(PyExc_RuntimeError, exception); ++ return NULL; + } +- Py_RETURN_NONE; + } + + char *result = cap_to_text(cap_d, NULL); -- 2.47.2