From ce7c518014d86bc7a6a3be890eec8cd7e18a1b77 Mon Sep 17 00:00:00 2001 From: haozi007 Date: Thu, 26 Aug 2021 14:27:38 +0100 Subject: [PATCH] add help info for new arguments Signed-off-by: haozi007 (cherry picked from commit 7b8a0b190e021b098bb02670644644fbfe2398fd) --- 0027-add-help-for-new-arguments.patch | 70 +++++++++++++++++++++++++++ lxc.spec | 9 +++- series.conf | 1 + 3 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 0027-add-help-for-new-arguments.patch diff --git a/0027-add-help-for-new-arguments.patch b/0027-add-help-for-new-arguments.patch new file mode 100644 index 0000000..086c2eb --- /dev/null +++ b/0027-add-help-for-new-arguments.patch @@ -0,0 +1,70 @@ +From 3d673da7da97058f6e4a200d924dbbdcfeb63678 Mon Sep 17 00:00:00 2001 +From: haozi007 +Date: Thu, 26 Aug 2021 13:50:41 +0100 +Subject: [PATCH] add help for new arguments + +Signed-off-by: haozi007 +--- + src/lxc/tools/lxc_attach.c | 10 ++++++++-- + src/lxc/tools/lxc_start.c | 16 ++++++++++++++-- + 2 files changed, 22 insertions(+), 4 deletions(-) + +diff --git a/src/lxc/tools/lxc_attach.c b/src/lxc/tools/lxc_attach.c +index 4d69e944..9931b39f 100644 +--- a/src/lxc/tools/lxc_attach.c ++++ b/src/lxc/tools/lxc_attach.c +@@ -144,9 +144,15 @@ Options :\n\ + " + #else + "\ +- --user User ID (format: UID[:GID])\n\ + -w, --workdir Working directory inside the container.\n\ +- --timeout Timeout in seconds (default: 0)\n\ ++ -u, --user User ID (format: UID[:GID])\n\ ++ --in-fifo Stdin fifo path\n\ ++ --out-fifo Stdout fifo path\n\ ++ --err-fifo Stderr fifo path\n\ ++ --suffi ID for mutli-attach on one container\n\ ++ --timeout Timeout in seconds (default: 0)\n\ ++ --disable-pty Disable pty for attach\n\ ++ --open-stdin Open stdin for attach\n\ + " + #endif + , +diff --git a/src/lxc/tools/lxc_start.c b/src/lxc/tools/lxc_start.c +index 4f2c8afa..3ef59610 100644 +--- a/src/lxc/tools/lxc_start.c ++++ b/src/lxc/tools/lxc_start.c +@@ -62,7 +62,6 @@ static const struct option my_longopts[] = { + {"start-timeout", required_argument, 0, OPT_START_TIMEOUT}, + {"disable-pty", no_argument, 0, OPT_DISABLE_PTY}, + {"open-stdin", no_argument, 0, OPT_OPEN_STDIN}, +- {"start-timeout", required_argument, 0, OPT_START_TIMEOUT}, + #endif + LXC_COMMON_OPTIONS + }; +@@ -86,7 +85,20 @@ Options :\n\ + Note: --daemon implies --close-all-fds\n\ + -s, --define KEY=VAL Assign VAL to configuration variable KEY\n\ + --share-[net|ipc|uts|pid]=NAME Share a namespace with another container or pid\n\ +-", ++" ++#ifdef HAVE_ISULAD ++"\ ++ --in-fifo Stdin fifo path\n\ ++ --out-fifo Stdout fifo path\n\ ++ --err-fifo Stderr fifo path\n\ ++ --container-pidfile File path for container pid\n\ ++ --exit-fifo Fifo path to save exit code\n\ ++ --start-timeout Timeout for start container\n\ ++ --disable-pty Disable pty for attach\n\ ++ --open-stdin Open stdin for attach\n\ ++" ++#endif ++, + .options = my_longopts, + .parser = my_parser, + .checker = NULL, +-- +2.20.1 + diff --git a/lxc.spec b/lxc.spec index 28f1395..3d3ff32 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2021061201 +%global _release 2021082601 Name: lxc Version: 4.0.3 @@ -34,6 +34,7 @@ Patch0023: 0023-log-support-long-syslog-tag.patch Patch0024: 0024-log-adjust-log-level-from-error-to-warn.patch Patch0025: 0025-get-cgroup-data-len-first-and-malloc-read-buff-by-le.patch Patch0026: 0026-coredump-fix-coredump-when-cgroup-get-return-error.patch +Patch0027: 0027-add-help-for-new-arguments.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -205,6 +206,12 @@ make check %{_mandir}/*/man7/%{name}* %changelog +* Thu Aug 26 2021 haozi007 - 4.0.3-2021082601 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add help info for new arguments + * Sat Jun 12 2021 lifeng - 4.0.3-2021061201 - Type:bugfix - ID:NA diff --git a/series.conf b/series.conf index 72e85e9..03ee73d 100644 --- a/series.conf +++ b/series.conf @@ -24,3 +24,4 @@ 0024-log-adjust-log-level-from-error-to-warn.patch 0025-get-cgroup-data-len-first-and-malloc-read-buff-by-le.patch 0026-coredump-fix-coredump-when-cgroup-get-return-error.patch +0027-add-help-for-new-arguments.patch -- Gitee