rename firefox-hg -> firefox
This commit is contained in:
parent
f284766c8b
commit
81b3b7eb7e
5 changed files with 0 additions and 0 deletions
15
gui/firefox/avoid-redefinition.patch
Normal file
15
gui/firefox/avoid-redefinition.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
Author: Rasmus Thomsen <oss@cogitri.dev>
|
||||
Reason: FF is mixing userspace net headers (net/if.h) and kernelspace ones
|
||||
(linux/if.h), leading to redefinitions. We need to include net/if.h before
|
||||
linux/if.h because linux/if.h has redifinition guards whereas net/if.h doesnt
|
||||
Upstream: No
|
||||
--- a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c.orig 2020-07-28 19:24:32.359751046 +0200
|
||||
+++ b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c 2020-07-28 19:24:37.856343751 +0200
|
||||
@@ -31,6 +31,7 @@
|
||||
*/
|
||||
|
||||
#if defined(LINUX)
|
||||
+#include <net/if.h>
|
||||
#include "addrs-netlink.h"
|
||||
#include <csi_platform.h>
|
||||
#include <assert.h>
|
95
gui/firefox/build.sh
Normal file
95
gui/firefox/build.sh
Normal file
|
@ -0,0 +1,95 @@
|
|||
pkgname=firefox
|
||||
pkgver=101.0
|
||||
mkdeps="cbindgen:rust"
|
||||
|
||||
fetch() {
|
||||
#curl "https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz" -o $pkgname-$pkgver.tar.xz
|
||||
#curl "https://hg.mozilla.org/mozilla-unified/archive/26726cd430955db041e5de33d9792bb816c57608.zip" -o $pkgname-$pkgver.zip
|
||||
curl "https://archive.mozilla.org/pub/firefox/releases/${pkgver}b3/source/firefox-${pkgver}b3.source.tar.xz" -o $pkgname-$pkgver.tar.xz
|
||||
tar -xf $pkgname-$pkgver.tar.xz
|
||||
cd $pkgname-$pkgver
|
||||
# patch -p1 < ../../no-x11.patch
|
||||
# patch -p1 < ../../fix-clang-as.patch
|
||||
patch -p1 < ../../avoid-redefinition.patch
|
||||
patch -p1 < ../../libcxx.patch
|
||||
patch -p1 < ../../grefptr.patch
|
||||
patch -p1 < ../../sandbox-allow-select.patch
|
||||
# patch -p1 < ../../sandbox-fork.patch
|
||||
# patch -p1 < ../../sandbox-sched.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
ulimit -n 4096
|
||||
|
||||
|
||||
export MACH_USE_SYSTEM_PYTHON=1
|
||||
export CXXSTDLIB=c++
|
||||
export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/firefox/,--enable-new-dtags"
|
||||
|
||||
cat > .mozconfig << EOF
|
||||
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland
|
||||
ac_add_options --prefix=/usr
|
||||
ac_add_options --libdir=/usr/lib
|
||||
ac_add_options --disable-alsa
|
||||
ac_add_options --enable-dbus
|
||||
ac_add_options --enable-strip
|
||||
ac_add_options --enable-release
|
||||
ac_add_options --enable-rust-simd
|
||||
ac_add_options --enable-install-strip
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-application=browser
|
||||
ac_add_options --enable-optimize="-O3 -w"
|
||||
ac_add_options --without-system-libvpx
|
||||
ac_add_options --without-system-ffi
|
||||
ac_add_options --without-system-png
|
||||
ac_add_options --without-system-jpeg
|
||||
ac_add_options --without-system-zlib
|
||||
ac_add_options --without-system-pixman
|
||||
ac_add_options --without-system-nss
|
||||
ac_add_options --without-system-nspr
|
||||
ac_add_options --enable-linker=lld
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --disable-vtune
|
||||
ac_add_options --disable-updater
|
||||
ac_add_options --disable-jemalloc
|
||||
ac_add_options --disable-callgrind
|
||||
ac_add_options --disable-profiling
|
||||
ac_add_options --disable-necko-wifi
|
||||
ac_add_options --disable-crashreporter
|
||||
ac_add_options --enable-pulseaudio
|
||||
ac_add_options --disable-accessibility
|
||||
ac_add_options --disable-debug
|
||||
ac_add_options --disable-debug-symbols
|
||||
ac_add_options --disable-parental-controls
|
||||
ac_add_options --disable-system-extension-dirs
|
||||
ac_add_options --enable-webrtc
|
||||
ac_add_options --disable-elf-hack
|
||||
ac_add_options --without-wasm-sandboxed-libraries
|
||||
#ac_add_options MOZ_PGO=1
|
||||
EOF
|
||||
|
||||
# bad --gmake --gm4 --autoconf ./mach clobber
|
||||
bad --gmake --gm4 --autoconf ./mach build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
export MACH_USE_SYSTEM_PYTHON=1
|
||||
export CXXSTDLIB=c++
|
||||
export RUSTFLAGS='-C target-feature=-crt-static'
|
||||
export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/firefox/,--enable-new-dtags"
|
||||
|
||||
DESTDIR=$pkgdir bad --gmake --gm4 --autoconf ./mach install
|
||||
}
|
||||
|
||||
backup() {
|
||||
return
|
||||
}
|
||||
|
||||
license() {
|
||||
cd $pkgname-$pkgver
|
||||
cat LICENSE
|
||||
# cat COPYING
|
||||
}
|
10
gui/firefox/grefptr.patch
Normal file
10
gui/firefox/grefptr.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- a/widget/gtk/nsClipboard.cpp
|
||||
+++ b/widget/gtk/nsClipboard.cpp
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "nsIObserverService.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
+#include "GRefPtr.h"
|
||||
#include "mozilla/SchedulerGroup.h"
|
||||
#include "mozilla/StaticPrefs_widget.h"
|
||||
#include "mozilla/TimeStamp.h"
|
69
gui/firefox/libcxx.patch
Normal file
69
gui/firefox/libcxx.patch
Normal file
|
@ -0,0 +1,69 @@
|
|||
--- a/memory/mozalloc/throw_gcc.h
|
||||
+++ b/memory/mozalloc/throw_gcc.h
|
||||
@@ -74,50 +74,66 @@ __throw_bad_function_call(void) {
|
||||
mozalloc_abort("fatal: STL threw bad_function_call");
|
||||
}
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_logic_error(
|
||||
const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_domain_error(
|
||||
const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
|
||||
__throw_invalid_argument(const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_length_error(
|
||||
const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_out_of_range(
|
||||
const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_runtime_error(
|
||||
const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_range_error(
|
||||
const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
|
||||
__throw_overflow_error(const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void
|
||||
__throw_underflow_error(const char* msg) {
|
||||
mozalloc_abort(msg);
|
||||
}
|
||||
+#endif // _LIBCPP_VERSION
|
||||
|
||||
MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_ios_failure(
|
||||
const char* msg) {
|
26
gui/firefox/sandbox-allow-select.patch
Normal file
26
gui/firefox/sandbox-allow-select.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
--- a/security/sandbox/linux/SandboxFilter.cpp
|
||||
+++ b/security/sandbox/linux/SandboxFilter.cpp
|
||||
@@ -1992,20 +1992,23 @@
|
||||
Arg<uintptr_t> new_limit(2);
|
||||
return If(AllOf(pid == 0, new_limit == 0), Allow())
|
||||
.Else(InvalidSyscall());
|
||||
}
|
||||
#endif // DESKTOP
|
||||
|
||||
// Bug 1640612
|
||||
case __NR_uname:
|
||||
return Allow();
|
||||
|
||||
+ CASES_FOR_select:
|
||||
+ return Allow();
|
||||
+
|
||||
default:
|
||||
return SandboxPolicyCommon::EvaluateSyscall(sysno);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
UniquePtr<sandbox::bpf_dsl::Policy> GetSocketProcessSandboxPolicy(
|
||||
SandboxBrokerClient* aMaybeBroker) {
|
||||
return UniquePtr<sandbox::bpf_dsl::Policy>(
|
||||
new SocketProcessSandboxPolicy(aMaybeBroker));
|
Loading…
Add table
Add a link
Reference in a new issue