Skip to content

Commit

Permalink
main/*: some gitpatching
Browse files Browse the repository at this point in the history
  • Loading branch information
nekopsykose committed Oct 2, 2024
1 parent 492e4cf commit 2de7267
Show file tree
Hide file tree
Showing 35 changed files with 97 additions and 297 deletions.
14 changes: 7 additions & 7 deletions main/firefox/patches/amdgpu-vaapi.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
diff -up firefox-115.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi firefox-115.0/widget/gtk/GfxInfo.cpp
--- firefox-115.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2023-06-29 12:18:53.179833765 +0200
+++ firefox-115.0/widget/gtk/GfxInfo.cpp 2023-06-29 12:19:33.256212776 +0200
@@ -970,14 +970,6 @@ const nsTArray<GfxDriverInfo>& GfxInfo::
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_R600", "");
permit amdgpu vaapi in release
--
--- a/widget/gtk/GfxInfo.cpp
+++ b/widget/gtk/GfxInfo.cpp
@@ -1086,14 +1086,6 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_LESS_THAN, V(23, 1, 1, 0),
"FEATURE_HARDWARE_VIDEO_DECODING_AMD_DISABLE", "Mesa 23.1.1.0");

- // Disable on Release/late Beta on AMD
-#if !defined(EARLY_BETA_OR_EARLIER)
Expand All @@ -16,4 +17,3 @@ diff -up firefox-115.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi firefox-115.0
////////////////////////////////////
// FEATURE_HW_DECODED_VIDEO_ZERO_COPY - ALLOWLIST
APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Linux, DeviceFamily::All,

13 changes: 6 additions & 7 deletions main/firefox/patches/fix-rust-target.patch
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
Allow us to just set RUST_TARGEt ourselves instead of hacking around in mozilla's
Allow us to just set RUST_TARGET ourselves instead of hacking around in mozilla's
weird custom build system...

--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -225,7 +225,9 @@
data.setdefault(key, []).append(namespace(rust_target=t, target=info))
@@ -280,6 +280,9 @@
return data

-
+@imports('os')
+@imports(_from='mozbuild.util', _import='ensure_unicode')
+@imports(_from='mozbuild.util', _import='system_encoding')
def detect_rustc_target(
host_or_target, compiler_info, arm_target, rust_supported_targets
):
@@ -340,13 +342,13 @@
@@ -411,12 +414,12 @@

return None

Expand All @@ -23,9 +22,9 @@ weird custom build system...

if rustc_target is None:
die("Don't know how to translate {} for rustc".format(host_or_target.alias))

- return rustc_target
+ return ensure_unicode(rustc_target, system_encoding)


@imports('os')
@imports("os")
34 changes: 0 additions & 34 deletions main/firefox/patches/mallinfo.patch

This file was deleted.

11 changes: 0 additions & 11 deletions main/firefox/patches/py312.patch

This file was deleted.

18 changes: 0 additions & 18 deletions main/firefox/patches/riscv64-no-lto.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
set rust crate lto to thin to not use fatlto for gkrust which ooms on 32-bit
set rust crate lto to thin to not use fatlto for gkrust which ooms on 32-bit.
also a lot faster
also no lto on riscv for now
--
diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
index 524bc436fd..cdc8d6089c 100644
--- a/config/makefiles/rust.mk
+++ b/config/makefiles/rust.mk
@@ -94,7 +94,7 @@
@@ -91,8 +91,9 @@ ifndef MOZ_LTO_RUST_CROSS
ifndef rustflags_sancov
# Never enable when coverage is enabled to work around https://github.com/rust-lang/rust/issues/90045.
ifndef MOZ_CODE_COVERAGE
+ifeq (,$(findstring riscv64,$(RUST_TARGET)))
ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
-cargo_rustc_flags += -Clto$(if $(filter full,$(MOZ_LTO_RUST_CROSS)),=fat)
+cargo_rustc_flags += -Clto=thin
endif
# We need -Cembed-bitcode=yes for all crates when using -Clto.
RUSTFLAGS += -Cembed-bitcode=yes
@@ -101,6 +102,7 @@ endif
endif
endif
endif
+endif

ifdef CARGO_INCREMENTAL
export CARGO_INCREMENTAL
12 changes: 6 additions & 6 deletions main/firefox/patches/xptcall-integrated-as.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ diff --git a/xpcom/reflect/xptcall/md/unix/moz.build b/xpcom/reflect/xptcall/md/
index 1779c14..cd4595c 100644
--- a/xpcom/reflect/xptcall/md/unix/moz.build
+++ b/xpcom/reflect/xptcall/md/unix/moz.build
@@ -187,10 +187,6 @@ if CONFIG["CPU_ARCH"] == "ppc64":
"xptcstubs_asm_ppc64_linux.S",
"xptcstubs_ppc64_linux.cpp",
@@ -110,10 +110,6 @@ if CONFIG["OS_ARCH"] in ("Linux", "FreeBSD", "NetBSD", "OpenBSD"):
"xptcstubs_asm_mips64.S",
"xptcstubs_mips64.cpp",
]
- if CONFIG["CC_TYPE"] == "clang":
- ASFLAGS += [
- "-fno-integrated-as",
- ]

if CONFIG["OS_ARCH"] == "OpenBSD" and CONFIG["CPU_ARCH"] == "ppc":
SOURCES += [
if CONFIG["TARGET_CPU"] == "mips32":
SOURCES += [
"xptcinvoke_asm_mips.S",
9 changes: 0 additions & 9 deletions main/firefox/patches/zstandard.patch

This file was deleted.

1 change: 0 additions & 1 deletion main/firefox/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
source = f"$(MOZILLA_SITE)/firefox/releases/{pkgver}/source/firefox-{pkgver}.source.tar.xz"
sha256 = "e4066ef47c65aac570aa16deefb8c3937c1c9b0755dbf2f760937c451174fb1d"
debug_level = 1 # defatten, especially with LTO
patch_style = "patch"
tool_flags = {
"LDFLAGS": ["-Wl,-rpath=/usr/lib/firefox", "-Wl,-z,stack-size=2097152"]
}
Expand Down
4 changes: 2 additions & 2 deletions main/localsearch/patches/fix-syscall.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
#include <sys/syscall.h>
+#include <unistd.h>

#include "tracker-debug.h"

#include <libtracker-miners-common/valgrind.h>
#include <libtracker-miners-common/tracker-debug.h>
4 changes: 2 additions & 2 deletions main/localsearch/patches/pread64.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ diff --git a/src/libtracker-miners-common/tracker-seccomp.c b/src/libtracker-min
index b2ad0b7..a322216 100644
--- a/src/libtracker-miners-common/tracker-seccomp.c
+++ b/src/libtracker-miners-common/tracker-seccomp.c
@@ -311,9 +311,8 @@ tracker_seccomp_init (void)
@@ -320,9 +320,8 @@
/* Syscalls may differ between libcs */
#if !defined(__GLIBC__)
ALLOW_RULE (rt_sigreturn);
ALLOW_RULE (readv);
-#else
- ALLOW_RULE (pread64);
Expand Down
1 change: 0 additions & 1 deletion main/localsearch/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
url = "https://gnome.pages.gitlab.gnome.org/tinysparql"
source = f"$(GNOME_SITE)/localsearch/{pkgver[:-2]}/localsearch-{pkgver}.tar.xz"
sha256 = "e4e83a1daebb5263915b45b719731e3f7041d959cbd637ea29afbe910c92bbf9"
patch_style = "patch"
tool_flags = {"LDFLAGS": ["-Wl,-z,stack-size=0x200000"]}
# check relies on stuff unsupported in chroot
options = ["!check", "!cross"]
65 changes: 4 additions & 61 deletions main/swtpm/patches/fix-tests.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/tests/common
+++ b/tests/common
@@ -688,12 +688,7 @@ function run_swtpm_bios()
@@ -698,12 +698,7 @@
# @1: filename
function get_filesize()
{
Expand All @@ -14,7 +14,7 @@
}

