!54 fix pidfd_open&pidfd_send_signal function compilation bug in glibc2.36+
From: @vegbir Reviewed-by: @zhangsong234, @jingwoo Signed-off-by: @jingwoo
This commit is contained in:
commit
b02d142a2c
@ -1,25 +1,25 @@
|
||||
From ba38ee0ef8e375ae7e1b19d6e99626b1152ddef8 Mon Sep 17 00:00:00 2001
|
||||
From: vegbir <yangjiaqi16@huawei.com>
|
||||
Date: Mon, 4 Jul 2022 17:15:19 +0800
|
||||
From ed5823bf5b0d8bd425417d9b3590ece248fe1655 Mon Sep 17 00:00:00 2001
|
||||
From: yangjiaqi <yangjiaqi16@huawei.com>
|
||||
Date: Sat, 26 Nov 2022 11:48:14 +0800
|
||||
Subject: [PATCH] enable cfs option to show correct proc cpuinfo view
|
||||
|
||||
---
|
||||
config/init/systemd/lxcfs.service | 2 +-
|
||||
config/init/systemd/lxcfs.service.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/config/init/systemd/lxcfs.service b/config/init/systemd/lxcfs.service
|
||||
index dbb029f..f24e11b 100644
|
||||
--- a/config/init/systemd/lxcfs.service
|
||||
+++ b/config/init/systemd/lxcfs.service
|
||||
@@ -5,7 +5,7 @@ Before=lxc.service
|
||||
Documentation=man:lxcfs(1)
|
||||
diff --git a/config/init/systemd/lxcfs.service.in b/config/init/systemd/lxcfs.service.in
|
||||
index bdaa2fa..3ee006b 100644
|
||||
--- a/config/init/systemd/lxcfs.service.in
|
||||
+++ b/config/init/systemd/lxcfs.service.in
|
||||
@@ -6,7 +6,7 @@ Documentation=man:lxcfs(1)
|
||||
|
||||
[Service]
|
||||
-ExecStart=/usr/bin/lxcfs /usr/local/var/lib/lxcfs
|
||||
+ExecStart=/usr/bin/lxcfs --enable-cfs /usr/local/var/lib/lxcfs
|
||||
ExecStartPre=-/usr/local/bin/lxcfs-tools prestart
|
||||
-ExecStart=/usr/bin/lxcfs /var/lib/lxc/lxcfs/
|
||||
+ExecStart=/usr/bin/lxcfs --enable-cfs /var/lib/lxc/lxcfs/
|
||||
ExecStartPost=-/usr/local/bin/lxcfs-tools remount -a
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
ExecStopPost=-/bin/fusermount -u /usr/local/var/lib/lxcfs
|
||||
ExecStop=-/usr/local/bin/lxcfs-tools umount -a
|
||||
--
|
||||
2.32.1 (Apple Git-133)
|
||||
2.30.0
|
||||
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
From e3ca16cd280bea10a63e959623fd6625f7b868ce Mon Sep 17 00:00:00 2001
|
||||
From: yangjiaqi <yangjiaqi16@huawei.com>
|
||||
Date: Thu, 24 Nov 2022 15:53:53 +0800
|
||||
Subject: [PATCH] fix pidfd_open&pidfd_send_signal function compilation bug in
|
||||
glibc2.36+
|
||||
|
||||
---
|
||||
src/utils.h | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/utils.h b/src/utils.h
|
||||
index 18d85a7..ab2da0f 100644
|
||||
--- a/src/utils.h
|
||||
+++ b/src/utils.h
|
||||
@@ -46,6 +46,9 @@ static inline int pidfd_open(pid_t pid, unsigned int flags)
|
||||
{
|
||||
return syscall(__NR_pidfd_open, pid, flags);
|
||||
}
|
||||
+#else
|
||||
+#include <sys/pidfd.h>
|
||||
+extern int pidfd_open(pid_t pid, unsigned int flags);
|
||||
#endif
|
||||
|
||||
#if !HAVE_PIDFD_SEND_SIGNAL
|
||||
@@ -54,6 +57,9 @@ static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
|
||||
{
|
||||
return syscall(__NR_pidfd_send_signal, pidfd, sig, info, flags);
|
||||
}
|
||||
+#else
|
||||
+#include <sys/pidfd.h>
|
||||
+extern int pidfd_send_signal(int pidfd, int sig, siginfo_t *info,unsigned int flags);
|
||||
#endif
|
||||
|
||||
extern FILE *fopen_cached(const char *path, const char *mode,
|
||||
--
|
||||
2.30.0
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
#Basic Information
|
||||
Name: lxcfs
|
||||
Version: 4.0.11
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: FUSE filesystem for LXC
|
||||
License: LGPL 2.1+
|
||||
URL: http://linuxcontainers.org
|
||||
@ -30,6 +30,7 @@ Patch9017: 0017-proc_fuse-fix-wait-child-process-hang.patch
|
||||
Patch9018: 0018-fix-deadlock-problem-when-subprocess-exit.patch
|
||||
Patch9019: 0019-fix-dev-read-memory-leak-in-container.patch
|
||||
Patch9020: 0020-enable-cfs-option-to-show-correct-proc-cpuinfo-view.patch
|
||||
Patch9021: 0021-fix-pidfd_open-pidfd_send_signal-function-compilatio.patch
|
||||
|
||||
#Dependency
|
||||
BuildRequires: autoconf automake libtool help2man
|
||||
@ -91,6 +92,9 @@ fi
|
||||
%{_unitdir}/*
|
||||
|
||||
%changelog
|
||||
* Thu Nov 24 2022 yangjiaqi <yangjiaqi16@huawei.com> - 4.0.11-5
|
||||
- fix pidfd_open&pidfd_send_signal function compilation bug in glibc2.36+
|
||||
|
||||
* Mon Jul 04 2022 yangjiaqi <yangjiaqi16@huawei.com> - 4.0.11-4
|
||||
- enable cfs option to show correct proc cpuinfo view
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user