From b66b817dfb75edb0f6903925c2e1008c0c462e3045478b7060c40204949d667a Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 17 Mar 2023 12:59:22 +0000 Subject: [PATCH] Accepting request 1072621 from home:marxin:branches:Base:System - Add upstream patch libmagic-exceptions.patch that speeds up libreoffice package build. OBS-URL: https://build.opensuse.org/request/show/1072621 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=634 --- libmagic-exceptions.patch | 29 +++++++++++++++++++++++++++++ rpm.changes | 6 ++++++ rpm.spec | 3 ++- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 libmagic-exceptions.patch diff --git a/libmagic-exceptions.patch b/libmagic-exceptions.patch new file mode 100644 index 0000000..7b14b70 --- /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/rpm.changes b/rpm.changes index 833c72d..aaae9fb 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +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 diff --git a/rpm.spec b/rpm.spec index 45f1af8..1ef4a23 100644 --- a/rpm.spec +++ b/rpm.spec @@ -112,6 +112,7 @@ 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 @@ -223,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 137 -P 180 +%patch -P 131 -P 133 -P 134 -P 135 -P 136 -P 137 -P 138 -P 180 %ifarch aarch64 ppc64le riscv64 %patch6464