Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure kiwi 10's mapper to kpartx #1974

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/bci_build/package/kiwi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@
from bci_build.os_version import ALL_NONBASE_OS_VERSIONS
from bci_build.os_version import CAN_BE_LATEST_OS_VERSION
from bci_build.os_version import OsVersion
from bci_build.package import DOCKERFILE_RUN
from bci_build.package import DevelopmentContainer
from bci_build.package import ParseVersion
from bci_build.package import generate_disk_size_constraints
from bci_build.package.helpers import generate_package_version_check
from bci_build.package.versions import format_version
from bci_build.package.versions import get_pkg_version


def generate_kiwi_10_config():
"""force part_mapper to be kpartx rather than the default udev, which we don't run in the image."""
return f"""{DOCKERFILE_RUN} printf "mapper:\\n - part_mapper: kpartx\\n" > /etc/kiwi.yml"""


KIWI_CONTAINERS = [
DevelopmentContainer(
name="kiwi",
Expand Down Expand Up @@ -54,7 +61,10 @@
*os_version.release_package_names,
]
+ os_version.common_devel_packages,
custom_end=f"{generate_package_version_check('python3-kiwi', kiwi_minor, ParseVersion.MINOR)}",
custom_end=(
f"{generate_package_version_check('python3-kiwi', kiwi_minor, ParseVersion.MINOR)}\n"
)
+ (generate_kiwi_10_config() if float(kiwi_minor) >= 10 else ""),
build_recipe_type=BuildType.DOCKER,
_min_release_counter=(15 if os_version.is_sle15 else None),
extra_labels={
Expand Down