Skip to content
Snippets Groups Projects
Commit febcad42 authored by Leo's avatar Leo
Browse files

community/*: remove stale patches

parent 00f259de
No related merge requests found
From 4c37352b9ba6f85eac04dfa9a43fd3d3da25bf72 Mon Sep 17 00:00:00 2001
From: Geod24 <pro.mathias.lang@gmail.com>
Date: Mon, 22 Feb 2021 20:52:25 +0900
Subject: Revert "cache the generated test main file: dub_test_root.d"
This reverts commit df67d832c9a2911e30f19a01d9b5404d161b4215.
---
source/dub/dub.d | 17 +----
source/dub/generators/build.d | 62 ++++++++-----------
test/cache-generated-test-config.sh | 24 -------
test/cache-generated-test-config/.no_build | 0
test/cache-generated-test-config/.no_run | 0
test/cache-generated-test-config/.no_test | 0
test/cache-generated-test-config/dub.sdl | 3 -
.../cache-generated-test-config/source/test.d | 6 --
8 files changed, 29 insertions(+), 83 deletions(-)
delete mode 100755 test/cache-generated-test-config.sh
delete mode 100644 test/cache-generated-test-config/.no_build
delete mode 100644 test/cache-generated-test-config/.no_run
delete mode 100644 test/cache-generated-test-config/.no_test
delete mode 100644 test/cache-generated-test-config/dub.sdl
delete mode 100644 test/cache-generated-test-config/source/test.d
diff --git a/source/dub/dub.d b/source/dub/dub.d
index e88ece23..ec0fb331 100644
--- a/source/dub/dub.d
+++ b/source/dub/dub.d
@@ -658,7 +658,6 @@ class Dub {
}
// prepare the list of tested modules
-
string[] import_modules;
foreach (file; lbuildsettings.sourceFiles) {
if (file.endsWith(".d")) {
@@ -679,23 +678,11 @@ class Dub {
}
}
- NativePath mainfile;
- if (settings.tempBuild)
- mainfile = getTempFile("dub_test_root", ".d");
- else {
- import dub.generators.build : computeBuildName;
- mainfile = m_project.rootPackage.path ~ format(".dub/code/%s_dub_test_root.d", computeBuildName(test_config, settings, import_modules));
- }
-
- mkdirRecurse(mainfile.parentPath.toNativeString());
-
- bool regenerateMainFile = settings.force || !existsFile(mainfile);
-
// generate main file
+ NativePath mainfile = getTempFile("dub_test_root", ".d");
tcinfo.sourceFiles[""] ~= mainfile.toNativeString();
tcinfo.mainSourceFile = mainfile.toNativeString();
-
- if (!m_dryRun && regenerateMainFile) {
+ if (!m_dryRun) {
auto fil = openFile(mainfile, FileMode.createTrunc);
scope(exit) fil.close();
fil.write("module dub_test_root;\n");
diff --git a/source/dub/generators/build.d b/source/dub/generators/build.d
index 649fbe0b..75250f4b 100644
--- a/source/dub/generators/build.d
+++ b/source/dub/generators/build.d
@@ -32,24 +32,6 @@ string getObjSuffix(const scope ref BuildPlatform platform)
return platform.platform.canFind("windows") ? ".obj" : ".o";
}
-string computeBuildName(string config, GeneratorSettings settings, const string[][] hashing...)
-{
- import std.digest;
- import std.digest.md;
-
- MD5 hash;
- hash.start();
- void addHash(in string[] strings...) { foreach (s; strings) { hash.put(cast(ubyte[])s); hash.put(0); } hash.put(0); }
- foreach(strings; hashing)
- addHash(strings);
- auto hashstr = hash.finish().toHexString().idup;
-
- return format("%s-%s-%s-%s-%s_v%s-%s", config, settings.buildType,
- settings.platform.platform.join("."),
- settings.platform.architecture.join("."),
- settings.platform.compiler, settings.platform.compilerVersion, hashstr);
-}
-
class BuildGenerator : ProjectGenerator {
private {
PackageManager m_packageMan;
@@ -347,23 +329,33 @@ class BuildGenerator : ProjectGenerator {
private string computeBuildID(string config, in BuildSettings buildsettings, GeneratorSettings settings)
{
- const(string[])[] hashing = [
- buildsettings.versions,
- buildsettings.debugVersions,
- buildsettings.dflags,
- buildsettings.lflags,
- buildsettings.stringImportPaths,
- buildsettings.importPaths,
- settings.platform.architecture,
- [
- (cast(uint)buildsettings.options).to!string,
- settings.platform.compilerBinary,
- settings.platform.compiler,
- settings.platform.compilerVersion,
- ],
- ];
-
- return computeBuildName(config, settings, hashing);
+ import std.digest;
+ import std.digest.md;
+ import std.bitmanip;
+
+ MD5 hash;
+ hash.start();
+ void addHash(in string[] strings...) { foreach (s; strings) { hash.put(cast(ubyte[])s); hash.put(0); } hash.put(0); }
+ void addHashI(int value) { hash.put(nativeToLittleEndian(value)); }
+ addHash(buildsettings.versions);
+ addHash(buildsettings.debugVersions);
+ //addHash(buildsettings.versionLevel);
+ //addHash(buildsettings.debugLevel);
+ addHash(buildsettings.dflags);
+ addHash(buildsettings.lflags);
+ addHash((cast(uint)buildsettings.options).to!string);
+ addHash(buildsettings.stringImportPaths);
+ addHash(buildsettings.importPaths);
+ addHash(settings.platform.architecture);
+ addHash(settings.platform.compilerBinary);
+ addHash(settings.platform.compiler);
+ addHashI(settings.platform.frontendVersion);
+ auto hashstr = hash.finish().toHexString().idup;
+
+ return format("%s-%s-%s-%s-%s_%s-%s", config, settings.buildType,
+ settings.platform.platform.join("."),
+ settings.platform.architecture.join("."),
+ settings.platform.compiler, settings.platform.frontendVersion, hashstr);
}
private void copyTargetFile(NativePath build_path, BuildSettings buildsettings, GeneratorSettings settings)
diff --git a/test/cache-generated-test-config.sh b/test/cache-generated-test-config.sh
deleted file mode 100755
index 9f5ca6f7..00000000
--- a/test/cache-generated-test-config.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env bash
-
-. $(dirname "${BASH_SOURCE[0]}")/common.sh
-cd ${CURR_DIR}/cache-generated-test-config
-rm -rf .dub
-
-${DUB} test --compiler=${DC}
-
-STAT="stat -c '%Y'"
-[[ "$OSTYPE" == "darwin"* ]] && STAT="stat -f '%m' -t '%Y'"
-
-EXECUTABLE_TIME="$(${STAT} cache-generated-test-config-test-library)"
-[ -z "$EXECUTABLE_TIME" ] && die $LINENO 'no EXECUTABLE_TIME was found'
-MAIN_TIME="$(${STAT} "$(ls .dub/code/*dub_test_root.d)")"
-[ -z "$MAIN_TIME" ] && die $LINENO 'no MAIN_TIME was found'
-
-${DUB} test --compiler=${DC}
-MAIN_FILES_COUNT=$(ls .dub/code/*dub_test_root.d | wc -l)
-
-[ $MAIN_FILES_COUNT -ne 1 ] && die $LINENO 'DUB generated more then one main file'
-[ "$EXECUTABLE_TIME" != "$(${STAT} cache-generated-test-config-test-library)" ] && die $LINENO 'The executable has been rebuilt'
-[ "$MAIN_TIME" != "$(${STAT} "$(ls .dub/code/*dub_test_root.d | head -n1)")" ] && die $LINENO 'The test main file has been rebuilt'
-
-exit 0
\ No newline at end of file
diff --git a/test/cache-generated-test-config/.no_build b/test/cache-generated-test-config/.no_build
deleted file mode 100644
index e69de29b..00000000
diff --git a/test/cache-generated-test-config/.no_run b/test/cache-generated-test-config/.no_run
deleted file mode 100644
index e69de29b..00000000
diff --git a/test/cache-generated-test-config/.no_test b/test/cache-generated-test-config/.no_test
deleted file mode 100644
index e69de29b..00000000
diff --git a/test/cache-generated-test-config/dub.sdl b/test/cache-generated-test-config/dub.sdl
deleted file mode 100644
index ccfd0a22..00000000
--- a/test/cache-generated-test-config/dub.sdl
+++ /dev/null
@@ -1,3 +0,0 @@
-name "cache-generated-test-config"
-
-targetType "staticLibrary"
\ No newline at end of file
diff --git a/test/cache-generated-test-config/source/test.d b/test/cache-generated-test-config/source/test.d
deleted file mode 100644
index c6e2276c..00000000
--- a/test/cache-generated-test-config/source/test.d
+++ /dev/null
@@ -1,6 +0,0 @@
-module test;
-
-unittest
-{
- assert(true);
-}
\ No newline at end of file
--
2.24.3 (Apple Git-128)
From 8f1935733b10d974a1a4176d38dd151ed98cf381 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 15 Apr 2021 15:50:13 +0100
Subject: [PATCH] lib/handle.c: Bounds check for block exceeding page length
(CVE-2021-3504)
Hives are encoded as fixed-sized pages containing smaller variable-
length blocks:
+-------------------+-------------------+-------------------+--
| header |[ blk ][blk][ blk ]|[blk][blk][blk] |
+-------------------+-------------------+-------------------+--
Blocks should not straddle a page boundary. However because blocks
contain a 32 bit length field it is possible to construct an invalid
hive where the last block in a page overlaps either the next page or
the end of the file:
+-------------------+-------------------+
| header |[ blk ][blk][ blk ..... ]
+-------------------+-------------------+
Hivex lacked a bounds check and would process the registry. Because
the rest of the code assumes this situation can never happen it was
possible to have a block containing some field (eg. a registry key
name) which would extend beyond the end of the file. Hivex mmaps or
mallocs the file, causing hivex to read memory beyond the end of the
mapped region, resulting in reading other memory structures or a
crash. (Writing beyond the end of the mapped region seems to be
impossible because we always allocate a new page before writing.)
This commit adds a check which rejects the malformed registry on
hivex_open.
Credit: Jeremy Galindo, Sr Security Engineer, Datto.com
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Fixes: CVE-2021-3504
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1949687
---
lib/handle.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/lib/handle.c b/lib/handle.c
index 88b1563..2e4231a 100644
--- a/lib/handle.c
+++ b/lib/handle.c
@@ -353,8 +353,8 @@ hivex_open (const char *filename, int flags)
#pragma GCC diagnostic pop
if (is_root || !h->unsafe) {
SET_ERRNO (ENOTSUP,
- "%s, the block at 0x%zx has invalid size %" PRIu32
- ", bad registry",
+ "%s, the block at 0x%zx size %" PRIu32
+ " <= 4 or not a multiple of 4, bad registry",
filename, blkoff, le32toh (block->seg_len));
goto error;
} else {
@@ -365,6 +365,14 @@ hivex_open (const char *filename, int flags)
}
}
+ if (blkoff + seg_len > off + page_size) {
+ SET_ERRNO (ENOTSUP,
+ "%s, the block at 0x%zx size %" PRIu32
+ " extends beyond the current page, bad registry",
+ filename, blkoff, le32toh (block->seg_len));
+ goto error;
+ }
+
if (h->msglvl >= 2) {
unsigned char *id = (unsigned char *) block->id;
int id0 = id[0], id1 = id[1];
From 6b7a4522a36c45719582cb0003250be9f765d697 Mon Sep 17 00:00:00 2001
From: Bart Ribbers <bribbers@disroot.org>
Date: Wed, 21 Apr 2021 16:07:56 +0200
Subject: [PATCH] Don't wrap dconf.h in a C block
Recent glib versions include some template stuff when C++ is being used,
which breaks this
There was a MR upstream to "fix" this but it was rejected
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1935
---
src/mgconfitem.cpp | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/mgconfitem.cpp b/src/mgconfitem.cpp
index 8a8fc29..69fa5b8 100644
--- a/src/mgconfitem.cpp
+++ b/src/mgconfitem.cpp
@@ -17,9 +17,7 @@
****************************************************************************/
// This has to be the first include otherwise gdbusintrospection.h causes an error.
-extern "C" {
#include <dconf.h>
-};
#include <QCoreApplication>
#include <QString>
--
2.31.1
diff --git a/ell/missing.h b/ell/missing.h
index 37d5586..649a5ac 100644
--- a/ell/missing.h
+++ b/ell/missing.h
@@ -54,11 +54,3 @@
# define __NR_getrandom 0xffffffff
# endif
#endif
-
-#ifndef HAVE_EXPLICIT_BZERO
-static inline void explicit_bzero(void *s, size_t n)
-{
- memset(s, 0, n);
- __asm__ __volatile__ ("" : : "r"(s) : "memory");
-}
-#endif
Upstream: Not applicable
Reason: Remove tests that check whether the testsuite conform to PEP-8, we don't care about that
diff --git a/tests.py b/tests.py
index c822ace..554a567 100644
--- a/tests.py
+++ b/tests.py
@@ -20,21 +20,10 @@ from itertools import product
from datetime import date, datetime, timedelta
from dateutil.relativedelta import relativedelta, MO
-from flake8.api import legacy as flake8
import holidays
-class TestFlake8(unittest.TestCase):
-
- def test_flake8(self):
- """Test that we conform to PEP-8."""
- self.style_guide = flake8.get_style_guide(ignore=['I', 'F401', 'W504'])
- self.py_files = [y for x in os.walk(os.path.abspath('holidays')) for y in glob(os.path.join(x[0], '*.py'))]
- self.report = self.style_guide.check_files(self.py_files)
- self.assertEqual(self.report.get_statistics('E'), [])
-
-
class TestBasics(unittest.TestCase):
def setUp(self):
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a67905f..6c80698 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -128,8 +128,8 @@ endif()
target_compile_definitions(vvave
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
-target_include_directories(vvave PRIVATE ${TAGLIB_INCLUDE_DIRS})
-target_link_libraries(vvave MauiKit Qt5::Network Qt5::Sql Qt5::Qml Qt5::Xml Qt5::Multimedia Qt5::QuickControls2 KF5::CoreAddons KF5::I18n ${TAGLIB_LIBRARIES})
+target_include_directories(vvave PRIVATE Taglib:Taglib)
+target_link_libraries(vvave MauiKit Qt5::Network Qt5::Sql Qt5::Qml Qt5::Xml Qt5::Multimedia Qt5::QuickControls2 KF5::CoreAddons KF5::I18n Taglib::Taglib)
if(UNIX AND NOT APPLE AND NOT ANDROID)
install(TARGETS vvave ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment