Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (ed97a434cbad4943544ee82918feeed432ec3a45)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (ed97a434cbad4943544ee82918feeed432ec3a45)
  • Date: Fri, 12 May 2017 23:10:50 +0000

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:

utils/lxc/DEPENDS | 3
utils/lxc/DETAILS | 4
utils/lxc/HISTORY | 9 +
utils/lxc/PRE_BUILD | 2
utils/lxc/patches/001-sysmacros.patch | 32 ------
utils/lxc/patches/002-sysmacros.patch | 55 -----------
utils/lxc/patches/003-capabilities.patch | 30 ------
utils/lxc/patches/004-capabilities.patch | 153
-------------------------------
utils/lxc/patches/setids.patch | 18 +++
9 files changed, 30 insertions(+), 276 deletions(-)

New commits:
commit ed97a434cbad4943544ee82918feeed432ec3a45
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

utils/lxc: version 2.0.8

diff --git a/utils/lxc/DEPENDS b/utils/lxc/DEPENDS
index 6742a27..07a9001 100755
--- a/utils/lxc/DEPENDS
+++ b/utils/lxc/DEPENDS
@@ -1,6 +1,3 @@
-depends autoconf &&
-depends automake &&
-
optional_depends libcap \
"--enable-capabilities" \
"--disable-capabilities" \
diff --git a/utils/lxc/DETAILS b/utils/lxc/DETAILS
index a2db1e9..f2619ff 100755
--- a/utils/lxc/DETAILS
+++ b/utils/lxc/DETAILS
@@ -1,8 +1,8 @@
SPELL=lxc
- VERSION=2.0.7
+ VERSION=2.0.8
SOURCE="${SPELL}-${VERSION}.tar.gz"
SOURCE_URL[0]=https://linuxcontainers.org/downloads/${SOURCE}
-
SOURCE_HASH=sha512:51aedd32ae108f31dac5e8e1e71c93fa5da7813a3569f4aeee79dc254fe4a8c27221de83f645e6b334048c44953a7a7dbcde64439b9161d0cb55d8207944bb7b
+
SOURCE_HASH=sha512:ed9fd47e92007f433695cffea659180866a5ac2778712f4eb13b6629bb18292589f5b674b734853ca196ba1f6d38bdbf3cc8a2bb28e25d3540b06b945fcf9096
SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
WEB_SITE="https://linuxcontainers.org/";
LICENSE[0]="LGPLv2.1+"
diff --git a/utils/lxc/HISTORY b/utils/lxc/HISTORY
index 1dd3855..e28cf9e 100644
--- a/utils/lxc/HISTORY
+++ b/utils/lxc/HISTORY
@@ -1,3 +1,12 @@
+2017-05-12 Pavel Vinogradov <public AT sourcemage.org>
+ * DETAILS: version 2.0.8
+ * DEPENDS: removed autotools
+ * PRE_BUILD: no need to autogen anymore, added small sed fix to build
+ with -Werror
+ * patches/00[1-4]-{sysmacros,capabilities}.patch: dropped, applied by
+ upstream
+ * patches/setids.patch: addded to fix some definitions
+
2017-04-07 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 2.0.7
* DEPENDS: added autotools and optional libcap
diff --git a/utils/lxc/PRE_BUILD b/utils/lxc/PRE_BUILD
index 81b5a62..ebec2ef 100755
--- a/utils/lxc/PRE_BUILD
+++ b/utils/lxc/PRE_BUILD
@@ -3,4 +3,4 @@ cd "${SOURCE_DIRECTORY}" &&

apply_patch_dir patches &&

