1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-02 11:09:29 +00:00

Remove www/palemoon, it is not maintained and full of security holes.

PR:		237107
This commit is contained in:
Mathieu Arnold 2019-07-03 09:43:45 +00:00
parent c4a847fd4e
commit bb374556e8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=505740
18 changed files with 1 additions and 826 deletions

1
MOVED

@ -12841,3 +12841,4 @@ devel/rubygem-fastthread||2019-06-30|Has expired: Does not build for all support
www/rubygem-responders-rails50|www/rubygem-responders|2019-06-30|Has expired: Use www/rubygem-responders (depends on Rails 5.0) instead
emulators/xen-kernel47|emulators/xen-kernel|2019-07-01|Has expired: This port is about to be removed, please update to a newer Xen version
sysutils/xen-tools47|sysutils/xen-tools|2019-07-01|Has expired: This port is about to be removed, please update to a newer Xen version
www/palemoon||2019-07-03|Not maintained and full of security holes.

@ -1323,7 +1323,6 @@
SUBDIR += p5-pQuery
SUBDIR += p5-webservice-validator-css-w3c
SUBDIR += p5-webservice-validator-html-w3c
SUBDIR += palemoon
SUBDIR += paros
SUBDIR += payara
SUBDIR += pear-HTML_AJAX

