Skip to content

Commit 758179e

Browse files
committedFeb 1, 2024
osbuild: update chattr stage with final version
The PR finally merged but didn't make it into the v106 release so we still need to carry the patch for now. osbuild/osbuild#1535
1 parent e7d4279 commit 758179e

5 files changed

+14
-15
lines changed
 

‎src/0001-mounts-ostree.deployment-rework-unmounting.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From a16da49474762d09ebf909651ec68633b799b6fe Mon Sep 17 00:00:00 2001
1+
From 0da68e9af5a7b148e9841ff2a48bffd96be79b72 Mon Sep 17 00:00:00 2001
22
From: Dusty Mabe <dusty@dustymabe.com>
33
Date: Tue, 9 Jan 2024 23:23:25 -0500
44
Subject: [PATCH 1/5] mounts/ostree.deployment: rework unmounting

‎src/0002-mounts-ostree.deployment-rename-var-root-deploy_root.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 34f74cfb33d7fd6994ec2a7b53aa45c262b69b78 Mon Sep 17 00:00:00 2001
1+
From e43abe1a9cbff3508eebc31d33efdc2fa44306aa Mon Sep 17 00:00:00 2001
22
From: Dusty Mabe <dusty@dustymabe.com>
33
Date: Wed, 10 Jan 2024 00:02:38 -0500
44
Subject: [PATCH 2/5] mounts/ostree.deployment: rename var root -> deploy_root

‎src/0003-mounts-ostree.deployment-use-target-instead-of-tree.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From b60e4d8cb4827d3f7cf2aa2158ba94ec00092520 Mon Sep 17 00:00:00 2001
1+
From be90d8c36c0f0a6846a475f394843e898ad35a24 Mon Sep 17 00:00:00 2001
22
From: Dusty Mabe <dusty@dustymabe.com>
33
Date: Wed, 10 Jan 2024 00:12:01 -0500
44
Subject: [PATCH 3/5] mounts/ostree.deployment: use target instead of tree

‎src/0004-mounts-ostree.deployment-support-deployments-on-moun.patch

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 32835637fe28ddbbf4ff1b1da6321a4e1a45884f Mon Sep 17 00:00:00 2001
1+
From bd6b8ffb83384e7f9e78dc42a9cee626830b990f Mon Sep 17 00:00:00 2001
22
From: Dusty Mabe <dusty@dustymabe.com>
33
Date: Wed, 10 Jan 2024 11:07:14 -0500
44
Subject: [PATCH 4/5] mounts/ostree.deployment: support deployments on mount
@@ -57,11 +57,11 @@ on the disk. The second mount (of type org.osbuild.ostree.deployment)
5757
then reconfigures things similar to how an OSTree system is set up.
5858
---
5959
mounts/org.osbuild.ostree.deployment | 18 +++++++++++++++---
60-
osbuild/mounts.py | 13 +++++++++++--
61-
2 files changed, 26 insertions(+), 5 deletions(-)
60+
osbuild/mounts.py | 13 ++++++++++---
61+
2 files changed, 25 insertions(+), 6 deletions(-)
6262

6363
diff --git a/mounts/org.osbuild.ostree.deployment b/mounts/org.osbuild.ostree.deployment
64-
index b200eca3..e19ac525 100755
64+
index b200eca3..24df7731 100755
6565
--- a/mounts/org.osbuild.ostree.deployment
6666
+++ b/mounts/org.osbuild.ostree.deployment
6767
@@ -32,6 +32,12 @@ SCHEMA_2 = """
@@ -72,7 +72,7 @@ index b200eca3..e19ac525 100755
7272
+ "type": "string",
7373
+ "pattern": "^(mount|tree)$",
7474
+ "default": "tree",
75-
+ "description": "The source of the OSTree filesystem tree"
75+
+ "description": "The source of the OSTree filesystem tree. If 'mount', there should be a preceding mount defined that's mounted at /."
7676
+ },
7777
"deployment": {
7878
"type": "object",
@@ -111,10 +111,10 @@ index b200eca3..e19ac525 100755
111111
var = os.path.join(target, "ostree", "deploy", osname, "var")
112112
boot = os.path.join(target, "boot")
113113
diff --git a/osbuild/mounts.py b/osbuild/mounts.py
114-
index 86576ad0..3e63c873 100644
114+
index b938d21d..42b556ba 100644
115115
--- a/osbuild/mounts.py
116116
+++ b/osbuild/mounts.py
117-
@@ -180,6 +180,8 @@ class FileSystemMountService(MountService):
117+
@@ -181,6 +181,8 @@ class FileSystemMountService(MountService):
118118
os.makedirs(mountpoint, exist_ok=True)
119119
self.mountpoint = mountpoint
120120

@@ -123,21 +123,20 @@ index 86576ad0..3e63c873 100644
123123
try:
124124
subprocess.run(
125125
["mount"] +
126-
@@ -202,12 +204,19 @@ class FileSystemMountService(MountService):
126+
@@ -203,12 +205,17 @@ class FileSystemMountService(MountService):
127127
if not self.mountpoint:
128128
return
129129

130+
- self.sync()
130131
+ # It's possible this mountpoint has already been unmounted
131132
+ # if a umount -R was run by another process, as is done in
132133
+ # mounts/org.osbuild.ostree.deployment.
133134
+ if not os.path.ismount(self.mountpoint):
134135
+ print(f"already unmounted: {self.mountpoint}")
135136
+ return
136-
+
137-
self.sync()
138137

139138
- print("umounting")
140-
+ print(f"unmounting {self.mountpoint}")
139+
+ self.sync()
141140

142141
# We ignore errors here on purpose
143142
- subprocess.run(["umount", self.mountpoint],

‎src/0005-Create-stages-org.osbuild.chattr-stage.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 98f472f05d02d6364d390d345ba133fa63e70284 Mon Sep 17 00:00:00 2001
1+
From 477a21043eeb55468b1f75a9574e46e77cb5fdef Mon Sep 17 00:00:00 2001
22
From: Luke Yang <luyang@redhat.com>
33
Date: Mon, 22 Jan 2024 10:28:01 -0500
44
Subject: [PATCH 5/5] Create stages/org.osbuild.chattr stage

0 commit comments

Comments
 (0)
Please sign in to comment.