diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2020-11-13 22:46:33 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2020-11-13 22:46:33 +0000 |
commit | 7249f5283dd7b047e55566498b5c5118790e7ce8 (patch) | |
tree | 008711f8d316589e2044040b8ea29a36b0f6b315 /mail | |
parent | 22ece1919d35d264751d02adc606c6ae2e604dbf (diff) | |
download | freebsd-ports-7249f5283dd7b047e55566498b5c5118790e7ce8.zip |
www/firefox-esr: revert r522464 to improve stability
Upstream adopted memfd_create instead which requires FreeBSD >= 13.
Having ESR behave differently complicates maintenance, so drop
SHM_ANON for now.
PR: 243252
Diffstat (limited to 'mail')
-rw-r--r-- | mail/thunderbird/Makefile | 2 | ||||
-rw-r--r-- | mail/thunderbird/files/patch-bug1550891 | 80 |
2 files changed, 1 insertions, 81 deletions
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile index 2337eb630be7..327093a803bc 100644 --- a/mail/thunderbird/Makefile +++ b/mail/thunderbird/Makefile @@ -3,7 +3,7 @@ PORTNAME= thunderbird DISTVERSION= 78.4.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= mail news net-im MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source diff --git a/mail/thunderbird/files/patch-bug1550891 b/mail/thunderbird/files/patch-bug1550891 deleted file mode 100644 index 7162795f7313..000000000000 --- a/mail/thunderbird/files/patch-bug1550891 +++ /dev/null @@ -1,80 +0,0 @@ -commit 965eb33c5e86 -Author: Greg V <greg@unrelenting.technology> -Date: Wed Jan 8 15:06:00 2020 -0800 - - Bug 1550891 - re-add SHM_ANON support in IPC shared memory, freezing via capabilities ---- - config/system-headers.mozbuild | 1 + - ipc/chromium/src/base/shared_memory_posix.cc | 20 +++++++++++++++++--- - 2 files changed, 18 insertions(+), 3 deletions(-) - -diff --git config/system-headers.mozbuild config/system-headers.mozbuild -index 88afca1070f86..beff3e2542c9f 100644 ---- config/system-headers.mozbuild -+++ config/system-headers.mozbuild -@@ -816,6 +816,7 @@ system_headers = [ - 'sys/bitypes.h', - 'sys/byteorder.h', - 'syscall.h', -+ 'sys/capsicum.h', - 'sys/cdefs.h', - 'sys/cfgodm.h', - 'sys/elf.h', -diff --git ipc/chromium/src/base/shared_memory_posix.cc ipc/chromium/src/base/shared_memory_posix.cc -index 0be9cce0b4bed..89e67483e4c16 100644 ---- ipc/chromium/src/base/shared_memory_posix.cc -+++ ipc/chromium/src/base/shared_memory_posix.cc -@@ -16,6 +16,10 @@ - # include "mozilla/Ashmem.h" - #endif - -+#ifdef __FreeBSD__ -+# include <sys/capsicum.h> -+#endif -+ - #include "base/eintr_wrapper.h" - #include "base/logging.h" - #include "base/string_util.h" -@@ -77,7 +81,7 @@ SharedMemoryHandle SharedMemory::NULLHandle() { return SharedMemoryHandle(); } - - // static - bool SharedMemory::AppendPosixShmPrefix(std::string* str, pid_t pid) { --#if defined(ANDROID) -+#if defined(ANDROID) || defined(__FreeBSD__) - return false; - #else - *str += '/'; -@@ -103,7 +107,7 @@ bool SharedMemory::AppendPosixShmPrefix(std::string* str, pid_t pid) { - // enough for this. - StringAppendF(str, "org.mozilla.ipc.%d.", static_cast<int>(pid)); - return true; --#endif // !ANDROID -+#endif // !ANDROID && !__FreeBSD__ - } - - bool SharedMemory::CreateInternal(size_t size, bool freezeable) { -@@ -125,6 +129,9 @@ bool SharedMemory::CreateInternal(size_t size, bool freezeable) { - return false; - } - needs_truncate = false; -+#elif defined(__FreeBSD__) -+ // FreeBSD supports anonymous shm_open -+ fd.reset(shm_open(SHM_ANON, O_RDWR, 0600)); - #else - // Generic Unix: shm_open + shm_unlink - do { -@@ -224,6 +231,14 @@ bool SharedMemory::ReadOnlyCopy(SharedMemory* ro_out) { - return false; - } - ro_file = mapped_file_; -+#elif defined(__FreeBSD__) -+ cap_rights_t rights; -+ cap_rights_init(&rights, CAP_MMAP_R); -+ if (cap_rights_limit(mapped_file_, &rights) != 0) { -+ CHROMIUM_LOG(WARNING) << "failed to freeze shm: " << strerror(errno); -+ return false; -+ } -+ ro_file = mapped_file_; - #else - DCHECK(frozen_file_ >= 0); - DCHECK(mapped_file_ >= 0); |