Compare commits

...

No commits in common. "c8" and "c9s" have entirely different histories.
c8 ... c9s

23 changed files with 32803 additions and 113 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

99
.gitignore vendored
View File

@ -1 +1,98 @@
SOURCES/osbuild-93.tar.gz
/1.tar.gz
/2.tar.gz
/3.tar.gz
/4.tar.gz
/5.tar.gz
/6.tar.gz
/7.tar.gz
/osbuild-8.tar.gz
/osbuild-9.tar.gz
/osbuild-10.tar.gz
/osbuild-11.tar.gz
/osbuild-12.tar.gz
/osbuild-13.tar.gz
/osbuild-14.tar.gz
/osbuild-15.tar.gz
/osbuild-16.tar.gz
/osbuild-17.tar.gz
/osbuild-18.tar.gz
/osbuild-19.tar.gz
/osbuild-20.tar.gz
/osbuild-21.tar.gz
/osbuild-22.tar.gz
/osbuild-23.tar.gz
/osbuild-24.tar.gz
/osbuild-25.tar.gz
/osbuild-26.tar.gz
/osbuild-27.tar.gz
/osbuild-29.tar.gz
/osbuild-30.tar.gz
/osbuild-31.tar.gz
/osbuild-32.tar.gz
/osbuild-33.tar.gz
/osbuild-34.tar.gz
/osbuild-35.tar.gz
/osbuild-39.tar.gz
/osbuild-42.tar.gz
/osbuild-43.tar.gz
/osbuild-44.tar.gz
/osbuild-45.tar.gz
/osbuild-46.tar.gz
/osbuild-47.tar.gz
/osbuild-48.tar.gz
/osbuild-49.tar.gz
/osbuild-50.tar.gz
/osbuild-52.tar.gz
/osbuild-53.tar.gz
/osbuild-54.tar.gz
/osbuild-55.tar.gz
/osbuild-56.tar.gz
/osbuild-57.tar.gz
/osbuild-58.tar.gz
/osbuild-59.tar.gz
/osbuild-60.tar.gz
/osbuild-61.tar.gz
/osbuild-62.tar.gz
/osbuild-63.tar.gz
/osbuild-64.tar.gz
/osbuild-65.tar.gz
/osbuild-69.tar.gz
/osbuild-70.tar.gz
/osbuild-71.tar.gz
/osbuild-72.tar.gz
/osbuild-73.tar.gz
/osbuild-74.tar.gz
/osbuild-75.tar.gz
/osbuild-76.tar.gz
/osbuild-77.tar.gz
/osbuild-78.tar.gz
/osbuild-79.tar.gz
/osbuild-80.tar.gz
/osbuild-81.tar.gz
/osbuild-82.tar.gz
/osbuild-84.tar.gz
/osbuild-85.tar.gz
/osbuild-86.tar.gz
/osbuild-87.tar.gz
/osbuild-88.tar.gz
/osbuild-89.tar.gz
/osbuild-90.tar.gz
/osbuild-91.tar.gz
/osbuild-92.tar.gz
/osbuild-93.tar.gz
/osbuild-94.tar.gz
/osbuild-95.tar.gz
/osbuild-96.tar.gz
/osbuild-97.tar.gz
/osbuild-98.tar.gz
/osbuild-99.tar.gz
/osbuild-100.tar.gz
/osbuild-101.tar.gz
/osbuild-102.tar.gz
/osbuild-103.tar.gz
/osbuild-104.tar.gz
/osbuild-105.tar.gz
/osbuild-106.tar.gz
/osbuild-109.tar.gz
/osbuild-110.tar.gz
/osbuild-111.tar.gz

View File

@ -1 +1 @@
4ef37f2c681bcf4f4ae6099726b1617fe1db471e SOURCES/osbuild-93.tar.gz
781319d0ac4d5d24e3b607c177efbab61560a022 osbuild-111.tar.gz

27
PR1539.patch Normal file
View File

@ -0,0 +1,27 @@
From 01446c54110e929d5b1a315003cdcce5032a7427 Mon Sep 17 00:00:00 2001
From: Michael Vogt <michael.vogt@gmail.com>
Date: Wed, 17 Jan 2024 08:45:19 +0100
Subject: [PATCH] test: export schemas in testing_libdir_fixture
When constructing a minimal environment for osbuild the exported
dirs lacked "schemas" so the test_exports.py test failed on RHEL8.
This commit adds it (and also "assemblers" for good measure). With
that the test will pass.
---
test/run/test_exports.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/run/test_exports.py b/test/run/test_exports.py
index 12b4cfe73..d89096494 100644
--- a/test/run/test_exports.py
+++ b/test/run/test_exports.py
@@ -58,7 +58,7 @@ def testing_libdir_fixture(tmpdir_factory):
# in buildroot.py
(fake_libdir_path / "osbuild").mkdir()
# construct minimal viable libdir from current checkout
- for d in ["stages", "runners", ]:
+ for d in ["stages", "runners", "schemas", "assemblers"]:
subprocess.run(
["cp", "-a", os.fspath(project_path / d), f"{fake_libdir_path}"],
check=True)