@ -1,62 +0,0 @@
# Created by: Zhihao Yuan <lichray@gmail.com>
# $FreeBSD$
PORTNAME= palemoon
DISTVERSION= 27.9.4
DISTVERSIONSUFFIX=_Release
PORTREVISION= 6
CATEGORIES= www ipv6
MAINTAINER= ports@FreeBSD.org
COMMENT= Open Source Goanna-based web browser
BROKEN_FreeBSD_13_amd64= xpcshell crashes after base Clang updated to 8.0.0
BUILD_DEPENDS= nspr>=4.15:devel/nspr \
nss>=3.31.1:security/nss \
libevent>=2.0.22:devel/libevent \
harfbuzz>=1.4.3:print/harfbuzz \
graphite2>=1.3.10:graphics/graphite2 \
png>=1.6.16:graphics/png \
libvpx>=1.5.0:multimedia/libvpx \
sqlite3>=3.19.3:databases/sqlite3 \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
autoconf-2.13:devel/autoconf213 \
yasm:devel/yasm \
zip:archivers/zip
USE_GITHUB= yes
GH_ACCOUNT= MoonchildProductions
GH_PROJECT= Pale-Moon
USE_GECKO= gecko
MOZ_PKGCONFIG_FILES= # empty
USE_MOZILLA= -webp
PM_ICON= ${PORTNAME}.png
PM_ICON_SRC= ${PREFIX}/lib/${PORTNAME}/browser/icons/mozicon128.png
PM_DESKTOP= ${WRKSRC}/browser/branding/official/${PORTNAME}.desktop
MOZ_OPTIONS= --enable-application=browser \
--enable-devtools \
--enable-jemalloc \
--enable-jemalloc-lib
OPTIONS_DEFAULT= GTK2
OPTIONS_EXCLUDE= JACK TEST WAYLAND
.include "${.CURDIR}/../../www/firefox/Makefile.options"
post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/browser/app/nsBrowserApp.cpp
pre-configure:
(cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf-2.13)
(cd ${WRKSRC}/js/src/ && ${LOCALBASE}/bin/autoconf-2.13)
post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps
${INSTALL_DATA} ${PM_DESKTOP} ${STAGEDIR}${PREFIX}/share/applications/
${LN} -sf ${PM_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${PM_ICON}
.include <bsd.port.mk>

@ -1,3 +0,0 @@
TIMESTAMP = 1531957369
SHA256 (MoonchildProductions-Pale-Moon-27.9.4_Release_GH0.tar.gz) = b2ad32daf6b83474a77f9c56e18a0e9282bf2af34a8d9ace581f0583545fd375
SIZE (MoonchildProductions-Pale-Moon-27.9.4_Release_GH0.tar.gz) = 175386776

@ -1,12 +0,0 @@
--- browser/app/nsBrowserApp.cpp.orig 2017-11-14 14:36:13 UTC
+++ browser/app/nsBrowserApp.cpp
@@ -409,6 +409,9 @@ int main(int argc, char* argv[])
#endif
uint64_t start = TimeStamp_Now();
+ setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
+ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
+
#ifdef XP_MACOSX
TriggerQuirks();
#endif

@ -1,13 +0,0 @@
--- browser/installer/Makefile.in.orig 2017-11-14 14:36:13 UTC
+++ browser/installer/Makefile.in
@@ -108,10 +108,6 @@ MOZ_PKG_MAC_ICON=branding/disk.icns
MOZ_PKG_MAC_EXTRA=--symlink '/Applications:/ '
endif
-ifndef LIBXUL_SDK
-INSTALL_SDK = 1
-endif
-
include $(topsrcdir)/toolkit/mozapps/installer/signing.mk
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk

@ -1,13 +0,0 @@
https://github.com/kinetiknz/nestegg/commit/3b7f1ae5dfd5
--- media/libnestegg/src/align.h.orig 2017-11-14 14:36:13 UTC
+++ media/libnestegg/src/align.h
@@ -22,7 +22,7 @@
*/
typedef double max_align_t;
-#else
+#elif !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T)
/*
* a type with the most strict alignment requirements

@ -1,23 +0,0 @@
# HG changeset patch
# User Nathan Froyd <froydnj@gmail.com>
# Date 1466820205 14400
# Node ID bd25b06261c840a62d035192cf4b1dbc18f54e3f
# Parent fbe25a30fcbbe172bdd37c70c5b06cdbb07886af
Bug 1278861 - adjust ifdefs in Conversions.h:ToInt32 to catch clang-on-arm-generally; r=luke
The bug noted in ToInt32 doesn't just exist when compiling for
arm-darwin; it exists for ARM targets generally. The ifdef should
reflect that.
--- js/public/Conversions.h.orig 2018-01-17 20:56:32 UTC
+++ js/public/Conversions.h
@@ -349,7 +349,7 @@ ToIntWidth(double d)
inline int32_t
ToInt32(double d)
{
-#if defined (__arm__) && defined (__GNUC__)
+#if defined (__arm__) && defined (__GNUC__) && !defined(__clang__)
int32_t i;
uint32_t tmp0;
uint32_t tmp1;

@ -1,13 +0,0 @@
Build Linux aarch64 code in XPTCALL also on BSDs
--- xpcom/reflect/xptcall/md/unix/moz.build.orig 2017-11-14 14:36:13 UTC
+++ xpcom/reflect/xptcall/md/unix/moz.build
@@ -143,7 +143,7 @@ if CONFIG['OS_ARCH'] == 'NetBSD':
'xptcstubs_netbsd_m68k.cpp'
]
-if CONFIG['OS_ARCH'] == 'Linux':
+if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD', 'NetBSD', 'OpenBSD'):
if CONFIG['OS_TEST'] == 'aarch64':
SOURCES += [
'xptcinvoke_aarch64.cpp',

@ -1,21 +0,0 @@
Allow readelf to print types without parentheses
--- toolkit/library/dependentlibs.py.orig 2017-11-14 14:36:13 UTC
+++ toolkit/library/dependentlibs.py
@@ -59,11 +59,15 @@ def dependentlibs_readelf(lib):
for line in proc.stdout:
# Each line has the following format:
# tag (TYPE) value
+ # or with BSD readelf:
+ # tag TYPE value
# Looking for NEEDED type entries
tmp = line.split(' ', 3)
- if len(tmp) > 3 and tmp[2] == '(NEEDED)':
+ if len(tmp) > 3 and 'NEEDED' in tmp[2]:
# NEEDED lines look like:
# 0x00000001 (NEEDED) Shared library: [libname]
+ # or with BSD readelf:
+ # 0x00000001 NEEDED Shared library: [libname]
match = re.search('\[(.*)\]', tmp[3])
if match:
deps.append(match.group(1))

@ -1,20 +0,0 @@
Don't rely on GNU regex extension for character classes.
$ echo --with-system-nspr --with-system-nss | gsed -e 's/--with-system-nspr\S* *//'
--with-system-nss
$ echo --with-system-nspr --with-system-nss | sed -e 's/--with-system-nspr\S* *//'
sed: 1: "s/--with-system-nspr\S* ...": RE error: trailing backslash (\)
diff --git old-configure.in old-configure.in
index 7722587fadac..acf5d8d67a60 100644
--- configure.in
+++ configure.in
@@ -4405,7 +4405,7 @@ ac_configure_args="$_SUBDIR_CONFIG_ARGS"
# --with-system-nspr will have been converted into the relevant $NSPR_CFLAGS
# and $NSPR_LIBS.
-ac_configure_args="`echo $ac_configure_args | sed -e 's/--with-system-nspr\S* *//'`"
+ac_configure_args="`echo $ac_configure_args | sed -e 's/--with-system-nspr[[^[:space:]]]* *//'`"
if test "$_INTL_API" = no; then
ac_configure_args="$ac_configure_args --without-intl-api"

@ -1,216 +0,0 @@
# Allow building against system-wide graphite2/harfbuzz.
--- config/Makefile.in.orig 2017-11-14 14:36:13 UTC
+++ config/Makefile.in
@@ -78,6 +78,8 @@ export:: $(export-preqs)
-DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \
-DMOZ_NATIVE_LIBWEBP=$(MOZ_NATIVE_LIBWEBP) \
-DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
+ -DMOZ_NATIVE_GRAPHITE2=$(MOZ_NATIVE_GRAPHITE2) \
+ -DMOZ_NATIVE_HARFBUZZ=$(MOZ_NATIVE_HARFBUZZ) \
$(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
$(INSTALL) system_wrappers $(DIST)
--- config/system-headers.orig 2017-11-14 14:36:13 UTC
+++ config/system-headers
@@ -1359,3 +1359,11 @@ unicode/utypes.h
#endif
libutil.h
unwind.h
+#if MOZ_NATIVE_GRAPHITE2==1
+graphite2/Font.h
+graphite2/Segment.h
+#endif
+#if MOZ_NATIVE_HARFBUZZ==1
+harfbuzz/hb-ot.h
+harfbuzz/hb.h
+#endif
--- configure.in.orig 2017-11-14 14:36:13 UTC
+++ configure.in
@@ -7746,6 +7746,49 @@ if test "$USE_FC_FREETYPE"; then
fi
dnl ========================================================
+dnl Check for harfbuzz
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-harfbuzz,
+[ --with-system-harfbuzz Use system harfbuzz (located with pkgconfig)],
+MOZ_NATIVE_HARFBUZZ=1,
+MOZ_NATIVE_HARFBUZZ=)
+
+if test -n "$MOZ_NATIVE_HARFBUZZ"; then
+ PKG_CHECK_MODULES(MOZ_HARFBUZZ, harfbuzz >= 1.4.3)
+fi
+
+AC_SUBST(MOZ_NATIVE_HARFBUZZ)
+
+dnl ========================================================
+dnl Check for graphite2
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-graphite2,
+[ --with-system-graphite2 Use system graphite2 (located with pkgconfig)],
+MOZ_NATIVE_GRAPHITE2=1,
+MOZ_NATIVE_GRAPHITE2=)
+
+if test -n "$MOZ_NATIVE_GRAPHITE2"; then
+ PKG_CHECK_MODULES(MOZ_GRAPHITE2, graphite2)
+
+ dnl graphite2.pc has bogus version, check manually
+ AC_TRY_COMPILE([ #include <graphite2/Font.h>
+ #define GR2_VERSION_REQUIRE(major,minor,bugfix) \
+ ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
+ * 100 + GR2_VERSION_BUGFIX >= \
+ (major) * 10000 + (minor) * 100 + (bugfix) )
+ ], [
+ #if !GR2_VERSION_REQUIRE(1,3,10)
+ #error "Insufficient graphite2 version."
+ #endif
+ ], [],
+ [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
+fi
+
+AC_SUBST(MOZ_NATIVE_GRAPHITE2)
+
+dnl ========================================================
dnl Check for pixman and cairo
dnl ========================================================
--- dom/base/moz.build.orig 2017-11-14 14:36:13 UTC
+++ dom/base/moz.build
@@ -366,6 +366,9 @@ if CONFIG['INTEL_ARCHITECTURE']:
SOURCES += ['nsTextFragmentSSE2.cpp']
SOURCES['nsTextFragmentSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ SOURCES['nsContentUtils.cpp'].flags += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
EXTRA_COMPONENTS += [
'ConsoleAPI.manifest',
'ConsoleAPIStorage.js',
--- gfx/graphite2/moz-gr-update.sh.orig 2017-11-14 14:36:13 UTC
+++ gfx/graphite2/moz-gr-update.sh
@@ -37,6 +37,9 @@ echo "See" $0 "for update procedure." >> gfx/graphite2
#find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
#find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
+perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \
+ if /GR2_VERSION_REQUIRE/" configure.in
+
# summarize what's been touched
echo Updated to $RELEASE.
echo Here is what changed in the gfx/graphite2 directory:
--- gfx/harfbuzz/README-mozilla.orig 2017-11-14 14:36:13 UTC
+++ gfx/harfbuzz/README-mozilla
@@ -19,3 +19,8 @@ the mozilla tree.
If the collection of source files changes, manual updates to moz.build may be
needed, as we don't use the upstream makefiles.
+
+The in-tree copy may be omitted during build by --with-system-harfbuzz.
+Make sure to keep pkg-config version check within configure.in in sync
+with checkout version or increment latest tag by one if it's not based
+on upstream release.
--- gfx/moz.build.orig 2017-11-14 14:36:13 UTC
+++ gfx/moz.build
@@ -7,6 +7,12 @@
if CONFIG['MOZ_TREE_CAIRO']:
DIRS += ['cairo']
+if not CONFIG['MOZ_NATIVE_GRAPHITE2']:
+ DIRS += ['graphite2/src' ]
+
+if not CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ DIRS += ['harfbuzz/src']
+
DIRS += [
'2d',
'ycbcr',
@@ -15,8 +21,6 @@ DIRS += [
'qcms',
'gl',
'layers',
- 'graphite2/src',
- 'harfbuzz/src',
'ots/src',
'thebes',
'ipc',
--- gfx/skia/generate_mozbuild.py.orig 2017-11-14 14:36:13 UTC
+++ gfx/skia/generate_mozbuild.py
@@ -157,6 +157,9 @@ if CONFIG['CLANG_CXX']:
'-Wno-unused-private-field',
]
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'):
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
--- gfx/skia/moz.build.orig 2017-11-14 14:36:13 UTC
+++ gfx/skia/moz.build
@@ -987,6 +987,9 @@ if CONFIG['CLANG_CXX']:
'-Wno-unused-private-field',
]
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'):
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
--- gfx/thebes/moz.build.orig 2017-11-14 14:36:13 UTC
+++ gfx/thebes/moz.build
@@ -298,7 +298,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'qt'):
CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
-DEFINES['GRAPHITE2_STATIC'] = True
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
+if CONFIG['MOZ_NATIVE_GRAPHITE2']:
+ CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
+else:
+ DEFINES['GRAPHITE2_STATIC'] = True
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
DEFINES['OTS_DLL'] = True
--- intl/unicharutil/util/moz.build.orig 2017-11-14 14:36:13 UTC
+++ intl/unicharutil/util/moz.build
@@ -38,5 +38,8 @@ if CONFIG['_MSC_VER']:
if CONFIG['ENABLE_INTL_API']:
CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
if CONFIG['GNU_CXX']:
FAIL_ON_WARNINGS = True
--- netwerk/dns/moz.build.orig 2017-11-14 14:36:13 UTC
+++ netwerk/dns/moz.build
@@ -68,5 +68,8 @@ LOCAL_INCLUDES += [
'/netwerk/base',
]
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['ANDROID_VERSION'] > '19':
CXXFLAGS += ['-I%s/bionic/libc/dns/include' % CONFIG['ANDROID_SOURCE']]
--- toolkit/library/moz.build.orig 2017-11-14 14:36:13 UTC
+++ toolkit/library/moz.build
@@ -230,6 +230,12 @@ if CONFIG['MOZ_NATIVE_LIBVPX']:
if not CONFIG['MOZ_TREE_PIXMAN']:
OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
+if CONFIG['MOZ_NATIVE_GRAPHITE2']:
+ OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS']
+
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS']
+
if CONFIG['MOZ_ALSA']:
OS_LIBS += CONFIG['MOZ_ALSA_LIBS']

@ -1,17 +0,0 @@
--- extensions/spellcheck/hunspell/glue/mozHunspell.cpp.orig 2017-11-14 14:36:13 UTC
+++ extensions/spellcheck/hunspell/glue/mozHunspell.cpp
@@ -400,6 +400,14 @@ mozHunspell::LoadDictionaryList(bool aNotifyChildProce
}
}
+ // load system hunspell dictionaries
+ nsCOMPtr<nsIFile> hunDir;
+ NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"),
+ true, getter_AddRefs(hunDir));
+ if (hunDir) {
+ LoadDictionariesFromDir(hunDir);
+ }
+
// find dictionaries from extensions requiring restart
nsCOMPtr<nsISimpleEnumerator> dictDirs;
rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST,

