From 13b37f631f2d3589443f59549856ff60cc91783f Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 04:07:28 +0100 Subject: [PATCH] added patches for x86_64 cohexistance with x86 packages and for openmamba kernel packages names [release 0.31.0-2mamba;Sun Jun 23 2019] --- ...f-0.31.0-arm-detect-arch-using-uname.patch | 26 +++++++++++++++ libdnf-0.31.0-openmamba-kernel-packages.patch | 19 +++++++++++ ...0-x86_64-disable_inferior_arch_check.patch | 11 +++++++ libdnf.spec | 33 +++++++++++++------ 4 files changed, 79 insertions(+), 10 deletions(-) create mode 100644 libdnf-0.31.0-arm-detect-arch-using-uname.patch create mode 100644 libdnf-0.31.0-openmamba-kernel-packages.patch create mode 100644 libdnf-0.31.0-x86_64-disable_inferior_arch_check.patch diff --git a/libdnf-0.31.0-arm-detect-arch-using-uname.patch b/libdnf-0.31.0-arm-detect-arch-using-uname.patch new file mode 100644 index 0000000..8eac73a --- /dev/null +++ b/libdnf-0.31.0-arm-detect-arch-using-uname.patch @@ -0,0 +1,26 @@ +--- libdnf-0.31.0/libdnf/hy-util.cpp.orig 2019-07-13 13:40:25.132045332 +0200 ++++ libdnf-0.31.0/libdnf/hy-util.cpp 2019-07-13 13:41:53.216392596 +0200 +@@ -108,23 +108,6 @@ + if (uname(&un) < 0) + return DNF_ERROR_FAILED; + +- if (!strncmp(un.machine, "armv", 4)) { +- /* un.machine is armvXE, where X is version number and E is +- * endianness (b or l); we need to add modifiers such as +- * h (hardfloat), n (neon), c (crypto extensions) */ +- char endian = un.machine[strlen(un.machine)-1]; +- char *modifier = un.machine + 5; +- while(isdigit(*modifier)) /* keep armv7, armv8, armv9, armv10, armv100, ... */ +- modifier++; +- if (getauxval(AT_HWCAP) & HWCAP_ARM_VFP) +- *modifier++ = 'h'; +- if (getauxval(AT_HWCAP2) & HWCAP2_AES) +- *modifier++ = 'c'; +- if (getauxval(AT_HWCAP) & HWCAP_ARM_NEON) +- *modifier++ = 'n'; +- *modifier++ = endian; +- *modifier = 0; +- } + #ifdef __MIPSEL__ + if (!strcmp(un.machine, "mips")) + strcpy(un.machine, "mipsel"); diff --git a/libdnf-0.31.0-openmamba-kernel-packages.patch b/libdnf-0.31.0-openmamba-kernel-packages.patch new file mode 100644 index 0000000..88413e4 --- /dev/null +++ b/libdnf-0.31.0-openmamba-kernel-packages.patch @@ -0,0 +1,19 @@ +--- libdnf-0.31.0/libdnf/dnf-context.cpp 2019-06-22 18:34:20.000000000 +0200 ++++ libdnf-0.31.0.patched/libdnf/dnf-context.cpp 2019-06-23 19:42:26.970196883 +0200 +@@ -889,8 +889,14 @@ + dnf_context_get_installonly_pkgs(DnfContext *context) + { + static const gchar *installonly_pkgs[] = { +- "kernel", +- "kernel-PAE", ++ "kernel-mamba-longterm","kernel-mamba-longterm-headers", ++ "kernel-mamba-longterm-4GB","kernel-mamba-longterm-4GB-headers", ++ "kernel-mamba","kernel-mamba-headers", ++ "kernel-mamba-64GB","kernel-mamba-64GB-headers", ++ "kernel-mamba-x86_64","kernel-mamba-x86_64-headers", ++ "kernel-raspberrypi","kernel-raspberrypi-headers", ++ "kernel-rpi","kernel-rpi-headers", ++ "kernel-rpi-v7","kernel-rpi-v7-headers", + "installonlypkg(kernel)", + "installonlypkg(kernel-module)", + "installonlypkg(vm)", diff --git a/libdnf-0.31.0-x86_64-disable_inferior_arch_check.patch b/libdnf-0.31.0-x86_64-disable_inferior_arch_check.patch new file mode 100644 index 0000000..83bf02c --- /dev/null +++ b/libdnf-0.31.0-x86_64-disable_inferior_arch_check.patch @@ -0,0 +1,11 @@ +--- libdnf-0.31.0/libdnf/goal/Goal.cpp.orig 2019-06-23 18:33:29.205434790 +0200 ++++ libdnf-0.31.0/libdnf/goal/Goal.cpp 2019-06-23 19:33:44.093032736 +0200 +@@ -1185,6 +1185,8 @@ + solver_set_flag(solv, SOLVER_FLAG_ALLOW_VENDORCHANGE, 1); + /* don't erase packages that are no longer in repo during distupgrade */ + solver_set_flag(solv, SOLVER_FLAG_KEEP_ORPHANS, 1); ++ /* x86_64: disable inferior arch check to allow x86 packages cohexistance */ ++ solver_set_flag(solv, SOLVER_FLAG_NO_INFARCHCHECK, 1); + /* no arch change for forcebest */ + solver_set_flag(solv, SOLVER_FLAG_BEST_OBEY_POLICY, 1); + /* support package splits via obsoletes */ diff --git a/libdnf.spec b/libdnf.spec index 67b8451..28434d6 100644 --- a/libdnf.spec +++ b/libdnf.spec @@ -1,6 +1,6 @@ Name: libdnf -Version: 0.26.0 -Release: 1mamba +Version: 0.31.0 +Release: 2mamba Summary: Software management library Group: System/Libraries Vendor: openmamba @@ -13,6 +13,9 @@ Patch0: libdnf-0.33.0-gcc-8.3.0.patch Patch1: libdnf-0.22.0-rpm5.patch Patch2: libdnf-0.22.0-rpm5-2.patch Patch3: libdnf-0.22.0-rpm5-additional.patch +Patch4: libdnf-0.31.0-x86_64-disable_inferior_arch_check.patch +Patch5: libdnf-0.31.0-openmamba-kernel-packages.patch +Patch6: libdnf-0.31.0-arm-detect-arch-using-uname.patch License: LGPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -27,14 +30,15 @@ BuildRequires: libopenssl-devel BuildRequires: libpython-devel BuildRequires: libpython27-devel BuildRequires: librepo-devel +BuildRequires: librpm-devel BuildRequires: libsmartcols-devel BuildRequires: libsolv-devel BuildRequires: libsqlite-devel BuildRequires: libstdc++6-devel -BuildRequires: rpm-devel ## AUTOBUILDREQ-END BuildRequires: cmake -BuildRequires: libsolv >= 0.7.4 +BuildRequires: libsolv >= 0.7.5 +BuildRequires: libmodulemd >= 2.5.0 #BuildRequires: libmodulemd-devel Provides: libhawkey Obsoletes: libhawkey @@ -59,14 +63,17 @@ This package contains libraries and header files for developing applications tha %prep %setup -q %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +#%patch1 -p1 +#%patch2 -p1 +#%patch3 -p1 +%ifarch x86_64 +%patch4 -p1 +%endif +%patch5 -p1 +%patch6 -p1 %build -%cmake -d build \ - -DCMAKE_CXX_FLAGS="-Doff64_t=__off64_t -Duint64_t=u_int64_t -Duint32_t=u_int32_t -Duint16_t=u_int16_t -Duint8_t=u_int8_t -I%{_includedir}/rpm" \ - -DCMAKE_C_FLAGS="-Doff64_t=__off64_t -Duint64_t=u_int64_t -Duint32_t=u_int32_t -Duint16_t=u_int16_t -Duint8_t=u_int8_t -I%{_includedir}/rpm" +%cmake -d build %make @@ -105,6 +112,12 @@ This package contains libraries and header files for developing applications tha %doc README.md %changelog +* Sun Jun 23 2019 Silvan Calarco 0.31.0-2mamba +- added patches for x86_64 cohexistance with x86 packages and for openmamba kernel packages names + +* Sat Jun 22 2019 Silvan Calarco 0.31.0-1mamba +- update to 0.31.0 + * Tue Jun 04 2019 Silvan Calarco 0.26.0-1mamba - update to 0.26.0