aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ0WI <J0WI@users.noreply.github.com>2022-05-08 22:43:04 +0200
committerMike Crute <mike@crute.us>2022-07-01 23:00:17 +0000
commit8032f7b4e545fa6b967323566401bffee7c49003 (patch)
tree8e0757590865f718f43c50cccc20b18160722043
parentb61f49ab0049aabc85615910416a2e5e831d367c (diff)
downloadaports-8032f7b4e545fa6b967323566401bffee7c49003.tar.gz
aports-8032f7b4e545fa6b967323566401bffee7c49003.tar.bz2
aports-8032f7b4e545fa6b967323566401bffee7c49003.tar.xz
community/gerbera: upgrade to 1.11.0
-rw-r--r--community/gerbera/32-bit-fix.patch134
-rw-r--r--community/gerbera/APKBUILD12
2 files changed, 142 insertions, 4 deletions
diff --git a/community/gerbera/32-bit-fix.patch b/community/gerbera/32-bit-fix.patch
new file mode 100644
index 0000000000..9f42f4182a
--- /dev/null
+++ b/community/gerbera/32-bit-fix.patch
@@ -0,0 +1,134 @@
+Patch-Source: https://github.com/gerbera/gerbera/pull/2635
+From ae46ab4684bd31df4537475dc33234ae85c9b1e6 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:
+---
+ src/metadata/resolution.cc | 4 ++--
+ src/upnp_xml.cc | 4 ++--
+ src/util/process_executor.cc | 3 ++-
+ src/util/tools.cc | 18 +++++++++++++++---
+ test/content/test_resolution.cc | 6 +++---
+ 5 files changed, 24 insertions(+), 11 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..4470b6f17 100644
+--- a/src/util/tools.cc
++++ b/src/util/tools.cc
+@@ -110,7 +110,13 @@ int stoiString(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::stoi(str, nullptr, base);
++ try {
++ std::size_t pos;
++ return std::stoi(str, &pos, base);
++ } catch (const std::exception& ex) {
++ log_error("{} (input {})", ex.what(), str);
++ }
++ return def;
+ }
+
+ unsigned long stoulString(const std::string& str, int def, int base)
+@@ -118,7 +124,13 @@ 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 {
++ std::size_t pos;
++ return std::stoul(str, &pos, base);
++ } catch (const std::exception& ex) {
++ log_error("{} (input {})", ex.what(), str);
++ }
++ return def;
+ }
+
+ void reduceString(std::string& str, char ch)
+@@ -252,7 +264,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/test/content/test_resolution.cc b/test/content/test_resolution.cc
+index 6d4a75610..c30c5c489 100644
+--- a/test/content/test_resolution.cc
++++ b/test/content/test_resolution.cc
+@@ -3,10 +3,10 @@
+ #include "metadata//resolution.h"
+
+ TEST(ResolutionTest, parse) {
+- auto res = Resolution("122586668x54589448448485");
++ auto res = Resolution("122586668x448448485");
+
+ EXPECT_EQ(res.x(), 122586668);
+- EXPECT_EQ(res.y(), 54589448448485);
++ EXPECT_EQ(res.y(), 448448485);
+ }
+
+ TEST(ResolutionTest, parseWithSpace) {
+@@ -38,4 +38,4 @@ TEST(ResolutionTest, throwOnBad) {
+ EXPECT_THROW(Resolution("0x"), std::runtime_error);
+ EXPECT_THROW(Resolution("0x1"), std::runtime_error);
+ EXPECT_THROW(Resolution("1x0"), std::runtime_error);
+-}
+\ No newline at end of file
++}
diff --git a/community/gerbera/APKBUILD b/community/gerbera/APKBUILD
index f68d7fd5a6..f901fe378c 100644
--- a/community/gerbera/APKBUILD
+++ b/community/gerbera/APKBUILD
@@ -1,10 +1,10 @@
# Contributor: Mike Crute <mike@crute.us>
# Maintainer: Mike Crute <mike@crute.us>
pkgname=gerbera
-pkgver=1.10.0
-pkgrel=1
+pkgver=1.11.0
+pkgrel=0
pkgdesc="A UPnP Media Server"
-url="https://gerbera.io"
+url="https://gerbera.io/"
arch="all"
license="GPL-2.0-or-later"
makedepends="
@@ -43,9 +43,12 @@ pkggroups="$pkgname"
# Patch removes check for git info in server version output. This assumes
# that the binary was built within a git repo which is not the case for
# releases. This test will never work for us.
+# 32-bit-fix.patch:
+# temp fixes for 32-bit tests
#
source="gerbera-$pkgver.tar.gz::https://github.com/gerbera/gerbera/archive/v$pkgver.tar.gz
disable-git-test.patch
+ 32-bit-fix.patch
$pkgname.initd
$pkgname.confd"
@@ -96,8 +99,9 @@ package() {
}
sha512sums="
-9bb605b6475bddc5b683433bc9c50818e4986fc134bb0a6daaa444d1733624164c6ff7440789af95da2ec3c04b6c2f4fd46a29744b4ef793b10d9fab0c65a881 gerbera-1.10.0.tar.gz
+ae2b3342b3b57ce6d656d0ebadfd73b5f2764f2164314f6b0deac170a82e6861349c37732e6914454918112124038b221dbd4882001b5de51a49326432ccd70f gerbera-1.11.0.tar.gz
5f084b107a534e8d8debda6fbc494ed7ab5d38e6de3d85867f2c316bd3f7d56daf3755de2647be84ae514905f998dad83ac88736a6ca59a30560c3d7a98dffcb disable-git-test.patch
+6be3eb807b64e66397eab587ff28b1bfb6f2b369902bab85bbe0509f1c8a3ec4687855ee174ee5aa5955cb10731fd1c28ed6aad605fc0d5ffa258b6ed2c9d3d2 32-bit-fix.patch
b8609b8ec46d8e61087b76ea9be34639786014f6545a2eb8dae977e56dcc3841715c0691417382d93d96eefd4c5a629e46cd9605c893445a66ac2815ec141c2b gerbera.initd
392d7e964b0328778847f871e88ffd475ddac99b6cf8c8ded4825eb2f970e084db692552790a1b30ff96f59eabcd9fff50164d9dedf328badab95a1cec833c02 gerbera.confd
"