@ -1,17 +0,0 @@
--- config/baseconfig.mk.orig 2017-11-14 14:36:13 UTC
+++ config/baseconfig.mk
@@ -2,10 +2,10 @@
# directly in python/mozbuild/mozbuild/base.py for gmake validation.
# We thus use INCLUDED_AUTOCONF_MK to enable/disable some parts depending
# whether a normal build is happening or whether the check is running.
-includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
+includedir := $(includedir)/%%MOZILLA%%
+idldir = $(datadir)/idl/%%MOZILLA%%
+installdir = $(libdir)/%%MOZILLA%%
+sdkdir = $(libdir)/%%MOZILLA%%
ifndef TOP_DIST
TOP_DIST = dist
endif

@ -1,212 +0,0 @@
--- python/psutil/psutil/_psutil_bsd.c.orig 2017-11-14 14:36:13 UTC
+++ python/psutil/psutil/_psutil_bsd.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
+#include <err.h>
#include <signal.h>
#include <fcntl.h>
#include <paths.h>
@@ -957,11 +958,19 @@ psutil_sockaddr_matches(int family, int port, void *pc
psutil_sockaddr_addrlen(family)) == 0);
}
+#if __FreeBSD_version >= 1200026
+static struct xtcpcb *
+psutil_search_tcplist(char *buf, struct kinfo_file *kif)
+{
+ struct xtcpcb *tp;
+ struct xinpcb *inp;
+#else
static struct tcpcb *
psutil_search_tcplist(char *buf, struct kinfo_file *kif)
{
struct tcpcb *tp;
struct inpcb *inp;
+#endif
struct xinpgen *xig, *oxig;
struct xsocket *so;
@@ -969,9 +978,15 @@ psutil_search_tcplist(char *buf, struct kinfo_file *ki
for (xig = (struct xinpgen *)((char *)xig + xig->xig_len);
xig->xig_len > sizeof(struct xinpgen);
xig = (struct xinpgen *)((char *)xig + xig->xig_len)) {
+#if __FreeBSD_version >= 1200026
+ tp = (struct xtcpcb *)xig;
+ inp = &tp->xt_inp;
+ so = &inp->xi_socket;
+#else
tp = &((struct xtcpcb *)xig)->xt_tp;
inp = &((struct xtcpcb *)xig)->xt_inp;
so = &((struct xtcpcb *)xig)->xt_socket;
+#endif
if (so->so_type != kif->kf_sock_type ||
so->xso_family != kif->kf_sock_domain ||
@@ -981,20 +996,36 @@ psutil_search_tcplist(char *buf, struct kinfo_file *ki
if (kif->kf_sock_domain == AF_INET) {
if (!psutil_sockaddr_matches(
AF_INET, inp->inp_lport, &inp->inp_laddr,
+#if __FreeBSD_version < 1200031
&kif->kf_sa_local))
+#else
+ &kif->kf_un.kf_sock.kf_sa_local))
+#endif
continue;
if (!psutil_sockaddr_matches(
AF_INET, inp->inp_fport, &inp->inp_faddr,
+#if __FreeBSD_version < 1200031
&kif->kf_sa_peer))
+#else
+ &kif->kf_un.kf_sock.kf_sa_peer))
+#endif
continue;
} else {
if (!psutil_sockaddr_matches(
AF_INET6, inp->inp_lport, &inp->in6p_laddr,
+#if __FreeBSD_version < 1200031
&kif->kf_sa_local))
+#else
+ &kif->kf_un.kf_sock.kf_sa_local))
+#endif
continue;
if (!psutil_sockaddr_matches(
AF_INET6, inp->inp_fport, &inp->in6p_faddr,
+#if __FreeBSD_version < 1200031
&kif->kf_sa_peer))
+#else
+ &kif->kf_un.kf_sock.kf_sa_peer))
+#endif
continue;
}
@@ -1019,7 +1050,11 @@ psutil_proc_connections(PyObject *self, PyObject *args
struct kinfo_file *freep = NULL;
struct kinfo_file *kif;
char *tcplist = NULL;
+#if __FreeBSD_version >= 1200026
+ struct xtcpcb *tcp;
+#else
struct tcpcb *tcp;
+#endif
PyObject *retList = PyList_New(0);
PyObject *tuple = NULL;
@@ -1094,19 +1129,35 @@ psutil_proc_connections(PyObject *self, PyObject *args
inet_ntop(
kif->kf_sock_domain,
psutil_sockaddr_addr(kif->kf_sock_domain,
+#if __FreeBSD_version < 1200031
&kif->kf_sa_local),
+#else
+ &kif->kf_un.kf_sock.kf_sa_local),
+#endif
lip,
sizeof(lip));
inet_ntop(
kif->kf_sock_domain,
psutil_sockaddr_addr(kif->kf_sock_domain,
+#if __FreeBSD_version < 1200031
&kif->kf_sa_peer),
+#else
+ &kif->kf_un.kf_sock.kf_sa_peer),
+#endif
rip,
sizeof(rip));
lport = htons(psutil_sockaddr_port(kif->kf_sock_domain,
+#if __FreeBSD_version < 1200031
&kif->kf_sa_local));
+#else
+ &kif->kf_un.kf_sock.kf_sa_local));
+#endif
rport = htons(psutil_sockaddr_port(kif->kf_sock_domain,
+#if __FreeBSD_version < 1200031
&kif->kf_sa_peer));
+#else
+ &kif->kf_un.kf_sock.kf_sa_peer));
+#endif
// construct python tuple/list
laddr = Py_BuildValue("(si)", lip, lport);
@@ -1137,10 +1188,14 @@ psutil_proc_connections(PyObject *self, PyObject *args
else if (kif->kf_sock_domain == AF_UNIX) {
struct sockaddr_un *sun;
+#if __FreeBSD_version < 1200031
sun = (struct sockaddr_un *)&kif->kf_sa_local;
+#else
+ sun = (struct sockaddr_un *)&kif->kf_un.kf_sock.kf_sa_local;
+#endif
snprintf(
path, sizeof(path), "%.*s",
- (sun->sun_len - (sizeof(*sun) - sizeof(sun->sun_path))),
+ (int)(sun->sun_len - (sizeof(*sun) - sizeof(sun->sun_path))),
sun->sun_path);
tuple = Py_BuildValue("(iiisOi)",
@@ -1250,7 +1305,7 @@ void remove_spaces(char *str) {
do
while (*p2 == ' ')
p2++;
- while (*p1++ = *p2++);
+ while ((*p1++ = *p2++));
}
@@ -1779,7 +1834,11 @@ int psutil_gather_inet(int proto, PyObject *py_retlist
struct xinpgen *xig, *exig;
struct xinpcb *xip;
struct xtcpcb *xtp;
+#if __FreeBSD_version >= 1200026
+ struct xinpcb *inp;
+#else
struct inpcb *inp;
+#endif
struct xsocket *so;
struct sock *sock;
const char *varname;
@@ -1849,13 +1908,22 @@ int psutil_gather_inet(int proto, PyObject *py_retlist
PyErr_Format(PyExc_RuntimeError, "struct xinpcb size mismatch");
goto error;
}
+#if __FreeBSD_version >= 1200026
+ inp = xip;
+#else
inp = &xip->xi_inp;
+#endif
so = &xip->xi_socket;
break;
}
+#if __FreeBSD_version >= 1200026
+ inp = xip;
+ so = xtp->t_state;
+#else
inp = &xtp->xt_inp;
so = &xtp->xt_socket;
+#endif
char lip[200], rip[200];
int family, lport, rport, pid, status;
@@ -1865,7 +1933,11 @@ int psutil_gather_inet(int proto, PyObject *py_retlist
continue;
lport = ntohs(inp->inp_lport);
rport = ntohs(inp->inp_fport);
+#if __FreeBSD_version >= 1200026
+ status = xtp->t_state;
+#else
status = xtp->xt_tp.t_state;
+#endif
if (inp->inp_vflag & INP_IPV4) {
family = AF_INET;
@@ -1985,7 +2057,7 @@ int psutil_gather_unix(int proto, PyObject *py_retlist
sun = (struct sockaddr_un *)&xup->xu_addr;
snprintf(path, sizeof(path), "%.*s",
- (sun->sun_len - (sizeof(*sun) - sizeof(sun->sun_path))),
+ (int)(sun->sun_len - (sizeof(*sun) - sizeof(sun->sun_path))),
sun->sun_path);
tuple = Py_BuildValue("(iiisOii)", -1, AF_UNIX, proto, path, Py_None,

@ -1,145 +0,0 @@
Bug 1153151 - make libcubeb sndio use non-blocking i/o
Bug 1153179 - fix latency reporting in libcubeb sndio
From cubeb:
From 5ffce9e91b2fde70ba532ea215e3e9e7eed3d41a Mon Sep 17 00:00:00 2001
From: Alexandre Ratchov <alex@caoua.org>
Date: Thu, 2 Apr 2015 13:09:22 +1300
Subject: [PATCH] sndio: improve and clamp float->s16 conversion.
https://marc.info/?l=openbsd-ports&m=152641946326955&w=2
Apply volume in software as do other backends. This is necessary
because sndio volume may be controlled externally and there's no
volume getter in libcubeb to notify the caller about volume
changes.
--- media/libcubeb/src/cubeb_sndio.c.orig 2018-05-24 13:59:58 UTC
+++ media/libcubeb/src/cubeb_sndio.c
@@ -4,6 +4,7 @@
* This program is made available under an ISC-style license. See the
* accompanying file LICENSE for details.
*/
+#include <math.h>
#include <poll.h>
#include <pthread.h>
#include <sndio.h>
@@ -41,17 +42,39 @@ struct cubeb_stream {
uint64_t wrpos; /* number of written frames */
cubeb_data_callback data_cb; /* cb to preapare data */
cubeb_state_callback state_cb; /* cb to notify about state changes */
+ float volume; /* current volume */
void *arg; /* user arg to {data,state}_cb */
};
static void
-float_to_s16(void *ptr, long nsamp)
+s16_setvol(void *ptr, long nsamp, float volume)
{
int16_t *dst = ptr;
+ int32_t mult = volume * 32768;
+ int32_t s;
+ while (nsamp-- > 0) {
+ s = *dst;
+ s = (s * mult) >> 15;
+ *(dst++) = s;
+ }
+}
+
+static void
+float_to_s16(void *ptr, long nsamp, float volume)
+{
+ int16_t *dst = ptr;
float *src = ptr;
+ float mult = volume * 32768;
+ int s;
- while (nsamp-- > 0)
- *(dst++) = *(src++) * 32767;
+ while (nsamp-- > 0) {
+ s = lrintf(*(src++) * mult);
+ if (s < -32768)
+ s = -32768;
+ else if (s > 32767)
+ s = 32767;
+ *(dst++) = s;
+ }
}
static void
@@ -59,7 +82,7 @@ sndio_onmove(void *arg, int delta)
{
cubeb_stream *s = (cubeb_stream *)arg;
- s->rdpos += delta;
+ s->rdpos += delta * s->bpf;
}
static void *
@@ -103,7 +126,9 @@ sndio_mainloop(void *arg)
break;
}
if (s->conv)
- float_to_s16(s->buf, nfr * s->pchan);
+ float_to_s16(s->buf, nfr * s->pchan, s->volume);
+ else
+ s16_setvol(s->buf, nfr * s->pchan, s->volume);
start = 0;
end = nfr * s->bpf;
}
@@ -127,7 +152,7 @@ sndio_mainloop(void *arg)
state = CUBEB_STATE_ERROR;
break;
}
- s->wrpos = 0;
+ s->wrpos += n;
start += n;
}
}
@@ -179,7 +204,7 @@ sndio_stream_init(cubeb *context,
if (s == NULL)
return CUBEB_ERROR;
s->context = context;
- s->hdl = sio_open(NULL, SIO_PLAY, 0);
+ s->hdl = sio_open(NULL, SIO_PLAY, 1);
if (s->hdl == NULL) {
free(s);
DPR("sndio_stream_init(), sio_open() failed\n");
@@ -242,6 +267,7 @@ sndio_stream_init(cubeb *context,
free(s);
return CUBEB_ERROR;
}
+ s->volume = 1.;
*stream = s;
DPR("sndio_stream_init() end, ok\n");
(void)context;
@@ -318,7 +344,7 @@ sndio_stream_get_position(cubeb_stream *s, uint64_t *p
{
pthread_mutex_lock(&s->mtx);
DPR("sndio_stream_get_position() %lld\n", s->rdpos);
- *p = s->rdpos;
+ *p = s->rdpos / s->bpf;
pthread_mutex_unlock(&s->mtx);
return CUBEB_OK;
}
@@ -328,7 +354,11 @@ sndio_stream_set_volume(cubeb_stream *s, float volume)
{
DPR("sndio_stream_set_volume(%f)\n", volume);
pthread_mutex_lock(&s->mtx);
- sio_setvol(s->hdl, SIO_MAXVOL * volume);
+ if (volume < 0.)
+ volume = 0.;
+ else if (volume > 1.0)
+ volume = 1.;
+ s->volume = volume;
pthread_mutex_unlock(&s->mtx);
return CUBEB_OK;
}
@@ -338,7 +368,7 @@ sndio_stream_get_latency(cubeb_stream * stm, uint32_t
{
// http://www.openbsd.org/cgi-bin/man.cgi?query=sio_open
// in the "Measuring the latency and buffers usage" paragraph.
- *latency = stm->wrpos - stm->rdpos;
+ *latency = (stm->wrpos - stm->rdpos) / stm->bpf;
return CUBEB_OK;
}

@ -1,23 +0,0 @@
--- xpcom/io/nsLocalFileUnix.cpp.orig 2017-11-14 14:36:13 UTC
+++ xpcom/io/nsLocalFileUnix.cpp
@@ -13,9 +13,6 @@
#include <sys/types.h>
#include <sys/stat.h>
-#if !defined(XP_MACOSX)
-#include <sys/sysmacros.h> // No longer implicitly included in later glibc
-#endif
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
@@ -31,6 +28,10 @@
#define USE_LINUX_QUOTACTL
#include <sys/mount.h>
#include <sys/quota.h>
+#include <sys/sysmacros.h>
+#ifndef BLOCK_SIZE
+#define BLOCK_SIZE 1024 /* kernel block size */
+#endif
#endif
#include "xpcom-private.h"

@ -1,15 +0,0 @@
Pale Moon offers you a browsing experience in a browser completely built
from its own, independently developed source that has been forked off
from Firefox/Mozilla code a number of years ago, with carefully selected
features and optimizations to improve the browser's stability and user
experience, while offering full customization and a growing collection
of extensions and themes to make the browser truly your own.
Main features:
o Support for many Firefox extensions
o Support for a growing number of Pale Moon exclusive extensions
o Secure: Additional security features and security-aware development
o Extensive and growing support for HTML5 and CSS3
WWW: https://www.palemoon.org/