public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/lxd/, app-emulation/lxd/files/
Date: Tue, 23 Jun 2020 07:25:42 +0000 (UTC)	[thread overview]
Message-ID: <1592897130.eb824502f28aa17d4ebaa4581491b48e156edab2.juippis@gentoo> (raw)

commit:     eb824502f28aa17d4ebaa4581491b48e156edab2
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 23 07:24:55 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Jun 23 07:25:30 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb824502

app-emulation/lxd: fix 4.0.1 compilation with clang

Closes: https://bugs.gentoo.org/729244
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-emulation/lxd/files/lxd-4.0.1-clang.patch | 76 +++++++++++++++++++++++++++
 app-emulation/lxd/lxd-4.0.1.ebuild            |  2 +
 2 files changed, 78 insertions(+)

diff --git a/app-emulation/lxd/files/lxd-4.0.1-clang.patch b/app-emulation/lxd/files/lxd-4.0.1-clang.patch
new file mode 100644
index 00000000000..765f2f38be5
--- /dev/null
+++ b/app-emulation/lxd/files/lxd-4.0.1-clang.patch
@@ -0,0 +1,76 @@
+From c7ce94825871ea5d0946e92762e981354628b8ad Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@ubuntu.com>
+Date: Mon, 22 Jun 2020 22:17:02 -0400
+Subject: [PATCH] lxd: Fix building with clang
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Closes #7573
+
+Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
+---
+ lxd/main_forksyscall.go |  8 --------
+ lxd/seccomp/seccomp.go  | 16 ++++++++--------
+ 2 files changed, 8 insertions(+), 16 deletions(-)
+
+diff --git a/lxd/main_forksyscall.go b/lxd/main_forksyscall.go
+index a304405c2e..14895b6ce0 100644
+--- a/lxd/main_forksyscall.go
++++ b/lxd/main_forksyscall.go
+@@ -34,12 +34,6 @@ extern void attach_userns_fd(int ns_fd);
+ extern int pidfd_nsfd(int pidfd, pid_t pid);
+ extern bool setnsat(int ns_fd, const char *ns);
+ 
+-static inline bool same_fsinfo(struct stat *s1, struct stat *s2,
+-			       struct statfs *sfs1, struct statfs *sfs2)
+-{
+-	return ((sfs1->f_type == sfs2->f_type) && (s1->st_dev == s2->st_dev));
+-}
+-
+ static bool chdirchroot_in_mntns(int cwd_fd, int root_fd)
+ {
+ 	ssize_t len;
+@@ -209,8 +203,6 @@ const char *ns_names[] = { "user", "pid", "uts", "ipc", "net", "cgroup", NULL };
+ 
+ static bool change_creds(int ns_fd, cap_t caps, uid_t nsuid, gid_t nsgid, uid_t nsfsuid, gid_t nsfsgid)
+ {
+-	__do_close int fd = -EBADF;
+-
+ 	if (prctl(PR_SET_KEEPCAPS, 1))
+ 		return false;
+ 
+diff --git a/lxd/seccomp/seccomp.go b/lxd/seccomp/seccomp.go
+index 8945fd9197..025efb3141 100644
+--- a/lxd/seccomp/seccomp.go
++++ b/lxd/seccomp/seccomp.go
+@@ -91,21 +91,21 @@ static int device_allowed(dev_t dev, mode_t mode)
+ {
+ 	switch (mode & S_IFMT) {
+ 	case S_IFCHR:
+-		if ((dev == makedev(0, 0))) // whiteout
++		if (dev == makedev(0, 0)) // whiteout
+ 			return 0;
+-		else if ((dev == makedev(5, 1))) // /dev/console
++		else if (dev == makedev(5, 1)) // /dev/console
+ 			return 0;
+-		else if ((dev == makedev(1, 7))) // /dev/full
++		else if (dev == makedev(1, 7)) // /dev/full
+ 			return 0;
+-		else if ((dev == makedev(1, 3))) // /dev/null
++		else if (dev == makedev(1, 3)) // /dev/null
+ 			return 0;
+-		else if ((dev == makedev(1, 8))) // /dev/random
++		else if (dev == makedev(1, 8)) // /dev/random
+ 			return 0;
+-		else if ((dev == makedev(5, 0))) // /dev/tty
++		else if (dev == makedev(5, 0)) // /dev/tty
+ 			return 0;
+-		else if ((dev == makedev(1, 9))) // /dev/urandom
++		else if (dev == makedev(1, 9)) // /dev/urandom
+ 			return 0;
+-		else if ((dev == makedev(1, 5))) // /dev/zero
++		else if (dev == makedev(1, 5)) // /dev/zero
+ 			return 0;
+ 	}
+ 

diff --git a/app-emulation/lxd/lxd-4.0.1.ebuild b/app-emulation/lxd/lxd-4.0.1.ebuild
index 33decc443dd..578a64630a1 100644
--- a/app-emulation/lxd/lxd-4.0.1.ebuild
+++ b/app-emulation/lxd/lxd-4.0.1.ebuild
@@ -67,6 +67,8 @@ QA_PREBUILT="/usr/lib/lxd/libdqlite.so.0.0.1
 EGO_PN="github.com/lxc/lxd"
 GOPATH="${S}/_dist" # this seems to reset every now and then, though
 
+PATCHES=( "${FILESDIR}"/lxd-4.0.1-clang.patch )
+
 common_op() {
 	local i
 	for i in dqlite raft; do


             reply	other threads:[~2020-06-23  7:25 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23  7:25 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-11-16 13:24 [gentoo-commits] repo/gentoo:master commit in: app-emulation/lxd/, app-emulation/lxd/files/ Joonas Niilola
2021-11-09 11:44 Joonas Niilola
2021-09-24  8:15 Florian Schmaus
2021-02-16  8:29 Joonas Niilola
2020-10-21  6:04 Joonas Niilola
2020-07-13  7:16 Joonas Niilola
2020-06-26  8:13 Joonas Niilola
2018-09-15 13:09 Erik Mackdanz
2018-08-19 22:27 Erik Mackdanz
2018-08-19 22:20 Erik Mackdanz
2018-07-01 17:15 Erik Mackdanz
2018-07-01 17:10 Erik Mackdanz
2018-01-26 21:22 Patrice Clement
2018-01-26 21:22 Patrice Clement
2017-11-29 11:21 Agostino Sarubbo
2017-11-29 11:21 Agostino Sarubbo
2017-09-21 12:41 Amy Liffey
2017-08-20  8:53 Michał Górny
2017-08-16 15:20 Michał Górny
2017-06-08  8:43 Zac Medico
2017-03-20  4:54 Erik Mackdanz
2017-03-20  4:37 Erik Mackdanz
2017-01-30  1:54 Erik Mackdanz
2017-01-03  4:05 Erik Mackdanz
2016-10-11  4:22 Erik Mackdanz
2016-10-04  1:46 Erik Mackdanz
2016-10-04  1:39 Erik Mackdanz
2016-09-04 17:51 Erik Mackdanz
2016-08-24 10:38 Pacho Ramos
2016-05-20  4:08 Erik Mackdanz
2016-04-14  3:43 Erik Mackdanz
2016-03-08  9:45 Erik Mackdanz
2016-02-28 18:08 Erik Mackdanz
2016-02-03 23:55 Erik Mackdanz
2016-01-25  0:10 Erik Mackdanz
2016-01-06  3:24 Erik Mackdanz
2016-01-06  3:22 Erik Mackdanz
2015-12-29  1:41 Erik Mackdanz
2015-12-29  1:39 Erik Mackdanz
2015-12-12  5:38 Erik Mackdanz
2015-11-12 15:59 Erik Mackdanz
2015-11-06  4:27 Erik Mackdanz
2015-11-06  4:23 Erik Mackdanz
2015-10-11 14:39 Alex Brandt
2015-08-09 20:49 Alex Brandt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1592897130.eb824502f28aa17d4ebaa4581491b48e156edab2.juippis@gentoo \
    --to=juippis@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox