Skip to content

Remove partitioning_mode = "raw" customization in blueprints once OpenSCAP is updated to add it #587

@matusmarhefka

Description

@matusmarhefka

It was added in #586 and the following part of code can be removed once OpenSCAP/openscap#2334 is resolved:

contest/lib/osbuild.py

Lines 390 to 420 in 183e64c

# Partitioning mode defaults to auto-lvm which uses lvm because we use
# filesystem customizations in blueprints; root LV then stays near the
# 1 GiB / + 2 GiB /usr hard-coded minimum size with free space left in the VG.
# Switch to raw layout which grows the / partition to fill the disk, see
# https://osbuild.org/docs/user-guide/partitioning/
# https://osbuild.org/docs/user-guide/blueprint-reference/#partitioning-mode
bp_new = re.sub(
r'^partitioning_mode\s*=\s*"[^"]*"\s*$',
'partitioning_mode = "raw"',
bp_text,
count=1,
flags=re.M,
)
if bp_new != bp_text:
bp_text = bp_new
elif not re.search(r'^partitioning_mode\s*=\s*"raw"\s*$', bp_text, flags=re.M):
bp_text, inserted = re.subn(
r'^(\[customizations\]\s*\n)',
r'\1partitioning_mode = "raw"\n',
bp_text,
count=1,
flags=re.M,
)
if not inserted:
bp_text = re.sub(
r'^(version = .*\n)',
r'\1\n[customizations]\npartitioning_mode = "raw"\n',
bp_text,
count=1,
flags=re.M,
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions