diff --git a/.travis.yml b/.travis.yml index 9e7cdc7a1..4e438dfe7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,4 +19,4 @@ matrix: script: # ubuntu's rpm package sets dbpath to ~/.rpmdb, which makes rpm fail... - sudo sh -c 'mkdir /etc/rpm; echo "%_dbpath /var/lib/rpm" > /etc/rpm/macros' - - sudo env "PATH=$PATH" "OSBUILD_TEST_BUILD_PIPELINE=tools/test_image_info/build-from-yum.json" python3 -m unittest tools.test_image_info + - sudo env "PATH=$PATH" "OSBUILD_TEST_BUILD_PIPELINE=test/build-from-yum.json" test/run diff --git a/internal/blueprint/blueprint_test.go b/internal/blueprint/blueprint_test.go index 47b22667c..9484e975e 100644 --- a/internal/blueprint/blueprint_test.go +++ b/internal/blueprint/blueprint_test.go @@ -60,7 +60,7 @@ func TestListOutputFormats(t *testing.T) { } func TestBlueprint_ToPipeline(t *testing.T) { - pipelinePath := "../../tools/test_image_info/pipelines/" + pipelinePath := "../../test/cases/" fileInfos, err := ioutil.ReadDir(pipelinePath) if err != nil { t.Errorf("Could not read pipelines directory '%s': %v", pipelinePath, err) diff --git a/tools/test_image_info/build-from-yum.json b/test/build-from-yum.json similarity index 100% rename from tools/test_image_info/build-from-yum.json rename to test/build-from-yum.json diff --git a/tools/test_image_info/pipelines/ami_empty_blueprint.json b/test/cases/ami_empty_blueprint.json similarity index 98% rename from tools/test_image_info/pipelines/ami_empty_blueprint.json rename to test/cases/ami_empty_blueprint.json index 109e99963..47ac638cf 100644 --- a/tools/test_image_info/pipelines/ami_empty_blueprint.json +++ b/test/cases/ami_empty_blueprint.json @@ -1,5 +1,6 @@ { "compose": { + "filename": "image.ami", "output-format": "ami", "blueprint": {} }, @@ -116,16 +117,6 @@ "expected": { "bootloader": "grub", "bootmenu": [ - { - "grub_arg": "--unrestricted", - "grub_class": "kernel", - "grub_users": "$grub_users", - "initrd": "/initramfs-0-rescue-ffffffffffffffffffffffffffffffff.img", - "linux": "/vmlinuz-0-rescue-ffffffffffffffffffffffffffffffff", - "options": "$kernelopts", - "title": "Fedora (0-rescue-ffffffffffffffffffffffffffffffff) 30 (Thirty)", - "version": "0-rescue-ffffffffffffffffffffffffffffffff" - }, { "grub_arg": "--unrestricted", "grub_class": "kernel", @@ -254,7 +245,6 @@ "dnf-plugins-core-4.0.6-1.fc30.noarch", "dnf-yum-4.2.2-2.fc30.noarch", "dracut-049-26.git20181204.fc30.x86_64", - "dracut-config-rescue-049-26.git20181204.fc30.x86_64", "e2fsprogs-1.44.6-1.fc30.x86_64", "e2fsprogs-libs-1.44.6-1.fc30.x86_64", "ebtables-2.0.10-31.fc30.x86_64", diff --git a/tools/test_image_info/pipelines/disk_empty_blueprint.json b/test/cases/disk_empty_blueprint.json similarity index 97% rename from tools/test_image_info/pipelines/disk_empty_blueprint.json rename to test/cases/disk_empty_blueprint.json index dd2ce4587..4f8702ed4 100644 --- a/tools/test_image_info/pipelines/disk_empty_blueprint.json +++ b/test/cases/disk_empty_blueprint.json @@ -1,6 +1,7 @@ { "compose": { "output-format": "partitioned-disk", + "filename": "disk.img", "blueprint": {} }, "pipeline": { @@ -112,16 +113,6 @@ "expected": { "bootloader": "grub", "bootmenu": [ - { - "grub_arg": "--unrestricted", - "grub_class": "kernel", - "grub_users": "$grub_users", - "initrd": "/initramfs-0-rescue-ffffffffffffffffffffffffffffffff.img", - "linux": "/vmlinuz-0-rescue-ffffffffffffffffffffffffffffffff", - "options": "$kernelopts", - "title": "Fedora (0-rescue-ffffffffffffffffffffffffffffffff) 30 (Thirty)", - "version": "0-rescue-ffffffffffffffffffffffffffffffff" - }, { "grub_arg": "--unrestricted", "grub_class": "kernel", @@ -248,7 +239,6 @@ "dnf-plugins-core-4.0.6-1.fc30.noarch", "dnf-yum-4.2.2-2.fc30.noarch", "dracut-049-26.git20181204.fc30.x86_64", - "dracut-config-rescue-049-26.git20181204.fc30.x86_64", "e2fsprogs-1.44.6-1.fc30.x86_64", "e2fsprogs-libs-1.44.6-1.fc30.x86_64", "ebtables-2.0.10-31.fc30.x86_64", diff --git a/tools/test_image_info/pipelines/ext4_empty_blueprint.json b/test/cases/ext4_empty_blueprint.json similarity index 99% rename from tools/test_image_info/pipelines/ext4_empty_blueprint.json rename to test/cases/ext4_empty_blueprint.json index a83129a77..ff0cf858e 100644 --- a/tools/test_image_info/pipelines/ext4_empty_blueprint.json +++ b/test/cases/ext4_empty_blueprint.json @@ -1,6 +1,7 @@ { "compose": { "output-format": "ext4-filesystem", + "filename": "filesystem.img", "blueprint": {} }, "pipeline": { diff --git a/tools/test_image_info/images/fedora-30-cloud-base.json b/test/cases/fedora-30-cloud-base.json similarity index 100% rename from tools/test_image_info/images/fedora-30-cloud-base.json rename to test/cases/fedora-30-cloud-base.json diff --git a/tools/test_image_info/pipelines/openstack_empty_blueprint.json b/test/cases/openstack_empty_blueprint.json similarity index 98% rename from tools/test_image_info/pipelines/openstack_empty_blueprint.json rename to test/cases/openstack_empty_blueprint.json index 45c5141bc..c17a10549 100644 --- a/tools/test_image_info/pipelines/openstack_empty_blueprint.json +++ b/test/cases/openstack_empty_blueprint.json @@ -1,6 +1,7 @@ { "compose": { "output-format": "openstack", + "filename": "image.qcow2", "blueprint": {} }, "pipeline": { @@ -116,16 +117,6 @@ "expected": { "bootloader": "grub", "bootmenu": [ - { - "grub_arg": "--unrestricted", - "grub_class": "kernel", - "grub_users": "$grub_users", - "initrd": "/initramfs-0-rescue-ffffffffffffffffffffffffffffffff.img", - "linux": "/vmlinuz-0-rescue-ffffffffffffffffffffffffffffffff", - "options": "$kernelopts", - "title": "Fedora (0-rescue-ffffffffffffffffffffffffffffffff) 30 (Thirty)", - "version": "0-rescue-ffffffffffffffffffffffffffffffff" - }, { "grub_arg": "--unrestricted", "grub_class": "kernel", @@ -255,7 +246,6 @@ "dnf-plugins-core-4.0.6-1.fc30.noarch", "dnf-yum-4.2.2-2.fc30.noarch", "dracut-049-26.git20181204.fc30.x86_64", - "dracut-config-rescue-049-26.git20181204.fc30.x86_64", "e2fsprogs-1.44.6-1.fc30.x86_64", "e2fsprogs-libs-1.44.6-1.fc30.x86_64", "ebtables-2.0.10-31.fc30.x86_64", diff --git a/tools/test_image_info/pipelines/qcow2_empty_blueprint.json b/test/cases/qcow2_empty_blueprint.json similarity index 99% rename from tools/test_image_info/pipelines/qcow2_empty_blueprint.json rename to test/cases/qcow2_empty_blueprint.json index 99cd353ac..96a52f5c9 100644 --- a/tools/test_image_info/pipelines/qcow2_empty_blueprint.json +++ b/test/cases/qcow2_empty_blueprint.json @@ -1,6 +1,7 @@ { "compose": { "output-format": "qcow2", + "filename": "image.qcow2", "blueprint": {} }, "pipeline": { diff --git a/tools/test_image_info/pipelines/vhd_empty_blueprint.json b/test/cases/vhd_empty_blueprint.json similarity index 97% rename from tools/test_image_info/pipelines/vhd_empty_blueprint.json rename to test/cases/vhd_empty_blueprint.json index a118e7ea4..1bcfb436e 100644 --- a/tools/test_image_info/pipelines/vhd_empty_blueprint.json +++ b/test/cases/vhd_empty_blueprint.json @@ -1,6 +1,7 @@ { "compose": { "output-format": "vhd", + "filename": "image.vhd", "blueprint": {} }, "pipeline": { @@ -115,16 +116,6 @@ "expected": { "bootloader": "grub", "bootmenu": [ - { - "grub_arg": "--unrestricted", - "grub_class": "kernel", - "grub_users": "$grub_users", - "initrd": "/initramfs-0-rescue-ffffffffffffffffffffffffffffffff.img", - "linux": "/vmlinuz-0-rescue-ffffffffffffffffffffffffffffffff", - "options": "$kernelopts", - "title": "Fedora (0-rescue-ffffffffffffffffffffffffffffffff) 30 (Thirty)", - "version": "0-rescue-ffffffffffffffffffffffffffffffff" - }, { "grub_arg": "--unrestricted", "grub_class": "kernel", @@ -252,7 +243,6 @@ "dnf-plugins-core-4.0.6-1.fc30.noarch", "dnf-yum-4.2.2-2.fc30.noarch", "dracut-049-26.git20181204.fc30.x86_64", - "dracut-config-rescue-049-26.git20181204.fc30.x86_64", "e2fsprogs-1.44.6-1.fc30.x86_64", "e2fsprogs-libs-1.44.6-1.fc30.x86_64", "ebtables-2.0.10-31.fc30.x86_64", diff --git a/tools/test_image_info/pipelines/vmdk_empty_blueprint.json b/test/cases/vmdk_empty_blueprint.json similarity index 97% rename from tools/test_image_info/pipelines/vmdk_empty_blueprint.json rename to test/cases/vmdk_empty_blueprint.json index e7102b624..894ab1451 100644 --- a/tools/test_image_info/pipelines/vmdk_empty_blueprint.json +++ b/test/cases/vmdk_empty_blueprint.json @@ -1,6 +1,7 @@ { "compose": { "output-format": "vmdk", + "filename": "disk.vmdk", "blueprint": {} }, "pipeline": { @@ -113,16 +114,6 @@ "expected": { "bootloader": "grub", "bootmenu": [ - { - "grub_arg": "--unrestricted", - "grub_class": "kernel", - "grub_users": "$grub_users", - "initrd": "/initramfs-0-rescue-ffffffffffffffffffffffffffffffff.img", - "linux": "/vmlinuz-0-rescue-ffffffffffffffffffffffffffffffff", - "options": "$kernelopts", - "title": "Fedora (0-rescue-ffffffffffffffffffffffffffffffff) 30 (Thirty)", - "version": "0-rescue-ffffffffffffffffffffffffffffffff" - }, { "grub_arg": "--unrestricted", "grub_class": "kernel", @@ -249,7 +240,6 @@ "dnf-plugins-core-4.0.6-1.fc30.noarch", "dnf-yum-4.2.2-2.fc30.noarch", "dracut-049-26.git20181204.fc30.x86_64", - "dracut-config-rescue-049-26.git20181204.fc30.x86_64", "e2fsprogs-1.44.6-1.fc30.x86_64", "e2fsprogs-libs-1.44.6-1.fc30.x86_64", "ebtables-2.0.10-31.fc30.x86_64", diff --git a/test/run b/test/run new file mode 100755 index 000000000..db5567e27 --- /dev/null +++ b/test/run @@ -0,0 +1,89 @@ +#!/usr/bin/python3 + +import contextlib +import glob +import json +import os +import shutil +import subprocess +import sys +import tempfile +import unittest +import urllib.request + + +TEST_DIR = os.path.dirname(__file__) + + +@contextlib.contextmanager +def osbuild_test_store(): + store = os.getenv("OSBUILD_TEST_STORE") + if store: + yield store + else: + with tempfile.TemporaryDirectory(dir="/var/tmp", prefix="osbuild-composer-test-") as store: + yield store + + +@contextlib.contextmanager +def temporary_json_file(obj): + f = tempfile.NamedTemporaryFile("w", delete=False) + json.dump(obj, f, indent=2) + f.close() + try: + yield f.name + finally: + os.unlink(f.name) + + +def run_osbuild(pipeline, store): + osbuild_cmd = ["python3", "-m", "osbuild", "--json", "--libdir", ".", "--store", store, "-"] + + build_pipeline = os.getenv("OSBUILD_TEST_BUILD_PIPELINE", None) + if build_pipeline: + osbuild_cmd.append("--build-pipeline") + osbuild_cmd.append(os.path.abspath(build_pipeline)) + + try: + result = json.loads(subprocess.check_output(osbuild_cmd, cwd="./osbuild", encoding="utf-8", input=json.dumps(pipeline))) + except subprocess.CalledProcessError as err: + print(err.output) + + return result["tree_id"], result["output_id"] + + +def run_test(case, store): + if "pipeline" in case: + _, output_id = run_osbuild(case["pipeline"], store) + filename = os.path.join(store, "refs", output_id, case["compose"]["filename"]) + else: + filename, _ = urllib.request.urlretrieve(case["url"]) + + info = json.loads(subprocess.check_output(["tools/image-info", filename])) + if info != case["expected"]: + with temporary_json_file(case["expected"]) as a, temporary_json_file(info) as b: + subprocess.run(["diff", "--unified", "--color", "--label", "expected", a, "--label", "got", b], check=False) + return False + + return True + + +def main(args): + failed = False + with osbuild_test_store() as store: + for filename in args or glob.glob(f"{TEST_DIR}/cases/*.json"): + name = os.path.basename(filename)[:-5] + with open(filename) as f: + case = json.load(f) + + print(f"{name}") + if not run_test(case, store): + print(f"FAIL") + print() + failed = True + + return 1 if failed else 0 + +r = main(sys.argv[1:]) +if r: + sys.exit(r) diff --git a/tools/test_image_info/__init__.py b/tools/test_image_info/__init__.py deleted file mode 100644 index 205e3ca73..000000000 --- a/tools/test_image_info/__init__.py +++ /dev/null @@ -1,89 +0,0 @@ -import json -import os -import shutil -import subprocess -import sys -import tempfile -import unittest -import urllib.request - - -TEST_DIR = os.path.dirname(__file__) - - -def json_files(path): - """Reads .json files in path and yields (name, blob) for each of them.""" - for entry in os.scandir(path): - name, ext = os.path.splitext(entry.name) - if ext == ".json": - with open(entry.path) as f: - data = json.load(f) - yield name, data - - -class TestImageInfo(unittest.TestCase): - """Tests for image-info - - All tests share the same osbuild store to make running them more efficient. - That's ok, because we're not testing osbuild itself. - """ - - @classmethod - def setUpClass(cls): - cls.store = tempfile.mkdtemp(dir="/var/tmp", prefix="osbuild-composer-test-") - - @classmethod - def tearDownClass(cls): - shutil.rmtree(cls.store) - - def run_osbuild(self, pipeline, input=None): - osbuild_cmd = ["python3", "-m", "osbuild", "--json", "--libdir", ".", "--store", self.store, pipeline] - - build_pipeline = os.getenv("OSBUILD_TEST_BUILD_PIPELINE", None) - if build_pipeline: - osbuild_cmd.append("--build-pipeline") - osbuild_cmd.append(os.path.abspath(build_pipeline)) - - try: - result = json.loads(subprocess.check_output(osbuild_cmd, cwd="./osbuild", encoding="utf-8", input=input)) - except subprocess.CalledProcessError as err: - print(err.output, file=sys.stderr) - - return result["tree_id"], result["output_id"] - - def run_image_info(self, image): - return json.loads(subprocess.check_output(["tools/image-info", image])) - - @unittest.skip("run too long") - def test_pipelines(self): - """Run image-info against an image generated by an osbuild pipepline - - The test case should have these keys: - "pipeline": the pipeline to run, which should have an assembler - with a "filename" option - "expected": the expected output from image-info - """ - for name, case in json_files(f"{TEST_DIR}/pipelines"): - if "expected" not in case: - continue - with self.subTest(name): - _, output_id = self.run_osbuild("-", input=json.dumps(case["pipeline"])) - filename = os.path.join(self.store, "refs", output_id, case["pipeline"]["assembler"]["options"]["filename"]) - info = self.run_image_info(filename) - self.assertEqual(info, case["expected"]) - - def test_images(self): - """Run image-info against an image from the web - - The test case should have these keys: - "url": the url at which to find the image - "expected": the expected output from image-info - """ - for name, case in json_files(f"{TEST_DIR}/images"): - with self.subTest(name): - try: - filename, _ = urllib.request.urlretrieve(case["url"]) - info = self.run_image_info(filename) - self.assertEqual(info, case["expected"]) - finally: - urllib.request.urlcleanup() diff --git a/tools/test_image_info/pipelines/empty-qcow2.json b/tools/test_image_info/pipelines/empty-qcow2.json deleted file mode 100644 index abf410045..000000000 --- a/tools/test_image_info/pipelines/empty-qcow2.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "pipeline": { - "build": { - "stages": [ - { - "name": "org.osbuild.dnf", - "options": { - "releasever": "30", - "basearch": "x86_64", - "install_weak_deps": false, - "repos": [ - { - "metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch", - "checksum": "sha256:9f596e18f585bee30ac41c11fb11a83ed6b11d5b341c1cb56ca4015d7717cb97", - "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBFturGcBEACv0xBo91V2n0uEC2vh69ywCiSyvUgN/AQH8EZpCVtM7NyjKgKm\nbbY4G3R0M3ir1xXmvUDvK0493/qOiFrjkplvzXFTGpPTi0ypqGgxc5d0ohRA1M75\nL+0AIlXoOgHQ358/c4uO8X0JAA1NYxCkAW1KSJgFJ3RjukrfqSHWthS1d4o8fhHy\nKJKEnirE5hHqB50dafXrBfgZdaOs3C6ppRIePFe2o4vUEapMTCHFw0woQR8Ah4/R\nn7Z9G9Ln+0Cinmy0nbIDiZJ+pgLAXCOWBfDUzcOjDGKvcpoZharA07c0q1/5ojzO\n4F0Fh4g/BUmtrASwHfcIbjHyCSr1j/3Iz883iy07gJY5Yhiuaqmp0o0f9fgHkG53\n2xCU1owmACqaIBNQMukvXRDtB2GJMuKa/asTZDP6R5re+iXs7+s9ohcRRAKGyAyc\nYKIQKcaA+6M8T7/G+TPHZX6HJWqJJiYB+EC2ERblpvq9TPlLguEWcmvjbVc31nyq\nSDoO3ncFWKFmVsbQPTbP+pKUmlLfJwtb5XqxNR5GEXSwVv4I7IqBmJz1MmRafnBZ\ng0FJUtH668GnldO20XbnSVBr820F5SISMXVwCXDXEvGwwiB8Lt8PvqzXnGIFDAu3\nDlQI5sxSqpPVWSyw08ppKT2Tpmy8adiBotLfaCFl2VTHwOae48X2dMPBvQARAQAB\ntDFGZWRvcmEgKDMwKSA8ZmVkb3JhLTMwLXByaW1hcnlAZmVkb3JhcHJvamVjdC5v\ncmc+iQI4BBMBAgAiBQJbbqxnAhsPBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAK\nCRDvPBEfz8ZZudTnD/9170LL3nyTVUCFmBjT9wZ4gYnpwtKVPa/pKnxbbS+Bmmac\ng9TrT9pZbqOHrNJLiZ3Zx1Hp+8uxr3Lo6kbYwImLhkOEDrf4aP17HfQ6VYFbQZI8\nf79OFxWJ7si9+3gfzeh9UYFEqOQfzIjLWFyfnas0OnV/P+RMQ1Zr+vPRqO7AR2va\nN9wg+Xl7157dhXPCGYnGMNSoxCbpRs0JNlzvJMuAea5nTTznRaJZtK/xKsqLn51D\nK07k9MHVFXakOH8QtMCUglbwfTfIpO5YRq5imxlWbqsYWVQy1WGJFyW6hWC0+RcJ\nOx5zGtOfi4/dN+xJ+ibnbyvy/il7Qm+vyFhCYqIPyS5m2UVJUuao3eApE38k78/o\n8aQOTnFQZ+U1Sw+6woFTxjqRQBXlQm2+7Bt3bqGATg4sXXWPbmwdL87Ic+mxn/ml\nSMfQux/5k6iAu1kQhwkO2YJn9eII6HIPkW+2m5N1JsUyJQe4cbtZE5Yh3TRA0dm7\n+zoBRfCXkOW4krchbgww/ptVmzMMP7GINJdROrJnsGl5FVeid9qHzV7aZycWSma7\nCxBYB1J8HCbty5NjtD6XMYRrMLxXugvX6Q4NPPH+2NKjzX4SIDejS6JjgrP3KA3O\npMuo7ZHMfveBngv8yP+ZD/1sS6l+dfExvdaJdOdgFCnp4p3gPbw5+Lv70HrMjA==\n=BfZ/\n-----END PGP PUBLIC KEY BLOCK-----\n" - } - ], - "packages": [ - "dnf", - "e2fsprogs", - "grub2-pc", - "policycoreutils", - "qemu-img", - "systemd" - ] - } - } - ] - }, - "assembler": { - "name": "org.osbuild.qemu", - "options": { - "filename": "empty.qcow2", - "format": "qcow2", - "root_fs_uuid": "ef157bb8-5c6f-4f10-a275-24f92e8c6370", - "ptuuid": "4ca14fe5-cccf-4780-9fc6-a2b387d3b703", - "size": 10485760 - } - } - }, - "expected": { - "bootloader": "grub", - "image-format": "qcow2", - "partition-table": "dos", - "partition-table-id": "0x4ca14fe5", - "partitions": [ - { - "bootable": true, - "fstype": "ext4", - "label": null, - "size": 9437184, - "start": 1048576, - "type": "83", - "uuid": "ef157bb8-5c6f-4f10-a275-24f92e8c6370" - } - ] - } -} diff --git a/tools/test_image_info/pipelines/invalid_blueprint.json b/tools/test_image_info/pipelines/invalid_blueprint.json deleted file mode 100644 index 0b84e9387..000000000 --- a/tools/test_image_info/pipelines/invalid_blueprint.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compose": { - "output-format": "invalid", - "blueprint": {} - } -} diff --git a/tools/test_image_info/pipelines/liveiso_empty_blueprint.json b/tools/test_image_info/pipelines/liveiso_empty_blueprint.json deleted file mode 100644 index 84652cc96..000000000 --- a/tools/test_image_info/pipelines/liveiso_empty_blueprint.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "compose": { - "output-format": "live-iso", - "blueprint": {} - }, - "pipeline": { - "build": { - "stages": [ - { - "name": "org.osbuild.dnf", - "options": { - "repos": [ - { - "metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch", - "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBFturGcBEACv0xBo91V2n0uEC2vh69ywCiSyvUgN/AQH8EZpCVtM7NyjKgKm\nbbY4G3R0M3ir1xXmvUDvK0493/qOiFrjkplvzXFTGpPTi0ypqGgxc5d0ohRA1M75\nL+0AIlXoOgHQ358/c4uO8X0JAA1NYxCkAW1KSJgFJ3RjukrfqSHWthS1d4o8fhHy\nKJKEnirE5hHqB50dafXrBfgZdaOs3C6ppRIePFe2o4vUEapMTCHFw0woQR8Ah4/R\nn7Z9G9Ln+0Cinmy0nbIDiZJ+pgLAXCOWBfDUzcOjDGKvcpoZharA07c0q1/5ojzO\n4F0Fh4g/BUmtrASwHfcIbjHyCSr1j/3Iz883iy07gJY5Yhiuaqmp0o0f9fgHkG53\n2xCU1owmACqaIBNQMukvXRDtB2G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X6Q4NPPH+2NKjzX4SIDejS6JjgrP3KA3O\npMuo7ZHMfveBngv8yP+ZD/1sS6l+dfExvdaJdOdgFCnp4p3gPbw5+Lv70HrMjA==\n=BfZ/\n-----END PGP PUBLIC KEY BLOCK-----\n", - "checksum": "sha256:9f596e18f585bee30ac41c11fb11a83ed6b11d5b341c1cb56ca4015d7717cb97" - } - ], - "packages": [ - "dnf", - "e2fsprogs", - "policycoreutils", - "qemu-img", - "systemd", - "grub2-pc", - "tar" - ], - "releasever": "30", - "basearch": "x86_64" - } - } - ] - }, - "stages": [ - { - "name": "org.osbuild.dnf", - "options": { - "repos": [ - { - "metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch", - "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBFturGcBEACv0xBo91V2n0uEC2vh69ywCiSyvUgN/AQH8EZpCVtM7NyjKgKm\nbbY4G3R0M3ir1xXmvUDvK0493/qOiFrjkplvzXFTGpPTi0ypqGgxc5d0ohRA1M75\nL+0AIlXoOgHQ358/c4uO8X0JAA1NYxCkAW1KSJgFJ3RjukrfqSHWthS1d4o8fhHy\nKJKEnirE5hHqB50dafXrBfgZdaOs3C6ppRIePFe2o4vUEapMTCHFw0woQR8Ah4/R\nn7Z9G9Ln+0Cinmy0nbIDiZJ+pgLAXCOWBfDUzcOjDGKvcpoZharA07c0q1/5ojzO\n4F0Fh4g/BUmtrASwHfcIbjHyCSr1j/3Iz883iy07gJY5Yhiuaqmp0o0f9fgHkG53\n2xCU1owmACqaIBNQMukvXRDtB2GJMuKa/asTZDP6R5re+iXs7+s9ohcRRAKGyAyc\nYKIQKcaA+6M8T7/G+TPHZX6HJWqJJiYB+EC2ERblpvq9TPlLguEWcmvjbVc31nyq\nSDoO3ncFWKFmVsbQPTbP+pKUmlLfJwtb5XqxNR5GEXSwVv4I7IqBmJz1MmRafnBZ\ng0FJUtH668GnldO20XbnSVBr820F5SISMXVwCXDXEvGwwiB8Lt8P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"kernel", - "selinux-policy-targeted", - "grub2-pc", - "spice-vdagent", - "qemu-guest-agent", - "xen-libs", - "langpacks-en" - ], - "releasever": "30", - "basearch": "x86_64" - } - }, - { - "name": "org.osbuild.fix-bls", - "options": {} - }, - { - "name": "org.osbuild.locale", - "options": { - "language": "en_US" - } - }, - { - "name": "org.osbuild.selinux", - "options": { - "file_contexts": "etc/selinux/targeted/contexts/files/file_contexts" - } - } - ], - "assembler": { - "name": "org.osbuild.qemu", - "options": { - "format": "raw", - "filename": "image.iso", - "ptuuid": "0x14fc63d2", - "root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac", - "size": 3221225472 - } - } - } -} diff --git a/tools/test_image_info/pipelines/tar_empty_blueprint.json b/tools/test_image_info/pipelines/tar_empty_blueprint.json deleted file mode 100644 index c0cfbc9bb..000000000 --- a/tools/test_image_info/pipelines/tar_empty_blueprint.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "compose": { - "output-format": "tar", - "blueprint": {} - }, - "pipeline": { - "build": { - "stages": [ - { - "name": "org.osbuild.dnf", - "options": { - "repos": [ - { - "metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch", - "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBFturGcBEACv0xBo91V2n0uEC2vh69ywCiSyvUgN/AQH8EZpCVtM7NyjKgKm\nbbY4G3R0M3ir1xXmvUDvK0493/qOiFrjkplvzXFTGpPTi0ypqGgxc5d0ohRA1M75\nL+0AIlXoOgHQ358/c4uO8X0JAA1NYxCkAW1KSJgFJ3RjukrfqSHWthS1d4o8fhHy\nKJKEnirE5hHqB50dafXrBfgZdaOs3C6ppRIePFe2o4vUEapMTCHFw0woQR8Ah4/R\nn7Z9G9Ln+0Cinmy0nbIDiZJ+pgLAXCOWBfDUzcOjDGKvcpoZharA07c0q1/5ojzO\n4F0Fh4g/BUmtrASwHfcIbjHyCSr1j/3Iz883iy07gJY5Yhiuaqmp0o0f9fg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nCxBYB1J8HCbty5NjtD6XMYRrMLxXugvX6Q4NPPH+2NKjzX4SIDejS6JjgrP3KA3O\npMuo7ZHMfveBngv8yP+ZD/1sS6l+dfExvdaJdOdgFCnp4p3gPbw5+Lv70HrMjA==\n=BfZ/\n-----END PGP PUBLIC KEY BLOCK-----\n", - "checksum": "sha256:9f596e18f585bee30ac41c11fb11a83ed6b11d5b341c1cb56ca4015d7717cb97" - } - ], - "packages": [ - "dnf", - "e2fsprogs", - "policycoreutils", - "qemu-img", - "systemd", - "grub2-pc", - "tar" - ], - "releasever": "30", - "basearch": "x86_64" - } - } - ] - }, - "stages": [ - { - "name": "org.osbuild.dnf", - "options": { - "repos": [ - { - "metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch", - "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBFturGcBEACv0xBo91V2n0uEC2vh69ywCiSyvUgN/AQH8EZpCVtM7NyjKgKm\nbbY4G3R0M3ir1xXmvUDvK0493/qOiFrjkplvzXFTGpPTi0ypqGgxc5d0ohRA1M75\nL+0AIlXoOgHQ358/c4uO8X0JAA1NYxCkAW1KSJgFJ3RjukrfqSHWthS1d4o8fhHy\nKJKEnirE5hHqB50dafXrBfgZdaOs3C6ppRIePFe2o4vUEapMTCHFw0woQR8Ah4/R\nn7Z9G9Ln+0Cinmy0nbIDiZJ+pgLAXCOWBfDUzcOjDGKvcpoZharA07c0q1/5ojzO\n4F0Fh4g/BUmtrASwHfcIbjHyCSr1j/3Iz883iy07gJY5Yhiuaqmp0o0f9fgHkG53\n2xCU1owmACqaIBNQMukvXRDtB2GJMuKa/asTZDP6R5re+iXs7+s9ohcRRAKGyAyc\nYKIQKcaA+6M8T7/G+TPHZX6HJWqJJiYB+EC2ERblpvq9TPlLguEWcmvjbVc31nyq\nSDoO3ncFWKFmVsbQPTbP+pKUmlLfJwtb5XqxNR5GEXSwVv4I7IqBmJz1MmRafnBZ\ng0FJUtH668GnldO20Xbn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717cb97" - } - ], - "packages": [ - "policycoreutils", - "selinux-policy-targeted", - "kernel", - "firewalld", - "chrony", - "langpacks-en" - ], - "exclude_packages": [ - "dracut-config-rescue" - ], - "releasever": "30", - "basearch": "x86_64" - } - }, - { - "name": "org.osbuild.locale", - "options": { - "language": "en_US" - } - }, - { - "name": "org.osbuild.grub2", - "options": { - "root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac", - "boot_fs_uuid": "00000000-0000-0000-0000-000000000000", - "kernel_opts": "ro biosdevname=0 net.ifnames=0" - } - }, - { - "name": "org.osbuild.fix-bls", - "options": {} - }, - { - "name": "org.osbuild.selinux", - "options": { - "file_contexts": "etc/selinux/targeted/contexts/files/file_contexts" - } - } - ], - "assembler": { - "name": "org.osbuild.tar", - "options": { - "filename": "root.tar.xz" - } - } - } -}