From 1a4b7ee28bf7413af6513fb45ad0d0736048f866 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Sun, 16 Dec 2018 17:11:34 -0800 Subject: reset upstream subtrees to yocto 2.6 Reset the following subtrees on thud HEAD: poky: 87e3a9739d meta-openembedded: 6094ae18c8 meta-security: 31dc4e7532 meta-raspberrypi: a48743dc36 meta-xilinx: c42016e2e6 Also re-apply backports that didn't make it into thud: poky: 17726d0 systemd-systemctl-native: handle Install wildcards meta-openembedded: 4321a5d libtinyxml2: update to 7.0.1 042f0a3 libcereal: Add native and nativesdk classes e23284f libcereal: Allow empty package 030e8d4 rsyslog: curl-less build with fmhttp PACKAGECONFIG 179a1b9 gtest: update to 1.8.1 Squashed OpenBMC subtree compatibility updates: meta-aspeed: Brad Bishop (1): aspeed: add yocto 2.6 compatibility meta-ibm: Brad Bishop (1): ibm: prepare for yocto 2.6 meta-ingrasys: Brad Bishop (1): ingrasys: set layer compatibility to yocto 2.6 meta-openpower: Brad Bishop (1): openpower: set layer compatibility to yocto 2.6 meta-phosphor: Brad Bishop (3): phosphor: set layer compatibility to thud phosphor: libgpg-error: drop patches phosphor: react to fitimage artifact rename Ed Tanous (4): Dropbear: upgrade options for latest upgrade yocto2.6: update openssl options busybox: remove upstream watchdog patch systemd: Rebase CONFIG_CGROUP_BPF patch Change-Id: I7b1fe71cca880d0372a82d94b5fd785323e3a9e7 Signed-off-by: Brad Bishop --- ...0001-Factor-out-and-unify-setting-CLOEXEC.patch | 148 --------------------- 1 file changed, 148 deletions(-) delete mode 100644 poky/meta/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch (limited to 'poky/meta/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch') diff --git a/poky/meta/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch b/poky/meta/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch deleted file mode 100644 index 6f440c617..000000000 --- a/poky/meta/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch +++ /dev/null @@ -1,148 +0,0 @@ -From 9c3e5de3240554c8ea1b29d52eeadee4840fefac Mon Sep 17 00:00:00 2001 -From: Kir Kolyshkin -Date: Tue, 29 May 2018 17:37:05 -0700 -Subject: [PATCH 1/3] Factor out and unify setting CLOEXEC - -Commit 7a7c31f5 ("Set FD_CLOEXEC on opened files before exec from -lua script is called") copied the code that sets CLOEXEC flag on all -possible file descriptors from lib/rpmscript.c to luaext/lposix.c, -essentially creating two copies of the same code (modulo comments -and the unused assignment). - -This commit moves the functionality into its own function, without -any code modifications, using the version from luaext/lposix.c. - -Signed-off-by: Kir Kolyshkin -Upstream-Status: Accepted [https://github.com/rpm-software-management/rpm/pull/444] -Signed-off-by: Peter Kjellerstedt ---- - lib/rpmscript.c | 18 ++---------------- - luaext/lposix.c | 13 ++----------- - rpmio/rpmio.c | 16 ++++++++++++++++ - rpmio/rpmio_internal.h | 6 ++++++ - 4 files changed, 26 insertions(+), 27 deletions(-) - -diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index 747385a5b..b4ccd3246 100644 ---- a/lib/rpmscript.c -+++ b/lib/rpmscript.c -@@ -3,7 +3,6 @@ - #include - #include - #include --#include - - #include - #include -@@ -14,6 +13,7 @@ - - #include "rpmio/rpmlua.h" - #include "lib/rpmscript.h" -+#include "rpmio/rpmio_internal.h" - - #include "lib/rpmplugins.h" /* rpm plugins hooks */ - -@@ -170,26 +170,12 @@ static const char * const SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr - static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes, - FD_t scriptFd, FD_t out) - { -- int flag; -- int fdno; - int xx; -- int open_max; - - /* SIGPIPE is ignored in rpm, reset to default for the scriptlet */ - (void) signal(SIGPIPE, SIG_DFL); - -- /* XXX Force FD_CLOEXEC on all inherited fdno's. */ -- open_max = sysconf(_SC_OPEN_MAX); -- if (open_max == -1) { -- open_max = 1024; -- } -- for (fdno = 3; fdno < open_max; fdno++) { -- flag = fcntl(fdno, F_GETFD); -- if (flag == -1 || (flag & FD_CLOEXEC)) -- continue; -- xx = fcntl(fdno, F_SETFD, FD_CLOEXEC); -- /* XXX W2DO? debug msg for inheirited fdno w/o FD_CLOEXEC */ -- } -+ rpmSetCloseOnExec(); - - if (scriptFd != NULL) { - int sfdno = Fileno(scriptFd); -diff --git a/luaext/lposix.c b/luaext/lposix.c -index 0a7c26c71..5d7ad3c87 100644 ---- a/luaext/lposix.c -+++ b/luaext/lposix.c -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include "rpmio/rpmio_internal.h" - - #define MYNAME "posix" - #define MYVERSION MYNAME " library for " LUA_VERSION " / Nov 2003" -@@ -335,21 +336,11 @@ static int Pexec(lua_State *L) /** exec(path,[args]) */ - const char *path = luaL_checkstring(L, 1); - int i,n=lua_gettop(L); - char **argv; -- int flag, fdno, open_max; - - if (!have_forked) - return luaL_error(L, "exec not permitted in this context"); - -- open_max = sysconf(_SC_OPEN_MAX); -- if (open_max == -1) { -- open_max = 1024; -- } -- for (fdno = 3; fdno < open_max; fdno++) { -- flag = fcntl(fdno, F_GETFD); -- if (flag == -1 || (flag & FD_CLOEXEC)) -- continue; -- fcntl(fdno, F_SETFD, FD_CLOEXEC); -- } -+ rpmSetCloseOnExec(); - - argv = malloc((n+1)*sizeof(char*)); - if (argv==NULL) return luaL_error(L,"not enough memory"); -diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c -index c7cbc32aa..ea111d2ec 100644 ---- a/rpmio/rpmio.c -+++ b/rpmio/rpmio.c -@@ -1759,3 +1759,19 @@ DIGEST_CTX fdDupDigest(FD_t fd, int id) - - return ctx; - } -+ -+void rpmSetCloseOnExec(void) -+{ -+ int flag, fdno, open_max; -+ -+ open_max = sysconf(_SC_OPEN_MAX); -+ if (open_max == -1) { -+ open_max = 1024; -+ } -+ for (fdno = 3; fdno < open_max; fdno++) { -+ flag = fcntl(fdno, F_GETFD); -+ if (flag == -1 || (flag & FD_CLOEXEC)) -+ continue; -+ fcntl(fdno, F_SETFD, FD_CLOEXEC); -+ } -+} -diff --git a/rpmio/rpmio_internal.h b/rpmio/rpmio_internal.h -index fbed183b0..370cbdc75 100644 ---- a/rpmio/rpmio_internal.h -+++ b/rpmio/rpmio_internal.h -@@ -41,6 +41,12 @@ DIGEST_CTX fdDupDigest(FD_t fd, int id); - int rpmioSlurp(const char * fn, - uint8_t ** bp, ssize_t * blenp); - -+/** -+ * Set close-on-exec flag for all opened file descriptors, except -+ * stdin/stdout/stderr. -+ */ -+void rpmSetCloseOnExec(void); -+ - #ifdef __cplusplus - } - #endif -- cgit v1.2.3