24
PR1540.patch Normal file
View File

@ -0,0 +1,24 @@
From 49d9cc5897ec2b47ee5ef3254e5d93c7aecb3a52 Mon Sep 17 00:00:00 2001
From: Michael Vogt <michael.vogt@gmail.com>
Date: Wed, 17 Jan 2024 09:05:13 +0100
Subject: [PATCH] test: check that `mkfs.fat` has the `-g` option in `test_fat`
Older versions of RHEL/Centos do not have `mkfs.fat -g` yet so
this test will fail. Detect this and skip the test if mkfs.fat
is too old (see 7af2f1a for the original commit).
---
test/run/test_stages.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/test/run/test_stages.py b/test/run/test_stages.py
index bc6d8b31c..f6156369d 100644
--- a/test/run/test_stages.py
+++ b/test/run/test_stages.py
@@ -573,6 +573,7 @@ def test_btrfs(self):
assert "path home" in subvols[1]
@unittest.skipUnless(test.TestBase.has_filesystem_support("fat"), "FAT needed")
+ @unittest.skipUnless("-g GEOM" in subprocess.getoutput("mkfs.fat"), "mkfs.fat -g GEOM missing")
def test_fat(self):
def _get_file_fields(image: str) -> List[str]:
r = subprocess.run(

43
PR1541.patch Normal file
View File

@ -0,0 +1,43 @@
From 78fc821803ce62d7f2846cb7c581d68c2be74c73 Mon Sep 17 00:00:00 2001
From: Michael Vogt <michael.vogt@gmail.com>
Date: Wed, 17 Jan 2024 09:29:26 +0100
Subject: [PATCH] test: fix `test_libc_futimes_works`
The test_libc_futimes_works() is failing under RHEL/Centos right
now. To make it more robust a tiny sleep and rounding of the
timestamps is introduced to ensure that we are not run into
floating point comaparison funnines.
The second part of the fix is to open the stamp_file in read-only
mode to ensure that the mtime is not modified by the open itself
which is what lead to the actual test failure.
---
test/mod/test_util_linux.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/mod/test_util_linux.py b/test/mod/test_util_linux.py
index be31723d3..518a4bfa2 100644
--- a/test/mod/test_util_linux.py
+++ b/test/mod/test_util_linux.py
@@ -6,6 +6,7 @@
import os
import subprocess
import tempfile
+import time
import pytest
@@ -255,10 +256,11 @@ def test_libc_futimes_works(tmpdir):
with open(stamp_file, "wb") as fp:
fp.write(b"meep")
mtime1 = os.stat(stamp_file).st_mtime
- with open(stamp_file, "wb") as fp:
+ time.sleep(0.1)
+ with open(stamp_file, "rb") as fp:
libc.futimens(fp.fileno(), ctypes.byref(linux.c_timespec_times2(
atime=linux.c_timespec(tv_sec=3, tv_nsec=300 * 1000 * 1000),
mtime=linux.c_timespec(tv_sec=0, tv_nsec=libc.UTIME_OMIT),
)))
assert os.stat(stamp_file).st_atime == 3.3
- assert os.stat(stamp_file).st_mtime == mtime1
+ assert round(os.stat(stamp_file).st_mtime, 3) == round(mtime1, 3)

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# osbuild
The osbuild package

View File

@ -1,35 +0,0 @@
From dcb0850a2edccd1067385c4a50dd2aab62778009 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Budai?= <ondrej@budai.cz>
Date: Fri, 1 Sep 2023 14:40:06 +0200
Subject: [PATCH] stages/org.osbuild.keymap: create xorg.conf.d if it doesn't
exist
Newer versions of Fedora don't create this directory by default. This
commit modifies the stage so it creates it if it doesn't exist.
---
stages/org.osbuild.keymap | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stages/org.osbuild.keymap b/stages/org.osbuild.keymap
index 7878fa08..c3a292f5 100755
--- a/stages/org.osbuild.keymap
+++ b/stages/org.osbuild.keymap
@@ -18,7 +18,6 @@ be configured for the X11 keyboard.
Valid keymaps are generally found in /lib/kbd/keymaps.
"""
-
import os
import subprocess
import sys
@@ -74,6 +73,7 @@ Section "InputClass"
EndSection
"""
+ os.makedirs(f"{tree}/etc/X11/xorg.conf.d", mode=0o755, exist_ok=True)
with open(f"{tree}/etc/X11/xorg.conf.d/00-keyboard.conf", "w", encoding="utf8") as f:
f.write(file_content)
--
2.43.0

19
gating.yaml Normal file
View File

@ -0,0 +1,19 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- rhel-8
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1,7 +1,7 @@
%global forgeurl https://github.com/osbuild/osbuild
%global selinuxtype targeted
Version: 93
Version: 111
%forgemeta
@ -9,7 +9,7 @@ Version: 93
%global pkgdir %{_prefix}/lib/%{pypi_name}
Name: %{pypi_name}
Release: 1%{?dist}.1
Release: 1%{?dist}
License: Apache-2.0
URL: %{forgeurl}
@ -18,9 +18,6 @@ Source0: %{forgesource}
BuildArch: noarch
Summary: A build system for OS images
# https://github.com/osbuild/osbuild/commit/dcb0850a2edccd1067385c4a50dd2aab62778009
Patch0: stages-org.osbuild.keymap-create-xorg.conf.d-if-it-d.patch
BuildRequires: make
BuildRequires: python3-devel
BuildRequires: python3-docutils
@ -42,6 +39,12 @@ Requires: util-linux
Requires: python3-%{pypi_name} = %{version}-%{release}
Requires: (%{name}-selinux if selinux-policy-%{selinuxtype})
# This is required for `osbuild`, for RHEL-10 and above
# the stdlib toml package can be used instead
%if 0%{?rhel} < 10
Requires: python3-tomli
%endif
# Turn off dependency generators for runners. The reason is that runners are
# tailored to the platform, e.g. on RHEL they are using platform-python. We
# don't want to pick up those dependencies on other platform.
@ -130,6 +133,20 @@ Requires: python3-typer
Contains additional tools and utilities for development of
manifests and osbuild.
%package depsolve-dnf
Summary: Dependency solving support for DNF
Requires: %{name} = %{version}-%{release}
# Fedora 40 and later use libdnf5, RHEL and Fedora < 40 use libdnf
%if 0%{?fedora} >= 40
Requires: python3-libdnf5 >= 5.1.1
%else
Requires: python3-libdnf
%endif
%description depsolve-dnf
Contains depsolving capabilities for package managers.
%prep
%forgeautosetup -p1
@ -148,7 +165,7 @@ bzip2 -9 osbuild.pp
%py3_install
mkdir -p %{buildroot}%{pkgdir}/stages
install -p -m 0755 $(find stages -type f) %{buildroot}%{pkgdir}/stages/
install -p -m 0755 $(find stages -type f -not -name "test_*.py") %{buildroot}%{pkgdir}/stages/
mkdir -p %{buildroot}%{pkgdir}/assemblers
install -p -m 0755 $(find assemblers -type f) %{buildroot}%{pkgdir}/assemblers/
@ -194,6 +211,15 @@ install -p -m 0755 data/10-osbuild-inhibitor.rules %{buildroot}%{_udevrulesdir}
# Remove `osbuild-dev` on non-fedora systems
%{!?fedora:rm %{buildroot}%{_bindir}/osbuild-dev}
# Install `osbuild-depsolve-dnf` into libexec
mkdir -p %{buildroot}%{_libexecdir}
# Fedora 40 and later use dnf5-json, RHEL and Fedora < 40 use dnf-json
%if 0%{?fedora} >= 40
install -p -m 0755 tools/osbuild-depsolve-dnf5 %{buildroot}%{_libexecdir}/osbuild-depsolve-dnf
%else
install -p -m 0755 tools/osbuild-depsolve-dnf %{buildroot}%{_libexecdir}/osbuild-depsolve-dnf
%endif
%check
exit 0
# We have some integration tests, but those require running a VM, so that would
@ -219,6 +245,7 @@ exit 0
%exclude %{pkgdir}/inputs/org.osbuild.ostree*
%exclude %{pkgdir}/sources/org.osbuild.ostree*
%exclude %{pkgdir}/stages/org.osbuild.ostree*
%exclude %{pkgdir}/stages/org.osbuild.experimental.ostree*
%exclude %{pkgdir}/stages/org.osbuild.rpm-ostree
%files -n python3-%{pypi_name}
@ -241,6 +268,7 @@ exit 0
%{pkgdir}/inputs/org.osbuild.ostree*
%{pkgdir}/sources/org.osbuild.ostree*
%{pkgdir}/stages/org.osbuild.ostree*
%{pkgdir}/stages/org.osbuild.experimental.ostree*
%{pkgdir}/stages/org.osbuild.rpm-ostree
%files selinux
@ -264,10 +292,64 @@ fi
%{_bindir}/osbuild-mpp
%{?fedora:%{_bindir}/osbuild-dev}
%files depsolve-dnf
%{_libexecdir}/osbuild-depsolve-dnf
%changelog
* Fri Jan 26 2024 Tomáš Hozza <thozza@redhat.com> - 93-1.1
- stages/org.osbuild.keymap: create xorg.conf.d if it doesn't exist (RHEL-22840)
* Wed Feb 28 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 111-1
- New upstream release
* Mon Feb 26 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 110-1
- New upstream release
* Thu Feb 22 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 109-1
- New upstream release
* Thu Feb 01 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 106-1
- New upstream release
* Wed Jan 31 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 105-1
- New upstream release
* Wed Jan 17 2024 Paweł Poławski <ppolawsk@redhat.com> - 104-2
- Fix unit tests in RHEL CI by backporting upstream fixes
* Tue Jan 16 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 104-1
- New upstream release
* Wed Jan 03 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 103-1
- New upstream release
* Wed Dec 20 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 102-1
- New upstream release
* Mon Dec 11 2023 Paweł Poławski <ppolawsk@redhat.com> - 101-2
- Change unit-test timeout from 3h to 4h
- Rebuild after failed gating
* Wed Dec 06 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 101-1
- New upstream release
* Fri Nov 24 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 100-1
- New upstream release
* Wed Nov 08 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 99-1
- New upstream release
* Wed Oct 25 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 98-1
- New upstream release
* Wed Oct 11 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 97-1
- New upstream release
* Wed Sep 27 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 96-1
- New upstream release
* Wed Sep 13 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 95-1
- New upstream release
* Wed Aug 30 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 94-1
- New upstream release
* Wed Aug 23 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 93-1
- New upstream release
@ -296,12 +378,9 @@ fi
* Wed Jun 07 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 87-1
- New upstream release
* Tue May 30 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 86-1
* Wed May 24 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 86-1
- New upstream release
* Tue May 30 2023 Tomáš Hozza <thozza@redhat.com> - 85-2
- Backport upstream fixes for unit tests on RHEL-8 (PR#1316, PR#1317)
* Thu May 11 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 85-1
- New upstream release
@ -332,6 +411,9 @@ fi
* Wed Jan 04 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 75-1
- New upstream release
* Wed Dec 21 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 74-1
- New upstream release
* Wed Dec 07 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 73-1
- New upstream release
@ -344,6 +426,9 @@ fi
* Wed Oct 26 2022 imagebuilder-bots+imagebuilder-bot@redhat.com <imagebuilder-bot> - 70-1
- New upstream release
* Tue Oct 18 2022 imagebuilder-bots+imagebuilder-bot@redhat.com <imagebuilder-bot> - 69-1
- New upstream release
* Fri Aug 26 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 65-1
- New upstream release
@ -359,7 +444,7 @@ fi
* Wed Jul 20 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 61-1
- New upstream release
* Thu Jul 07 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 60-1
* Wed Jul 06 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 60-1
- New upstream release
* Wed Jun 22 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 59-1
@ -368,7 +453,7 @@ fi
* Wed Jun 08 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 58-1
- New upstream release
* Thu May 26 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 57-1
* Wed May 25 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 57-1
- New upstream release
* Wed May 11 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 56-1
@ -377,13 +462,13 @@ fi
* Wed Apr 27 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 55-1
- New upstream release
* Fri Apr 15 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 54-1
* Wed Apr 13 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 54-1
- New upstream release
* Thu Mar 24 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 53-1
- New upstream release
* Tue Mar 08 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 52-1
* Fri Mar 04 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 52-1
- New upstream release
* Sun Feb 27 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 50-1
@ -392,90 +477,112 @@ fi
* Wed Feb 23 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 49-1
- New upstream release
* Thu Feb 17 2022 Chloe Kaubisch <chloe.kaubisch@gmail.com> - 48-1
* Wed Feb 16 2022 Chloe Kaubisch <chloe.kaubisch@gmail.com> - 48-1
- New upstream release
* Thu Feb 03 2022 Jacob Kozol <jacobdkozol@gmail.com> - 47-1
* Wed Feb 02 2022 Jacob Kozol <jacobdkozol@gmail.com> - 47-1
- New upstream release
* Wed Jan 19 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 46-1
- New upstream release
* Mon Jan 10 2022 Tomas Hozza <thozza@redhat.com> - 45-1
* Fri Jan 07 2022 Tomas Hozza <thozza@redhat.com> - 45-1
- New upstream release
* Wed Jan 05 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 44-1
* Thu Dec 16 2021 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 44-1
- New upstream release
* Wed Dec 01 2021 Achilleas Koutsou <achilleas@redhat.com> - 43-1
* Wed Dec 01 2021 Achilleas Koutsou <achilleas@koutsou.net> - 43-1
- New upstream release
* Mon Nov 29 2021 Ondřej Budai <ondrej@budai.cz> - 42-1
* Wed Nov 17 2021 'Gianluca Zuccarelli' <'<gzuccare@redhat.com>'> - 42-1
- New upstream release
* Fri Oct 15 2021 Achilleas Koutsou <achilleas@redhat.com> - 39-1
* Thu Oct 07 2021 Simon Steinbeiß <simon.steinbeiss@redhat.com> - 39-1
- New upstream release
* Sun Aug 29 2021 Tom Gundersen <teg@jklm.no> - 35-1
* Sun Aug 29 2021 Tom Gundersen <tgunders@redhat.com> - 35-1
- Upstream release 35
* Sun Aug 29 2021 Tom Gundersen <teg@jklm.no> - 34-1
* Sun Aug 29 2021 Tom Gundersen <tgunders@redhat.com> - 34-1
- Upstream release 34
* Wed Aug 25 2021 Tom Gundersen <teg@jklm.no> - 33-1
* Wed Aug 25 2021 Tom Gundersen <tgunders@redhat.com> - 33-1
- Upstream release 33
* Tue Aug 24 2021 Tom Gundersen <teg@jklm.no> - 32-1
* Tue Aug 24 2021 Tom Gundersen <tgunders@redhat.com> - 32-1
- Upstream release 32
* Mon Aug 23 2021 Tom Gundersen <teg@jklm.no> - 31-1
* Mon Aug 23 2021 Tom Gundersen <tgunders@redhat.com> - 31-1
- Upstream release 31
* Fri Jul 23 2021 Christian Kellner <christian@kellner.me> - 30-1
* Thu Aug 12 2021 Ondřej Budai <ondrej@budai.cz> - 30-1
- Upstream release 30
- Ship osbuild-mpp in new tools sub-package.
- Remove executable bit from schemata files.
- Many new stages for building ostree-based raw images
- Bootiso.mono stage was deprecated and split into smaller stages
- Mounts are now represented as an array in a manifest
- Various bug fixes and improvements to various stages
* Tue Apr 27 2021 Achilleas Koutsou <achilleas@redhat.com> - 28-1
- Upstream release 28
- Includes fixes and feature additions for multiple stages.
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 29-2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Feb 19 2021 Christian Kellner <ckellner@redhat.com> - 26-1
* Tue Jun 29 2021 Ondřej Budai <ondrej@budai.cz> - 29-1
- Upstream release 29
- Adds host services
- Adds modprobe and logind stage
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 27-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Mar 17 2021 Christian Kellner <ckellner@redhat.com> - 27-2
- Include Fedora 35 runner (upstream commit 337e0f0)
* Tue Mar 16 2021 Christian Kellner <ckellner@redhat.com> - 27-1
- Upstream release 27
- Various bug fixes related to the new container and installer
stages introdcued in version 25 and 26.
* Sat Feb 20 2021 Christian Kellner <ckellner@redhat.com> - 26-1
- Upstream release 26
- Includes the necessary stages to build boot isos.
- Support for building boot isos
- Grub stage gained support for 'saved_entry' to fix grub tooling
* Fri Feb 12 2021 Christian Kellner <ckellner@redhat.com> - 25-1
- Upstream 25 release
- Upstream release 25
- First tech preview of the new manifest format. Includes
various new stages and inputs to be able to build ostree
commits contained in a oci archive.
* Thu Jan 28 2021 Christian Kellner <ckellner@redhat.com> - 24-1
- Upstream 24 release
- Include new `Input` modules.
- Upstream release 24
- Turn on dependency generator for everything but runners
- Include new 'input' binaries
* Mon Nov 23 2020 Christian Kellner <ckellner@redhat.com> - 23-3
- only disable the dep. generator for runners, remove explicity
python3 requirement again. The dependency should be picked up
via the dependency generator now.
* Fri Nov 13 2020 Christian Kellner <ckellner@redhat.com> - 23-2
- Explicilty require python3. See the comment above the Requires
for an explanation why this is needed.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 23-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Oct 23 2020 Christian Kellner <ckellner@redhat.com> - 23-1
- Upstream release 23
- Do not mangle shebangs for assemblers, runners & stages.
* Wed Oct 14 2020 Christian Kellner <ckellner@redhat.com> - 22-1
* Mon Oct 12 2020 Christian Kellner <ckellner@redhat.com> - 22-1
- Upstream release 22
- Remove all patches since they are all in osbuild-22.
* Thu Sep 10 2020 Christian Kellner <ckellner@redhat.com> - 21-1
- Upstream reelase 21
* Thu Aug 13 2020 Christian Kellner <ckellner@redhat.com> - 20-1
- Upstream reelase 20
* Fri Aug 7 2020 Christian Kellner <ckellner@redhat.com> - 19-1
- Upstream release 19
- Drop no-floats-in-sources.patch included in release 19
- bubblewrap replaced systemd-nspawn for sandboxing; change the
requirements accordingly.
* Thu Aug 13 2020 Christian Kellner <ckellner@redhat.com> - 18-3
- Add patch to allow nnp and nosuid domain transitions
https://github.com/osbuild/osbuild/pull/495
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 18-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jun 26 2020 Christian Kellner <ckellner@redhat.com> - 18-2
- Add patch to not pass floats to curl in the files source
@ -486,54 +593,80 @@ fi
- All RHEL runners now use platform-python.
* Wed Jun 10 2020 Christian Kellner <ckellner@redhat.com> - 17-1
- Upstream release 17
- new upstream relaese 17
- Add custom SELinux policy that lets osbuild set labels inside
the build root that are unknown to the host.
* Thu Jun 4 2020 Christian Kellner <christian@kellner.me> - 16-1
- Upstream release 16
* Thu Jun 4 2020 Christian Kellner <ckellner@redhat.com> - 16-1
- new upstream release 16
- Drop sources-fix-break-when-secrets-is-None.patch included in
osbuild-16.
the new upstream reelase.
* Tue May 26 2020 Christian Kellner <ckellner@redhat.com> - 15-2
* Wed May 27 2020 Miro Hrončok <mhroncok@redhat.com> - 15-4
- Rebuilt for Python 3.9
* Tue May 26 2020 Christian Kellner <ckellner@redhat.com> - 15-3
- Add a patch to allow org.osbuild.files source in the new format
but without actually containing the secrets key.
Taken from merged PR: https://github.com/osbuild/osbuild/pull/416
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 15-2
- Rebuilt for Python 3.9
* Thu May 21 2020 Christian Kellner <ckellner@redhat.com> - 15-1
- New upstream release 15
- Drop draft4-validator.json patch, included in osbuild-15
- new upstream release 15
* Wed May 13 2020 Christian Kellner <ckellner@redhat.com> - 14-2
- Add draft4-validator.json patch
python3-jsonschema in RHEL currently has version 2.6.0 which
has support validating up to and including draft4 of jsonschema.
See https://github.com/osbuild/osbuild/pull/394
* Wed May 13 2020 Christian Kellner <ckellner@redhat.com> - 14-1
- Upstream release 14
* Wed May 6 2020 Christian Kellner <christian@kellner.me> - 14-2
- Install schemata to <datadir>/osbuild/schemas and include a
symlink to it in /usr/lib/osbuild/schemas
* Wed May 6 2020 Christian Kellner <christian@kellner.me> - 14-1
- new upstream release 14
- The directories /usr/lib/osbuild/{assemblers, stages}/osbuild
got removed. Changes to osbuild made them obsolete.
* Wed Apr 15 2020 Christian Kellner <ckellner@redhat.com> - 12-1
- Sync with Fedora and use upstream release 12
- new upstream release 12
- Specify the exact version in the 'python3-osbuild' requirement
to avoid the library and the main binary being out of sync.
- osbuild-ostree sub-package with the necessary bits to create
OSTree based images
- Turn off dependency generator for internal components
- Add NEWS.md file with the release notes and man pages
* Mon Dec 16 2019 Lars Karlitski <lars@karlitski.net> - 7-1
- New upstream release
* Thu Apr 2 2020 Christian Kellner <ckellner@redhat.com> - 11-1
- new upstream release 11
- Turn of dependency generator for internal components
* Sun Dec 1 2019 Tom Gundersen <teg@jklm.no> - 6-2
- New upstream release
* Thu Mar 19 2020 Christian Kellner <ckellner@redhat.com> - 10-1
- new upstream release 10
- build and include man pages, this adds 'make' and 'python3-docutils'
to the build requirements
- add NEWS.md file with the release notes
* Thu Oct 24 2019 Lars Karlitski <lueberni@redhat.com> - 3-2
- add gating infra and tests
* Thu Mar 5 2020 Christian Kellner <ckellner@redhat.com> - 9-1
- new upstream release: 9
- Remove host runner link, it now is being auto-detected
- Cleanup use of mixed use of spaces/tabs
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Dec 16 2019 Packit Service <user-cont-team+packit-service@redhat.com> - 7-1
- new upstream release: 7
* Sat Nov 30 2019 Tom Gundersen <teg@jklm.no> - 6-1
- new upstream release: 6
* Wed Oct 30 2019 Lars Karlitski <lars@karlitski.net> - 5-1
- new upstream release: 5
* Wed Oct 16 2019 Tom Gundersen <tgunders@redhat.com> - 4-1
- new upstream release: 4
* Fri Oct 04 2019 Lars Karlitski <lars@karlitski.net> - 3-1
- new upstream release: 3
* Wed Sep 18 2019 Martin Sehnoutka <msehnout@redhat.com> - 2-1
- new upstream release: 2
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1-3
- Rebuilt for Python 3.8

View File

@ -0,0 +1,10 @@
summary: Run osbuild integration tests
prepare:
how: install
package:
- osbuild
discover:
how: fmf
filter: tag:integration-test
execute:
how: tmt

12
plans/unit-tests.fmf Normal file
View File

@ -0,0 +1,12 @@
summary: Run osbuild unit tests from dist-git sources
prepare:
how: install
package:
- git
- make
- osbuild
discover:
how: fmf
filter: tag:unit-test
execute:
how: tmt

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (osbuild-111.tar.gz) = 946ac8140b88dec35f7e73f3703cea5357b50b535a770cabff4fc56efc81922559bca5b4467cfa45218ff36070db9a8a5fd1c28365413d750c333dc898f62bea

View File

@ -0,0 +1,49 @@
#!/usr/bin/bash
set -euxo pipefail
MANIFESTS_DIR=$1
# check that MANIFESTS_DIR is a directory
if [ ! -d "$MANIFESTS_DIR" ]; then
echo "Error: $MANIFESTS_DIR is not a directory"
exit 1
fi
# ensure that we are running on x86_64 architecture
if [ "$(uname -m)" != "x86_64" ]; then
echo "Error: this script is only supported on x86_64 architecture"
exit 1
fi
. /etc/os-release
case "${ID}-${VERSION_ID}" in
fedora-*)
IMAGE_MANIFEST="${MANIFESTS_DIR}/fedora.json"
;;
rhel-8.*)
IMAGE_MANIFEST="${MANIFESTS_DIR}/rhel-8.json"
;;
rhel-9.*)
IMAGE_MANIFEST="${MANIFESTS_DIR}/rhel-9.json"
;;
centos-8)
IMAGE_MANIFEST="${MANIFESTS_DIR}/centos-8.json"
;;
centos-9)
IMAGE_MANIFEST="${MANIFESTS_DIR}/centos-9.json"
;;
*)
echo "Error: unsupported OS: ${ID}-${VERSION_ID}"
exit 1
;;
esac
OUTPUT_DIR=/var/tmp/osbuild-output
STORE_DIR=/var/tmp/osbuild-store
sudo mkdir -p "${OUTPUT_DIR}"
sudo mkdir -p "${STORE_DIR}"
# all the images are built with qcow2 format, so export it
EXPORT_PIPELINE="qcow2"
sudo osbuild --output-directory "${OUTPUT_DIR}" --store "${STORE_DIR}" --export "${EXPORT_PIPELINE}" "${IMAGE_MANIFEST}"

