diff options
Diffstat (limited to 'kde-frameworks/knewstuff')
-rw-r--r-- | kde-frameworks/knewstuff/Manifest | 8 | ||||
-rw-r--r-- | kde-frameworks/knewstuff/files/knewstuff-5.90.0-add-conditional-cache-preference.patch | 61 | ||||
-rw-r--r-- | kde-frameworks/knewstuff/files/knewstuff-5.90.0-ensure-correct-ProvidersUrl.patch | 27 | ||||
-rw-r--r-- | kde-frameworks/knewstuff/knewstuff-5.90.0-r1.ebuild (renamed from kde-frameworks/knewstuff/knewstuff-5.88.0.ebuild) | 8 | ||||
-rw-r--r-- | kde-frameworks/knewstuff/knewstuff-5.92.0.ebuild (renamed from kde-frameworks/knewstuff/knewstuff-5.90.0.ebuild) | 0 |
5 files changed, 100 insertions, 4 deletions
diff --git a/kde-frameworks/knewstuff/Manifest b/kde-frameworks/knewstuff/Manifest index 058c77e60fa5..be051d115831 100644 --- a/kde-frameworks/knewstuff/Manifest +++ b/kde-frameworks/knewstuff/Manifest @@ -1,5 +1,7 @@ -DIST knewstuff-5.88.0.tar.xz 1146552 BLAKE2B 210322ac54eb1fc292b0b9a2a27940bead11b64e86f9c1f3f50150317f11dac87fbd0932aff9b5862c9acdaa654f0c4c2dc44a16a815889f5d63f6485784f9cc SHA512 253f2d5b5fb496a0d24674592b7f6d69866422ffb393bf1db738799f4846e109c8e30e55eff57c6b7c3c56f1e43fa126ba396b8680524a40eec018b84443e634 +AUX knewstuff-5.90.0-add-conditional-cache-preference.patch 2827 BLAKE2B cfa37e232f0c534ab6431ec52dd108f66a1d9f1a3a4551e2ea00247112990a13baaa5ba05585a7ab582d3ed98cff87d7fbfe365946f2357ec23ec4bfcff334d0 SHA512 5b20a0218380737fcfd6435ef7aad7e28ee635efe3dcbbd17e8fc9b2f1965b779345ac7420bc6f18140c4b647c25ace119aa7d6ad27ecc038bc488c6bcf2ee80 +AUX knewstuff-5.90.0-ensure-correct-ProvidersUrl.patch 1264 BLAKE2B 7b22f0e173d7460caeb82ec4be514292093e2423bbfae7465f4bf038259ee734ff3960b6a0d41fdc9c03b08dfd738846bf3839a0fdb21a5054531968c3e328d6 SHA512 e45c22952c87234b25915b7039e2e4cca1c920d6fea32ed29a93c6f45940b6a1b09f8d38bba929f55bbdd63d868327436f83b107808e62c6a45f405f90a09324 DIST knewstuff-5.90.0.tar.xz 1151308 BLAKE2B 3ee001569596c96b7a28696b1be22f5138f7f274ed87b7255d3809a32304b3eacf594ab78627266d8227bb7330fd1e90526b2d93bf4f82c780050bd5d1f7c548 SHA512 d80b743691eb9665e0df196a69db3cee2247bbfe6c34ea5e9511c94558d2e807c9aca867aef6cd4344eaae6f252d9fff6b3e7a31c152b8a8b69b8d54813ede28 -EBUILD knewstuff-5.88.0.ebuild 1269 BLAKE2B b1a564a30a07c4b50c2383fc79b216c770cf5f3e51cf979336decd4d5aecd4b6bb8e802484dc681cc49818b1995f930f826c53a33a1b430d30bf12f75689f94f SHA512 01511a2c8cd685a147bce2f43c7887de2f14d500f900f0d11fe3bfcde06390cc9c5ff8955d79da2c0fd6e7dd2af71d484945abaac280a57ce372b54323b08a3e -EBUILD knewstuff-5.90.0.ebuild 1272 BLAKE2B f258e3a95875eb05cea822c7718758107b2a0fd322c28b77863f4274e2e8d2c0cc72216c2fd3a0336687bd05c37a2984249e1ee33da59eeb6c4e625cad1274c5 SHA512 e4f8515a2bae8807080c6f3bf0db0eebf16d2b1f23c75efac5a5ceb6bd291b2ab742ad2b6bdf526498f003e7930b20390dc5d92ea21c3be0ed188736e54be9c2 +DIST knewstuff-5.92.0.tar.xz 1155052 BLAKE2B ee3485c1e3371c139019bb1889aedb112f40c0bb0ee1c92c159b3a6b8a84208d53de10fb1d368852927b7a65e6e1cee3afcf99aa821e8468c67f8b0ac49db79d SHA512 689089724f53ecd59bc79e046bb0b3f64e7a3bd7c8d9a5cd8be15d13bdc045e0484e05a2e0a87ab0134744da829becf8fc669a9e17b7668dafec3fff8e62a2a8 +EBUILD knewstuff-5.90.0-r1.ebuild 1468 BLAKE2B 93a3c9fd4d72de1e1acf0ceac1d885a2827afefa1a9c95a41843e67b5b28a69efd298ce9d4a205fa89ff45d555fd8a3654fa0936d08517fbf6e088c22227040e SHA512 16604d4eb4ac5694a2883a3965b455d4504d4c14dd05795feb668314d657e6315141da109a1143797b3cd18cb889657caf21beef5fee1cf09e73e2330b118d18 +EBUILD knewstuff-5.92.0.ebuild 1272 BLAKE2B f258e3a95875eb05cea822c7718758107b2a0fd322c28b77863f4274e2e8d2c0cc72216c2fd3a0336687bd05c37a2984249e1ee33da59eeb6c4e625cad1274c5 SHA512 e4f8515a2bae8807080c6f3bf0db0eebf16d2b1f23c75efac5a5ceb6bd291b2ab742ad2b6bdf526498f003e7930b20390dc5d92ea21c3be0ed188736e54be9c2 MISC metadata.xml 600 BLAKE2B b9dafdddae4fb5f9969ca845f02690b096f81f6b3c1f76fe877f2886697c0636b8a3b4498aa5cbf903f1b6ee14f3de51c10ce88b37a9780f91ce23bd841f5fbe SHA512 5f3710e9d14cb62c66fa6b21f70691f276fb1fe030b3b2eb92f206a55bbc10dd998dd522e478c883c36d7f811d7f163602e3a2af7ff92e6dd79fa28a1fa32b85 diff --git a/kde-frameworks/knewstuff/files/knewstuff-5.90.0-add-conditional-cache-preference.patch b/kde-frameworks/knewstuff/files/knewstuff-5.90.0-add-conditional-cache-preference.patch new file mode 100644 index 000000000000..80a8451ec990 --- /dev/null +++ b/kde-frameworks/knewstuff/files/knewstuff-5.90.0-add-conditional-cache-preference.patch @@ -0,0 +1,61 @@ +From e1c6f2bf383876a31cd3e3f9e6edcaa19dc0a7dd Mon Sep 17 00:00:00 2001 +From: Dan Leinir Turthra Jensen <admin@leinir.dk> +Date: Wed, 9 Feb 2022 16:17:58 +0000 +Subject: [PATCH] Add conditional cache preference to http requests + +If we have a cache that's older than 7 days, assume that it's out of +date and actually try again. If it's younger than that, assume that it's +just the same, and prefer our cached version, if we have one. + +The logic here is an attempt at striking a balance between using our cache +to its fullest potential (as in, reducing server-side load and network +roundtrips in general) while also handling the situation where the +information that we are fed about the cache is not entirely correct (such +as the case where we're told there's no expiration date, but the data in +fact does change). 7 days seems a sensible sort of deadline for that, +though we could change that later if we need to. + +This was born out of a discussion on another kns review[1] + +Assume that no cache expiration time will be longer than 7 days, but otherwise prefer the cache +This is mildly hacky, but if we don't do this, we end up with infinite cache expirations in some +cases, which of course isn't really acceptable... See ed62ee20 for a situation where that happened. + +[1] https://invent.kde.org/frameworks/knewstuff/-/merge_requests/166#note_394067 +--- + src/core/jobs/httpworker.cpp | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/core/jobs/httpworker.cpp b/src/core/jobs/httpworker.cpp +index b52161f6..208e1ef0 100644 +--- a/src/core/jobs/httpworker.cpp ++++ b/src/core/jobs/httpworker.cpp +@@ -41,7 +41,6 @@ public: + return nam.get(request); + } + +-private: + QNetworkDiskCache cache; + }; + +@@ -101,6 +100,17 @@ static void addUserAgent(QNetworkRequest &request) + agentHeader += QStringLiteral("-%1/%2").arg(QCoreApplication::instance()->applicationName(), QCoreApplication::instance()->applicationVersion()); + } + request.setHeader(QNetworkRequest::UserAgentHeader, agentHeader); ++ ++ // Assume that no cache expiration time will be longer than a week, but otherwise prefer the cache ++ // This is mildly hacky, but if we don't do this, we end up with infinite cache expirations in some ++ // cases, which of course isn't really acceptable... See ed62ee20 for a situation where that happened. ++ QNetworkCacheMetaData cacheMeta{s_httpWorkerNAM->cache.metaData(request.url())}; ++ if (cacheMeta.isValid()) { ++ const QDateTime nextWeek{QDateTime::currentDateTime().addDays(7)}; ++ if (cacheMeta.expirationDate().isValid() && cacheMeta.expirationDate() < nextWeek) { ++ request.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferCache); ++ } ++ } + } + + void HTTPWorker::startRequest() +-- +GitLab + diff --git a/kde-frameworks/knewstuff/files/knewstuff-5.90.0-ensure-correct-ProvidersUrl.patch b/kde-frameworks/knewstuff/files/knewstuff-5.90.0-ensure-correct-ProvidersUrl.patch new file mode 100644 index 000000000000..130ca3dfbd5d --- /dev/null +++ b/kde-frameworks/knewstuff/files/knewstuff-5.90.0-ensure-correct-ProvidersUrl.patch @@ -0,0 +1,27 @@ +From c8165b7a0d622e318b3353ccf257a8f229dd12c9 Mon Sep 17 00:00:00 2001 +From: Aleix Pol <aleixpol@kde.org> +Date: Tue, 8 Feb 2022 11:48:11 +0100 +Subject: [PATCH] Engine: Ensure we are not using the wrong ProvidersUrl + +--- + src/core/engine.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/core/engine.cpp b/src/core/engine.cpp +index 139dda1a..c96ba890 100644 +--- a/src/core/engine.cpp ++++ b/src/core/engine.cpp +@@ -264,6 +264,10 @@ bool Engine::init(const QString &configfile) + Q_EMIT uploadEnabledChanged(); + + m_providerFileUrl = group.readEntry("ProvidersUrl"); ++ if (m_providerFileUrl == QLatin1String("https://download.kde.org/ocs/providers.xml")) { ++ m_providerFileUrl = QStringLiteral("https://autoconfig.kde.org/ocs/providers.xml"); ++ qCWarning(KNEWSTUFFCORE) << "Please make sure" << configfile << "has ProvidersUrl=https://autoconfig.kde.org/ocs/providers.xml"; ++ } + if (group.readEntry("UseLocalProvidersFile", "false").toLower() == QLatin1String{"true"}) { + // The local providers file is called "appname.providers", to match "appname.knsrc" + m_providerFileUrl = QUrl::fromLocalFile(QLatin1String("%1.providers").arg(configFullPath.left(configFullPath.length() - 6))).toString(); +-- +GitLab + diff --git a/kde-frameworks/knewstuff/knewstuff-5.88.0.ebuild b/kde-frameworks/knewstuff/knewstuff-5.90.0-r1.ebuild index 845f3b37d0fb..34fdae40c707 100644 --- a/kde-frameworks/knewstuff/knewstuff-5.88.0.ebuild +++ b/kde-frameworks/knewstuff/knewstuff-5.90.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -40,6 +40,12 @@ RDEPEND="${DEPEND} >=kde-frameworks/kirigami-${PVCUT}:5 " +# https://mail.kde.org/pipermail/distributions/2022-February/001140.html +PATCHES=( + "${FILESDIR}/${P}-ensure-correct-ProvidersUrl.patch" + "${FILESDIR}/${P}-add-conditional-cache-preference.patch" +) + src_configure() { local mycmakeargs=( $(cmake_use_find_package opds KF5Syndication) diff --git a/kde-frameworks/knewstuff/knewstuff-5.90.0.ebuild b/kde-frameworks/knewstuff/knewstuff-5.92.0.ebuild index 974b65f15605..974b65f15605 100644 --- a/kde-frameworks/knewstuff/knewstuff-5.90.0.ebuild +++ b/kde-frameworks/knewstuff/knewstuff-5.92.0.ebuild |