Merge pull request #1769 from marineam/polkit

polkit: remove old polkit and spidermonkey
This commit is contained in:
Michael Marineau 2016-02-10 15:15:52 -08:00
commit 57bb543041
8 changed files with 0 additions and 404 deletions

View File

@ -1,2 +1 @@
DIST js185-1.0.0.tar.gz 6164605 SHA256 5d12f7e1f5b4a99436685d97b9b7b75f094d33580227aa998c406bbae6f2a687 SHA512 2af7122a7c7007fd7b6668776fe1222515a810b3e43bbf0f76b8f94e1ef406ffd3fb5ccec393021b00274c05b38a77235bc8d6886994c56762fcaf0aa7cf6718 WHIRLPOOL 58b372713275874d3ae3c6b58c12c56bf8d17d024d591e321538bcdd8e615332e41655954368ce86b90e970209e3fd650c39d931000880f5ec22cb044b5d7a4e
DIST mozjs17.0.0.tar.gz 6778934 SHA256 321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba SHA512 39b68aeb9f712f146778d8b68ee795709a1372c8ab893a222af4eb34882427d6f5cf877e743d6cb2f1b4348c194d8f3774f00cb775b03515b34b49560b748be4 WHIRLPOOL 4df7b51577787194065162b09d2c3dda849c13fa901305f9925d4ca5d38bb7f8e2daa943099e003fb9d11f9264ae2d77ccf04e5eea11e3ddcb624b504b99d52f

View File

@ -1,67 +0,0 @@
--- a/js/src/gc/Memory.cpp 2013-02-11 17:33:22.000000000 -0500
+++ b/js/src/gc/Memory.cpp 2014-01-08 12:36:29.406851422 -0500
@@ -302,10 +302,46 @@
void
InitMemorySubsystem()
{
+#if !defined(__ia64__)
if (size_t(sysconf(_SC_PAGESIZE)) != PageSize)
MOZ_CRASH();
+#endif
}
+static inline void *
+MapMemory(size_t length, int prot, int flags, int fd, off_t offset)
+{
+#if defined(__ia64__)
+ /*
+ * The JS engine assumes that all allocated pointers have their high 17 bits clear,
+ * which ia64's mmap doesn't support directly. However, we can emulate it by passing
+ * mmap an "addr" parameter with those bits clear. The mmap will return that address,
+ * or the nearest available memory above that address, providing a near-guarantee
+ * that those bits are clear. If they are not, we return NULL below to indicate
+ * out-of-memory.
+ *
+ * The addr is chosen as 0x0000070000000000, which still allows about 120TB of virtual
+ * address space.
+ *
+ * See Bug 589735 for more information.
+ */
+ void *region = mmap((void*)0x0000070000000000, length, prot, flags, fd, offset);
+ if (region == MAP_FAILED)
+ return MAP_FAILED;
+ /*
+ * If the allocated memory doesn't have its upper 17 bits clear, consider it
+ * as out of memory.
+ */
+ if ((uintptr_t(region) + (length - 1)) & 0xffff800000000000) {
+ JS_ALWAYS_TRUE(0 == munmap(region, length));
+ return MAP_FAILED;
+ }
+ return region;
+#else
+ return mmap(NULL, length, prot, flags, fd, offset);
+#endif
+}
+
void *
MapAlignedPages(size_t size, size_t alignment)
{
@@ -319,12 +353,15 @@
/* Special case: If we want page alignment, no further work is needed. */
if (alignment == PageSize) {
- return mmap(NULL, size, prot, flags, -1, 0);
+ void *region = MapMemory(size, prot, flags, -1, 0);
+ if (region == MAP_FAILED)
+ return NULL;
+ return region;
}
/* Overallocate and unmap the region's edges. */
size_t reqSize = Min(size + 2 * alignment, 2 * size);
- void *region = mmap(NULL, reqSize, prot, flags, -1, 0);
+ void *region = MapMemory(reqSize, prot, flags, -1, 0);
if (region == MAP_FAILED)
return NULL;

View File

@ -1,22 +0,0 @@
--- a/js/src/js-config.in 2013-03-25 16:34:20.000000000 -0400
+++ b/js/src/js-config.in 2013-08-09 22:15:29.000901763 -0400
@@ -2,7 +2,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#filter substitution
+%filter substitution
prefix='@prefix@'
mozilla_version='@MOZILLA_VERSION@'
--- a/js/src/Makefile.in 2013-03-25 16:34:20.000000000 -0400
+++ b/js/src/Makefile.in 2013-08-09 22:17:20.211903793 -0400
@@ -778,7 +778,7 @@
$(JS_CONFIG_NAME): js-config.in Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk $(topsrcdir)/config/rules.mk
$(RM) $@.tmp
- $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(JS_CONFIG_SUBSTITUTIONS) $< > $@.tmp \
+ $(PYTHON) $(topsrcdir)/config/Preprocessor.py --marker="%" $(JS_CONFIG_SUBSTITUTIONS) $< > $@.tmp \
&& mv $@.tmp $@ && chmod +x $@
SCRIPTS = $(JS_CONFIG_NAME)

View File

@ -1,37 +0,0 @@
diff -urN a/js/src/Makefile.in b/js/src/Makefile.in
--- a/js/src/Makefile.in 2013-03-25 15:34:20.000000000 -0500
+++ b/js/src/Makefile.in 2014-03-08 08:26:36.726979744 -0600
@@ -788,7 +788,7 @@
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(JS_CONFIG_SUBSTITUTIONS) $< > $@
install:: $(LIBRARY_NAME).pc
- $(SYSINSTALL) $^ $(DESTDIR)$(libdir)/pkgconfig
+ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(libdir)/pkgconfig
######################################################
# BEGIN SpiderMonkey header installation
@@ -836,19 +836,19 @@
#
install:: $(INSTALLED_HEADERS)
- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)
+ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(MODULE)
install:: $(EXPORTS_ds)
- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/ds
+ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(MODULE)/ds
install:: $(EXPORTS_gc)
- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/gc
+ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(MODULE)/gc
install:: $(EXPORTS_js)
- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/js
+ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(MODULE)/js
install:: $(EXPORTS_mozilla)
- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/mozilla
+ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(MODULE)/mozilla
#
# END SpiderMonkey header installation

