diff options
Diffstat (limited to 'kde-frameworks/knewstuff')
-rw-r--r-- | kde-frameworks/knewstuff/Manifest | 3 | ||||
-rw-r--r-- | kde-frameworks/knewstuff/files/knewstuff-5.86.0-include-user-agent-on-KNS-requests.patch | 58 | ||||
-rw-r--r-- | kde-frameworks/knewstuff/knewstuff-5.86.0-r2.ebuild (renamed from kde-frameworks/knewstuff/knewstuff-5.86.0-r1.ebuild) | 5 |
3 files changed, 64 insertions, 2 deletions
diff --git a/kde-frameworks/knewstuff/Manifest b/kde-frameworks/knewstuff/Manifest index 68fc3bcdd515..b2b33577f3fa 100644 --- a/kde-frameworks/knewstuff/Manifest +++ b/kde-frameworks/knewstuff/Manifest @@ -1,6 +1,7 @@ AUX knewstuff-5.86.0-fix-crash-in-DownloadWidget.patch 725 BLAKE2B 2395108343b6ead975779ae06c63beab4bf3f88eea3f16f7c50c9baebd639e933550553e7f664ab9a33f01bd4503eabb9ffe663aa436b063120063ea1fc46b08 SHA512 89d18085897197f2a3d1fa7164c2ca2957c75b519bc588c8c4981b934199a6e919ef1e293b80bff18c1e7f188898362d3f41517e5f1a14eaaa78a806f373c3a5 +AUX knewstuff-5.86.0-include-user-agent-on-KNS-requests.patch 2150 BLAKE2B 3da29159a51597d2986568b465a0f04d3c96e32af5a66a7adf8b2a3bf2af027ff0aa1ce0e1537d90232075da00f19beb5bb3a1b6db356917df2345f8eff4b811 SHA512 dd765c485761ec25a18feba10c80762cee76b660e4108d737deb17e96e3b0d9597bdf43fbabc1035ed65c30470ed7bb1afe095b04fd931b2059bfdf3a2afb12f DIST knewstuff-5.85.0.tar.xz 1138788 BLAKE2B 6f037ddd3dd7d9499d19b8d10b2486ced1ab169180d69a004369158665eb098015c60fd657e9d84af7b15634a28abd13e761b2728861f3f88c02ac0510121c5c SHA512 2da81b520ecab1d43b79e75ec56cbba410bd0944b13ea53eeee5ca94c77f9c04ad91a35b0c1942516edc5101a365f2a91b774405183bc8bf82c6cd5fb53a0570 DIST knewstuff-5.86.0.tar.xz 1142536 BLAKE2B 8b1aa8ee9e8dc54f0431f77516d3e39bb4f9ff33f72573fee27b749df692b32c850230a2bc566ee580a56b587af05822a0348cd61d58501c49b507fdf0d164bb SHA512 984291bb68e6bde5d90b35245c101c0feb64338ee4c0656802f4812c3a0619a5291307e8e5e2de99b7a34e29554e2283de6513156e7aac32f0d2198433bb45cc EBUILD knewstuff-5.85.0.ebuild 1269 BLAKE2B b1a564a30a07c4b50c2383fc79b216c770cf5f3e51cf979336decd4d5aecd4b6bb8e802484dc681cc49818b1995f930f826c53a33a1b430d30bf12f75689f94f SHA512 01511a2c8cd685a147bce2f43c7887de2f14d500f900f0d11fe3bfcde06390cc9c5ff8955d79da2c0fd6e7dd2af71d484945abaac280a57ce372b54323b08a3e -EBUILD knewstuff-5.86.0-r1.ebuild 1355 BLAKE2B b09a316b35af2db6185ee23ee517fa2748f77c0e1e269fb0295bcef4cb0e71b9a1a2a4ea3d116954620403cd40e71f0fef62d97f3276a316aba558716f8d3368 SHA512 932889d14d31b88d62e2315da78189214b05e9ac225a0048f1719ffed3b01f6c29eaecd0d83c98186e8963c8d2aa72499aa61ed7fff54c7b020845a73cd0ace1 +EBUILD knewstuff-5.86.0-r2.ebuild 1417 BLAKE2B bdb88b835f530ba6ead02e0e9661fc18985362e52067221f8c87da6b7a8e2e942a9de46c5b727967ff07be02c7f69ec5486cb79133efe7d6b61c24e7791db127 SHA512 5dbc60f5bad5eb2d470e86748b5539ff66d72abdb33946935059d008d8e5dc7c98e6b7e056b8d5560fbda0892418f598b0a92609ca5eb23fe6bfe9df8857f03a MISC metadata.xml 600 BLAKE2B b9dafdddae4fb5f9969ca845f02690b096f81f6b3c1f76fe877f2886697c0636b8a3b4498aa5cbf903f1b6ee14f3de51c10ce88b37a9780f91ce23bd841f5fbe SHA512 5f3710e9d14cb62c66fa6b21f70691f276fb1fe030b3b2eb92f206a55bbc10dd998dd522e478c883c36d7f811d7f163602e3a2af7ff92e6dd79fa28a1fa32b85 diff --git a/kde-frameworks/knewstuff/files/knewstuff-5.86.0-include-user-agent-on-KNS-requests.patch b/kde-frameworks/knewstuff/files/knewstuff-5.86.0-include-user-agent-on-KNS-requests.patch new file mode 100644 index 000000000000..6252d28f7b93 --- /dev/null +++ b/kde-frameworks/knewstuff/files/knewstuff-5.86.0-include-user-agent-on-KNS-requests.patch @@ -0,0 +1,58 @@ +From f687c5abd0c5e9bd5a6688b6d9d50f2536b7d33d Mon Sep 17 00:00:00 2001 +From: Aleix Pol <aleixpol@kde.org> +Date: Fri, 24 Sep 2021 14:31:05 +0200 +Subject: [PATCH] Include a user agent on KNS requests + +--- + src/core/jobs/httpworker.cpp | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/src/core/jobs/httpworker.cpp b/src/core/jobs/httpworker.cpp +index 4c218b08..b81edd2d 100644 +--- a/src/core/jobs/httpworker.cpp ++++ b/src/core/jobs/httpworker.cpp +@@ -7,7 +7,9 @@ + #include "httpworker.h" + + #include "knewstuffcore_debug.h" ++#include "knewstuffcore_version.h" + ++#include <QCoreApplication> + #include <QFile> + #include <QMutex> + #include <QMutexLocker> +@@ -93,6 +95,15 @@ void HTTPWorker::setUrl(const QUrl &url) + d->source = url; + } + ++static void addUserAgent(QNetworkRequest &request) ++{ ++ QString agentHeader = QStringLiteral("KNewStuff/%1").arg(QLatin1String(KNEWSTUFFCORE_VERSION_STRING)); ++ if (QCoreApplication::instance()) { ++ agentHeader += QStringLiteral("-%1/%2").arg(QCoreApplication::instance()->applicationName(), QCoreApplication::instance()->applicationVersion()); ++ } ++ request.setHeader(QNetworkRequest::UserAgentHeader, agentHeader); ++} ++ + void HTTPWorker::startRequest() + { + if (d->reply) { +@@ -101,6 +112,7 @@ void HTTPWorker::startRequest() + } + + QNetworkRequest request(d->source); ++ addUserAgent(request); + d->reply = s_httpWorkerNAM->get(request); + connect(d->reply, &QNetworkReply::readyRead, this, &HTTPWorker::handleReadyRead); + connect(d->reply, &QNetworkReply::finished, this, &HTTPWorker::handleFinished); +@@ -144,6 +156,7 @@ void HTTPWorker::handleFinished() + << d->reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); + d->reply->deleteLater(); + QNetworkRequest request(d->redirectUrl); ++ addUserAgent(request); + d->reply = s_httpWorkerNAM->get(request); + connect(d->reply, &QNetworkReply::readyRead, this, &HTTPWorker::handleReadyRead); + connect(d->reply, &QNetworkReply::finished, this, &HTTPWorker::handleFinished); +-- +GitLab + diff --git a/kde-frameworks/knewstuff/knewstuff-5.86.0-r1.ebuild b/kde-frameworks/knewstuff/knewstuff-5.86.0-r2.ebuild index 293f9356d4af..06de55295853 100644 --- a/kde-frameworks/knewstuff/knewstuff-5.86.0-r1.ebuild +++ b/kde-frameworks/knewstuff/knewstuff-5.86.0-r2.ebuild @@ -40,7 +40,10 @@ RDEPEND="${DEPEND} >=kde-frameworks/kirigami-${PVCUT}:5 " -PATCHES=( "${FILESDIR}/${P}-fix-crash-in-DownloadWidget.patch" ) # KDE-bug 443025 +PATCHES=( + "${FILESDIR}/${P}-fix-crash-in-DownloadWidget.patch" # KDE-bug 443025 + "${FILESDIR}/${P}-include-user-agent-on-KNS-requests.patch" +) src_configure() { local mycmakeargs=( |