aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/akonadi-Revert-Make-installation-properly-relocatabl.patch49
-rw-r--r--gnu/packages/patches/akonadi-paths.patch49
-rw-r--r--gnu/packages/patches/akonadi-timestamps.patch14
-rw-r--r--gnu/packages/patches/choqok-Fix-building-under-Qt-5.13.patch89
-rw-r--r--gnu/packages/patches/konversation-Fix-build-with-Qt-5.11.patch24
-rw-r--r--gnu/packages/patches/opensmtpd-fix-crash.patch44
-rw-r--r--gnu/packages/patches/qemu-CVE-2020-7039.patch173
-rw-r--r--gnu/packages/patches/qemu-CVE-2020-7211.patch49
-rw-r--r--gnu/packages/patches/qemu-fix-documentation-build-failure.patch43
-rw-r--r--gnu/packages/patches/sdl-pango-api_additions.patch128
-rw-r--r--gnu/packages/patches/sdl-pango-blit_overflow.patch32
-rw-r--r--gnu/packages/patches/sdl-pango-fillrect_crash.patch15
-rw-r--r--gnu/packages/patches/sdl-pango-fix-explicit-SDLPango_CopyFTBitmapToSurface.patch20
-rw-r--r--gnu/packages/patches/sdl-pango-matrix_declarations.patch131
-rw-r--r--gnu/packages/patches/sdl-pango-sans-serif.patch13
-rw-r--r--gnu/packages/patches/superlu-dist-fix-mpi-deprecations.patch57
-rw-r--r--gnu/packages/patches/t4k-common-libpng16.patch26
-rw-r--r--gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch54
18 files changed, 909 insertions, 101 deletions
diff --git a/gnu/packages/patches/akonadi-Revert-Make-installation-properly-relocatabl.patch b/gnu/packages/patches/akonadi-Revert-Make-installation-properly-relocatabl.patch
new file mode 100644
index 0000000000..c3964c5c05
--- /dev/null
+++ b/gnu/packages/patches/akonadi-Revert-Make-installation-properly-relocatabl.patch
@@ -0,0 +1,49 @@
+From bc018b4bc816a3b51deb9739bedbf8a2268d0684 Mon Sep 17 00:00:00 2001
+From: gnidorah <gnidorah@users.noreply.github.com>
+Date: Fri, 22 Dec 2017 17:36:03 +0300
+Subject: [PATCH] Revert "Make Akonadi installation properly relocatable"
+
+This reverts commit b2bb55f13f2ac783f89cc414de8c39f62fa2096a.
+---
+ CMakeLists.txt | 3 ---
+ KF5AkonadiConfig.cmake.in | 6 +++---
+ 2 files changed, 3 insertions(+), 6 deletions(-)
+
+Index: akonadi-19.08.0/CMakeLists.txt
+===================================================================
+--- akonadi-19.08.0.orig/CMakeLists.txt
++++ akonadi-19.08.0/CMakeLists.txt
+@@ -306,9 +306,6 @@ configure_package_config_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/KF5AkonadiConfig.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/KF5AkonadiConfig.cmake"
+ INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
+- PATH_VARS AKONADI_DBUS_INTERFACES_INSTALL_DIR
+- AKONADI_INCLUDE_DIR
+- KF5Akonadi_DATA_DIR
+ )
+
+ install(FILES
+Index: akonadi-19.08.0/KF5AkonadiConfig.cmake.in
+===================================================================
+--- akonadi-19.08.0.orig/KF5AkonadiConfig.cmake.in
++++ akonadi-19.08.0/KF5AkonadiConfig.cmake.in
+@@ -26,8 +26,8 @@ if(BUILD_TESTING)
+ find_dependency(Qt5Test "@QT_REQUIRED_VERSION@")
+ endif()
+
+-set_and_check(AKONADI_DBUS_INTERFACES_DIR "@PACKAGE_AKONADI_DBUS_INTERFACES_INSTALL_DIR@")
+-set_and_check(AKONADI_INCLUDE_DIR "@PACKAGE_AKONADI_INCLUDE_DIR@")
++set_and_check(AKONADI_DBUS_INTERFACES_DIR "@AKONADI_DBUS_INTERFACES_INSTALL_DIR@")
++set_and_check(AKONADI_INCLUDE_DIR "@AKONADI_INCLUDE_DIR@")
+
+ find_dependency(Boost "@Boost_MINIMUM_VERSION@")
+
+@@ -35,7 +35,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/KF5Ako
+ include(${CMAKE_CURRENT_LIST_DIR}/KF5AkonadiMacros.cmake)
+
+ # The directory where akonadi-xml.xsd and kcfg2dbus.xsl are installed
+-set(KF5Akonadi_DATA_DIR "@PACKAGE_KF5Akonadi_DATA_DIR@")
++set(KF5Akonadi_DATA_DIR "@KF5Akonadi_DATA_DIR@")
+
+ ####################################################################################
+ # CMAKE_AUTOMOC
diff --git a/gnu/packages/patches/akonadi-paths.patch b/gnu/packages/patches/akonadi-paths.patch
new file mode 100644
index 0000000000..da250ee9e8
--- /dev/null
+++ b/gnu/packages/patches/akonadi-paths.patch
@@ -0,0 +1,49 @@
+This is based on the respectve patch from NixPkgs, but with the parts pinning
+mysql and postgresql executables removed. The our package definition on why.
+
+
+Index: akonadi-19.08.0/src/akonadicontrol/agentmanager.cpp
+===================================================================
+--- akonadi-19.08.0.orig/src/akonadicontrol/agentmanager.cpp
++++ akonadi-19.08.0/src/akonadicontrol/agentmanager.cpp
+@@ -78,12 +78,12 @@ AgentManager::AgentManager(bool verbose,
+ mStorageController = new Akonadi::ProcessControl;
+ mStorageController->setShutdownTimeout(15 * 1000); // the server needs more time for shutdown if we are using an internal mysqld
+ connect(mStorageController, &Akonadi::ProcessControl::unableToStart, this, &AgentManager::serverFailure);
+- mStorageController->start(QStringLiteral("akonadiserver"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash);
++ mStorageController->start(QLatin1String(NIX_OUT "/bin/akonadiserver"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash);
+
+ if (mAgentServerEnabled) {
+ mAgentServer = new Akonadi::ProcessControl;
+ connect(mAgentServer, &Akonadi::ProcessControl::unableToStart, this, &AgentManager::agentServerFailure);
+- mAgentServer->start(QStringLiteral("akonadi_agent_server"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash);
++ mAgentServer->start(QLatin1String(NIX_OUT "/bin/akonadi_agent_server"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash);
+ }
+ }
+
+Index: akonadi-19.08.0/src/akonadicontrol/agentprocessinstance.cpp
+===================================================================
+--- akonadi-19.08.0.orig/src/akonadicontrol/agentprocessinstance.cpp
++++ akonadi-19.08.0/src/akonadicontrol/agentprocessinstance.cpp
+@@ -62,7 +62,7 @@ bool AgentProcessInstance::start(const A
+ } else {
+ Q_ASSERT(agentInfo.launchMethod == AgentType::Launcher);
+ const QStringList arguments = QStringList() << executable << identifier();
+- const QString agentLauncherExec = Akonadi::StandardDirs::findExecutable(QStringLiteral("akonadi_agent_launcher"));
++ const QString agentLauncherExec = QLatin1String(NIX_OUT "/bin/akonadi_agent_launcher");
+ mController->start(agentLauncherExec, arguments);
+ }
+ return true;
+Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
+===================================================================
+--- akonadi-19.08.0.orig/src/server/storage/dbconfigmysql.cpp
++++ akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
+@@ -209,7 +193,7 @@ bool DbConfigMysql::startInternalServer(
+ #endif
+
+ // generate config file
+- const QString globalConfig = StandardDirs::locateResourceFile("config", QStringLiteral("mysql-global.conf"));
++ const QString globalConfig = QLatin1String(NIX_OUT "/etc/xdg/akonadi/mysql-global.conf");
+ const QString localConfig = StandardDirs::locateResourceFile("config", QStringLiteral("mysql-local.conf"));
+ const QString actualConfig = StandardDirs::saveDir("data") + QLatin1String("/mysql.conf");
+ if (globalConfig.isEmpty()) {
diff --git a/gnu/packages/patches/akonadi-timestamps.patch b/gnu/packages/patches/akonadi-timestamps.patch
new file mode 100644
index 0000000000..e299a6991f
--- /dev/null
+++ b/gnu/packages/patches/akonadi-timestamps.patch
@@ -0,0 +1,14 @@
+Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
+===================================================================
+--- akonadi-19.08.0.orig/src/server/storage/dbconfigmysql.cpp
++++ akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
+@@ -235,8 +235,7 @@ bool DbConfigMysql::startInternalServer(
+ bool confUpdate = false;
+ QFile actualFile(actualConfig);
+ // update conf only if either global (or local) is newer than actual
+- if ((QFileInfo(globalConfig).lastModified() > QFileInfo(actualFile).lastModified()) ||
+- (QFileInfo(localConfig).lastModified() > QFileInfo(actualFile).lastModified())) {
++ if (true) {
+ QFile globalFile(globalConfig);
+ QFile localFile(localConfig);
+ if (globalFile.open(QFile::ReadOnly) && actualFile.open(QFile::WriteOnly)) {
diff --git a/gnu/packages/patches/choqok-Fix-building-under-Qt-5.13.patch b/gnu/packages/patches/choqok-Fix-building-under-Qt-5.13.patch
new file mode 100644
index 0000000000..4250106a19
--- /dev/null
+++ b/gnu/packages/patches/choqok-Fix-building-under-Qt-5.13.patch
@@ -0,0 +1,89 @@
+Add QMap include to fix building under Qt 5.13
+
+This combines several patches which all add the same missing include:
+- e13ab06f65a4e8b6259bccda1401abb9c1c9fdca
+- 546ede9ef712bb1b156a55ce30df81c3203dde61
+- 08fb06b63a78888e6703de6ac1a4fd6a0e2791eb
+- bef6784596bf0b41287ebad81f138e1c8c2a6be2
+
+Include is no longer added transitively.
+---
+
+--- a/plugins/betternotify/notify.h
++++ b/plugins/betternotify/notify.h
+@@ -23,6 +23,7 @@
+ #ifndef NOTIFY_H
+ #define NOTIFY_H
+
++#include <QMap>
+ #include <QQueue>
+ #include <QPoint>
+ #include <QPointer>
+--- a/plugins/untiny/untiny.h
++++ b/plugins/untiny/untiny.h
+@@ -27,6 +27,7 @@
+
+ #include "plugin.h"
+
++#include <QMap>
+ #include <QQueue>
+ #include <QUrl>
+ #include <QPointer>
+--- a/plugins/uploaders/flickr/flickr.h
++++ b/plugins/uploaders/flickr/flickr.h
+@@ -26,6 +26,8 @@
+
+ #include "uploader.h"
+
++#include <QMap>
++
+ /**
+ @author Andrey Esin \<gmlastik@gmail.com\>
+ */
+diff --git a/plugins/uploaders/imageshack/imageshack.h b/plugins/uploaders/imageshack/imageshack.h
+index d9ddc88..63d0e3f 100644
+--- a/plugins/uploaders/imageshack/imageshack.h
++++ b/plugins/uploaders/imageshack/imageshack.h
+@@ -26,6 +26,8 @@
+
+ #include "uploader.h"
+
++#include <QMap>
++
+ /**
+ @author Mehrdad Momeny \<mehrdad.momeny@gmail.com\>
+ */
+--- a/plugins/uploaders/mobypicture/mobypicture.h
++++ b/plugins/uploaders/mobypicture/mobypicture.h
+@@ -26,6 +26,8 @@
+
+ #include "uploader.h"
+
++#include <QMap>
++
+ class KJob;
+
+ class Mobypicture : public Choqok::Uploader
+--- a/plugins/uploaders/posterous/posterous.h
++++ b/plugins/uploaders/posterous/posterous.h
+@@ -26,6 +26,8 @@
+
+ #include "uploader.h"
+
++#include <QMap>
++
+ class KJob;
+
+ class Posterous : public Choqok::Uploader
+--- a/plugins/uploaders/twitgoo/twitgoo.h
++++ b/plugins/uploaders/twitgoo/twitgoo.h
+@@ -26,6 +26,8 @@
+
+ #include "uploader.h"
+
++#include <QMap>
++
+ class KJob;
+
+ class Twitgoo : public Choqok::Uploader
+--
diff --git a/gnu/packages/patches/konversation-Fix-build-with-Qt-5.11.patch b/gnu/packages/patches/konversation-Fix-build-with-Qt-5.11.patch
new file mode 100644
index 0000000000..d9d29bbd1a
--- /dev/null
+++ b/gnu/packages/patches/konversation-Fix-build-with-Qt-5.11.patch
@@ -0,0 +1,24 @@
+From 4d0036617becc26a76fd021138c98aceec4c7b53 Mon Sep 17 00:00:00 2001
+From: Luca Beltrame <lbeltrame@kde.org>
+Date: Sun, 21 Jul 2019 09:14:32 +0200
+Subject: Fix build with Qt 5.13
+
+---
+ src/irc/outputfilter.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/irc/outputfilter.cpp b/src/irc/outputfilter.cpp
+index f9e6253..45d11fb 100644
+--- a/src/irc/outputfilter.cpp
++++ b/src/irc/outputfilter.cpp
+@@ -32,6 +32,7 @@
+
+ #include <QStringList>
+ #include <QFile>
++#include <QMetaMethod>
+ #include <QRegExp>
+ #include <QTextCodec>
+ #include <QByteArray>
+--
+cgit v1.1
+
diff --git a/gnu/packages/patches/opensmtpd-fix-crash.patch b/gnu/packages/patches/opensmtpd-fix-crash.patch
deleted file mode 100644
index 0030167533..0000000000
--- a/gnu/packages/patches/opensmtpd-fix-crash.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 9b5f70b93e038df5446bd37a4adac5a0380748e7 Mon Sep 17 00:00:00 2001
-From: johannes <johannes.brechtmann@gmail.com>
-Date: Wed, 21 Feb 2018 23:57:11 +0100
-Subject: [PATCH] crypt_checkpass: include HAVE_CRYPT_H definition, add NULL
- check
-
----
- openbsd-compat/crypt_checkpass.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/openbsd-compat/crypt_checkpass.c b/openbsd-compat/crypt_checkpass.c
-index dafd2dae..d10b3a57 100644
---- a/openbsd-compat/crypt_checkpass.c
-+++ b/openbsd-compat/crypt_checkpass.c
-@@ -1,5 +1,6 @@
- /* OPENBSD ORIGINAL: lib/libc/crypt/cryptutil.c */
-
-+#include "includes.h"
- #include <errno.h>
- #ifdef HAVE_CRYPT_H
- #include <crypt.h>
-@@ -10,6 +11,8 @@
- int
- crypt_checkpass(const char *pass, const char *goodhash)
- {
-+ char *c;
-+
- if (goodhash == NULL)
- goto fail;
-
-@@ -17,7 +20,11 @@ crypt_checkpass(const char *pass, const char *goodhash)
- if (strlen(goodhash) == 0 && strlen(pass) == 0)
- return 0;
-
-- if (strcmp(crypt(pass, goodhash), goodhash) == 0)
-+ c = crypt(pass, goodhash);
-+ if (c == NULL)
-+ goto fail;
-+
-+ if (strcmp(c, goodhash) == 0)
- return 0;
-
- fail:
-
diff --git a/gnu/packages/patches/qemu-CVE-2020-7039.patch b/gnu/packages/patches/qemu-CVE-2020-7039.patch
new file mode 100644
index 0000000000..ffebda68ab
--- /dev/null
+++ b/gnu/packages/patches/qemu-CVE-2020-7039.patch
@@ -0,0 +1,173 @@
+Fix CVE-2020-7039:
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7039
+
+Patches copied from upstream dependency repository:
+
+https://gitlab.freedesktop.org/slirp/libslirp/commit/2655fffed7a9e765bcb4701dd876e9dab975f289
+https://gitlab.freedesktop.org/slirp/libslirp/commit/ce131029d6d4a405cb7d3ac6716d03e58fb4a5d9
+https://gitlab.freedesktop.org/slirp/libslirp/commit/82ebe9c370a0e2970fb5695aa19aa5214a6a1c80
+
+From 2655fffed7a9e765bcb4701dd876e9dab975f289 Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Wed, 8 Jan 2020 00:58:48 +0100
+Subject: [PATCH] tcp_emu: Fix oob access
+
+The main loop only checks for one available byte, while we sometimes
+need two bytes.
+---
+ CHANGELOG.md | 1 +
+ src/tcp_subr.c | 7 +++++++
+ 2 files changed, 8 insertions(+)
+
+#diff --git a/CHANGELOG.md b/CHANGELOG.md
+#index 00d0ce2..5cf94a8 100644
+#--- a/CHANGELOG.md
+#+++ b/CHANGELOG.md
+#@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
+# ### Fixed
+#
+# - ncsi: fix checksum OOB memory access
+#+ - `tcp_emu()`: fix OOB accesses
+#
+# ## [4.1.0] - 2019-12-02
+#
+diff --git a/src/tcp_subr.c b/src/tcp_subr.c
+index 382aa38..9c1bdec 100644
+--- a/slirp/src/tcp_subr.c
++++ b/slirp/src/tcp_subr.c
+@@ -871,6 +871,9 @@ int tcp_emu(struct socket *so, struct mbuf *m)
+ break;
+
+ case 5:
++ if (bptr == m->m_data + m->m_len - 1)
++ return 1; /* We need two bytes */
++
+ /*
+ * The difference between versions 1.0 and
+ * 2.0 is here. For future versions of
+@@ -886,6 +889,10 @@ int tcp_emu(struct socket *so, struct mbuf *m)
+ /* This is the field containing the port
+ * number that RA-player is listening to.
+ */
++
++ if (bptr == m->m_data + m->m_len - 1)
++ return 1; /* We need two bytes */
++
+ lport = (((uint8_t *)bptr)[0] << 8) + ((uint8_t *)bptr)[1];
+ if (lport < 6970)
+ lport += 256; /* don't know why */
+--
+2.24.1
+
+From ce131029d6d4a405cb7d3ac6716d03e58fb4a5d9 Mon Sep 17 00:00:00 2001
+From: Prasad J Pandit <pjp@fedoraproject.org>
+Date: Thu, 9 Jan 2020 15:12:27 +0530
+Subject: [PATCH] slirp: use correct size while emulating IRC commands
+
+While emulating IRC DCC commands, tcp_emu() uses 'mbuf' size
+'m->m_size' to write DCC commands via snprintf(3). This may
+lead to OOB write access, because 'bptr' points somewhere in
+the middle of 'mbuf' buffer, not at the start. Use M_FREEROOM(m)
+size to avoid OOB access.
+
+Reported-by: Vishnu Dev TJ <vishnudevtj@gmail.com>
+Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
+Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Message-Id: <20200109094228.79764-2-ppandit@redhat.com>
+---
+ src/tcp_subr.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/src/tcp_subr.c b/src/tcp_subr.c
+index 9c1bdec..ee7a938 100644
+--- a/slirp/src/tcp_subr.c
++++ b/slirp/src/tcp_subr.c
+@@ -763,7 +763,8 @@ int tcp_emu(struct socket *so, struct mbuf *m)
+ return 1;
+ }
+ m->m_len = bptr - m->m_data; /* Adjust length */
+- m->m_len += snprintf(bptr, m->m_size, "DCC CHAT chat %lu %u%c\n",
++ m->m_len += snprintf(bptr, M_FREEROOM(m),
++ "DCC CHAT chat %lu %u%c\n",
+ (unsigned long)ntohl(so->so_faddr.s_addr),
+ ntohs(so->so_fport), 1);
+ } else if (sscanf(bptr, "DCC SEND %256s %u %u %u", buff, &laddr, &lport,
+@@ -773,8 +774,8 @@ int tcp_emu(struct socket *so, struct mbuf *m)
+ return 1;
+ }
+ m->m_len = bptr - m->m_data; /* Adjust length */
+- m->m_len +=
+- snprintf(bptr, m->m_size, "DCC SEND %s %lu %u %u%c\n", buff,
++ m->m_len += snprintf(bptr, M_FREEROOM(m),
++ "DCC SEND %s %lu %u %u%c\n", buff,
+ (unsigned long)ntohl(so->so_faddr.s_addr),
+ ntohs(so->so_fport), n1, 1);
+ } else if (sscanf(bptr, "DCC MOVE %256s %u %u %u", buff, &laddr, &lport,
+@@ -784,8 +785,8 @@ int tcp_emu(struct socket *so, struct mbuf *m)
+ return 1;
+ }
+ m->m_len = bptr - m->m_data; /* Adjust length */
+- m->m_len +=
+- snprintf(bptr, m->m_size, "DCC MOVE %s %lu %u %u%c\n", buff,
++ m->m_len += snprintf(bptr, M_FREEROOM(m),
++ "DCC MOVE %s %lu %u %u%c\n", buff,
+ (unsigned long)ntohl(so->so_faddr.s_addr),
+ ntohs(so->so_fport), n1, 1);
+ }
+--
+2.24.1
+
+From 82ebe9c370a0e2970fb5695aa19aa5214a6a1c80 Mon Sep 17 00:00:00 2001
+From: Prasad J Pandit <pjp@fedoraproject.org>
+Date: Thu, 9 Jan 2020 15:12:28 +0530
+Subject: [PATCH] slirp: use correct size while emulating commands
+
+While emulating services in tcp_emu(), it uses 'mbuf' size
+'m->m_size' to write commands via snprintf(3). Use M_FREEROOM(m)
+size to avoid possible OOB access.
+
+Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
+Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Message-Id: <20200109094228.79764-3-ppandit@redhat.com>
+---
+ src/tcp_subr.c | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/src/tcp_subr.c b/src/tcp_subr.c
+index ee7a938..177dfd2 100644
+--- a/slirp/src/tcp_subr.c
++++ b/slirp/src/tcp_subr.c
+@@ -681,7 +681,7 @@ int tcp_emu(struct socket *so, struct mbuf *m)
+ n4 = (laddr & 0xff);
+
+ m->m_len = bptr - m->m_data; /* Adjust length */
+- m->m_len += snprintf(bptr, m->m_size - m->m_len,
++ m->m_len += snprintf(bptr, M_FREEROOM(m),
+ "ORT %d,%d,%d,%d,%d,%d\r\n%s", n1, n2, n3, n4,
+ n5, n6, x == 7 ? buff : "");
+ return 1;
+@@ -716,8 +716,7 @@ int tcp_emu(struct socket *so, struct mbuf *m)
+ n4 = (laddr & 0xff);
+
+ m->m_len = bptr - m->m_data; /* Adjust length */
+- m->m_len +=
+- snprintf(bptr, m->m_size - m->m_len,
++ m->m_len += snprintf(bptr, M_FREEROOM(m),
+ "27 Entering Passive Mode (%d,%d,%d,%d,%d,%d)\r\n%s",
+ n1, n2, n3, n4, n5, n6, x == 7 ? buff : "");
+
+@@ -743,8 +742,8 @@ int tcp_emu(struct socket *so, struct mbuf *m)
+ if (m->m_data[m->m_len - 1] == '\0' && lport != 0 &&
+ (so = tcp_listen(slirp, INADDR_ANY, 0, so->so_laddr.s_addr,
+ htons(lport), SS_FACCEPTONCE)) != NULL)
+- m->m_len =
+- snprintf(m->m_data, m->m_size, "%d", ntohs(so->so_fport)) + 1;
++ m->m_len = snprintf(m->m_data, M_ROOM(m),
++ "%d", ntohs(so->so_fport)) + 1;
+ return 1;
+
+ case EMU_IRC:
+--
+2.24.1
+
diff --git a/gnu/packages/patches/qemu-CVE-2020-7211.patch b/gnu/packages/patches/qemu-CVE-2020-7211.patch
new file mode 100644
index 0000000000..2885dda411
--- /dev/null
+++ b/gnu/packages/patches/qemu-CVE-2020-7211.patch
@@ -0,0 +1,49 @@
+Fix CVE-2020-7211:
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7211
+
+Patch copied from upstream dependency repository:
+
+https://gitlab.freedesktop.org/slirp/libslirp/commit/14ec36e107a8c9af7d0a80c3571fe39b291ff1d4
+
+From 14ec36e107a8c9af7d0a80c3571fe39b291ff1d4 Mon Sep 17 00:00:00 2001
+From: Prasad J Pandit <pjp@fedoraproject.org>
+Date: Mon, 13 Jan 2020 17:44:31 +0530
+Subject: [PATCH] slirp: tftp: restrict relative path access
+
+tftp restricts relative or directory path access on Linux systems.
+Apply same restrictions on Windows systems too. It helps to avoid
+directory traversal issue.
+
+Fixes: https://bugs.launchpad.net/qemu/+bug/1812451
+Reported-by: Peter Maydell <peter.maydell@linaro.org>
+Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
+Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Message-Id: <20200113121431.156708-1-ppandit@redhat.com>
+---
+ src/tftp.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/tftp.c b/src/tftp.c
+index 093c2e0..e52e71b 100644
+--- a/slirp/src/tftp.c
++++ b/slirp/src/tftp.c
+@@ -344,8 +344,13 @@ static void tftp_handle_rrq(Slirp *slirp, struct sockaddr_storage *srcsas,
+ k += 6; /* skipping octet */
+
+ /* do sanity checks on the filename */
+- if (!strncmp(req_fname, "../", 3) ||
+- req_fname[strlen(req_fname) - 1] == '/' || strstr(req_fname, "/../")) {
++ if (
++#ifdef G_OS_WIN32
++ strstr(req_fname, "..\\") ||
++ req_fname[strlen(req_fname) - 1] == '\\' ||
++#endif
++ strstr(req_fname, "../") ||
++ req_fname[strlen(req_fname) - 1] == '/') {
+ tftp_send_error(spt, 2, "Access violation", tp);
+ return;
+ }
+--
+2.24.1
+
diff --git a/gnu/packages/patches/qemu-fix-documentation-build-failure.patch b/gnu/packages/patches/qemu-fix-documentation-build-failure.patch
new file mode 100644
index 0000000000..c913c553b2
--- /dev/null
+++ b/gnu/packages/patches/qemu-fix-documentation-build-failure.patch
@@ -0,0 +1,43 @@
+Fix a build failure caused by a texinfo bug:
+
+qemu-doc.texi:41: @menu reference to nonexistent node `QEMU Guest Agent'
+
+Patch copied from upstream source repository:
+
+https://git.qemu.org/?p=qemu.git;a=commitdiff;h=80bc935eaaf93e5b9a4efe97abd7c51d645f2612
+
+From 80bc935eaaf93e5b9a4efe97abd7c51d645f2612 Mon Sep 17 00:00:00 2001
+From: Thomas Huth <thuth@redhat.com>
+Date: Mon, 16 Dec 2019 14:29:41 +0100
+Subject: [PATCH] qemu-doc: Remove the unused "Guest Agent" node
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The node has been removed from the texi file some months ago, so we
+should remove it from the menu section, too.
+
+Fixes: 27a296fce982 ("qemu-ga: Convert invocation documentation to rST")
+Signed-off-by: Thomas Huth <thuth@redhat.com>
+Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
+Message-Id: <20191216132941.25729-1-thuth@redhat.com>
+Signed-off-by: Laurent Vivier <laurent@vivier.eu>
+---
+ qemu-doc.texi | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/qemu-doc.texi b/qemu-doc.texi
+index eea91a2d1e..39f950471f 100644
+--- a/qemu-doc.texi
++++ b/qemu-doc.texi
+@@ -38,7 +38,6 @@
+ * Introduction::
+ * QEMU PC System emulator::
+ * QEMU System emulator for non PC targets::
+-* QEMU Guest Agent::
+ * QEMU User space emulator::
+ * System requirements::
+ * Security::
+--
+2.24.1
+
diff --git a/gnu/packages/patches/sdl-pango-api_additions.patch b/gnu/packages/patches/sdl-pango-api_additions.patch
new file mode 100644
index 0000000000..5c02e79910
--- /dev/null
+++ b/gnu/packages/patches/sdl-pango-api_additions.patch
@@ -0,0 +1,128 @@
+Index: SDL_Pango-0.1.2/src/SDL_Pango.c
+===================================================================
+--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c 2004-12-10 10:06:33.000000000 +0100
++++ SDL_Pango-0.1.2/src/SDL_Pango.c 2007-09-18 14:56:35.362379428 +0200
+@@ -723,13 +723,9 @@
+ SDL_UnlockSurface(surface);
+ }
+
+-/*!
+- Create a context which contains Pango objects.
+
+- @return A pointer to the context as a SDLPango_Context*.
+-*/
+ SDLPango_Context*
+-SDLPango_CreateContext()
++SDLPango_CreateContext_GivenFontDesc(const char* font_desc)
+ {
+ SDLPango_Context *context = g_malloc(sizeof(SDLPango_Context));
+ G_CONST_RETURN char *charset;
+@@ -743,8 +739,7 @@
+ pango_context_set_language (context->context, pango_language_from_string (charset));
+ pango_context_set_base_dir (context->context, PANGO_DIRECTION_LTR);
+
+- context->font_desc = pango_font_description_from_string(
+- MAKE_FONT_NAME (DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE));
++ context->font_desc = pango_font_description_from_string(font_desc);
+
+ context->layout = pango_layout_new (context->context);
+
+@@ -762,6 +757,17 @@
+ }
+
+ /*!
++ Create a context which contains Pango objects.
++
++ @return A pointer to the context as a SDLPango_Context*.
++*/
++SDLPango_Context*
++SDLPango_CreateContext()
++{
++ SDLPango_CreateContext_GivenFontDesc(MAKE_FONT_NAME(DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE));
++}
++
++/*!
+ Free a context.
+
+ @param *context [i/o] Context to be free
+@@ -1053,6 +1059,20 @@
+ pango_layout_set_font_description (context->layout, context->font_desc);
+ }
+
++void
++SDLPango_SetText_GivenAlignment(
++ SDLPango_Context *context,
++ const char *text,
++ int length,
++ SDLPango_Alignment alignment)
++{
++ pango_layout_set_attributes(context->layout, NULL);
++ pango_layout_set_text (context->layout, text, length);
++ pango_layout_set_auto_dir (context->layout, TRUE);
++ pango_layout_set_alignment (context->layout, alignment);
++ pango_layout_set_font_description (context->layout, context->font_desc);
++}
++
+ /*!
+ Set plain text to context.
+ Text must be utf-8.
+@@ -1067,11 +1087,7 @@
+ const char *text,
+ int length)
+ {
+- pango_layout_set_attributes(context->layout, NULL);
+- pango_layout_set_text (context->layout, text, length);
+- pango_layout_set_auto_dir (context->layout, TRUE);
+- pango_layout_set_alignment (context->layout, PANGO_ALIGN_LEFT);
+- pango_layout_set_font_description (context->layout, context->font_desc);
++ SDLPango_SetText_GivenAlignment(context, text, length, SDLPANGO_ALIGN_LEFT);
+ }
+
+ /*!
+Index: SDL_Pango-0.1.2/src/SDL_Pango.h
+===================================================================
+--- SDL_Pango-0.1.2.orig/src/SDL_Pango.h 2004-12-10 10:06:33.000000000 +0100
++++ SDL_Pango-0.1.2/src/SDL_Pango.h 2007-09-18 15:00:41.736419485 +0200
+@@ -26,6 +26,7 @@
+
+ #ifndef SDL_PANGO_H
+ #define SDL_PANGO_H
++#define SDL_PANGO_HAS_GC_EXTENSIONS
+
+ #include "SDL.h"
+
+@@ -109,12 +110,20 @@
+ SDLPANGO_DIRECTION_NEUTRAL /*! Neutral */
+ } SDLPango_Direction;
+
+-
++/*!
++ Specifies alignment of text. See Pango reference for detail
++*/
++typedef enum {
++ SDLPANGO_ALIGN_LEFT,
++ SDLPANGO_ALIGN_CENTER,
++ SDLPANGO_ALIGN_RIGHT
++} SDLPango_Alignment;
+
+ extern DECLSPEC int SDLCALL SDLPango_Init();
+
+ extern DECLSPEC int SDLCALL SDLPango_WasInit();
+
++extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext_GivenFontDesc(const char* font_desc);
+ extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext();
+
+ extern DECLSPEC void SDLCALL SDLPango_FreeContext(
+@@ -157,6 +166,12 @@
+ const char *markup,
+ int length);
+
++extern DECLSPEC void SDLCALL SDLPango_SetText_GivenAlignment(
++ SDLPango_Context *context,
++ const char *text,
++ int length,
++ SDLPango_Alignment alignment);
++
+ extern DECLSPEC void SDLCALL SDLPango_SetText(
+ SDLPango_Context *context,
+ const char *markup,
diff --git a/gnu/packages/patches/sdl-pango-blit_overflow.patch b/gnu/packages/patches/sdl-pango-blit_overflow.patch
new file mode 100644
index 0000000000..411d066a74
--- /dev/null
+++ b/gnu/packages/patches/sdl-pango-blit_overflow.patch
@@ -0,0 +1,32 @@
+Index: sdlpango-0.1.2/src/SDL_Pango.c
+===================================================================
+--- sdlpango-0.1.2.orig/src/SDL_Pango.c 2007-10-08 19:44:15.000000000 +0000
++++ sdlpango-0.1.2/src/SDL_Pango.c 2007-10-08 19:45:27.000000000 +0000
+@@ -725,16 +725,23 @@
+ int x = rect->x;
+ int y = rect->y;
+
++ if(x < 0) {
++ width += x; x = 0;
++ }
+ if(x + width > surface->w) {
+ width = surface->w - x;
+- if(width <= 0)
+- return;
++ }
++ if(width <= 0)
++ return;
++
++ if(y < 0) {
++ height += y; y = 0;
+ }
+ if(y + height > surface->h) {
+ height = surface->h - y;
+- if(height <= 0)
+- return;
+ }
++ if(height <= 0)
++ return;
+
+ if(SDL_LockSurface(surface)) {
+ SDL_SetError("surface lock failed");
diff --git a/gnu/packages/patches/sdl-pango-fillrect_crash.patch b/gnu/packages/patches/sdl-pango-fillrect_crash.patch
new file mode 100644
index 0000000000..7a41bbf2fe
--- /dev/null
+++ b/gnu/packages/patches/sdl-pango-fillrect_crash.patch
@@ -0,0 +1,15 @@
+Index: SDL_Pango-0.1.2/src/SDL_Pango.c
+===================================================================
+--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c 2007-09-18 15:56:12.406223540 +0200
++++ SDL_Pango-0.1.2/src/SDL_Pango.c 2007-09-18 15:57:27.986530616 +0200
+@@ -932,7 +932,9 @@
+ width = PANGO_PIXELS (logical_rect.width);
+ height = PANGO_PIXELS (logical_rect.height);
+
+- SDL_FillRect(surface, NULL, SDL_MapRGBA(surface->format, 0, 0, 0, 0));
++ if (width && height) {
++ SDL_FillRect(surface, NULL, SDL_MapRGBA(surface->format, 0, 0, 0, 0));
++ }
+
+ if((! context->tmp_ftbitmap) || context->tmp_ftbitmap->width < width
+ || context->tmp_ftbitmap->rows < height)
diff --git a/gnu/packages/patches/sdl-pango-fix-explicit-SDLPango_CopyFTBitmapToSurface.patch b/gnu/packages/patches/sdl-pango-fix-explicit-SDLPango_CopyFTBitmapToSurface.patch
new file mode 100644
index 0000000000..3d4b10cc10
--- /dev/null
+++ b/gnu/packages/patches/sdl-pango-fix-explicit-SDLPango_CopyFTBitmapToSurface.patch
@@ -0,0 +1,20 @@
+--- a/src/SDL_Pango.h
++++ b/src/SDL_Pango.h
+@@ -171,7 +171,7 @@
+ SDLPango_Direction direction);
+
+
+-#ifdef __FT2_BUILD_UNIX_H__
++#ifdef FT2BUILD_H_
+
+ extern DECLSPEC void SDLCALL SDLPango_CopyFTBitmapToSurface(
+ const FT_Bitmap *bitmap,
+@@ -179,7 +179,7 @@
+ const SDLPango_Matrix *matrix,
+ SDL_Rect *rect);
+
+-#endif /* __FT2_BUILD_UNIX_H__ */
++#endif
+
+
+ #ifdef __PANGO_H__
diff --git a/gnu/packages/patches/sdl-pango-matrix_declarations.patch b/gnu/packages/patches/sdl-pango-matrix_declarations.patch
new file mode 100644
index 0000000000..c35d0a708d
--- /dev/null
+++ b/gnu/packages/patches/sdl-pango-matrix_declarations.patch
@@ -0,0 +1,131 @@
+Index: SDL_Pango-0.1.2/src/SDL_Pango.c
+===================================================================
+--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c 2007-09-18 15:03:10.732910311 +0200
++++ SDL_Pango-0.1.2/src/SDL_Pango.c 2007-09-18 15:04:41.970109622 +0200
+@@ -286,6 +286,59 @@
+ } contextImpl;
+
+
++const SDLPango_Matrix _MATRIX_WHITE_BACK
++ = {255, 0, 0, 0,
++ 255, 0, 0, 0,
++ 255, 0, 0, 0,
++ 255, 255, 0, 0,};
++
++/*!
++ Specifies white back and black letter.
++*/
++const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK;
++
++const SDLPango_Matrix _MATRIX_BLACK_BACK
++ = {0, 255, 0, 0,
++ 0, 255, 0, 0,
++ 0, 255, 0, 0,
++ 255, 255, 0, 0,};
++/*!
++ Specifies black back and white letter.
++*/
++const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK;
++
++const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER
++ = {0, 0, 0, 0,
++ 0, 0, 0, 0,
++ 0, 0, 0, 0,
++ 0, 255, 0, 0,};
++/*!
++ Specifies transparent back and black letter.
++*/
++const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
++
++const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER
++ = {255, 255, 0, 0,
++ 255, 255, 0, 0,
++ 255, 255, 0, 0,
++ 0, 255, 0, 0,};
++/*!
++ Specifies transparent back and white letter.
++*/
++const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
++
++const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER
++ = {255, 255, 0, 0,
++ 255, 255, 0, 0,
++ 255, 255, 0, 0,
++ 0, 0, 0, 0,};
++/*!
++ Specifies transparent back and transparent letter.
++ This is useful for KARAOKE like rendering.
++*/
++const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
++
++
+ /*!
+ Initialize the Glib and Pango API.
+ This must be called before using other functions in this library,
+Index: SDL_Pango-0.1.2/src/SDL_Pango.h
+===================================================================
+--- SDL_Pango-0.1.2.orig/src/SDL_Pango.h 2007-09-18 15:03:10.732910311 +0200
++++ SDL_Pango-0.1.2/src/SDL_Pango.h 2007-09-18 15:06:24.919976401 +0200
+@@ -47,57 +47,27 @@
+ Uint8 m[4][4]; /*! Matrix variables */
+ } SDLPango_Matrix;
+
+-const SDLPango_Matrix _MATRIX_WHITE_BACK
+- = {255, 0, 0, 0,
+- 255, 0, 0, 0,
+- 255, 0, 0, 0,
+- 255, 255, 0, 0,};
+-
+ /*!
+ Specifies white back and black letter.
+ */
+-const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK;
+-
+-const SDLPango_Matrix _MATRIX_BLACK_BACK
+- = {0, 255, 0, 0,
+- 0, 255, 0, 0,
+- 0, 255, 0, 0,
+- 255, 255, 0, 0,};
++extern const SDLPango_Matrix *MATRIX_WHITE_BACK;
+ /*!
+ Specifies black back and white letter.
+ */
+-const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK;
+-
+-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER
+- = {0, 0, 0, 0,
+- 0, 0, 0, 0,
+- 0, 0, 0, 0,
+- 0, 255, 0, 0,};
++extern const SDLPango_Matrix *MATRIX_BLACK_BACK;
+ /*!
+ Specifies transparent back and black letter.
+ */
+-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
+-
+-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER
+- = {255, 255, 0, 0,
+- 255, 255, 0, 0,
+- 255, 255, 0, 0,
+- 0, 255, 0, 0,};
++extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
+ /*!
+ Specifies transparent back and white letter.
+ */
+-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
+-
+-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER
+- = {255, 255, 0, 0,
+- 255, 255, 0, 0,
+- 255, 255, 0, 0,
+- 0, 0, 0, 0,};
++extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
+ /*!
+ Specifies transparent back and transparent letter.
+ This is useful for KARAOKE like rendering.
+ */
+-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
++extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
+
+ /*!
+ Specifies direction of text. See Pango reference for detail
diff --git a/gnu/packages/patches/sdl-pango-sans-serif.patch b/gnu/packages/patches/sdl-pango-sans-serif.patch
new file mode 100644
index 0000000000..ccdc8150a7
--- /dev/null
+++ b/gnu/packages/patches/sdl-pango-sans-serif.patch
@@ -0,0 +1,13 @@
+Index: SDL_Pango-0.1.2/src/SDL_Pango.c
+===================================================================
+--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c 2007-09-18 15:12:20.736253215 +0200
++++ SDL_Pango-0.1.2/src/SDL_Pango.c 2007-09-18 15:12:44.621614364 +0200
+@@ -234,7 +234,7 @@
+ //! non-zero if initialized
+ static int IS_INITIALIZED = 0;
+
+-#define DEFAULT_FONT_FAMILY "Sans"
++#define DEFAULT_FONT_FAMILY "sans-serif"
+ #define DEFAULT_FONT_SIZE 12
+ #define DEFAULT_DPI 96
+ #define _MAKE_FONT_NAME(family, size) family " " #size
diff --git a/gnu/packages/patches/superlu-dist-fix-mpi-deprecations.patch b/gnu/packages/patches/superlu-dist-fix-mpi-deprecations.patch
deleted file mode 100644
index 25f0aaf2f3..0000000000
--- a/gnu/packages/patches/superlu-dist-fix-mpi-deprecations.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From c9cbcf8730221e366c7495073f8f8d819ee8ce89 Mon Sep 17 00:00:00 2001
-From: Eric Bavier <bavier@member.fsf.org>
-Date: Wed, 6 Feb 2019 10:06:59 -0600
-Subject: [PATCH] Replace deprecated MPI_Attr_get.
-
-Fixes build with OpenMPI version 4.0.
-
-* SRC/pdgstrf.c, SRC/pdgstrf.c, SRC/superlu_grid.c: 'MPI_Attr_get' ->
- 'MPI_Comm_get_attr'.
----
- SRC/pdgstrf.c | 2 +-
- SRC/pzgstrf.c | 2 +-
- SRC/superlu_grid.c | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/SRC/pdgstrf.c b/SRC/pdgstrf.c
-index 736ffa2..f92a1ba 100644
---- a/SRC/pdgstrf.c
-+++ b/SRC/pdgstrf.c
-@@ -426,7 +426,7 @@ pdgstrf(superlu_dist_options_t * options, int m, int n, double anorm,
- s_eps = smach_dist("Epsilon");
- thresh = s_eps * anorm;
-
-- MPI_Attr_get (MPI_COMM_WORLD, MPI_TAG_UB, &attr_val, &flag);
-+ MPI_Comm_get_attr (MPI_COMM_WORLD, MPI_TAG_UB, &attr_val, &flag);
- if (!flag) {
- fprintf (stderr, "Could not get TAG_UB\n");
- return (-1);
-diff --git a/SRC/pzgstrf.c b/SRC/pzgstrf.c
-index 8896548..8800057 100644
---- a/SRC/pzgstrf.c
-+++ b/SRC/pzgstrf.c
-@@ -426,7 +426,7 @@ pzgstrf(superlu_dist_options_t * options, int m, int n, double anorm,
- s_eps = smach_dist("Epsilon");
- thresh = s_eps * anorm;
-
-- MPI_Attr_get (MPI_COMM_WORLD, MPI_TAG_UB, &attr_val, &flag);
-+ MPI_Comm_get_attr (MPI_COMM_WORLD, MPI_TAG_UB, &attr_val, &flag);
- if (!flag) {
- fprintf (stderr, "Could not get TAG_UB\n");
- return (-1);
-diff --git a/SRC/superlu_grid.c b/SRC/superlu_grid.c
-index 1213d27..0c0fb90 100644
---- a/SRC/superlu_grid.c
-+++ b/SRC/superlu_grid.c
-@@ -150,7 +150,7 @@ void superlu_gridmap(
- {
- int tag_ub;
- if ( !grid->iam ) {
-- MPI_Attr_get(Bcomm, MPI_TAG_UB, &tag_ub, &info);
-+ MPI_Comm_get_attr(Bcomm, MPI_TAG_UB, &tag_ub, &info);
- printf("MPI_TAG_UB %d\n", tag_ub);
- /* returns 4295677672
- In reality it is restricted to no greater than 16384. */
---
-2.20.1
-
diff --git a/gnu/packages/patches/t4k-common-libpng16.patch b/gnu/packages/patches/t4k-common-libpng16.patch
new file mode 100644
index 0000000000..17967773de
--- /dev/null
+++ b/gnu/packages/patches/t4k-common-libpng16.patch
@@ -0,0 +1,26 @@
+Description: Fix for libpng 1.6
+Author: Programmer Nerd <theprogrammernerd@gmail.com>
+Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743388#20
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743388
+Reviewed-by: Tobias Frost <tobi@debian.org>>
+Last-Update: 2016-04-07
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/t4k_loaders.c
++++ b/src/t4k_loaders.c
+@@ -1028,12 +1028,9 @@
+ {
+ png_init_io(png_ptr, fi);
+
+- info_ptr->width = surf->w;
+- info_ptr->height = surf->h;
+- info_ptr->bit_depth = 8;
+- info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
+- info_ptr->interlace_type = 1;
+- info_ptr->valid = 0; /* will be updated by various png_set_FOO() functions */
++ png_set_IHDR(png_ptr, info_ptr, surf->w, surf->h, 8,
++ PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE,
++ PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
+
+ png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr,
+ PNG_sRGB_INTENT_PERCEPTUAL);
diff --git a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch
new file mode 100644
index 0000000000..3feeb1dc5e
--- /dev/null
+++ b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch
@@ -0,0 +1,54 @@
+From 3fc056f0b9f7c26e58a1e947c8c0184e55919614 Mon Sep 17 00:00:00 2001
+From: David Abdurachmanov <david.abdurachmanov@gmail.com>
+Date: Wed, 21 Aug 2019 12:07:20 -0700
+Subject: [PATCH] qemu-riscv64_smode, sifive-fu540: fix extlinux (define
+ preboot)
+Forwarded: https://patchwork.ozlabs.org/patch/1151125/
+
+Commit 37304aaf60bf92a5dc3ef222ba520698bd862a44 removed preboot
+commands in RISC-V targets and broke extlinux support as reported
+by Fu Wei <wefu@redhat.com>.
+
+The patch finishes migration of CONFIG_USE_PREBOOT and CONFIG_REBOOT
+to Kconfig.
+
+Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
+---
+ configs/qemu-riscv64_smode_defconfig | 2 ++
+ configs/sifive_fu540_defconfig | 2 ++
+ include/configs/sifive-fu540.h | 4 ----
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+Index: u-boot/configs/qemu-riscv64_smode_defconfig
+===================================================================
+--- u-boot.orig/configs/qemu-riscv64_smode_defconfig
++++ u-boot/configs/qemu-riscv64_smode_defconfig
+@@ -14,3 +14,5 @@ CONFIG_CMD_NVEDIT_EFI=y
+ CONFIG_OF_PRIOR_STAGE=y
+ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+ CONFIG_DM_MTD=y
++CONFIG_USE_PREBOOT=y
++CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};"
+Index: u-boot/configs/sifive_fu540_defconfig
+===================================================================
+--- u-boot.orig/configs/sifive_fu540_defconfig
++++ u-boot/configs/sifive_fu540_defconfig
+@@ -12,3 +12,5 @@ CONFIG_DISPLAY_BOARDINFO=y
+ CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00"
+ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+ CONFIG_DM_MTD=y
++CONFIG_USE_PREBOOT=y
++CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};"
+Index: u-boot/include/configs/sifive-fu540.h
+===================================================================
+--- u-boot.orig/include/configs/sifive-fu540.h
++++ u-boot/include/configs/sifive-fu540.h
+@@ -40,8 +40,4 @@
+ "ramdisk_addr_r=0x88300000\0" \
+ BOOTENV
+
+-#define CONFIG_PREBOOT \
+- "setenv fdt_addr ${fdtcontroladdr};" \
+- "fdt addr ${fdtcontroladdr};"
+-
+ #endif /* __CONFIG_H */