-autoreconf -v -i
+sed -i '1381s;5;6;' src/lxc/cgroups/cgfsng.c
diff --git a/utils/lxc/patches/001-sysmacros.patch
b/utils/lxc/patches/001-sysmacros.patch
deleted file mode 100644
index dbccead..0000000
--- a/utils/lxc/patches/001-sysmacros.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 66c1f8c270f748286643f4368a0e7ad57a2344c0 Mon Sep 17 00:00:00 2001
-From: Christian Brauner <christian.brauner AT ubuntu.com>
-Date: Tue, 21 Mar 2017 12:03:16 +0100
-Subject: [PATCH] tree-wide: include <sys/sysmacros.h> directly
-
-Signed-off-by: Christian Brauner <christian.brauner AT ubuntu.com>
----
- src/lxc/lxccontainer.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
-index 0dbbf2c..4786908 100644
---- a/src/lxc/lxccontainer.c
-+++ b/src/lxc/lxccontainer.c
-@@ -31,6 +31,7 @@
- #include <stdio.h>
- #include <unistd.h>
- #include <arpa/inet.h>
-+#include <sys/sysmacros.h>
- #include <sys/mman.h>
- #include <sys/mount.h>
- #include <sys/syscall.h>
-@@ -64,9 +65,6 @@
- #ifdef MAJOR_IN_MKDEV
- # include <sys/mkdev.h>
- #endif
--#ifdef MAJOR_IN_SYSMACROS
--# include <sys/sysmacros.h>
--#endif
-
- #if HAVE_IFADDRS_H
- #include <ifaddrs.h>
diff --git a/utils/lxc/patches/002-sysmacros.patch
b/utils/lxc/patches/002-sysmacros.patch
deleted file mode 100644
index 94bbf40..0000000
--- a/utils/lxc/patches/002-sysmacros.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From ce831b3b8887b0c1dfea637bdb16d38d1cd277fd Mon Sep 17 00:00:00 2001
-From: Christian Brauner <christian.brauner AT ubuntu.com>
-Date: Mon, 20 Mar 2017 15:42:50 +0100
-Subject: [PATCH] tree-wide: include <sys/sysmacros.h> directly
-
-Signed-off-by: Christian Brauner <christian.brauner AT ubuntu.com>
----
- src/lxc/bdev/lxclvm.c | 4 +---
- src/lxc/conf.c | 4 +---
- 2 files changed, 2 insertions(+), 6 deletions(-)
-
-diff --git a/src/lxc/bdev/lxclvm.c b/src/lxc/bdev/lxclvm.c
-index 75de17f..bcd8be8 100644
---- a/src/lxc/bdev/lxclvm.c
-+++ b/src/lxc/bdev/lxclvm.c
-@@ -29,6 +29,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
-+#include <sys/sysmacros.h>
- #include <sys/wait.h>
-
- #include "bdev.h"
-@@ -41,9 +42,6 @@
- #ifdef MAJOR_IN_MKDEV
- # include <sys/mkdev.h>
- #endif
--#ifdef MAJOR_IN_SYSMACROS
--# include <sys/sysmacros.h>
--#endif
-
- lxc_log_define(lxclvm, lxc);
-
-diff --git a/src/lxc/conf.c b/src/lxc/conf.c
-index edad28f..55de873 100644
---- a/src/lxc/conf.c
-+++ b/src/lxc/conf.c
-@@ -47,6 +47,7 @@
- #include <sys/prctl.h>
- #include <sys/stat.h>
- #include <sys/socket.h>
-+#include <sys/sysmacros.h>
- #include <sys/syscall.h>
- #include <sys/types.h>
- #include <sys/utsname.h>
-@@ -56,9 +57,6 @@
- #ifdef MAJOR_IN_MKDEV
- # include <sys/mkdev.h>
- #endif
--#ifdef MAJOR_IN_SYSMACROS
--# include <sys/sysmacros.h>
--#endif
-
- #ifdef HAVE_STATVFS
- #include <sys/statvfs.h>
diff --git a/utils/lxc/patches/003-capabilities.patch
b/utils/lxc/patches/003-capabilities.patch
deleted file mode 100644
index 042cfe6..0000000
--- a/utils/lxc/patches/003-capabilities.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From df11e022a50d458c4fe3e97f643293cfc9fd30ff Mon Sep 17 00:00:00 2001
-From: Brett Neumeier <brett AT neumeier.us>
-Date: Sun, 29 Jan 2017 08:29:53 -0600
-Subject: [PATCH] Allow build without sys/capability.h
-
-There is no guard clause around a reference to CAP_EFFECTIVE and
-CAP_SETGID, causing compilation to fail if sys/capability.h is not
-available.
-
-Signed-off-by: Brett Neumeier <brett AT neumeier.us>
----
- src/lxc/start.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/lxc/start.c b/src/lxc/start.c
-index 09dc1ff..2929514 100644
---- a/src/lxc/start.c
-+++ b/src/lxc/start.c
-@@ -898,7 +898,11 @@ static int do_start(void *data)
- * further above. Only drop groups if we can, so ensure that
we
- * have necessary privilege.
- */
-+ #if HAVE_SYS_CAPABILITY_H
- have_cap_setgid = lxc_cap_is_set(CAP_SETGID, CAP_EFFECTIVE);
-+ #else
-+ have_cap_setgid = false;
-+ #endif
- if (lxc_list_empty(&handler->conf->id_map) &&
have_cap_setgid) {
- if (lxc_setgroups(0, NULL) < 0)
- goto out_warn_father;
diff --git a/utils/lxc/patches/004-capabilities.patch
b/utils/lxc/patches/004-capabilities.patch
deleted file mode 100644
index fa62faa..0000000
--- a/utils/lxc/patches/004-capabilities.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From e37dda715615d09543b9e15c181f9e0a422646da Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice AT gmail.com>
-Date: Sat, 11 Feb 2017 22:40:19 +0100
-Subject: [PATCH] Add HAVE_LIBCAP
-
-Currently it is impossible to build lxc with --disable-capabilities if
-the user has libcap-dev installed on his system as:
- - calls to cap_xxx functions are not protected by HAVE_LIBCAP defines.
- The whole file is only protected by HAVE_SYS_CAPABILITY_H.
- - AC_CHECK_LIB default action-if-found is overriden by [true] so
- HAVE_LIBCAP is never written to config.h
-
-This patch replaces all HAVE_SYS_CAPABILITY_H checks by HAVE_LIBCAP
-checks (fix #1361)
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice AT gmail.com>
----
- configure.ac | 5 +++--
- src/lxc/caps.c | 2 +-
- src/lxc/caps.h | 2 +-
- src/lxc/conf.c | 6 +++---
- src/lxc/start.c | 10 +++++-----
- 5 files changed, 13 insertions(+), 12 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 612ca46..d5767e1 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -370,7 +370,8 @@ fi
- AM_CONDITIONAL([ENABLE_CAP], [test "x$enable_capabilities" = "xyes"])
-
- AM_COND_IF([ENABLE_CAP],
-- [AC_CHECK_LIB(cap,cap_set_proc,[true],[AC_MSG_ERROR([You are missing
libcap support.])])
-+ [AC_CHECK_HEADER([sys/capability.h],[],[AC_MSG_ERROR([You must
install the libcap development package in order to compile lxc])])
-+ AC_CHECK_LIB(cap,cap_set_proc,[],[AC_MSG_ERROR([You must install the
libcap development package in order to compile lxc])])
- AC_SUBST([CAP_LIBS], [-lcap])])
-
- # HAVE_SCMP_FILTER_CTX=1 will tell us we have libseccomp api >= 1.0.0
-@@ -638,7 +639,7 @@ AC_CHECK_DECLS([PR_SET_NO_NEW_PRIVS], [], [], [#include
<sys/prctl.h>])
- AC_CHECK_DECLS([PR_GET_NO_NEW_PRIVS], [], [], [#include <sys/prctl.h>])
-
- # Check for some headers
--AC_CHECK_HEADERS([sys/signalfd.h pty.h ifaddrs.h sys/capability.h
sys/memfd.h sys/personality.h utmpx.h sys/timerfd.h])
-+AC_CHECK_HEADERS([sys/signalfd.h pty.h ifaddrs.h sys/memfd.h
sys/personality.h utmpx.h sys/timerfd.h])
-
- # lookup major()/minor()/makedev()
- AC_HEADER_MAJOR
-diff --git a/src/lxc/caps.c b/src/lxc/caps.c
-index 73b5516..1d46c45 100644
---- a/src/lxc/caps.c
-+++ b/src/lxc/caps.c
-@@ -36,7 +36,7 @@
-
- lxc_log_define(lxc_caps, lxc);
-
--#if HAVE_SYS_CAPABILITY_H
-+#if HAVE_LIBCAP
-
- #ifndef PR_CAPBSET_READ
- #define PR_CAPBSET_READ 23
-diff --git a/src/lxc/caps.h b/src/lxc/caps.h
-index 390dbdd..8d60fdc 100644
---- a/src/lxc/caps.h
-+++ b/src/lxc/caps.h
-@@ -27,7 +27,7 @@
- #ifndef __LXC_CAPS_H
- #define __LXC_CAPS_H
-
--#if HAVE_SYS_CAPABILITY_H
-+#if HAVE_LIBCAP
- #include <sys/capability.h>
-
- extern int lxc_caps_down(void);
-diff --git a/src/lxc/conf.c b/src/lxc/conf.c
-index 6f31d33..b94fbbb 100644
---- a/src/lxc/conf.c
-+++ b/src/lxc/conf.c
-@@ -91,7 +91,7 @@
- #include "utils.h"
- #include "lsm/lsm.h"
-
--#if HAVE_SYS_CAPABILITY_H
-+#if HAVE_LIBCAP
- #include <sys/capability.h>
- #endif
-
-@@ -107,7 +107,7 @@
-
- lxc_log_define(lxc_conf, lxc);
-
--#if HAVE_SYS_CAPABILITY_H
-+#if HAVE_LIBCAP
- #ifndef CAP_SETFCAP
- #define CAP_SETFCAP 31
- #endif
-@@ -316,7 +316,7 @@ static struct mount_opt mount_opt[] = {
- { NULL, 0, 0 },
- };
-
--#if HAVE_SYS_CAPABILITY_H
-+#if HAVE_LIBCAP
- static struct caps_opt caps_opt[] = {
- { "chown", CAP_CHOWN },
- { "dac_override", CAP_DAC_OVERRIDE },
-diff --git a/src/lxc/start.c b/src/lxc/start.c
-index 2929514..ab5f5ad 100644
---- a/src/lxc/start.c
-+++ b/src/lxc/start.c
-@@ -46,7 +46,7 @@
- #include <sys/un.h>
- #include <sys/wait.h>
-
--#if HAVE_SYS_CAPABILITY_H
-+#if HAVE_LIBCAP
- #include <sys/capability.h>
- #endif
-
-@@ -375,7 +375,7 @@ int lxc_poll(const char *name, struct lxc_handler
*handler)
- }
-
- if (handler->conf->need_utmp_watch) {
-- #if HAVE_SYS_CAPABILITY_H
-+ #if HAVE_LIBCAP
- if (lxc_utmp_mainloop_add(&descr, handler)) {
- ERROR("Failed to add utmp handler to LXC mainloop.");
- goto out_mainloop_open;
-@@ -787,7 +787,7 @@ static int do_start(void *data)
- goto out_warn_father;
- }
-
-- #if HAVE_SYS_CAPABILITY_H
-+ #if HAVE_LIBCAP
- if (handler->conf->need_utmp_watch) {
- if (prctl(PR_CAPBSET_DROP, CAP_SYS_BOOT, 0, 0, 0)) {
- SYSERROR("Failed to remove the CAP_SYS_BOOT
capability.");
-@@ -898,7 +898,7 @@ static int do_start(void *data)
- * further above. Only drop groups if we can, so ensure that
we
- * have necessary privilege.
- */
-- #if HAVE_SYS_CAPABILITY_H
-+ #if HAVE_LIBCAP
- have_cap_setgid = lxc_cap_is_set(CAP_SETGID, CAP_EFFECTIVE);
- #else
- have_cap_setgid = false;
-@@ -1337,7 +1337,7 @@ int __lxc_start(const char *name, struct lxc_conf
*conf,
- handler->netnsfd = -1;
-
- if (must_drop_cap_sys_boot(handler->conf)) {
-- #if HAVE_SYS_CAPABILITY_H
-+ #if HAVE_LIBCAP
- DEBUG("Dropping CAP_SYS_BOOT capability.");
- #else
- DEBUG("Not dropping CAP_SYS_BOOT capability as capabilities
aren't supported.");
diff --git a/utils/lxc/patches/setids.patch b/utils/lxc/patches/setids.patch
new file mode 100644
index 0000000..345fb4d
--- /dev/null
+++ b/utils/lxc/patches/setids.patch
@@ -0,0 +1,18 @@
+diff --git a/src/lxc/conf.c b/src/lxc/conf.c
+--- a/src/lxc/conf.c
++++ b/src/lxc/conf.c
+@@ -119,6 +119,14 @@
+ #endif
+ #endif
+
++#ifndef CAP_SETUID
++#define CAP_SETUID 7
++#endif
++
++#ifndef CAP_SETGID
++#define CAP_SETGID 6
++#endif
++
+ #ifndef PR_CAPBSET_DROP
+ #define PR_CAPBSET_DROP 24
+ #endif



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (ed97a434cbad4943544ee82918feeed432ec3a45), Pavel Vinogradov, 05/12/2017

Archive powered by MHonArc 2.6.24.

Top of Page