Skip to content

Commit 18d49c4

Browse files
Johan-Liebert1allisonkarlitskaya
authored andcommitted
Move state to /state/deploy
Signed-off-by: Pragyan Poudyal <[email protected]>
1 parent bb2b6b8 commit 18d49c4

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

crates/cfsctl/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ async fn main() -> Result<()> {
303303
.as_ref()
304304
.map(|p: &PathBuf| p.parent().unwrap())
305305
.unwrap_or(Path::new("/sysroot"))
306-
.join("state")
306+
.join("state/deploy")
307307
.join(id.to_hex());
308308

309309
create_dir_all(state.join("var"))?;

crates/composefs-setup-root/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ fn setup_root(args: Args) -> Result<()> {
257257
}
258258

259259
// etc + var
260-
let state = open_dir(open_dir(&sysroot, "state")?, image.to_hex())?;
260+
let state = open_dir(open_dir(&sysroot, "state/deploy")?, image.to_hex())?;
261261
mount_subdir(&new_root, &state, "etc", config.etc, MountType::Overlay)?;
262262
mount_subdir(&new_root, &state, "var", config.var, MountType::Bind)?;
263263

crates/composefs/tests/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ EOF
3535
blkdev="$(mkd "${top}/blkdev")"
3636
repo="$(mkd "${blkdev}/composefs")"
3737
state="$(mkd "${blkdev}/state")"
38-
deployment="$(mkd "${state}/${imageid}")"
38+
deployment="$(mkd "${state}/deploy/${imageid}")"
3939
dply_etc="$(mkd "${deployment}/etc")"
4040
dply_etc_u="$(mkd "${dply_etc}/upper")"
4141
dply_etc_w="$(mkd "${dply_etc}/work")"

examples/common/run-repart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ set -eux
44

55
chown -R 0:0 tmp/sysroot
66
chcon -R system_u:object_r:usr_t:s0 tmp/sysroot/composefs
7-
chcon system_u:object_r:var_t:s0 tmp/sysroot/state/*/var
8-
chcon system_u:object_r:etc_t:s0 tmp/sysroot/state/*/etc/*
7+
chcon system_u:object_r:var_t:s0 tmp/sysroot/state/deploy/*/var
8+
chcon system_u:object_r:etc_t:s0 tmp/sysroot/state/deploy/*/etc/*
99

1010
definitions='tmp/repart.d'
1111
export SYSTEMD_REPART_MKFS_OPTIONS_EXT4='-O verity'

0 commit comments

Comments
 (0)