View File

@ -1,26 +0,0 @@
From d37efd69428da06eb4834c27dc43ffdab086f20c Mon Sep 17 00:00:00 2001
From: Geoff Levand <geoff@infradead.org>
Date: Fri, 1 May 2015 10:04:14 -0700
Subject: [PATCH] mfbt: Add aarch64 to double-conversion
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
mfbt/double-conversion/utils.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
index 0eec2d9..a68a032 100644
--- a/mfbt/double-conversion/utils.h
+++ b/mfbt/double-conversion/utils.h
@@ -58,7 +58,7 @@
defined(__mips__) || defined(__powerpc__) || \
defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
defined(__SH4__) || defined(__alpha__) || \
- defined(_MIPS_ARCH_MIPS32R2)
+ defined(_MIPS_ARCH_MIPS32R2) || defined(__aarch64__)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
#elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
#if defined(_WIN32)
--
2.1.0

View File

@ -1,119 +0,0 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/spidermonkey/spidermonkey-17.0.0-r3.ebuild,v 1.7 2014/04/19 17:43:30 ago Exp $
EAPI="5"
WANT_AUTOCONF="2.1"
PYTHON_COMPAT=( python2_{6,7} )
PYTHON_REQ_USE="threads"
inherit eutils toolchain-funcs multilib python-any-r1 versionator pax-utils
MY_PN="mozjs"
MY_P="${MY_PN}${PV}"
DESCRIPTION="Stand-alone JavaScript C library"
HOMEPAGE="http://www.mozilla.org/js/spidermonkey/"
SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/js/${MY_PN}${PV}.tar.gz"
LICENSE="NPL-1.1"
SLOT="17"
# "MIPS, MacroAssembler is not supported" wrt #491294 for -mips
KEYWORDS="alpha amd64 arm arm64 -hppa ia64 -mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
IUSE="debug jit minimal static-libs test"
REQUIRED_USE="debug? ( jit )"
RESTRICT="ia64? ( test )"
S="${WORKDIR}/${MY_P}"
BUILDDIR="${S}/js/src"
RDEPEND=">=dev-libs/nspr-4.9.4
virtual/libffi
>=sys-libs/zlib-1.1.4"
DEPEND="${RDEPEND}
${PYTHON_DEPS}
app-arch/zip
virtual/pkgconfig"
pkg_setup(){
if [[ ${MERGE_TYPE} != "binary" ]]; then
python-any-r1_pkg_setup
export LC_ALL="C"
fi
}
src_prepare() {
epatch "${FILESDIR}"/${PN}-${SLOT}-js-config-shebang.patch
epatch "${FILESDIR}"/${PN}-${SLOT}-ia64-mmap.patch
epatch "${FILESDIR}"/${PN}-17.0.0-fix-file-permissions.patch
epatch "${FILESDIR}"/${PN}-mfbt-Add-aarch64-to-double-conversion.patch
# Remove obsolete jsuword bug #506160
sed -i -e '/jsuword/d' "${BUILDDIR}"/jsval.h ||die "sed failed"
epatch_user
if [[ ${CHOST} == *-freebsd* ]]; then
# Don't try to be smart, this does not work in cross-compile anyway
ln -sfn "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" || die
fi
}
src_configure() {
local nspr_cflags nspr_libs
cd "${BUILDDIR}" || die
# Mozilla screws up the meaning of BUILD, HOST, and TARGET :(
tc-export_build_env CC CXX LD AR RANLIB PKG_CONFIG \
BUILD_CC BUILD_CXX BUILD_LD BUILD_AR BUILD_RANLIB
export HOST_CC="${BUILD_CC}" HOST_CFLAGS="${BUILD_CFLAGS}" \
HOST_CXX="${BUILD_CXX}" HOST_CXXFLAGS="${BUILD_CXXFLAGS}" \
HOST_LD="${BUILD_LD}" HOST_LDFLAGS="${BUILD_LDFLAGS}" \
HOST_AR="${BUILD_AR}" HOST_RANLIB="${BUILD_RANLIB}"
# Use pkg-config instead of nspr-config to use $SYSROOT
nspr_cflags="$(${PKG_CONFIG} --cflags nspr)" || die
nspr_libs="$(${PKG_CONFIG} --libs nspr)" || die
econf \
${myopts} \
--host="${CBUILD}" \
--target="${CHOST}" \
--enable-jemalloc \
--enable-readline \
--enable-threadsafe \
--enable-system-ffi \
--with-nspr-cflags="${nspr_cflags}" \
--with-nspr-libs="${nspr_libs}" \
$(use_enable debug) \
$(use_enable jit tracejit) \
$(use_enable jit methodjit) \
$(use_enable static-libs static) \
$(use_enable test tests)
}
src_compile() {
cd "${BUILDDIR}" || die
emake
}
src_test() {
cd "${BUILDDIR}/jsapi-tests" || die
emake check
}
src_install() {
cd "${BUILDDIR}" || die
emake DESTDIR="${D}" install
if ! use minimal; then
if use jit; then
pax-mark m "${ED}/usr/bin/js${SLOT}"
fi
else
rm -f "${ED}/usr/bin/js${SLOT}"
fi
if ! use static-libs; then
# We can't actually disable building of static libraries
# They're used by the tests and in a few other places
find "${D}" -iname '*.a' -delete || die
fi
}

View File

@ -1,2 +1 @@
DIST polkit-0.112.tar.gz 1429240 SHA256 d695f43cba4748a822fbe864dd32c4887c5da1c71694a47693ace5e88fcf6af6 SHA512 e4ad1bd287b38e5650cb94b1897a959b2ceaa6c19b4478ba872eacb13b58758fd42f6ab1718976162d823d850cd5c99b3ccadf1b57d75dea7790101422029d5f WHIRLPOOL af5dd0a17b7356302b0319e80565d6ac916128dfc85b6e2711147f3de86651f11fe8d08f3d6067d7abd24e263be92403f9d8f46935ba93db571e386a603a038a
DIST polkit-0.113.tar.gz 1448865 SHA256 e1c095093c654951f78f8618d427faf91cf62abdefed98de40ff65eca6413c81 SHA512 ab177c89a20eeb2978ddbe28afb205d3619f9c5defe833eb68a85e71a0f2c905367f1295cbbfb85da5eafdd661bce474d5d84aca9195cd425a18c9b4170eb5f9 WHIRLPOOL 106db7e6085a4ce49da44929138671eff2fd6007c80533518abe2d91ede9242b1e3cd0a1801190eeac5d4d5c1e978a30a18e47a6b604497b38853fa60c935a81

View File

