Skip to content

Commit

Permalink
Drop composefs setting
Browse files Browse the repository at this point in the history
Since ostreedev/ostree#3165
this can be configured in the ostree commit itself.
  • Loading branch information
cgwalters committed Feb 15, 2024
1 parent cc95fc3 commit eb3c49d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 25 deletions.
18 changes: 0 additions & 18 deletions src/cmd-build
Original file line number Diff line number Diff line change
Expand Up @@ -335,24 +335,6 @@ if test "${PREPARE_ONLY}" = 1; then
exit 0
fi

# See https://github.com/coreos/coreos-assembler/pull/1379 - we want the local
# dev case to explicitly fetch updates when they want them, plus CI pipelines
# generally want to react to "changed or not" with a separate `fetch`.
# The fetched-stamp is new, in order to not break existing workdirs we assume
# a fetch was done if a successful build was done.
if [ ! -f "${workdir}"/builds/builds.json ] && [ ! -f "${fetch_stamp}" ] ; then
fatal "Must fetch before building"
fi
composefs="$(jq -r .composefs < "${image_json}")"
case "${composefs}" in
false)
;;
true)
ostree config --repo="${tmprepo}" set ex-integrity.composefs "true"
;;
*) fatal "Unhandled composefs setting: ${composefs}" ;;
esac

# --cache-only is here since `fetch` is a separate verb
# shellcheck disable=SC2086
if test -n "${previous_commit}"; then
Expand Down
6 changes: 1 addition & 5 deletions src/create_disk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ esac
rootfs_args=$(getconfig_def "rootfs-args" "")

bootfs=$(getconfig "bootfs")
composefs=$(getconfig_def "composefs" "")
grub_script=$(getconfig "grub-script")
ostree_container=$(getconfig "ostree-container")
ostree_container_spec="ostree-unverified-image:oci-archive:${ostree_container}"
Expand Down Expand Up @@ -316,14 +315,11 @@ ostree config --repo $rootfs/ostree/repo set sysroot.bootloader none
# Opt-in to https://github.com/ostreedev/ostree/pull/1767 AKA
# https://github.com/ostreedev/ostree/issues/1265
ostree config --repo $rootfs/ostree/repo set sysroot.readonly true
if test -n "${composefs}"; then
ostree config --repo $rootfs/ostree/repo set ex-integrity.composefs true
fi
# Initialize the "stateroot"
ostree admin os-init "$os_name" --sysroot $rootfs

# Propagate flags into target repository
if [ "${rootfs_type}" = "ext4verity" ] && [ -z "${composefs}" ]; then
if [ "${rootfs_type}" = "ext4verity" ]; then
ostree config --repo=$rootfs/ostree/repo set ex-fsverity.required 'true'
fi

Expand Down
2 changes: 0 additions & 2 deletions src/image-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ bootfs: "ext4"
rootfs: "xfs"
# Add arguments here that will be passed to e.g. mkfs.xfs
rootfs-args: ""
# Set to "true" to enable composefs
composefs: false

# Additional default kernel arguments injected into disk images
extra-kargs: []
Expand Down

0 comments on commit eb3c49d

Please sign in to comment.