From 2230b7512a32f6555563c187708082a854ec060bda24a178c444ca0c9c427e1d Mon Sep 17 00:00:00 2001 From: Paolo Stivanin Date: Tue, 17 May 2022 18:44:06 +0000 Subject: [PATCH] - Remove patch, as it didn't solve the issue on i586 and x86. OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/gerbera?expand=0&rev=34 --- fixes.patch | 95 ------------------------------------------------- gerbera.changes | 5 +++ gerbera.spec | 2 -- 3 files changed, 5 insertions(+), 97 deletions(-) delete mode 100644 fixes.patch diff --git a/fixes.patch b/fixes.patch deleted file mode 100644 index 5736e4e..0000000 --- a/fixes.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 4178830cbe41e870b8d066bdb6953e4495d357c7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Karl=20Strau=C3=9Fberger?= -Date: Tue, 17 May 2022 18:13:55 +0200 -Subject: [PATCH] This and that - -May even solve: -#2630 -#2628 ---- - src/metadata/resolution.cc | 4 ++-- - src/upnp_xml.cc | 4 ++-- - src/util/process_executor.cc | 3 ++- - src/util/tools.cc | 9 +++++++-- - 4 files changed, 13 insertions(+), 7 deletions(-) - -diff --git a/src/metadata/resolution.cc b/src/metadata/resolution.cc -index 031cb5788..476c644e5 100644 ---- a/src/metadata/resolution.cc -+++ b/src/metadata/resolution.cc -@@ -33,7 +33,7 @@ Resolution::Resolution(const std::string& string) - - if (!parts[0].empty()) { - auto x = stoulString(trimString(parts[0])); -- if (x == 0 || x == std::numeric_limits::max()) { -+ if (x == 0 || x == std::numeric_limits::max()) { - throw_std_runtime_error("Failed to parse '{}' to valid resolution", string); - } - _x = x; -@@ -41,7 +41,7 @@ Resolution::Resolution(const std::string& string) - - if (!parts[1].empty()) { - auto y = stoulString(trimString(parts[1])); -- if (y == 0 || y == std::numeric_limits::max()) { -+ if (y == 0 || y == std::numeric_limits::max()) { - throw_std_runtime_error("Failed to parse '{}' to valid resolution", string); - } - _y = y; -diff --git a/src/upnp_xml.cc b/src/upnp_xml.cc -index d2d6bc60b..2ed9c7bef 100644 ---- a/src/upnp_xml.cc -+++ b/src/upnp_xml.cc -@@ -508,9 +508,9 @@ std::string UpnpXMLBuilder::renderExtension(const std::string& contentType, cons - } - - if (!location.empty() && location.has_extension()) { -- std::string extension = location.filename().extension(); -+ std::string extension = urlEscape(location.filename().extension().string()); - if (!language.empty()) -- return fmt::format("{}.{}{}", urlExt, language, extension); -+ return fmt::format("{}.{}{}", urlExt, urlEscape(language), extension); - return fmt::format("{}{}", urlExt, extension); - } - -diff --git a/src/util/process_executor.cc b/src/util/process_executor.cc -index 5f238058a..8557175fe 100644 ---- a/src/util/process_executor.cc -+++ b/src/util/process_executor.cc -@@ -70,7 +70,8 @@ ProcessExecutor::ProcessExecutor(const std::string& command, const std::vector(argv.data())); -+ if (execvp(command.c_str(), const_cast(argv.data()))) -+ log_error("Failed to execvp {} {}", command, fmt::join(arglist, " ")); - break; - default: - break; -diff --git a/src/util/tools.cc b/src/util/tools.cc -index 119b74f5b..0aedfd845 100644 ---- a/src/util/tools.cc -+++ b/src/util/tools.cc -@@ -118,7 +118,12 @@ unsigned long stoulString(const std::string& str, int def, int base) - if (str.empty() || (str[0] == '-' && !std::isdigit(*str.substr(1).c_str())) || (str[0] != '-' && !std::isdigit(*str.c_str()))) - return def; - -- return std::stoul(str, nullptr, base); -+ try { -+ return std::stoul(str, nullptr, base); -+ } catch (const std::exception& ex) { -+ log_error("{} (input {})", ex.what(), str); -+ return def; -+ } - } - - void reduceString(std::string& str, char ch) -@@ -252,7 +257,7 @@ std::string urlEscape(std::string_view str) - if ((i + cplen) > str.length()) - cplen = 1; - -- if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '_' || c == '-') { -+ if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '_' || c == '-' || c == '.') { - buf << char(c); - } else { - int hi = c >> 4; - diff --git a/gerbera.changes b/gerbera.changes index 273ad41..52de6a9 100644 --- a/gerbera.changes +++ b/gerbera.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 17 18:43:32 UTC 2022 - Paolo Stivanin + +- Remove patch, as it didn't solve the issue on i586 and x86. + ------------------------------------------------------------------- Tue May 17 18:24:54 UTC 2022 - Paolo Stivanin diff --git a/gerbera.spec b/gerbera.spec index af5cc3b..838a7fb 100644 --- a/gerbera.spec +++ b/gerbera.spec @@ -27,8 +27,6 @@ Source0: https://github.com/gerbera/gerbera/archive/v%{version}.tar.gz#/% Source1: config.xml Source2: gerbera.sysusers.in Patch0: harden_gerbera.service.patch -# PATCH-FIX-UPSTREAM https://github.com/gerbera/gerbera/pull/2635 -Patch1: fixes.patch BuildRequires: ccache BuildRequires: cmake >= 3.13 BuildRequires: fdupes