From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1171275-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 161781382C5
	for <garchives@archives.gentoo.org>; Fri, 15 May 2020 06:32:06 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 195A3E0841;
	Fri, 15 May 2020 06:32:05 +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 00892E0841
	for <gentoo-commits@lists.gentoo.org>; Fri, 15 May 2020 06:32:04 +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 C3A1C350F52
	for <gentoo-commits@lists.gentoo.org>; Fri, 15 May 2020 06:32:02 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 7135D239
	for <gentoo-commits@lists.gentoo.org>; Fri, 15 May 2020 06:32:00 +0000 (UTC)
From: "Matt Turner" <mattst88@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, "Matt Turner" <mattst88@gentoo.org>
Message-ID: <1589524294.f7b7b9f3e0df2c62e4724a7f44ce8ddd9c3e1084.mattst88@gentoo>
Subject: [gentoo-commits] proj/catalyst:pending/mattst88 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: pending/mattst88
Date: Fri, 15 May 2020 06:32:00 +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: 3b75708e-88bf-4d17-ad05-fdde3c0ddfe8
X-Archives-Hash: 738f51421a67c05ac0f6010858936b0f

commit:     f7b7b9f3e0df2c62e4724a7f44ce8ddd9c3e1084
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May 15 06:30:09 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> 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 <mattst88 <AT> 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


From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1171452-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 E86F91382C5
	for <garchives@archives.gentoo.org>; 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 <gentoo-commits@lists.gentoo.org>; 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 <gentoo-commits@lists.gentoo.org>; 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 <gentoo-commits@lists.gentoo.org>; Sat, 16 May 2020 06:43:34 +0000 (UTC)
From: "Matt Turner" <mattst88@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, "Matt Turner" <mattst88@gentoo.org>
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: <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: 5a96e7ba-d1b5-451f-9a92-d225ed385420
X-Archives-Hash: 28f57b0d5333dc768504e036bb1eeb62
Message-ID: <20200516064334.Soatnf3TWap6fTqHkdyFzAaEi9w2b5Rps5VTV5fNYlA@z>

commit:     f7b7b9f3e0df2c62e4724a7f44ce8ddd9c3e1084
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May 15 06:30:09 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> 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 <mattst88 <AT> 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