# Get the file mode bits in octal format
@@ -701,12 +696,7 @@ function get_filesize()
@@ -711,12 +706,7 @@
# @1: filename
function get_filemode()
{
Expand All @@ -28,7 +28,7 @@
}

# Get the file owner uid and gid
@@ -714,12 +704,7 @@ function get_filemode()
@@ -724,12 +714,7 @@
# @1: filename
function get_fileowner()
{
Expand All @@ -42,7 +42,7 @@
}

# Get the file owner user name and group name
@@ -727,12 +712,7 @@ function get_fileowner()
@@ -737,12 +722,7 @@
# @1: filename
function get_fileowner_names()
{
Expand All @@ -56,60 +56,3 @@
}

# Get the SHA1 of a file

--- a/tests/test_parameters
+++ b/tests/test_parameters
@@ -68,7 +68,7 @@ skip_test_no_tpm12 "${SWTPM_EXE}"
SWTPM=swtpm
SWTPM_EXE=${SWTPM_EXE:-$ROOT/src/swtpm/$SWTPM}
TPMDIR="$(mktemp -d)" || exit 1
-SWTPM_SETUP_CONF=$SRCDIR/samples/swtpm_setup.conf
+SWTPM_SETUP_CONF=$SRCDIR/build/samples/swtpm_setup.conf
# filesystem privileges require to run swtpm_setup as root during test
TPMAUTHORING="$ROOT/src/swtpm_setup/swtpm_setup --config ${SWTPM_SETUP_CONF}"
PATH=${ROOT}/src/swtpm_bios:${TESTDIR}:$PATH

--- a/tests/test_swtpm_setup_overwrite
+++ b/tests/test_swtpm_setup_overwrite
@@ -10,7 +10,7 @@ source ${TESTDIR}/common
skip_test_no_tpm12 "${SWTPM_EXE}"
STATEBASENAME="tpm-00.permall"

-SWTPM_SETUP_CONF=$SRCDIR/samples/swtpm_setup.conf
+SWTPM_SETUP_CONF=$SRCDIR/build/samples/swtpm_setup.conf

trap "cleanup" SIGTERM EXIT

--- a/tests/test_swtpm_setup_file_backend
+++ b/tests/test_swtpm_setup_file_backend
@@ -9,7 +9,7 @@ SRCDIR=${abs_top_srcdir:-$(dirname "$0")/..}
source ${TESTDIR}/common
skip_test_no_tpm12 "${SWTPM_EXE}"

-SWTPM_SETUP_CONF=$SRCDIR/samples/swtpm_setup.conf
+SWTPM_SETUP_CONF=$SRCDIR/builds/samples/swtpm_setup.conf

state_save_dir="$(mktemp -d)" || exit 1
state_save=${state_save_dir}/swtpm-test.state.save

--- a/tests/test_tpm2_swtpm_setup_overwrite
+++ b/tests/test_tpm2_swtpm_setup_overwrite
@@ -10,7 +10,7 @@ source ${TESTDIR}/common
skip_test_no_tpm20 "${SWTPM_EXE}"
STATEBASENAME="tpm2-00.permall"

-SWTPM_SETUP_CONF=$SRCDIR/samples/swtpm_setup.conf
+SWTPM_SETUP_CONF=$SRCDIR/build/samples/swtpm_setup.conf

trap "cleanup" SIGTERM EXIT

--- a/tests/test_tpm2_parameters
+++ b/tests/test_tpm2_parameters
@@ -65,7 +65,7 @@ exec 101<${TESTDIR}/data/pwdfile.txt
SWTPM=swtpm
SWTPM_EXE=$ROOT/src/swtpm/$SWTPM
TPMDIR="$(mktemp -d)" || exit 1
-SWTPM_SETUP_CONF=$SRCDIR/samples/swtpm_setup.conf
+SWTPM_SETUP_CONF=$SRCDIR/build/samples/swtpm_setup.conf
TPMAUTHORING="$ROOT/src/swtpm_setup/swtpm_setup --tpm2 --config ${SWTPM_SETUP_CONF}"
PATH=${ROOT}/src/swtpm_bios:$PATH
3 changes: 2 additions & 1 deletion main/swtpm/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"--with-tss-user=tss",
"--with-tss-group=tss",
]
# test compat
make_dir = "."
hostmakedepends = [
"automake",
"bash",
Expand Down Expand Up @@ -34,7 +36,6 @@
url = "https://github.com/stefanberger/swtpm"
source = f"{url}/archive/refs/tags/v{pkgver}.tar.gz"
sha256 = "9679ca171e8aaa3c4e4053e8bc1d10c8dabf0220bd4b16aba78743511c25f731"
patch_style = "patch"


def post_install(self):
Expand Down
13 changes: 6 additions & 7 deletions main/thunderbird/patches/fix-rust-target.patch
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
Allow us to just set RUST_TARGEt ourselves instead of hacking around in mozilla's
Allow us to just set RUST_TARGET ourselves instead of hacking around in mozilla's
weird custom build system...

--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -225,7 +225,9 @@
data.setdefault(key, []).append(namespace(rust_target=t, target=info))
@@ -280,6 +280,9 @@
return data

-
+@imports('os')
+@imports(_from='mozbuild.util', _import='ensure_unicode')
+@imports(_from='mozbuild.util', _import='system_encoding')
def detect_rustc_target(
host_or_target, compiler_info, arm_target, rust_supported_targets
):
@@ -340,13 +342,13 @@
@@ -411,12 +414,12 @@

return None

Expand All @@ -23,9 +22,9 @@ weird custom build system...

if rustc_target is None:
die("Don't know how to translate {} for rustc".format(host_or_target.alias))

- return rustc_target
+ return ensure_unicode(rustc_target, system_encoding)


@imports('os')
@imports("os")
Loading

0 comments on commit 2de7267

Please sign in to comment.