From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 E86F91382C5 for ; Sat, 16 May 2020 06:43:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 56EFAE09B4; Sat, 16 May 2020 06:43:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 3C433E09B4 for ; Sat, 16 May 2020 06:43:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 0689D34F10B for ; Sat, 16 May 2020 06:43:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F2EBC257 for ; Sat, 16 May 2020 06:43:34 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1589524294.f7b7b9f3e0df2c62e4724a7f44ce8ddd9c3e1084.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/base/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/base/stagebase.py X-VCS-Directories: catalyst/base/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: f7b7b9f3e0df2c62e4724a7f44ce8ddd9c3e1084 X-VCS-Branch: master Date: Sat, 16 May 2020 06:43:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5a96e7ba-d1b5-451f-9a92-d225ed385420 X-Archives-Hash: 28f57b0d5333dc768504e036bb1eeb62 Message-ID: <20200516064334.Soatnf3TWap6fTqHkdyFzAaEi9w2b5Rps5VTV5fNYlA@z> commit: f7b7b9f3e0df2c62e4724a7f44ce8ddd9c3e1084 Author: Matt Turner gentoo org> AuthorDate: Fri May 15 06:30:09 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Fri May 15 06:31:34 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f7b7b9f3 catalyst: Mount squashfs with -o ro Even though squashfs is not writeable, it must be mounted with -o ro in order to be mounted multiple times. This allows, for example, the same snapshot to be mounted simultaneously in multiple catalyst chroots. Signed-off-by: Matt Turner gentoo.org> catalyst/base/stagebase.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 55d1032d..651bf4e4 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -868,7 +868,9 @@ class StageBase(TargetBase, ClearBase, GenBase): mount += ['-t', 'tmpfs', '-o', 'noexec,nosuid,nodev'] else: source_path = Path(self.mount[x]['source']) - if source_path.suffix != '.sqfs': + if source_path.suffix == '.sqfs': + mount += ['-o', 'ro'] + else: mount.append('--bind') # We may need to create the source of the bind mount. E.g., in the