View File

@ -0,0 +1,4 @@
summary: Build simple image using osbuild
tag: integration-test
duration: 1h
test: ./build-images.sh ./manifests

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,4 @@
summary: Run osbuild unit tests from dist-git sources
tag: unit-test
duration: 4h
test: ./prep-host-environment.sh; sudo chcon $(matchpathcon -n /usr/bin/osbuild) ./run-unit-tests.sh; ./run-unit-tests.sh

View File

@ -0,0 +1,64 @@
#!/usr/bin/bash
# Prepare the host environment for running the osbuild unit tests.
# This includes installing missing dependencies and tools.
set -euxo pipefail
source /etc/os-release
case "${ID}" in
fedora)
PKG_MAINT_TOOL="fedpkg"
sudo dnf install -y "${PKG_MAINT_TOOL}"
;;
rhel)
PKG_MAINT_TOOL="rhpkg"
# rhpkg is not available in the default repos
sudo curl -L -o "/etc/yum.repos.d/rcm-tools-rhel-${VERSION_ID%.*}-baseos.repo" "http://download.devel.redhat.com/rel-eng/internal/rcm-tools-rhel-${VERSION_ID%.*}-baseos.repo"
# install the RH IT CA certificate used by the repo above
sudo curl -L -o /etc/pki/ca-trust/source/anchors/2015-IT-Root-CA.pem http://certs.corp.redhat.com/certs/2015-IT-Root-CA.pem
sudo curl -L -o /etc/pki/ca-trust/source/anchors/2022-IT-Root-CA.pem http://certs.corp.redhat.com/certs/2022-IT-Root-CA.pem
sudo update-ca-trust
;;
centos)
PKG_MAINT_TOOL="centpkg"
# centpkg is not available in the default repos
sudo dnf install -y epel-release
# CRB repos are available only for CentOS Stream 9
if [ "${VERSION_ID}" == "9" ]; then
dnf config-manager --set-enabled crb
fi
;;
*)
echo "Error: unsupported OS: ${ID}-${VERSION_ID}"
exit 1
;;
esac
# Move to the checked out git repo with the test plans
# this should be the root of the dist-git repo
cd "${TMT_TREE}"
# install all test dependencies
sudo dnf install -y \
"${PKG_MAINT_TOOL}" \
rpmdevtools \
python3-mako \
python3-pip \
rpm-ostree \
dosfstools \
gdisk
sudo dnf builddep -y osbuild.spec
# Install pytst from pip, because the version in some RHEL / CentOS releases is too old
sudo pip3 install pytest
# Make sure that /usr/lib/systemd/boot/efi/linuxx64.efi.stub is available to enable pe32p tests
case "${ID}-${VERSION_ID}" in
rhel-8.* | centos-8)
sudo dnf install -y systemd-udev
;;
*)
sudo dnf install -y systemd-boot-unsigned
;;
esac

View File

@ -0,0 +1,108 @@
#!/usr/bin/bash
# Execute osbuild unit tests from a checked out dist-git repo
set -euxo pipefail
source /etc/os-release
case "${ID}" in
fedora)
PKG_MAINT_TOOL="fedpkg"
;;
rhel)
PKG_MAINT_TOOL="rhpkg"
;;
centos)
PKG_MAINT_TOOL="centpkg"
;;
*)
echo "Error: unsupported OS: ${ID}-${VERSION_ID}"
exit 1
;;
esac
# Move to the checked out git repo with the test plans
# this should be the root of the dist-git repo
cd "${TMT_TREE}"
# the content of the directory is copy of the dist-git repo, but the .git directory is missing
# so we need to create it to make all *pkg tools happy
git init
# deduct the release to pass to rpkg to prep the sources.
# 1. use the DIST_GIT_RELEASE if set
DIST_GIT_RELEASE="${DIST_GIT_RELEASE:-}"
# 2. use the TARGET_BRANCH if set
if [[ -z "${DIST_GIT_RELEASE}" ]]; then
echo "DIST_GIT_RELEASE was not provided, trying to use TARGET_BRANCH"
DIST_GIT_RELEASE="${TARGET_BRANCH:-}"
fi
# 3. use the host OS type and version
if [[ -z "${DIST_GIT_RELEASE}" ]]; then
echo "DIST_GIT_RELEASE nor TARGET_BRANCH were not provided, trying to use the host OS type and version"
case "${ID}" in
fedora)
DIST_GIT_RELEASE="f${VERSION_ID}"
;;
rhel)
DIST_GIT_RELEASE="rhel-${VERSION_ID}.0"
;;
centos)
DIST_GIT_RELEASE="c${VERSION_ID}s"
;;
esac
fi
# The namespace and name must be passed explicitly to rhpkg, because it can't determine them on its own.
# Passing these options to centpkg and fedpkg is harmless, so we can use them for all tools.
# shellcheck disable=SC2086
${PKG_MAINT_TOOL} -v --namespace rpms --name osbuild --release "${DIST_GIT_RELEASE}" prep
# Extract the Source0 basename without extension
SRC_DIR=$(spectool --source 0 osbuild.spec | sed 's/.\+\(osbuild-[0-9]\+\)\.tar\.gz/\1/')
cd "${SRC_DIR}"
# Some unit tests depend on the fact that the source code is in a git repo
git init .
git add *
git commit -m "Initial commit"
# The 'test/run/test_assemblers.py::test_tar' test case uses system tar to extract the built tar archive.
# However, files in the tar archive can have SELinux context not present in the system policy. Therefore,
# in order for the system tar to be able to set it when extracting the archive, it must be labeled with
# 'install_exec_t' type.
ORIGINAL_TAR_CONTEXT="$(matchpathcon -n "$(which tar)")"
sudo chcon "system_u:object_r:install_exec_t:s0" "$(which tar)"
function restore_tar_context() {
sudo chcon "${ORIGINAL_TAR_CONTEXT}" "$(which tar)"
}
trap restore_tar_context EXIT
# Run the unit tests
# Note:
# - Ignore the boot test, because it requires qemu-system-x86_64 not available on all distributions.
# - Ignore source code tests, which run linters, since we can't ensure that all linters are available
# and of the same version as in upstream.
# - Explicitly mark btrfs as unsupported on CentOS / RHEL
if [ "${ID}" == "centos" ] || [ "${ID}" == "rhel" ]; then
UNSUPPORTED_FS="--unsupported-fs btrfs"
fi
TEST_SELECTION_EXPR="not (TestBoot and boot)"
# disable some tests on RHEL-8
if ([ "${ID}" == "rhel" ] || [ "${ID}" == "centos" ]) && [ "${VERSION_ID%%.*}" == "8" ]; then
# qemu-img info in RHEL-8 produces "raw" as the image format for "vdi" images, which causes tests to fail. Skip it.
TEST_SELECTION_EXPR="${TEST_SELECTION_EXPR} and not (test_qemu[ext4-vdi] or test_qemu[xfs-vdi])"
TEST_SELECTION_EXPR="${TEST_SELECTION_EXPR} and not (TestStages and test_qemu)"
fi
sudo python3 -m pytest \
--rootdir "$(pwd)" \
--ignore "$(pwd)/test/src" \
${UNSUPPORTED_FS:-} \
-k "${TEST_SELECTION_EXPR}" \
-v \
"$(pwd)/test/"