From 278b9130b01eb352d9c8f8fdcec1d3b419879295 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Wed, 16 Oct 2024 17:47:12 +0200 Subject: [PATCH] test: (mpp) manifests for container embed Add mpp files to create manifests that will embed the container (that contains /dev/null) in an OS tree and compose an ostree commit from it. This used to cause the rpm-ostree compose command to fail with: error: Writing commit: While writing rootfs to mtree: Not a regular file or symlink: null --- .../fedora-ostree-container-dev-null.mpp.yaml | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 test/data/manifests/fedora-ostree-container-dev-null.mpp.yaml diff --git a/test/data/manifests/fedora-ostree-container-dev-null.mpp.yaml b/test/data/manifests/fedora-ostree-container-dev-null.mpp.yaml new file mode 100644 index 00000000..2b6ee668 --- /dev/null +++ b/test/data/manifests/fedora-ostree-container-dev-null.mpp.yaml @@ -0,0 +1,113 @@ +version: '2' +pipelines: + - mpp-import-pipelines: + path: fedora-vars.ipp.yaml + - mpp-import-pipeline: + path: fedora-build-v2.ipp.yaml + id: build + runner: + mpp-format-string: org.osbuild.fedora{release} + # The input-tree pipeline will contain the container archive from the inline + # source to we can use it with the skopeo stage in the os pipeline + - name: input-tree + build: name:build + stages: + - type: org.osbuild.copy + inputs: + inlinefile: + type: org.osbuild.files + origin: org.osbuild.source + mpp-embed: + id: container-with-devnull.tar + path: container-with-devnull.tar + options: + paths: + - from: + mpp-format-string: input://inlinefile/{embedded['container-with-devnull.tar']} + to: tree:///container-with-devnull.tar + - name: os + build: name:build + stages: + - type: org.osbuild.rpm + inputs: + packages: + type: org.osbuild.files + origin: org.osbuild.source + mpp-depsolve: + architecture: $arch + module-platform-id: $module_platform_id + repos: + mpp-eval: repos + packages: + - basesystem + - container-selinux + - coreutils + - dracut-config-generic + - glibc + - kernel + - policycoreutils + - policycoreutils-python-utils + - rpm + - rpm-ostree + - selinux-policy-targeted + - setools-console + excludes: + - dracut-config-rescue + options: + gpgkeys: + mpp-eval: gpgkeys + exclude: + docs: true + disable_dracut: true + # Copy the container archive from the input-tree pipeline into the + # container storage + - type: org.osbuild.skopeo + inputs: + images: + type: org.osbuild.containers + origin: org.osbuild.pipeline + references: + name:input-tree: + name: localhost/container-with-devnull + options: + destination: + type: containers-storage + storage-path: /usr/share/containers/storage + - type: org.osbuild.selinux + options: + file_contexts: etc/selinux/targeted/contexts/files/file_contexts + - type: org.osbuild.ostree.preptree + options: + etc_group_members: + - wheel + - docker + - name: ostree-commit + build: name:build + stages: + - type: org.osbuild.ostree.init + options: + path: /repo + - type: org.osbuild.ostree.commit + inputs: + tree: + type: org.osbuild.tree + origin: org.osbuild.pipeline + references: + - name:os + options: + ref: + mpp-format-string: '{ref}' + os_version: + mpp-format-string: '{release}' + - name: commit-archive + build: name:build + stages: + - type: org.osbuild.tar + inputs: + tree: + type: org.osbuild.tree + origin: org.osbuild.pipeline + references: + - name:ostree-commit + options: + filename: ostree-commit.tar