diff --git a/.files b/.files index d3bd8f9..48388b6 100644 Binary files a/.files and b/.files differ diff --git a/.rev b/.rev index 11e2d7a..a2b0bb5 100644 --- a/.rev +++ b/.rev @@ -2422,4 +2422,12 @@ See bugzilla 1167537 for the gory details. Automatic submission by obs-autosubmit 1058837 + + a4c62ebb4469254e900d2af7d671e575 + 4.18.0 + + dimstar_suse + + 1072623 + diff --git a/cpuid_lzcnt.patch b/cpuid_lzcnt.patch new file mode 100644 index 0000000..722cbe6 --- /dev/null +++ b/cpuid_lzcnt.patch @@ -0,0 +1,48 @@ +From 6b7c58474df3b416b1acb8b58e73b7edf73b8c43 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Mon, 6 Mar 2023 17:50:42 +0100 +Subject: [PATCH] The bit for LZCNT is in CPUID 0x80000001, not 1 + +The GCC headers put bit_LZCNT into the list for CPUID 1 %ecx values, but that +corresponds to VMX. LZCNT is actually advertised in CPUID 0x80000001 %ecx, +which is also referred to as "ABM" by AMD and some other places. +--- + lib/rpmrc.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git lib/rpmrc.c lib/rpmrc.c +index fc2ed5fe2..66ce947ae 100644 +--- lib/rpmrc.c ++++ lib/rpmrc.c +@@ -747,7 +747,6 @@ static inline void cpuid(uint32_t op, uint32_t op2, uint32_t *eax, uint32_t *ebx + /* Features (%eax == 1) */ + /* %ecx */ + #define bit_SSE3 (1 << 0) +-#define bit_LZCNT (1 << 5) + #define bit_SSSE3 (1 << 9) + #define bit_FMA (1 << 12) + #define bit_CMPXCHG16B (1 << 13) +@@ -762,6 +761,7 @@ static inline void cpuid(uint32_t op, uint32_t op2, uint32_t *eax, uint32_t *ebx + /* Extended Features (%eax == 0x80000001) */ + /* %ecx */ + #define bit_LAHF_LM (1 << 0) ++#define bit_LZCNT (1 << 5) + + /* Extended Features (%eax == 7) */ + /* %ebx */ +@@ -787,9 +787,10 @@ static int get_x86_64_level(void) + if ((op_1_ecx & op_1_ecx_lv2) == op_1_ecx_lv2 && (op_80000001_ecx & bit_LAHF_LM)) + level = 2; + +- const unsigned int op_1_ecx_lv3 = bit_LZCNT | bit_FMA | bit_MOVBE | bit_OSXSAVE | bit_AVX | bit_F16C; ++ const unsigned int op_1_ecx_lv3 = bit_FMA | bit_MOVBE | bit_OSXSAVE | bit_AVX | bit_F16C; + const unsigned int op_7_ebx_lv3 = bit_BMI | bit_AVX2 | bit_BMI2; +- if (level == 2 && (op_1_ecx & op_1_ecx_lv3) == op_1_ecx_lv3 && (op_7_ebx & op_7_ebx_lv3) == op_7_ebx_lv3) ++ if (level == 2 && (op_1_ecx & op_1_ecx_lv3) == op_1_ecx_lv3 && (op_7_ebx & op_7_ebx_lv3) == op_7_ebx_lv3 ++ && (op_80000001_ecx & bit_LZCNT)) + level = 3; + + const unsigned int op_7_ebx_lv4 = bit_AVX512F | bit_AVX512DQ | bit_AVX512CD | bit_AVX512BW | bit_AVX512VL; +-- +2.39.2 + diff --git a/libmagic-exceptions.patch b/libmagic-exceptions.patch new file mode 100644 index 0000000..0568792 --- /dev/null +++ b/libmagic-exceptions.patch @@ -0,0 +1,29 @@ +From 4e244280db8d780ac90313785598487f888b8924 Mon Sep 17 00:00:00 2001 +From: Martin Liska +Date: Wed, 15 Mar 2023 19:15:00 +0100 +Subject: [PATCH] add more libmagic exceptions for HTML, SVG and PNG + +I noticed there are ~150K .html files in all libreoffice rpm files +and the detection is significantly delaying package build. Thus, I +introduce more exceptions for commonly used file formats. +--- + build/rpmfc.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git build/rpmfc.c build/rpmfc.c +index 763a68603..cd9e64348 100644 +--- build/rpmfc.c ++++ build/rpmfc.c +@@ -1181,6 +1181,9 @@ static const struct skipped_extension_s skipped_extensions[] = { + { ".h", "C Header", "text/x-c" }, + { ".la", "libtool library file", "text/plain" }, + { ".pc", "pkgconfig file", "text/plain" }, ++ { ".html", "HTML document", "text/html" }, ++ { ".png", "PNG image data", "image/png" }, ++ { ".svg", "SVG Scalable Vector Graphics image", "image/svg+xml" }, + { NULL, NULL, NULL } + }; + +-- +2.39.2 + diff --git a/python-rpm.spec b/python-rpm.spec index 998b6e0..144a4ac 100644 --- a/python-rpm.spec +++ b/python-rpm.spec @@ -1,7 +1,7 @@ # # spec file for package python-rpm # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2017 Neal Gompa . # # All modifications and additions to the file contributed by third parties diff --git a/rpm.changes b/rpm.changes index 4043883..58e58ca 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,4 +1,15 @@ ------------------------------------------------------------------- +Thu Mar 16 12:22:23 UTC 2023 - Martin Liška + +- Add upstream patch libmagic-exceptions.patch that speeds up libreoffice + package build. + +------------------------------------------------------------------- +Thu Mar 9 15:12:11 UTC 2023 - Fabian Vogt + +- add cpuid_lzcnt.patch + +------------------------------------------------------------------- Tue Dec 27 13:17:31 UTC 2022 - Ludwig Nussel - Replace transitional %usrmerged macro with regular version check (boo#1206798) diff --git a/rpm.spec b/rpm.spec index 9cca25d..4280914 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,7 +1,7 @@ # # spec file for package rpm # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -111,6 +111,8 @@ Patch133: zstdpool.diff Patch134: zstdthreaded.diff Patch135: selinux_transactional_update.patch Patch136: x86_64-microarchitectures.patch +Patch137: cpuid_lzcnt.patch +Patch138: libmagic-exceptions.patch # touches a generated file Patch180: whatrequires-doc.diff Patch6464: auto-config-update-aarch64-ppc64le.diff @@ -222,7 +224,7 @@ rm -rf sqlite %patch -P 100 -P 102 -P 103 %patch -P 117 %patch -P 122 -P 123 -%patch -P 131 -P 133 -P 134 -P 135 -P 136 -P 180 +%patch -P 131 -P 133 -P 134 -P 135 -P 136 -P 137 -P 138 -P 180 %ifarch aarch64 ppc64le riscv64 %patch6464