From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1181873-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CE4571382C5 for <garchives@archives.gentoo.org>; Tue, 23 Jun 2020 07:25:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E0619E08C8; Tue, 23 Jun 2020 07:25:47 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B5065E08C8 for <gentoo-commits@lists.gentoo.org>; Tue, 23 Jun 2020 07:25:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E88AD34EF5C for <gentoo-commits@lists.gentoo.org>; Tue, 23 Jun 2020 07:25:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 402B29C for <gentoo-commits@lists.gentoo.org>; Tue, 23 Jun 2020 07:25:42 +0000 (UTC) From: "Joonas Niilola" <juippis@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" <juippis@gentoo.org> Message-ID: <1592897130.eb824502f28aa17d4ebaa4581491b48e156edab2.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/lxd/, app-emulation/lxd/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/lxd/files/lxd-4.0.1-clang.patch app-emulation/lxd/lxd-4.0.1.ebuild X-VCS-Directories: app-emulation/lxd/files/ app-emulation/lxd/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: eb824502f28aa17d4ebaa4581491b48e156edab2 X-VCS-Branch: master Date: Tue, 23 Jun 2020 07:25:42 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 27932a72-1aa1-4984-bf6f-58d3bd1be708 X-Archives-Hash: 72e95d43c65b41cd8969ba453da61715 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