A layer to put packages we cherrypick out of community layers.
This commit is contained in:
parent
722c88c5d8
commit
43e4a2ff26
@ -10,4 +10,5 @@ BBLAYERS ?= " \
|
||||
##OEROOT##/../meta-intel \
|
||||
##OEROOT##/../meta-citadel \
|
||||
##OEROOT##/../meta-citadel-distro \
|
||||
##OEROOT##/../meta-foreign \
|
||||
"
|
||||
|
17
meta-foreign/COPYING.MIT
Normal file
17
meta-foreign/COPYING.MIT
Normal file
@ -0,0 +1,17 @@
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
41
meta-foreign/README
Normal file
41
meta-foreign/README
Normal file
@ -0,0 +1,41 @@
|
||||
This README file contains information on the contents of the meta-foreign layer.
|
||||
|
||||
Please see the corresponding sections below for details.
|
||||
|
||||
Dependencies
|
||||
============
|
||||
|
||||
URI: <first dependency>
|
||||
branch: <branch name>
|
||||
|
||||
URI: <second dependency>
|
||||
branch: <branch name>
|
||||
|
||||
.
|
||||
.
|
||||
.
|
||||
|
||||
Patches
|
||||
=======
|
||||
|
||||
Please submit any patches against the meta-foreign layer to the xxxx mailing list (xxxx@zzzz.org)
|
||||
and cc: the maintainer:
|
||||
|
||||
Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com>
|
||||
|
||||
Table of Contents
|
||||
=================
|
||||
|
||||
I. Adding the meta-foreign layer to your build
|
||||
II. Misc
|
||||
|
||||
|
||||
I. Adding the meta-foreign layer to your build
|
||||
=================================================
|
||||
|
||||
Run 'bitbake-layers add-layer meta-foreign'
|
||||
|
||||
II. Misc
|
||||
========
|
||||
|
||||
--- replace with specific information about the meta-foreign layer ---
|
7
meta-foreign/SOURCES
Normal file
7
meta-foreign/SOURCES
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
|
||||
https://github.com/openembedded/meta-openembedded/tree/master/meta-oe/recipes-extended/mozjs
|
||||
https://github.com/openembedded/meta-openembedded/tree/master/meta-oe/recipes-extended/polkit
|
||||
|
||||
|
10
meta-foreign/conf/layer.conf
Normal file
10
meta-foreign/conf/layer.conf
Normal file
@ -0,0 +1,10 @@
|
||||
# We have a conf and classes directory, add to BBPATH
|
||||
BBPATH .= ":${LAYERDIR}"
|
||||
|
||||
# We have recipes-* directories, add to BBFILES
|
||||
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \\
|
||||
${LAYERDIR}/recipes-*/*/*.bbappend"
|
||||
|
||||
BBFILE_COLLECTIONS += "meta-foreign"
|
||||
BBFILE_PATTERN_meta-foreign = "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_meta-foreign = "6"
|
@ -0,0 +1,25 @@
|
||||
From 94e9a082d76414f82794b0c9817d0c24e3868275 Mon Sep 17 00:00:00 2001
|
||||
From: Kylie McClain <somasis@exherbo.org>
|
||||
Date: Sat, 21 May 2016 21:24:36 -0400
|
||||
Subject: [PATCH] ndptool: Fix compilation on musl libc
|
||||
|
||||
FD_ZERO, fd_set, etc are defined within sys/select.h on musl.
|
||||
|
||||
Signed-off-by: Kylie McClain <somasis@exherbo.org>
|
||||
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
|
||||
---
|
||||
utils/ndptool.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/utils/ndptool.c b/utils/ndptool.c
|
||||
index 1d96f4c..96479fa 100644
|
||||
--- a/utils/ndptool.c
|
||||
+++ b/utils/ndptool.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <ndp.h>
|
||||
+#include <sys/select.h>
|
||||
|
||||
enum verbosity_level {
|
||||
VERB1,
|
13
meta-foreign/recipes-connectivity/libndp/libndp_1.6.bb
Normal file
13
meta-foreign/recipes-connectivity/libndp/libndp_1.6.bb
Normal file
@ -0,0 +1,13 @@
|
||||
SUMMARY = "Library for IPv6 Neighbor Discovery Protocol"
|
||||
HOMEPAGE = "http://libndp.org/"
|
||||
LICENSE = "LGPLv2.1"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
|
||||
|
||||
SRC_URI = "git://github.com/jpirko/libndp \
|
||||
file://0001-include-sys-select.h-for-fd_-definitions.patch \
|
||||
"
|
||||
# tag for v1.6
|
||||
SRCREV = "2f721c4ff519f38f46695a60d9f9d88f35bf3c1d"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools
|
11
meta-foreign/recipes-example/example/example.bb
Normal file
11
meta-foreign/recipes-example/example/example.bb
Normal file
@ -0,0 +1,11 @@
|
||||
SUMMARY = "bitbake-layers recipe"
|
||||
DESCRIPTION = "Recipe created by bitbake-layers"
|
||||
LICENSE = "MIT"
|
||||
|
||||
python do_build() {
|
||||
bb.plain("***********************************************");
|
||||
bb.plain("* *");
|
||||
bb.plain("* Example recipe created by bitbake-layers *");
|
||||
bb.plain("* *");
|
||||
bb.plain("***********************************************");
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
From f36c9476d2816e0d3e61c9e13c22ed73883cb54a Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 24 Apr 2017 12:13:43 -0700
|
||||
Subject: [PATCH] compare the first character of string to be null or not
|
||||
|
||||
Fixes
|
||||
|
||||
error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
|
||||
| if (value[0] == '\0')
|
||||
| ^~~~
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
js/src/shell/jsoptparse.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/src/shell/jsoptparse.cpp b/js/src/shell/jsoptparse.cpp
|
||||
index b49d0a5..612aa00 100644
|
||||
--- a/js/src/shell/jsoptparse.cpp
|
||||
+++ b/js/src/shell/jsoptparse.cpp
|
||||
@@ -243,7 +243,7 @@ OptionParser::extractValue(size_t argc, char **argv, size_t *i, char **value)
|
||||
char *eq = strchr(argv[*i], '=');
|
||||
if (eq) {
|
||||
*value = eq + 1;
|
||||
- if (value[0] == '\0')
|
||||
+ if (value[0][0] == '\0')
|
||||
return error("A value is required for option %.*s", eq - argv[*i], argv[*i]);
|
||||
return Okay;
|
||||
}
|
||||
--
|
||||
2.12.2
|
||||
|
@ -0,0 +1,35 @@
|
||||
From 0a61b0b98c152f10404ccbdeeac583a486638a7a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
|
||||
Date: Thu, 6 Jun 2013 18:36:01 +0200
|
||||
Subject: [PATCH] js.pc.in: do not include RequiredDefines.h for depending
|
||||
packages
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
in our cross environment the would fail with:
|
||||
|
||||
| cc1: fatal error: /usr/include/js-17.0/js/RequiredDefines.h: No such file or directory
|
||||
|
||||
and currently it only defines __STDC_LIMIT_MACROS
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
|
||||
---
|
||||
js.pc.in | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/js.pc.in b/js.pc.in
|
||||
index 13d761d..a95a7bd 100644
|
||||
--- a/js.pc.in
|
||||
+++ b/js.pc.in
|
||||
@@ -8,4 +8,4 @@ Description: The Mozilla library for JavaScript
|
||||
Version: @MOZILLA_VERSION@
|
||||
Requires.private: @NSPR_PKGCONF_CHECK@
|
||||
Libs: -L${libdir} -l@LIBRARY_NAME@
|
||||
-Cflags: -include ${includedir}/@MODULE@/js/RequiredDefines.h -I${includedir}/@MODULE@
|
||||
+Cflags: -I${includedir}/@MODULE@
|
||||
--
|
||||
1.7.6.5
|
||||
|
@ -0,0 +1,36 @@
|
||||
From da3929a96d9c74e11bf37d128890e18fcb745365 Mon Sep 17 00:00:00 2001
|
||||
From: Lei Maohui <leimaohui@cn.fujitsu.com>
|
||||
Date: Mon, 26 Jan 2015 08:53:19 +0900
|
||||
Subject: [PATCH] mozjs17.0.0: fix the compile bug of powerpc
|
||||
|
||||
To fix the bug as following
|
||||
|
||||
error: cannot convert '__va_list_tag**' to '__va_list_tag (*)[1]' for
|
||||
argument '5' to 'JSBool TryArgumentFormatter(JSContext*, const char**,
|
||||
JSBool, jsval**, __va_list_tag (*)[1])'
|
||||
|
||||
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
|
||||
---
|
||||
jscpucfg.h | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/jscpucfg.h b/jscpucfg.h
|
||||
index dfb1c14..8683491 100644
|
||||
--- a/jscpucfg.h
|
||||
+++ b/jscpucfg.h
|
||||
@@ -47,6 +47,12 @@
|
||||
#elif defined(JS_HAVE_ENDIAN_H)
|
||||
# include <endian.h>
|
||||
|
||||
+#if defined(_POWER) || defined(__powerpc__) || \
|
||||
+ defined(__ppc__)
|
||||
+# define HAVE_VA_LIST_AS_ARRAY 1
|
||||
+# endif
|
||||
+
|
||||
+
|
||||
# if defined(__BYTE_ORDER)
|
||||
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define IS_LITTLE_ENDIAN 1
|
||||
--
|
||||
1.8.4.2
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,75 @@
|
||||
From d4a15ad82292ff6d772dcc631df98754d20be31b Mon Sep 17 00:00:00 2001
|
||||
From: Colin Walters <walters@verbum.org>
|
||||
Date: Tue, 18 Mar 2014 11:46:05 -0400
|
||||
Subject: [PATCH 2/5] Move JS_BYTES_PER_WORD out of config.h
|
||||
|
||||
Instead define it in terms of the already extant GNU C extension
|
||||
__SIZEOF_POINTER__. This avoids multiarch conflicts when 32 and 64
|
||||
bit packages of js are co-installed.
|
||||
---
|
||||
|
||||
Upstream-status: Pending
|
||||
|
||||
js/src/configure.in | 9 ---------
|
||||
js/src/js-config.h.in | 1 -
|
||||
js/src/jstypes.h | 12 ++++++++++++
|
||||
3 files changed, 12 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/js/src/configure.in b/js/src/configure.in
|
||||
index 15605b2..64c7606 100644
|
||||
--- a/js/src/configure.in
|
||||
+++ b/js/src/configure.in
|
||||
@@ -2345,15 +2345,6 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
-MOZ_SIZE_OF_TYPE(JS_BYTES_PER_WORD, void*, 4 8)
|
||||
-if test "$moz_cv_size_of_JS_BYTES_PER_WORD" -eq "4"; then
|
||||
- AC_DEFINE(JS_BITS_PER_WORD_LOG2, 5)
|
||||
-elif test "$moz_cv_size_of_JS_BYTES_PER_WORD" -eq "8"; then
|
||||
- AC_DEFINE(JS_BITS_PER_WORD_LOG2, 6)
|
||||
-else
|
||||
- AC_MSG_ERROR([Unexpected JS_BYTES_PER_WORD])
|
||||
-fi
|
||||
-
|
||||
MOZ_ALIGN_OF_TYPE(JS_ALIGN_OF_POINTER, void*, 2 4 8 16)
|
||||
MOZ_SIZE_OF_TYPE(JS_BYTES_PER_DOUBLE, double, 6 8 10 12 14)
|
||||
|
||||
diff --git a/js/src/js-config.h.in b/js/src/js-config.h.in
|
||||
index 6889e00..4775420 100644
|
||||
--- a/js/src/js-config.h.in
|
||||
+++ b/js/src/js-config.h.in
|
||||
@@ -56,7 +56,6 @@
|
||||
#undef JS_INT32_TYPE
|
||||
#undef JS_INT64_TYPE
|
||||
#undef JS_INTPTR_TYPE
|
||||
-#undef JS_BYTES_PER_WORD
|
||||
|
||||
/* Some mozilla code uses JS-friend APIs that depend on JS_METHODJIT being
|
||||
correct. */
|
||||
diff --git a/js/src/jstypes.h b/js/src/jstypes.h
|
||||
index d0cf183..3e7928f 100644
|
||||
--- a/js/src/jstypes.h
|
||||
+++ b/js/src/jstypes.h
|
||||
@@ -24,6 +24,18 @@
|
||||
#include "mozilla/Util.h"
|
||||
|
||||
#include "js-config.h"
|
||||
+#ifndef JS_BYTES_PER_WORD
|
||||
+#define JS_BYTES_PER_WORD __SIZEOF_POINTER__
|
||||
+#endif
|
||||
+#ifndef JS_BITS_PER_WORD_LOG2
|
||||
+#if JS_BYTES_PER_WORD == 8
|
||||
+#define JS_BITS_PER_WORD_LOG2 6
|
||||
+#elif JS_BYTES_PER_WORD == 4
|
||||
+#define JS_BITS_PER_WORD_LOG2 5
|
||||
+#else
|
||||
+#error Unhandled JS_BYTES_PER_WORD
|
||||
+#endif
|
||||
+#endif
|
||||
|
||||
/***********************************************************************
|
||||
** MACROS: JS_EXTERN_API
|
||||
--
|
||||
1.9.3
|
||||
|
@ -0,0 +1,76 @@
|
||||
From 15e710e331d36eb279852b5cd1ba37a9a6005217 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen.kooi@linaro.org>
|
||||
Date: Mon, 2 Mar 2015 19:08:22 +0800
|
||||
Subject: [PATCH 3/5] Add AArch64 support
|
||||
|
||||
---
|
||||
Upstream-status: Pending
|
||||
|
||||
js/src/assembler/jit/ExecutableAllocator.h | 6 ++++++
|
||||
js/src/assembler/wtf/Platform.h | 4 ++++
|
||||
js/src/configure.in | 4 ++++
|
||||
mfbt/double-conversion/utils.h | 1 +
|
||||
4 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/js/src/assembler/jit/ExecutableAllocator.h b/js/src/assembler/jit/ExecutableAllocator.h
|
||||
index c071c33..90764c3 100644
|
||||
--- a/js/src/assembler/jit/ExecutableAllocator.h
|
||||
+++ b/js/src/assembler/jit/ExecutableAllocator.h
|
||||
@@ -382,6 +382,12 @@ public:
|
||||
{
|
||||
reprotectRegion(start, size, Executable);
|
||||
}
|
||||
+#elif WTF_CPU_AARCH64 && WTF_PLATFORM_LINUX
|
||||
+ static void cacheFlush(void* code, size_t size)
|
||||
+ {
|
||||
+ intptr_t end = reinterpret_cast<intptr_t>(code) + size;
|
||||
+ __builtin___clear_cache(reinterpret_cast<char*>(code), reinterpret_cast<char*>(end));
|
||||
+ }
|
||||
#else
|
||||
static void makeWritable(void*, size_t) {}
|
||||
static void makeExecutable(void*, size_t) {}
|
||||
diff --git a/js/src/assembler/wtf/Platform.h b/js/src/assembler/wtf/Platform.h
|
||||
index 0c84896..e8763a7 100644
|
||||
--- a/js/src/assembler/wtf/Platform.h
|
||||
+++ b/js/src/assembler/wtf/Platform.h
|
||||
@@ -325,6 +325,10 @@
|
||||
#define WTF_THUMB_ARCH_VERSION 0
|
||||
#endif
|
||||
|
||||
+/* CPU(AArch64) - 64-bit ARM */
|
||||
+#if defined(__aarch64__)
|
||||
+#define WTF_CPU_AARCH64 1
|
||||
+#endif
|
||||
|
||||
/* WTF_CPU_ARMV5_OR_LOWER - ARM instruction set v5 or earlier */
|
||||
/* On ARMv5 and below the natural alignment is required.
|
||||
diff --git a/js/src/configure.in b/js/src/configure.in
|
||||
index 64c7606..0673aca 100644
|
||||
--- a/js/src/configure.in
|
||||
+++ b/js/src/configure.in
|
||||
@@ -1121,6 +1121,10 @@ arm*)
|
||||
CPU_ARCH=arm
|
||||
;;
|
||||
|
||||
+aarch64)
|
||||
+ CPU_ARCH=aarch64
|
||||
+ ;;
|
||||
+
|
||||
mips|mipsel)
|
||||
CPU_ARCH="mips"
|
||||
;;
|
||||
diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
|
||||
index 0eec2d9..fe26dab 100644
|
||||
--- a/mfbt/double-conversion/utils.h
|
||||
+++ b/mfbt/double-conversion/utils.h
|
||||
@@ -58,6 +58,7 @@
|
||||
defined(__mips__) || defined(__powerpc__) || \
|
||||
defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
|
||||
defined(__SH4__) || defined(__alpha__) || \
|
||||
+ defined(__aarch64__) || \
|
||||
defined(_MIPS_ARCH_MIPS32R2)
|
||||
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
|
||||
#elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
|
||||
--
|
||||
1.9.3
|
||||
|
@ -0,0 +1,103 @@
|
||||
From 0128c5a9eeee0d3fc0deb9129dd20eb79338c8f4 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen.kooi@linaro.org>
|
||||
Date: Mon, 2 Mar 2015 19:08:59 +0800
|
||||
Subject: [PATCH 4/5] mozbug746112-no-decommit-on-large-pages
|
||||
|
||||
---
|
||||
Upstream-status: Pending
|
||||
|
||||
js/src/gc/Heap.h | 15 ++++++++++-----
|
||||
js/src/jsgc.cpp | 15 ++++++++++++---
|
||||
2 files changed, 22 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/js/src/gc/Heap.h b/js/src/gc/Heap.h
|
||||
index b8f8c78..1cfd269 100644
|
||||
--- a/js/src/gc/Heap.h
|
||||
+++ b/js/src/gc/Heap.h
|
||||
@@ -103,26 +103,31 @@ struct Cell
|
||||
};
|
||||
|
||||
/*
|
||||
- * Page size is 4096 by default, except for SPARC, where it is 8192.
|
||||
+ * Page size must be static to support our arena pointer optimizations, so we
|
||||
+ * are forced to support each platform with non-4096 pages as a special case.
|
||||
+ * Note: The freelist supports a maximum arena shift of 15.
|
||||
* Note: Do not use JS_CPU_SPARC here, this header is used outside JS.
|
||||
* Bug 692267: Move page size definition to gc/Memory.h and include it
|
||||
* directly once jsgc.h is no longer an installed header.
|
||||
*/
|
||||
#if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9))
|
||||
const size_t PageShift = 13;
|
||||
+const size_t ArenaShift = PageShift;
|
||||
+#elif defined(__powerpc__)
|
||||
+const size_t PageShift = 16;
|
||||
+const size_t ArenaShift = 12;
|
||||
#else
|
||||
const size_t PageShift = 12;
|
||||
+const size_t ArenaShift = PageShift;
|
||||
#endif
|
||||
const size_t PageSize = size_t(1) << PageShift;
|
||||
+const size_t ArenaSize = size_t(1) << ArenaShift;
|
||||
+const size_t ArenaMask = ArenaSize - 1;
|
||||
|
||||
const size_t ChunkShift = 20;
|
||||
const size_t ChunkSize = size_t(1) << ChunkShift;
|
||||
const size_t ChunkMask = ChunkSize - 1;
|
||||
|
||||
-const size_t ArenaShift = PageShift;
|
||||
-const size_t ArenaSize = PageSize;
|
||||
-const size_t ArenaMask = ArenaSize - 1;
|
||||
-
|
||||
/*
|
||||
* This is the maximum number of arenas we allow in the FreeCommitted state
|
||||
* before we trigger a GC_SHRINK to release free arenas to the OS.
|
||||
diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp
|
||||
index b3caf05..a258d2d 100644
|
||||
--- a/js/src/jsgc.cpp
|
||||
+++ b/js/src/jsgc.cpp
|
||||
@@ -251,6 +251,13 @@ static const int BackgroundPhaseLength[] = {
|
||||
sizeof(BackgroundPhaseStrings) / sizeof(AllocKind)
|
||||
};
|
||||
|
||||
+/* Unused memory decommiting requires the arena size match the page size. */
|
||||
+static bool
|
||||
+DecommitEnabled()
|
||||
+{
|
||||
+ return PageSize == ArenaSize;
|
||||
+}
|
||||
+
|
||||
#ifdef DEBUG
|
||||
void
|
||||
ArenaHeader::checkSynchronizedWithFreeList() const
|
||||
@@ -742,7 +749,8 @@ Chunk::fetchNextDecommittedArena()
|
||||
decommittedArenas.unset(offset);
|
||||
|
||||
Arena *arena = &arenas[offset];
|
||||
- MarkPagesInUse(arena, ArenaSize);
|
||||
+ if (DecommitEnabled())
|
||||
+ MarkPagesInUse(arena, ArenaSize);
|
||||
arena->aheader.setAsNotAllocated();
|
||||
|
||||
return &arena->aheader;
|
||||
@@ -2731,7 +2739,7 @@ DecommitArenasFromAvailableList(JSRuntime *rt, Chunk **availableListHeadp)
|
||||
chunk->removeFromAvailableList();
|
||||
|
||||
size_t arenaIndex = Chunk::arenaIndex(aheader->arenaAddress());
|
||||
- bool ok;
|
||||
+ bool ok = true;
|
||||
{
|
||||
/*
|
||||
* If the main thread waits for the decommit to finish, skip
|
||||
@@ -2741,7 +2749,8 @@ DecommitArenasFromAvailableList(JSRuntime *rt, Chunk **availableListHeadp)
|
||||
Maybe<AutoUnlockGC> maybeUnlock;
|
||||
if (!rt->isHeapBusy())
|
||||
maybeUnlock.construct(rt);
|
||||
- ok = MarkPagesUnused(aheader->getArena(), ArenaSize);
|
||||
+ if (DecommitEnabled())
|
||||
+ ok = MarkPagesUnused(aheader->getArena(), ArenaSize);
|
||||
}
|
||||
|
||||
if (ok) {
|
||||
--
|
||||
1.9.3
|
||||
|
@ -0,0 +1,44 @@
|
||||
From 9c42920c2b635a399bd1f93833efdeb1696f17ee Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen.kooi@linaro.org>
|
||||
Date: Mon, 2 Mar 2015 19:09:57 +0800
|
||||
Subject: [PATCH 5/5] aarch64-64k-page
|
||||
|
||||
---
|
||||
Upstream-status: Pending
|
||||
|
||||
js/src/gc/Heap.h | 2 +-
|
||||
js/src/gc/Memory.cpp | 3 +++
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/src/gc/Heap.h b/js/src/gc/Heap.h
|
||||
index 1cfd269..f4dbcda 100644
|
||||
--- a/js/src/gc/Heap.h
|
||||
+++ b/js/src/gc/Heap.h
|
||||
@@ -113,7 +113,7 @@ struct Cell
|
||||
#if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9))
|
||||
const size_t PageShift = 13;
|
||||
const size_t ArenaShift = PageShift;
|
||||
-#elif defined(__powerpc__)
|
||||
+#elif defined(__powerpc__) || defined(__aarch64__)
|
||||
const size_t PageShift = 16;
|
||||
const size_t ArenaShift = 12;
|
||||
#else
|
||||
diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp
|
||||
index 5b386a2..e5ad018 100644
|
||||
--- a/js/src/gc/Memory.cpp
|
||||
+++ b/js/src/gc/Memory.cpp
|
||||
@@ -302,8 +302,11 @@ GetPageFaultCount()
|
||||
void
|
||||
InitMemorySubsystem()
|
||||
{
|
||||
+ /* aarch64 may have 64KB or 4KB pages */
|
||||
+#ifndef __aarch64__
|
||||
if (size_t(sysconf(_SC_PAGESIZE)) != PageSize)
|
||||
MOZ_CRASH();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void *
|
||||
--
|
||||
1.9.3
|
||||
|
@ -0,0 +1,46 @@
|
||||
From a452138a1dd274bfad381a701729783360dc86fb Mon Sep 17 00:00:00 2001
|
||||
From: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
|
||||
Date: Tue, 5 Jan 2016 22:04:17 +0100
|
||||
Subject: [PATCH] fix cross compilation on i586 targets
|
||||
|
||||
Remove offending -Wl,-rpath-link that may cause host libraries to be picked
|
||||
during linking. The patch applies a fix to configure.in. So as not to
|
||||
regenerate configure, similar fix is applied there.
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
|
||||
---
|
||||
js/src/configure | 2 +-
|
||||
js/src/configure.in | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/js/src/configure b/js/src/configure
|
||||
index d019b0fdba44233596541de94307010d85a8e32e..5aa40f757a3dbb7d6887175046f44212c15c2eac 100755
|
||||
--- a/js/src/configure
|
||||
+++ b/js/src/configure
|
||||
@@ -5555,7 +5555,7 @@ TARGET_MD_ARCH=unix
|
||||
DIRENT_INO=d_ino
|
||||
MOZ_USER_DIR=".mozilla"
|
||||
|
||||
-MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
|
||||
+MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin'
|
||||
|
||||
MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
|
||||
|
||||
diff --git a/js/src/configure.in b/js/src/configure.in
|
||||
index 0673aca12f6d83035549ade2a4a83906bf91f0f0..39b22724f9535ac1a6dba04658c91e4ef667fc47 100644
|
||||
--- a/js/src/configure.in
|
||||
+++ b/js/src/configure.in
|
||||
@@ -919,7 +919,7 @@ TARGET_MD_ARCH=unix
|
||||
DIRENT_INO=d_ino
|
||||
MOZ_USER_DIR=".mozilla"
|
||||
|
||||
-MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
|
||||
+MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin'
|
||||
|
||||
MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
|
||||
|
||||
--
|
||||
2.5.0
|
||||
|
@ -0,0 +1,115 @@
|
||||
From a0c0f32299419359b44ac0f880c1ea9073ae51e1 Mon Sep 17 00:00:00 2001
|
||||
From: Zheng Xu <zheng.xu@linaro.org>
|
||||
Date: Fri, 2 Sep 2016 17:40:05 +0800
|
||||
Subject: [PATCH] Bug 1143022 - Manually mmap on arm64 to ensure high 17 bits
|
||||
are clear. r=ehoogeveen
|
||||
|
||||
There might be 48-bit VA on arm64 depending on kernel configuration.
|
||||
Manually mmap heap memory to align with the assumption made by JS engine.
|
||||
|
||||
Change-Id: Ic5d2b2fe4b758b3c87cc0688348af7e71a991146
|
||||
|
||||
Upstream-status: Backport
|
||||
|
||||
---
|
||||
js/src/gc/Memory.cpp | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 71 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp
|
||||
index 5b386a2..38101cf 100644
|
||||
--- a/js/src/gc/Memory.cpp
|
||||
+++ b/js/src/gc/Memory.cpp
|
||||
@@ -306,6 +306,75 @@ InitMemorySubsystem()
|
||||
MOZ_CRASH();
|
||||
}
|
||||
|
||||
+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;
|
||||
+#elif defined(__aarch64__)
|
||||
+ /*
|
||||
+ * There might be similar virtual address issue on arm64 which depends on
|
||||
+ * hardware and kernel configurations. But the work around is slightly
|
||||
+ * different due to the different mmap behavior.
|
||||
+ *
|
||||
+ * TODO: Merge with the above code block if this implementation works for
|
||||
+ * ia64 and sparc64.
|
||||
+ */
|
||||
+ const uintptr_t start = UINT64_C(0x0000070000000000);
|
||||
+ const uintptr_t end = UINT64_C(0x0000800000000000);
|
||||
+ const uintptr_t step = ChunkSize;
|
||||
+ /*
|
||||
+ * Optimization options if there are too many retries in practice:
|
||||
+ * 1. Examine /proc/self/maps to find an available address. This file is
|
||||
+ * not always available, however. In addition, even if we examine
|
||||
+ * /proc/self/maps, we may still need to retry several times due to
|
||||
+ * racing with other threads.
|
||||
+ * 2. Use a global/static variable with lock to track the addresses we have
|
||||
+ * allocated or tried.
|
||||
+ */
|
||||
+ uintptr_t hint;
|
||||
+ void* region = MAP_FAILED;
|
||||
+ for (hint = start; region == MAP_FAILED && hint + length <= end; hint += step) {
|
||||
+ region = mmap((void*)hint, length, prot, flags, fd, offset);
|
||||
+ if (region != MAP_FAILED) {
|
||||
+ if ((uintptr_t(region) + (length - 1)) & 0xffff800000000000) {
|
||||
+ if (munmap(region, length)) {
|
||||
+ MOZ_ASSERT(errno == ENOMEM);
|
||||
+ }
|
||||
+ region = MAP_FAILED;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return region == MAP_FAILED ? NULL : region;
|
||||
+#else
|
||||
+ return mmap(NULL, length, prot, flags, fd, offset);
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
void *
|
||||
MapAlignedPages(size_t size, size_t alignment)
|
||||
{
|
||||
@@ -319,12 +388,12 @@ MapAlignedPages(size_t size, size_t alignment)
|
||||
|
||||
/* Special case: If we want page alignment, no further work is needed. */
|
||||
if (alignment == PageSize) {
|
||||
- return mmap(NULL, size, prot, flags, -1, 0);
|
||||
+ return MapMemory(size, prot, flags, -1, 0);
|
||||
}
|
||||
|
||||
/* 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;
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
@ -0,0 +1,18 @@
|
||||
fix the compile error of powerpc64
|
||||
|
||||
Upstream-status: Accepted
|
||||
|
||||
fix the following error
|
||||
|error: 'jsuword' does not name a type
|
||||
|
||||
|
||||
--- a/js/src/jsval.hold 2015-04-24 01:15:06.692970731 -0500
|
||||
+++ b/js/src/jsval.h 2015-04-24 01:15:41.792969478 -0500
|
||||
@@ -304,7 +304,6 @@
|
||||
int32_t i32;
|
||||
uint32_t u32;
|
||||
JSWhyMagic why;
|
||||
- jsuword word;
|
||||
} payload;
|
||||
} s;
|
||||
double asDouble;
|
@ -0,0 +1,20 @@
|
||||
fix the compile error do to perl update
|
||||
|
||||
Upstream-status: Inappropriate
|
||||
|
||||
|
||||
Signed-of-by: Armin Kuster <akuster808@gmail.com>
|
||||
|
||||
Index: src/config/milestone.pl
|
||||
===================================================================
|
||||
--- src.orig/config/milestone.pl
|
||||
+++ src/config/milestone.pl
|
||||
@@ -55,7 +55,7 @@ $MILESTONE_FILE = "$TOPSRCDIR/config/mi
|
||||
#
|
||||
my $milestone = Moz::Milestone::getOfficialMilestone($MILESTONE_FILE);
|
||||
|
||||
-if (defined(@TEMPLATE_FILE)) {
|
||||
+if (@TEMPLATE_FILE) {
|
||||
my $TFILE;
|
||||
|
||||
foreach $TFILE (@TEMPLATE_FILE) {
|
82
meta-foreign/recipes-extended/mozjs/mozjs_17.0.0.bb
Normal file
82
meta-foreign/recipes-extended/mozjs/mozjs_17.0.0.bb
Normal file
@ -0,0 +1,82 @@
|
||||
SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
|
||||
HOMEPAGE = "http://www.mozilla.org/js/"
|
||||
LICENSE = "MPL-2.0"
|
||||
LIC_FILES_CHKSUM = "file://../../LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
|
||||
|
||||
SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/js/${BPN}${PV}.tar.gz \
|
||||
file://0001-mozjs17.0.0-fix-the-compile-bug-of-powerpc.patch \
|
||||
file://0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \
|
||||
file://0002-Move-JS_BYTES_PER_WORD-out-of-config.h.patch;patchdir=../../ \
|
||||
file://0003-Add-AArch64-support.patch;patchdir=../../ \
|
||||
file://0004-mozbug746112-no-decommit-on-large-pages.patch;patchdir=../../ \
|
||||
file://0005-aarch64-64k-page.patch;patchdir=../../ \
|
||||
file://0001-regenerate-configure.patch;patchdir=../../ \
|
||||
file://fix-the-compile-error-of-powerpc64.patch;patchdir=../../ \
|
||||
file://fix_milestone_compile_issue.patch \
|
||||
file://0010-fix-cross-compilation-on-i586-targets.patch;patchdir=../../ \
|
||||
file://Manually_mmap_heap_memory_esr17.patch;patchdir=../../ \
|
||||
file://0001-compare-the-first-character-of-string-to-be-null-or-.patch;patchdir=../../ \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "20b6f8f1140ef6e47daa3b16965c9202"
|
||||
SRC_URI[sha256sum] = "321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba"
|
||||
|
||||
S = "${WORKDIR}/${BPN}${PV}/js/src"
|
||||
|
||||
inherit autotools pkgconfig perlnative pythonnative
|
||||
|
||||
DEPENDS += "nspr zlib"
|
||||
|
||||
# Host specific flags need to be defined, otherwise target flags will be passed to the host
|
||||
export HOST_CFLAGS = "${BUILD_CFLAGS}"
|
||||
export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
|
||||
export HOST_LDFLAGS = "${BUILD_LDFLAGS}"
|
||||
|
||||
# nspr's package-config is ignored so set libs manually
|
||||
EXTRA_OECONF = " \
|
||||
--target=${TARGET_SYS} \
|
||||
--host=${BUILD_SYS} \
|
||||
--build=${BUILD_SYS} \
|
||||
--prefix=${prefix} \
|
||||
--libdir=${libdir} \
|
||||
--with-nspr-libs='-lplds4 -lplc4 -lnspr4' \
|
||||
--enable-threadsafe \
|
||||
--disable-static \
|
||||
"
|
||||
EXTRA_OECONF_append_armv4 = " \
|
||||
--disable-methodjit \
|
||||
"
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
|
||||
PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11"
|
||||
|
||||
# mozjs requires autoreconf 2.13
|
||||
do_configure() {
|
||||
export HOST_CFLAGS="${BUILD_CFLAGS}"
|
||||
export HOST_CXXFLAGS="${BUILD_CPPFLAGS}"
|
||||
export HOST_LDFLAGS="${BUILD_LDFLAGS}"
|
||||
( cd ${S}
|
||||
gnu-configize --force
|
||||
mv config.guess config.sub build/autoconf )
|
||||
${S}/configure ${EXTRA_OECONF}
|
||||
}
|
||||
|
||||
# patch.bbclass will try to apply the patches already present and fail, so clean them out
|
||||
do_unpack() {
|
||||
tar -xvf ${DL_DIR}/mozjs17.0.0.tar.gz -C ${WORKDIR}/
|
||||
rm -rf ${WORKDIR}/${BPN}${PV}/patches
|
||||
}
|
||||
|
||||
|
||||
PACKAGES =+ "lib${BPN}"
|
||||
FILES_lib${BPN} += "${libdir}/lib*.so"
|
||||
FILES_${PN}-dev += "${bindir}/js17-config"
|
||||
|
||||
# Fails to build with thumb-1 (qemuarm)
|
||||
#| {standard input}: Assembler messages:
|
||||
#| {standard input}:2172: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r2,r1,LSR#20'
|
||||
#| {standard input}:2173: Error: unshifted register required -- `bic r2,r2,#(1<<11)'
|
||||
#| {standard input}:2174: Error: unshifted register required -- `orr r1,r1,#(1<<20)'
|
||||
#| {standard input}:2176: Error: instruction not supported in Thumb16 mode -- `subs r2,r2,#0x300'
|
||||
#| {standard input}:2178: Error: instruction not supported in Thumb16 mode -- `subs r5,r2,#52'
|
||||
ARM_INSTRUCTION_SET = "arm"
|
@ -0,0 +1,8 @@
|
||||
/* give group 'network' rights to change settings */
|
||||
/* taken from https://wiki.archlinux.org/index.php/NetworkManager#Set_up_PolicyKit_permissions */
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("network")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
@ -0,0 +1,8 @@
|
||||
/* give group 'datetime' rights to change settings */
|
||||
/* based upon http://lists.freedesktop.org/archives/systemd-devel/2013-March/009576.html */
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id.indexOf("org.freedesktop.timedate1.") == 0 && subject.isInGroup("datetime")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
@ -0,0 +1,12 @@
|
||||
--- polkit-gnome-0.105/configure.ac.org 2015-05-04 22:33:03.925977953 -0700
|
||||
+++ polkit-gnome-0.105/configure.ac 2015-05-04 22:33:16.862288030 -0700
|
||||
@@ -120,6 +120,9 @@
|
||||
# Check for required packages
|
||||
# ***************************
|
||||
|
||||
+# check for gtk-doc
|
||||
+GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
|
||||
+
|
||||
POLKIT_AGENT_REQUIRED=0.97
|
||||
POLKIT_GOBJECT_REQUIRED=0.97
|
||||
GTK_REQUIRED=3.0.0
|
26
meta-foreign/recipes-extended/polkit/polkit-gnome_0.105.bb
Normal file
26
meta-foreign/recipes-extended/polkit/polkit-gnome_0.105.bb
Normal file
@ -0,0 +1,26 @@
|
||||
SUMMARY = "GNOME Authentication Agent for PolicyKit"
|
||||
DESCRIPTION = "PolicyKit-gnome provides an Authentication Agent for PolicyKit that integrates well with the GNOME desktop environment"
|
||||
HOMEPAGE = "http://www.packagekit.org/"
|
||||
BUGTRACKER = "http://bugzilla.gnome.org/"
|
||||
DEPENDS = "polkit dbus-glib gconf gtk+ intltool-native gnome-common"
|
||||
LICENSE = "LGPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=74579fab173e4c5e12aac0cd83ee98ec \
|
||||
file://src/main.c;beginline=1;endline=20;md5=aba145d1802f2329ba561e3e48ecb795"
|
||||
|
||||
SRC_URI = "https://download.gnome.org/sources/polkit-gnome/${PV}/polkit-gnome-${PV}.tar.xz \
|
||||
file://gtk-doc-check.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "50ecad37c8342fb4a52f590db7530621"
|
||||
SRC_URI[sha256sum] = "1784494963b8bf9a00eedc6cd3a2868fb123b8a5e516e66c5eda48df17ab9369"
|
||||
|
||||
EXTRA_OECONF = "\
|
||||
--disable-static \
|
||||
"
|
||||
|
||||
DEPENDS += "gtk+3"
|
||||
|
||||
inherit autotools gtk-doc pkgconfig
|
||||
|
||||
FILES_${PN} += " ${datadir}/dbus-1 \
|
||||
${datadir}/PolicyKit \
|
||||
"
|
@ -0,0 +1,14 @@
|
||||
DESCRIPTION = "Create usergroup datetime. All members off this group are allowed set date/time/timezone via system dbus"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
require polkit-group-rule.inc
|
||||
|
||||
SRC_URI = "file://50-org.freedesktop.timedate1.rules"
|
||||
|
||||
do_install() {
|
||||
install -m 0755 ${WORKDIR}/50-org.freedesktop.timedate1.rules ${D}${sysconfdir}/polkit-1/rules.d
|
||||
}
|
||||
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
GROUPADD_PARAM_${PN} = "--system datetime"
|
@ -0,0 +1,14 @@
|
||||
DESCRIPTION = "Create usergroup network. All members off this group are allowed to modify networkmanager settings"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
require polkit-group-rule.inc
|
||||
|
||||
SRC_URI = "file://50-org.freedesktop.NetworkManager.rules"
|
||||
|
||||
do_install() {
|
||||
install -m 0755 ${WORKDIR}/50-org.freedesktop.NetworkManager.rules ${D}${sysconfdir}/polkit-1/rules.d
|
||||
}
|
||||
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
GROUPADD_PARAM_${PN} = "--system network"
|
10
meta-foreign/recipes-extended/polkit/polkit-group-rule.inc
Normal file
10
meta-foreign/recipes-extended/polkit/polkit-group-rule.inc
Normal file
@ -0,0 +1,10 @@
|
||||
# polkit must prepare polkitd group
|
||||
DEPENDS += "polkit"
|
||||
|
||||
inherit useradd
|
||||
|
||||
do_install_prepend() {
|
||||
install -m 700 -d ${D}${sysconfdir}/polkit-1/rules.d
|
||||
chown polkitd:polkitd ${D}${sysconfdir}/polkit-1/rules.d
|
||||
}
|
||||
USERADD_PARAM_${PN}_prepend = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;"
|
@ -0,0 +1,107 @@
|
||||
From 7d5e205aa58a10e7b1ccc2fa75b443508a5c3e18 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 20 Jan 2016 04:31:59 +0000
|
||||
Subject: [PATCH] make netgroup support configurable
|
||||
|
||||
Disable using innetgr and *netigrent function if not available
|
||||
|
||||
These functions are not available on all libc implementations e.g. musl
|
||||
doesnt have them.
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
configure.ac | 2 +-
|
||||
src/polkitbackend/polkitbackendinteractiveauthority.c | 6 +++++-
|
||||
src/polkitbackend/polkitbackendjsauthority.c | 5 ++---
|
||||
3 files changed, 8 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 07982d1..21590b2 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -158,7 +158,7 @@ AC_CHECK_LIB(expat,XML_ParserCreate,[EXPAT_LIBS="-lexpat"],
|
||||
[AC_MSG_ERROR([Can't find expat library. Please install expat.])])
|
||||
AC_SUBST(EXPAT_LIBS)
|
||||
|
||||
-AC_CHECK_FUNCS(clearenv fdatasync)
|
||||
+AC_CHECK_FUNCS(clearenv fdatasync getnetgrent innetgr)
|
||||
|
||||
if test "x$GCC" = "xyes"; then
|
||||
LDFLAGS="-Wl,--as-needed $LDFLAGS"
|
||||
diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c
|
||||
index 7019356..cf39d77 100644
|
||||
--- a/src/polkitbackend/polkitbackendinteractiveauthority.c
|
||||
+++ b/src/polkitbackend/polkitbackendinteractiveauthority.c
|
||||
@@ -2213,7 +2213,7 @@ get_users_in_group (PolkitIdentity *group,
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
-
|
||||
+#if defined HAVE_GETNETGRENT
|
||||
static GList *
|
||||
get_users_in_net_group (PolkitIdentity *group,
|
||||
gboolean include_root)
|
||||
@@ -2270,6 +2270,8 @@ get_users_in_net_group (PolkitIdentity *group,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+#endif
|
||||
+
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
static void
|
||||
@@ -2355,10 +2357,12 @@ authentication_agent_initiate_challenge (AuthenticationAgent *agent,
|
||||
{
|
||||
user_identities = g_list_concat (user_identities, get_users_in_group (identity, FALSE));
|
||||
}
|
||||
+#if defined HAVE_GETNETGRENT
|
||||
else if (POLKIT_IS_UNIX_NETGROUP (identity))
|
||||
{
|
||||
user_identities = g_list_concat (user_identities, get_users_in_net_group (identity, FALSE));
|
||||
}
|
||||
+#endif
|
||||
else
|
||||
{
|
||||
g_warning ("Unsupported identity");
|
||||
diff --git a/src/polkitbackend/polkitbackendjsauthority.c b/src/polkitbackend/polkitbackendjsauthority.c
|
||||
index 097dcc5..e59b3f7 100644
|
||||
--- a/src/polkitbackend/polkitbackendjsauthority.c
|
||||
+++ b/src/polkitbackend/polkitbackendjsauthority.c
|
||||
@@ -1498,7 +1498,6 @@ js_polkit_spawn (JSContext *cx,
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
-
|
||||
static JSBool
|
||||
js_polkit_user_is_in_netgroup (JSContext *cx,
|
||||
unsigned argc,
|
||||
@@ -1518,6 +1517,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx,
|
||||
user = JS_EncodeString (cx, user_str);
|
||||
netgroup = JS_EncodeString (cx, netgroup_str);
|
||||
|
||||
+#if defined HAVE_INNETGR
|
||||
if (innetgr (netgroup,
|
||||
NULL, /* host */
|
||||
user,
|
||||
@@ -1525,6 +1525,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx,
|
||||
{
|
||||
is_in_netgroup = JS_TRUE;
|
||||
}
|
||||
+#endif
|
||||
|
||||
JS_free (cx, netgroup);
|
||||
JS_free (cx, user);
|
||||
@@ -1536,8 +1537,6 @@ js_polkit_user_is_in_netgroup (JSContext *cx,
|
||||
return ret;
|
||||
}
|
||||
|
||||
-
|
||||
-
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
typedef struct
|
||||
--
|
||||
2.7.0
|
||||
|
@ -0,0 +1,23 @@
|
||||
polkit: No system-auth in OE-Core, we can use common-* in place of it.
|
||||
|
||||
Upstream-Status:Inappropriate [configuration]
|
||||
|
||||
Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
|
||||
|
||||
--- a/configure.ac 2011-03-04 02:26:20.000000000 +0800
|
||||
+++ b/configure.ac.new 2011-07-18 10:14:12.516818852 +0800
|
||||
@@ -350,10 +350,10 @@
|
||||
PAM_FILE_INCLUDE_PASSWORD=system
|
||||
PAM_FILE_INCLUDE_SESSION=system
|
||||
else
|
||||
- PAM_FILE_INCLUDE_AUTH=system-auth
|
||||
- PAM_FILE_INCLUDE_ACCOUNT=system-auth
|
||||
- PAM_FILE_INCLUDE_PASSWORD=system-auth
|
||||
- PAM_FILE_INCLUDE_SESSION=system-auth
|
||||
+ PAM_FILE_INCLUDE_AUTH=common-auth
|
||||
+ PAM_FILE_INCLUDE_ACCOUNT=common-account
|
||||
+ PAM_FILE_INCLUDE_PASSWORD=common-password
|
||||
+ PAM_FILE_INCLUDE_SESSION=common-session
|
||||
fi
|
||||
|
||||
AC_SUBST(PAM_FILE_INCLUDE_AUTH)
|
51
meta-foreign/recipes-extended/polkit/polkit_0.113.bb
Normal file
51
meta-foreign/recipes-extended/polkit/polkit_0.113.bb
Normal file
@ -0,0 +1,51 @@
|
||||
SUMMARY = "PolicyKit Authorization Framework"
|
||||
DESCRIPTION = "The polkit package is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes."
|
||||
HOMEPAGE = "http://www.freedesktop.org/wiki/Software/polkit"
|
||||
LICENSE = "LGPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \
|
||||
file://src/polkit/polkit.h;beginline=1;endline=20;md5=0a8630b0133176d0504c87a0ded39db4"
|
||||
|
||||
DEPENDS = "expat glib-2.0 intltool-native mozjs"
|
||||
|
||||
inherit autotools gtk-doc pkgconfig useradd systemd gobject-introspection
|
||||
|
||||
PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', \
|
||||
bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \
|
||||
"
|
||||
|
||||
PACKAGECONFIG[pam] = "--with-authfw=pam,--with-authfw=shadow,libpam,libpam"
|
||||
PACKAGECONFIG[systemd] = "--enable-libsystemd-login=yes --with-systemdsystemunitdir=${systemd_unitdir}/system/,--enable-libsystemd-login=no --with-systemdsystemunitdir=,systemd"
|
||||
# there is no --enable/--disable option for consolekit and it's not picked by shlibs, so add it to RDEPENDS
|
||||
PACKAGECONFIG[consolekit] = ",,,consolekit"
|
||||
|
||||
PAM_SRC_URI = "file://polkit-1_pam.patch"
|
||||
SRC_URI = "http://www.freedesktop.org/software/polkit/releases/polkit-${PV}.tar.gz \
|
||||
file://0001-make-netgroup-support-configurable.patch \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
|
||||
"
|
||||
SRC_URI[md5sum] = "4b77776c9e4f897dcfe03b2c34198edf"
|
||||
SRC_URI[sha256sum] = "e1c095093c654951f78f8618d427faf91cf62abdefed98de40ff65eca6413c81"
|
||||
|
||||
EXTRA_OECONF = "--with-os-type=moblin --disable-man-pages"
|
||||
|
||||
do_compile_prepend () {
|
||||
export GIR_EXTRA_LIBS_PATH="${B}/src/polkit/.libs"
|
||||
}
|
||||
|
||||
PACKAGES =+ "${PN}-examples"
|
||||
|
||||
FILES_${PN}_append = " \
|
||||
${libdir}/${BPN}-1 \
|
||||
${nonarch_libdir}/${BPN}-1 \
|
||||
${datadir}/dbus-1 \
|
||||
${datadir}/${BPN}-1 \
|
||||
"
|
||||
|
||||
FILES_${PN}-examples = "${bindir}/*example*"
|
||||
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
USERADD_PARAM_${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 polkitd"
|
||||
|
||||
SYSTEMD_SERVICE_${PN} = "${BPN}.service"
|
||||
SYSTEMD_AUTO_ENABLE = "disable"
|
Loading…
Reference in New Issue
Block a user