@ -1,131 +0,0 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-auth/polkit/polkit-0.112-r2.ebuild,v 1.2 2014/04/06 15:39:36 pacho Exp $
EAPI=5
inherit eutils multilib pam pax-utils systemd toolchain-funcs user
DESCRIPTION="Policy framework for controlling privileges for system-wide services"
HOMEPAGE="http://www.freedesktop.org/wiki/Software/polkit"
SRC_URI="http://www.freedesktop.org/software/${PN}/releases/${P}.tar.gz"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
IUSE="examples gtk +introspection jit kde nls pam selinux systemd"
RDEPEND="ia64? ( =dev-lang/spidermonkey-1.8.5*[-debug] )
mips? ( =dev-lang/spidermonkey-1.8.5*[-debug] )
!ia64? ( !mips? ( dev-lang/spidermonkey:17[-debug,jit=] ) )
>=dev-libs/glib-2.32
>=dev-libs/expat-2:=
introspection? ( >=dev-libs/gobject-introspection-1 )
pam? (
sys-auth/pambase
virtual/pam
)
selinux? ( sec-policy/selinux-policykit )
systemd? ( sys-apps/systemd:0= )"
DEPEND="${RDEPEND}
app-text/docbook-xml-dtd:4.1.2
app-text/docbook-xsl-stylesheets
dev-libs/libxslt
dev-util/intltool
virtual/pkgconfig"
PDEPEND="
gtk? ( || (
>=gnome-extra/polkit-gnome-0.105
lxde-base/lxpolkit
) )
kde? ( sys-auth/polkit-kde-agent )
!systemd? ( sys-auth/consolekit[policykit] )"
QA_MULTILIB_PATHS="
usr/lib/polkit-1/polkit-agent-helper-1
usr/lib/polkit-1/polkitd"
pkg_setup() {
local u=polkitd
local g=polkitd
local h=/var/lib/polkit-1
enewgroup ${g}
enewuser ${u} -1 -1 ${h} ${g}
esethome ${u} ${h}
}
src_prepare() {
sed -i -e 's|unix-group:wheel|unix-user:0|' src/polkitbackend/*-default.rules || die #401513
}
src_configure() {
local mozjs
if use ia64 || use mips; then
mozjs=mozjs185
else
mozjs=mozjs-17.0
fi
# pkg-config doesn't properly apply SYSROOT to -include
local sysroot="${PKG_CONFIG_SYSROOT_DIR:-${SYSROOT:-/}}"
if [[ "${sysroot}" != / ]]; then
local pkgconf=$(tc-getPKG_CONFIG)
LIBJS_CFLAGS=$($pkgconf --cflags "${mozjs}") || die
LIBJS_LIBS=$($pkgconf --libs "${mozjs}") || die
LIBJS_CFLAGS=$(echo "${LIBJS_CFLAGS}" | \
sed -e "s%-include /usr/%-include ${sysroot}/usr/%") || die
export LIBJS_CFLAGS LIBJS_LIBS
fi
econf \
--localstatedir="${EPREFIX}"/var \
--disable-static \
--enable-man-pages \
--disable-gtk-doc \
$(use_enable systemd libsystemd-login) \
$(use_enable introspection) \
--disable-examples \
$(use_enable nls) \
--with-mozjs="${mozjs}" \
"$(systemd_with_unitdir)" \
--with-authfw=$(usex pam pam shadow) \
$(use pam && echo --with-pam-module-dir="$(getpam_mod_dir)") \
--with-os-type=gentoo
}
src_compile() {
default
# Required for polkitd on hardened/PaX due to spidermonkey's JIT
local f='src/polkitbackend/.libs/polkitd test/polkitbackend/.libs/polkitbackendjsauthoritytest'
local m=''
# Only used when USE="jit" is enabled for 'dev-lang/spidermonkey:17' wrt #485910
has_version 'dev-lang/spidermonkey:17[jit]' && m='m'
# ia64 and mips uses spidermonkey-1.8.5 which requires different pax-mark flags
use ia64 && m='mr'
use mips && m='mr'
pax-mark ${m} ${f}
}
src_install() {
emake DESTDIR="${D}" install
dodoc docs/TODO HACKING NEWS README
# relocate default configs from /etc to /usr
dodir /usr/share/dbus-1/system.d
mv "${D}"/{etc,usr/share}/dbus-1/system.d/org.freedesktop.PolicyKit1.conf || die
mv "${D}"/{etc,usr/share}/polkit-1/rules.d/50-default.rules || die
rmdir "${D}"/etc/dbus-1/system.d "${D}"/etc/dbus-1 || die
systemd_dotmpfilesd "${FILESDIR}/polkit.conf"
diropts -m0700 -o polkitd -g polkitd
dodir /var/lib/polkit-1
if use examples; then
insinto /usr/share/doc/${PF}/examples
doins src/examples/{*.c,*.policy*}
fi
prune_libtool_files
}