- 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
This commit is contained in:
parent
452b4c7fe4
commit
2230b7512a
95
fixes.patch
95
fixes.patch
@ -1,95 +0,0 @@
|
|||||||
From 4178830cbe41e870b8d066bdb6953e4495d357c7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Karl=20Strau=C3=9Fberger?= <k_straussberger@netzland.net>
|
|
||||||
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<unsigned int>::max()) {
|
|
||||||
+ if (x == 0 || x == std::numeric_limits<uint64_t>::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<unsigned int>::max()) {
|
|
||||||
+ if (y == 0 || y == std::numeric_limits<uint64_t>::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<s
|
|
||||||
log_debug("setenv: {}='{}'", eName, eValue);
|
|
||||||
}
|
|
||||||
log_debug("Launching process: {} {}", command, fmt::join(arglist, " "));
|
|
||||||
- execvp(command.c_str(), const_cast<char**>(argv.data()));
|
|
||||||
+ if (execvp(command.c_str(), const_cast<char**>(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;
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 17 18:43:32 UTC 2022 - Paolo Stivanin <info@paolostivanin.com>
|
||||||
|
|
||||||
|
- Remove patch, as it didn't solve the issue on i586 and x86.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue May 17 18:24:54 UTC 2022 - Paolo Stivanin <info@paolostivanin.com>
|
Tue May 17 18:24:54 UTC 2022 - Paolo Stivanin <info@paolostivanin.com>
|
||||||
|
|
||||||
|
@ -27,8 +27,6 @@ Source0: https://github.com/gerbera/gerbera/archive/v%{version}.tar.gz#/%
|
|||||||
Source1: config.xml
|
Source1: config.xml
|
||||||
Source2: gerbera.sysusers.in
|
Source2: gerbera.sysusers.in
|
||||||
Patch0: harden_gerbera.service.patch
|
Patch0: harden_gerbera.service.patch
|
||||||
# PATCH-FIX-UPSTREAM https://github.com/gerbera/gerbera/pull/2635
|
|
||||||
Patch1: fixes.patch
|
|
||||||
BuildRequires: ccache
|
BuildRequires: ccache
|
||||||
BuildRequires: cmake >= 3.13
|
BuildRequires: cmake >= 3.13
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user