mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@26c91a9
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
From a853f21633693f9eefc4949660253a5328d2d2f3 Mon Sep 17 00:00:00 2001
|
||||
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
Date: Sun, 13 Aug 2017 23:21:54 +0200
|
||||
Subject: [PATCH 1/1] communicate: check return status of msgrcv()
|
||||
Subject: [PATCH] communicate: check return status of msgrcv()
|
||||
|
||||
msgrcv can return with -1 to indicate an error condition.
|
||||
One such error is to have been interrupted by a signal.
|
||||
|
||||
77
package/fakeroot/0003-Select-TCP-when-lack-of-SYSV-IPC.patch
Normal file
77
package/fakeroot/0003-Select-TCP-when-lack-of-SYSV-IPC.patch
Normal file
@@ -0,0 +1,77 @@
|
||||
From 8e9a7a8c72a9fe407d296ec0ffeb56b2cd271959 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Weber <matthew.weber@rockwellcollins.com>
|
||||
Date: Mon, 16 Sep 2019 22:00:29 -0500
|
||||
Subject: [PATCH] Select TCP when lack of SYSV IPC
|
||||
|
||||
Update to add a configure test to build and install the TCP IPC version
|
||||
when detecting SYSV IPC MsgQ support isn't available.
|
||||
|
||||
The issue was initially discovered on Windows Services for Linux
|
||||
(WSL1.0). WSL does have some SysV IPC, but no message Q's, which is
|
||||
required by fakeroot/faked by default.
|
||||
|
||||
Fixes:
|
||||
https://github.com/Microsoft/WSL/issues/2465
|
||||
|
||||
Additional bug reports:
|
||||
https://bugs.busybox.net/show_bug.cgi?id=11366
|
||||
|
||||
Upstream:
|
||||
https://salsa.debian.org/clint/fakeroot/merge_requests/2
|
||||
|
||||
Signed-off-by: Jean-Francois Doyon <jfdoyon@gmail.com>
|
||||
Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
|
||||
---
|
||||
configure.ac | 36 ++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 36 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a9189e6..1650f77 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -25,6 +25,42 @@ AC_CACHE_CHECK([which IPC method to use],
|
||||
[ac_cv_use_ipc],
|
||||
[ac_cv_use_ipc=sysv])
|
||||
|
||||
+if test $ac_cv_use_ipc = "sysv"; then
|
||||
+ AC_MSG_CHECKING([whether SysV IPC message queues are actually working on the host])
|
||||
+
|
||||
+ AC_LANG_PUSH(C)
|
||||
+ AC_TRY_RUN([
|
||||
+#include <stdlib.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/ipc.h>
|
||||
+#include <sys/msg.h>
|
||||
+#include <time.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+int main() {
|
||||
+
|
||||
+ srandom(time(NULL)+getpid()*33151);
|
||||
+ key_t msg_key = random();
|
||||
+ int msg_get = msgget(msg_key, IPC_CREAT|0600);
|
||||
+
|
||||
+ if (msg_get==-1) {
|
||||
+ return 1;
|
||||
+ } else {
|
||||
+ msgctl(msg_get, IPC_RMID, NULL);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+}], [ac_cv_use_ipc=sysv], [ac_cv_use_ipc=tcp])
|
||||
+
|
||||
+ if test $ac_cv_use_ipc = "tcp"; then
|
||||
+ AC_MSG_RESULT([No, using TCP])
|
||||
+ else
|
||||
+ AC_MSG_RESULT([Yes])
|
||||
+ fi
|
||||
+
|
||||
+ AC_LANG_POP(C)
|
||||
+fi
|
||||
+
|
||||
AC_ARG_WITH([dbformat],
|
||||
AS_HELP_STRING([--with-dbformat@<:@=DBFORMAT@:>@],
|
||||
[database format to use: either inode (default) or path]),
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
Forward supported flags to fstatat, this fixes issues like
|
||||
using an empty path
|
||||
|
||||
Upstream BR: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959876
|
||||
|
||||
Signed-off-by: Norbert Lange <nolange79@gmail.com>
|
||||
|
||||
diff -burN fakeroot-1.20.2.org/libfakeroot.c fakeroot-1.20.2/libfakeroot.c
|
||||
--- fakeroot-1.20.2.org/libfakeroot.c 2014-10-05 17:16:00.000000000 +0200
|
||||
+++ fakeroot-1.20.2/libfakeroot.c 2020-05-10 22:24:18.896625085 +0200
|
||||
@@ -880,7 +880,7 @@
|
||||
/* If AT_SYMLINK_NOFOLLOW is set in the fchownat call it should
|
||||
be when we stat it. */
|
||||
INT_STRUCT_STAT st;
|
||||
- r=INT_NEXT_FSTATAT(dir_fd, path, &st, (flags & AT_SYMLINK_NOFOLLOW));
|
||||
+ r=INT_NEXT_FSTATAT(dir_fd, path, &st, (flags & (AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH | AT_NO_AUTOMOUNT)));
|
||||
|
||||
if(r)
|
||||
return(r);
|
||||
@@ -1017,7 +1017,7 @@
|
||||
|
||||
/* If AT_SYMLINK_NOFOLLOW is set in the fchownat call it should
|
||||
be when we stat it. */
|
||||
- r=INT_NEXT_FSTATAT(dir_fd, path, &st, flags & AT_SYMLINK_NOFOLLOW);
|
||||
+ r=INT_NEXT_FSTATAT(dir_fd, path, &st, flags & (AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH | AT_NO_AUTOMOUNT));
|
||||
|
||||
if(r)
|
||||
return(r);
|
||||
@@ -15,8 +15,14 @@ HOST_FAKEROOT_DEPENDENCIES = host-acl
|
||||
HOST_FAKEROOT_CONF_ENV = \
|
||||
ac_cv_header_sys_capability_h=no \
|
||||
ac_cv_func_capset=no
|
||||
|
||||
# 0003-Select-TCP-when-lack-of-SYSV-IPC.patch touches configure.ac
|
||||
HOST_FAKEROOT_AUTORECONF = YES
|
||||
FAKEROOT_LICENSE = GPL-3.0+
|
||||
FAKEROOT_LICENSE_FILES = COPYING
|
||||
|
||||
define HOST_FAKEROOT_BUILD_AUX
|
||||
mkdir -p $(@D)/build-aux
|
||||
endef
|
||||
HOST_FAKEROOT_POST_PATCH_HOOKS += HOST_FAKEROOT_BUILD_AUX
|
||||
|
||||
$(eval $(host-autotools-package))
|
||||
|
||||
Reference in New Issue
Block a user