pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/tor-browser tor-browser: merge recent changes...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0a7a377e6b6a
branches:  trunk
changeset: 441894:0a7a377e6b6a
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Thu Nov 12 21:07:45 2020 +0000

description:
tor-browser: merge recent changes from firefox

This includes nia's mprotect patch.

Bump PKGREVISION.

diffstat:

 security/tor-browser/Makefile                                             |  128 +-
 security/tor-browser/distinfo                                             |    5 +-
 security/tor-browser/files/cubeb_sun.c                                    |  752 ----------
 security/tor-browser/options.mk                                           |   62 +-
 security/tor-browser/patches/patch-js_src_jit_ProcessExecutableMemory.cpp |   38 +
 security/tor-browser/patches/patch-js_src_vm_ArrayBufferObject.cpp        |   24 +
 security/tor-browser/patches/patch-media_libcubeb_src_cubeb__sun.c        |   12 -
 7 files changed, 165 insertions(+), 856 deletions(-)

diffs (truncated from 1134 to 300 lines):

diff -r ce3ffdcd8470 -r 0a7a377e6b6a security/tor-browser/Makefile
--- a/security/tor-browser/Makefile     Thu Nov 12 21:05:51 2020 +0000
+++ b/security/tor-browser/Makefile     Thu Nov 12 21:07:45 2020 +0000
@@ -1,26 +1,5 @@
-# $NetBSD: Makefile,v 1.78 2020/11/05 09:09:05 ryoon Exp $
-
-DISTNAME=      src-firefox-tor-browser-78.4.0esr-10.0-2-build2
-PKGNAME=       tor-browser-10.0.2
-PKGREVISION=   1
-CATEGORIES=    security www
-MASTER_SITES=  https://dist.torproject.org/torbrowser/${PKGVERSION_NOREV}/
-EXTRACT_SUFX=  .tar.xz
-DISTFILES=     ${DISTNAME}${EXTRACT_SUFX}
-DISTFILES+=    tor-browser-linux64-${PKGVERSION_NOREV}_en-US${EXTRACT_SUFX}
-#DISTFILES+=   src-tor-launcher-0.2.21.8${EXTRACT_SUFX}
-
-MAINTAINER=    wiz%NetBSD.org@localhost
-HOMEPAGE=      https://www.torproject.org/projects/torbrowser.html.en
-COMMENT=       Tor Browser based on Firefox
-LICENSE=       mpl-1.1
-
-WRKSRC=                ${WRKDIR}/${DISTNAME:S/src-//}
-
-DEPENDS+=      tor-[0-9]*:../../net/tor
-DEPENDS+=      tor-browser-https-everywhere>=2020.5.20:../../security/tor-browser-https-everywhere
-DEPENDS+=      tor-browser-noscript>=11.0.32:../../security/tor-browser-noscript
-
+# $NetBSD: Makefile,v 1.79 2020/11/12 21:07:45 wiz Exp $
+#
 # How to update this package:
 #
 # replace all patches with the one from the correspoding www/firefox${ESR_RELEASE}
@@ -36,6 +15,57 @@
 # when packaged up, read MESSAGE and test by visiting https://check.torproject.org
 # and https://panopticlick.eff.org
 
+DISTNAME=      src-firefox-tor-browser-78.4.0esr-10.0-2-build2
+PKGNAME=       tor-browser-10.0.2
+PKGREVISION=   2
+CATEGORIES=    security www
+MASTER_SITES=  https://dist.torproject.org/torbrowser/${PKGVERSION_NOREV}/
+EXTRACT_SUFX=  .tar.xz
+DISTFILES=     ${DISTNAME}${EXTRACT_SUFX}
+DISTFILES+=    tor-browser-linux64-${PKGVERSION_NOREV}_en-US${EXTRACT_SUFX}
+#DISTFILES+=   src-tor-launcher-0.2.21.8${EXTRACT_SUFX}
+
+MAINTAINER=    wiz%NetBSD.org@localhost
+HOMEPAGE=      https://www.torproject.org/projects/torbrowser.html.en
+COMMENT=       Tor Browser based on Firefox
+LICENSE=       mpl-1.1
+
+UNLIMIT_RESOURCES+=    datasize virtualsize
+
+WRKSRC=                ${WRKDIR}/${DISTNAME:S/src-//}
+
+MOZILLA_DIR=   # empty
+
+DEPENDS+=      tor-[0-9]*:../../net/tor
+DEPENDS+=      tor-browser-https-everywhere>=2020.5.20:../../security/tor-browser-https-everywhere
+DEPENDS+=      tor-browser-noscript>=11.0.32:../../security/tor-browser-noscript
+
+.include "../../mk/bsd.prefs.mk"
+
+CONFIGURE_ARGS+=       --enable-tor-browser-data-outside-app-dir
+CONFIGURE_ARGS+=       --with-tor-browser-version=${PKGVERSION_NOREV}
+CFLAGS+=               -DTOR_BROWSER_DATA_IN_HOME_DIR=1
+CFLAGS+=               -DTOR_BROWSER_DATA_OUTSIDE_APP_DIR=1
+CFLAGS+=               -fPIC
+
+# workaround for link of libxul.so etc.
+LDFLAGS+=              ${COMPILER_RPATH_FLAG}${PREFIX}/lib/${PKGBASE}
+LDFLAGS+=              ${COMPILER_RPATH_FLAG}${PREFIX}/lib
+LDFLAGS.DragonFly+=    -lplc4 -lnspr4
+LDFLAGS.FreeBSD+=      -lplc4 -lnspr4
+LDFLAGS.Linux+=                -lnspr4
+LDFLAGS.SunOS+=                -lm
+
+ALL_ENV+=              MOZ_APP_NAME=${PKGBASE}
+
+# Avoid ld "invalid section index" errors.
+BUILDLINK_TRANSFORM.SunOS+=    rm:-fdata-sections
+BUILDLINK_TRANSFORM.SunOS+=    rm:-ffunction-sections
+BUILDLINK_TRANSFORM.SunOS+=    rm:-pie
+
+# Workaround for https://bugs.llvm.org/show_bug.cgi?id=46366
+BUILDLINK_TRANSFORM.NetBSD+=   rm:-fexperimental-new-pass-manager
+
 # Remove hardcoded build directory.
 SUBST_CLASSES+=                        fix-build-dir
 SUBST_STAGE.fix-build-dir=     pre-configure
@@ -48,10 +78,15 @@
 SUBST_SED.fonts+=      -e 's,<dir>fonts</dir>,<dir>${PREFIX}/lib/tor-browser/browser/fonts</dir>,'
 SUBST_MESSAGE.fonts=   Fixing path to bundled fonts directory.
 
-MOZILLA_DIR=   # empty
+.include "../../www/firefox78/mozilla-common.mk"
+.include "options.mk"
 
-# Workaround for https://bugs.llvm.org/show_bug.cgi?id=46366
-BUILDLINK_TRANSFORM.NetBSD+=   rm:-fexperimental-new-pass-manager
+CHECK_INTERPRETER_SKIP+=       lib/firefox-sdk/sdk/bin/header.py
+CHECK_INTERPRETER_SKIP+=       lib/firefox-sdk/sdk/bin/typelib.py
+CHECK_INTERPRETER_SKIP+=       lib/firefox-sdk/sdk/bin/xpidl.py
+CHECK_INTERPRETER_SKIP+=       lib/firefox-sdk/sdk/bin/xpt.py
+
+CHECK_WRKREF_SKIP+=    lib/${PKGBASE}/chrome/toolkit/content/global/buildconfig.html
 
 #
 # Generate list of subst entries for various .cargo-checksum.json files.  These
@@ -81,56 +116,21 @@
 SUBST_SED.cksum+=      -e 's,${from},${to},g'
 .endfor
 
-.include "../../mk/bsd.prefs.mk"
-
-CONFIGURE_ARGS+=       --enable-tor-browser-data-outside-app-dir
-CONFIGURE_ARGS+=       --with-tor-browser-version=${PKGVERSION_NOREV}
-CFLAGS+=               -DTOR_BROWSER_DATA_IN_HOME_DIR=1
-CFLAGS+=               -DTOR_BROWSER_DATA_OUTSIDE_APP_DIR=1
-CFLAGS+=               -fPIC
-
-# workaround for link of libxul.so etc.
-LDFLAGS+=              ${COMPILER_RPATH_FLAG}${PREFIX}/lib/${PKGBASE}
-LDFLAGS+=              ${COMPILER_RPATH_FLAG}${PREFIX}/lib
-LDFLAGS.DragonFly+=    -lplc4 -lnspr4
-LDFLAGS.FreeBSD+=      -lplc4 -lnspr4
-LDFLAGS.Linux+=                -lnspr4
-LDFLAGS.SunOS+=                -lm
-
-ALL_ENV+=              MOZ_APP_NAME=${PKGBASE}
-
-NOT_PAX_MPROTECT_SAFE+=        lib/${PKGBASE}/tor-browser
-NOT_PAX_MPROTECT_SAFE+=        lib/${PKGBASE}/tor-browser-bin
-
-# Avoid ld "invalid section index" errors.
-BUILDLINK_TRANSFORM.SunOS+=    rm:-fdata-sections
-BUILDLINK_TRANSFORM.SunOS+=    rm:-ffunction-sections
-
-.include "../../www/firefox78/mozilla-common.mk"
-.include "options.mk"
-
-CHECK_INTERPRETER_SKIP+=       lib/firefox-sdk/sdk/bin/header.py
-CHECK_INTERPRETER_SKIP+=       lib/firefox-sdk/sdk/bin/typelib.py
-CHECK_INTERPRETER_SKIP+=       lib/firefox-sdk/sdk/bin/xpidl.py
-CHECK_INTERPRETER_SKIP+=       lib/firefox-sdk/sdk/bin/xpt.py
-
-CHECK_WRKREF_SKIP+=    lib/${PKGBASE}/chrome/toolkit/content/global/buildconfig.html
-
 MOZILLA=       ${PKGBASE}
 MOZILLA_ICON=  ${WRKSRC}/browser/branding/official/default48.png
 MOZILLA_NAME=  TorBrowser
 
 post-extract:
        mv ${WRKSRC}/gfx/ycbcr/yuv_row_arm.s ${WRKSRC}/gfx/ycbcr/yuv_row_arm.S
-       ${CP} ${FILESDIR}/cubeb_sun.c ${WRKSRC}/media/libcubeb/src/cubeb_sun.c
        mv ${WRKDIR}/tor-browser_en-US ${WRKSRC}
 #      mv ${WRKDIR}/tor-launcher* ${WRKSRC}/browser/extensions/tor-launcher
 
 pre-configure:
+       cd ${WRKSRC} && autoconf
+       cd ${WRKSRC}/js/src && autoconf
        cd ${WRKSRC} && mkdir ${OBJDIR}
-       cd ${WRKSRC} && autoconf
        cd ${WRKSRC}/${OBJDIR} && touch old-configure.vars
-       cd ${WRKSRC}/js/src && autoconf
+       # Do not fetch Rust Cargo file via network during build
 
 post-build:
        ${SED} -e 's|@MOZILLA@|${MOZILLA}|g'                            \
diff -r ce3ffdcd8470 -r 0a7a377e6b6a security/tor-browser/distinfo
--- a/security/tor-browser/distinfo     Thu Nov 12 21:05:51 2020 +0000
+++ b/security/tor-browser/distinfo     Thu Nov 12 21:07:45 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.30 2020/10/31 00:55:27 wiz Exp $
+$NetBSD: distinfo,v 1.31 2020/11/12 21:07:45 wiz Exp $
 
 SHA1 (src-firefox-tor-browser-78.4.0esr-10.0-2-build2.tar.xz) = 58c2c7954b7b751c71f6cbd7944c4be3281d2105
 RMD160 (src-firefox-tor-browser-78.4.0esr-10.0-2-build2.tar.xz) = e773a61f364bd2a1c01fcd06fa714cb8ae7b7e56
@@ -26,11 +26,12 @@
 SHA1 (patch-ipc_chromium_src_base_message__pump__libevent.cc) = 4a6606da590cfb8d855bde58b9c6f90e98d0870c
 SHA1 (patch-ipc_chromium_src_base_platform__thread__posix.cc) = 35d20981d33ccdb1d8ffb8039e48798777f11658
 SHA1 (patch-ipc_glue_GeckoChildProcessHost.cpp) = 260c29bacd8bf265951b7a412f850bf2b292c836
+SHA1 (patch-js_src_jit_ProcessExecutableMemory.cpp) = c75e9ea7124c18be1a051106fcc407ddd1e82e46
 SHA1 (patch-js_src_jsfriendapi.h) = 6bbb895b882ee24929f011751c42732215e153a2
 SHA1 (patch-js_src_util_NativeStack.cpp) = a0a16d8d8d78d3cc3f4d2a508586f1a7821f7dba
+SHA1 (patch-js_src_vm_ArrayBufferObject.cpp) = ca117633d2aae52d82ec349a0bfb0c03b87898b4
 SHA1 (patch-media_ffvpx_libavutil_arm_bswap.h) = de58daa0fd23d4fec50426602b65c9ea5862558a
 SHA1 (patch-media_libcubeb_src_cubeb__alsa.c) = 31536f36cb33f16da309527b50eda9b721608115
-SHA1 (patch-media_libcubeb_src_cubeb__sun.c) = a8e03bc95850f83fd7ee3985c7cdb700981aa019
 SHA1 (patch-media_libcubeb_src_moz.build) = e4e64a1135cf4157ae5b6f7c1710ebd076953479
 SHA1 (patch-media_libpng_pngpriv.h) = c8084332560017cd7c9b519b61d125fa28af0dbc
 SHA1 (patch-media_libtheora_lib_info.c) = f6dbf536d73859a1ff78304c2e9f6a6f74dac01f
diff -r ce3ffdcd8470 -r 0a7a377e6b6a security/tor-browser/files/cubeb_sun.c
--- a/security/tor-browser/files/cubeb_sun.c    Thu Nov 12 21:05:51 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,752 +0,0 @@
-/*
- * Copyright © 2019 Nia Alarie
- *
- * This program is made available under an ISC-style license.  See the
- * accompanying file LICENSE for details.
- */
-#include <sys/audioio.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <pthread.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-#include "cubeb/cubeb.h"
-#include "cubeb-internal.h"
-
-#define BYTES_TO_FRAMES(bytes, channels) \
-  (bytes / (channels * sizeof(int16_t)))
-
-#define FRAMES_TO_BYTES(frames, channels) \
-  (frames * (channels * sizeof(int16_t)))
-
-/* Default to 4 + 1 for the default device. */
-#ifndef SUN_DEVICE_COUNT
-#define SUN_DEVICE_COUNT (5)
-#endif
-
-/* Supported well by most hardware. */
-#ifndef SUN_PREFER_RATE
-#define SUN_PREFER_RATE (48000)
-#endif
-
-/* Standard acceptable minimum. */
-#ifndef SUN_LATENCY_MS
-#define SUN_LATENCY_MS (40)
-#endif
-
-#ifndef SUN_DEFAULT_DEVICE
-#define SUN_DEFAULT_DEVICE "/dev/audio"
-#endif
-
-#ifndef SUN_POLL_TIMEOUT
-#define SUN_POLL_TIMEOUT (1000)
-#endif
-
-#ifndef SUN_BUFFER_FRAMES
-#define SUN_BUFFER_FRAMES (32)
-#endif
-
-/*
- * Supported on NetBSD regardless of hardware.
- */
-
-#ifndef SUN_MAX_CHANNELS
-# ifdef __NetBSD__
-#  define SUN_MAX_CHANNELS (12)
-# else
-#  define SUN_MAX_CHANNELS (2)
-# endif
-#endif
-
-#ifndef SUN_MIN_RATE
-#define SUN_MIN_RATE (1000)
-#endif
-
-#ifndef SUN_MAX_RATE
-#define SUN_MAX_RATE (192000)
-#endif
-
-static struct cubeb_ops const sun_ops;
-
-struct cubeb {
-  struct cubeb_ops const * ops;
-};
-
-struct cubeb_stream {
-  struct cubeb * context;
-  void * user_ptr;
-  pthread_t thread;
-  pthread_mutex_t mutex; /* protects running, volume, frames_written */
-  int floating;
-  int running;
-  int play_fd;
-  int record_fd;
-  float volume;
-  struct audio_info p_info; /* info for the play fd */
-  struct audio_info r_info; /* info for the record fd */
-  cubeb_data_callback data_cb;
-  cubeb_state_callback state_cb;
-  int16_t * play_buf;
-  int16_t * record_buf;
-  float * f_play_buf;
-  float * f_record_buf;
-  char input_name[32];
-  char output_name[32];
-  uint64_t frames_written;
-  uint64_t blocks_written;
-};
-
-int
-sun_init(cubeb ** context, char const * context_name)
-{



Home | Main Index | Thread Index | Old Index