Compare commits
No commits in common. "c8" and "c10s" have entirely different histories.
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
118
.gitignore
vendored
118
.gitignore
vendored
@ -1 +1,117 @@
|
||||
SOURCES/osbuild-110.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-28.tar.gz
|
||||
/osbuild-29.tar.gz
|
||||
/osbuild-30.tar.gz
|
||||
/osbuild-31.tar.gz
|
||||
/osbuild-32.tar.gz
|
||||
/osbuild-33.tar.gz
|
||||
/osbuild-35.tar.gz
|
||||
/osbuild-36.tar.gz
|
||||
/osbuild-37.tar.gz
|
||||
/osbuild-38.tar.gz
|
||||
/osbuild-39.tar.gz
|
||||
/osbuild-40.tar.gz
|
||||
/osbuild-41.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-51.tar.gz
|
||||
/osbuild-52.tar.gz
|
||||
/osbuild-53.tar.gz
|
||||
/osbuild-54.tar.gz
|
||||
/osbuild-55.tar.gz
|
||||
/osbuild-53.1.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-66.tar.gz
|
||||
/osbuild-67.tar.gz
|
||||
/osbuild-68.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-83.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-117.tar.gz
|
||||
/osbuild-118.tar.gz
|
||||
/osbuild-119.tar.gz
|
||||
/osbuild-122.tar.gz
|
||||
/osbuild-123.tar.gz
|
||||
/osbuild-124.tar.gz
|
||||
/osbuild-125.tar.gz
|
||||
/osbuild-126.tar.gz
|
||||
/osbuild-130.tar.gz
|
||||
/osbuild-131.tar.gz
|
||||
/osbuild-132.tar.gz
|
||||
|
62
.packit.yaml
Normal file
62
.packit.yaml
Normal file
@ -0,0 +1,62 @@
|
||||
# https://packit.dev/docs/configuration/
|
||||
|
||||
specfile_path: osbuild.spec
|
||||
|
||||
files_to_sync:
|
||||
- osbuild.spec
|
||||
- .packit.yaml
|
||||
|
||||
upstream_package_name: osbuild
|
||||
downstream_package_name: osbuild
|
||||
|
||||
copy_upstream_release_description: true
|
||||
|
||||
upstream_tag_template: v{version}
|
||||
|
||||
srpm_build_deps: []
|
||||
actions:
|
||||
get-current-version: bash -c "git describe --tags --abbrev=0 | sed 's|v||'"
|
||||
|
||||
# Handle only releases without a "dot" (e.g. v88.2), since "dot" releases should never be released to Fedora
|
||||
# "dot" releases are used only for "backports" to RHEL.
|
||||
upstream_tag_include: 'v\d+'
|
||||
|
||||
jobs:
|
||||
- &copr
|
||||
job: copr_build
|
||||
trigger: pull_request
|
||||
targets:
|
||||
- centos-stream-8-aarch64
|
||||
- centos-stream-8-x86_64
|
||||
- centos-stream-9-aarch64
|
||||
- centos-stream-9-x86_64
|
||||
- epel-8-aarch64
|
||||
- epel-8-x86_64
|
||||
- epel-9-aarch64
|
||||
- epel-9-x86_64
|
||||
- fedora-all-aarch64
|
||||
- fedora-all-s390x
|
||||
- fedora-all-ppc64le
|
||||
- fedora-all
|
||||
- <<: *copr
|
||||
trigger: commit
|
||||
branch: main
|
||||
owner: "@osbuild" # copr repo namespace
|
||||
project: osbuild # copr repo name so you can consume the builds
|
||||
- <<: *copr
|
||||
trigger: release
|
||||
branch: main
|
||||
owner: "@osbuild" # copr repo namespace
|
||||
project: osbuild-stable # copr repo name so you can consume the builds
|
||||
- job: propose_downstream
|
||||
trigger: release
|
||||
dist_git_branches:
|
||||
- fedora-all
|
||||
- job: koji_build
|
||||
trigger: commit
|
||||
dist_git_branches:
|
||||
- fedora-all
|
||||
- job: bodhi_update
|
||||
trigger: commit
|
||||
dist_git_branches:
|
||||
- fedora-branched # rawhide updates are created automatically
|
3
README.packit
Normal file
3
README.packit
Normal file
@ -0,0 +1,3 @@
|
||||
This repository is maintained by packit.
|
||||
https://packit.dev/
|
||||
The file was generated using packit 0.90.0.post1.dev3+g3d9551d2.
|
@ -1,616 +0,0 @@
|
||||
%global forgeurl https://github.com/osbuild/osbuild
|
||||
%global selinuxtype targeted
|
||||
|
||||
Version: 110
|
||||
|
||||
%forgemeta
|
||||
|
||||
%global pypi_name osbuild
|
||||
%global pkgdir %{_prefix}/lib/%{pypi_name}
|
||||
|
||||
Name: %{pypi_name}
|
||||
Release: 1%{?dist}.alma.1
|
||||
License: Apache-2.0
|
||||
|
||||
URL: %{forgeurl}
|
||||
|
||||
Source0: %{forgesource}
|
||||
BuildArch: noarch
|
||||
Summary: A build system for OS images
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-docutils
|
||||
BuildRequires: systemd
|
||||
|
||||
Requires: bash
|
||||
Requires: bubblewrap
|
||||
Requires: coreutils
|
||||
Requires: curl
|
||||
Requires: dnf
|
||||
Requires: e2fsprogs
|
||||
Requires: glibc
|
||||
Requires: policycoreutils
|
||||
Requires: qemu-img
|
||||
Requires: systemd
|
||||
Requires: skopeo
|
||||
Requires: tar
|
||||
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.
|
||||
%global __requires_exclude_from ^%{pkgdir}/(runners)/.*$
|
||||
|
||||
# Turn off shebang mangling on RHEL. brp-mangle-shebangs (from package
|
||||
# redhat-rpm-config) is run on all executables in a package after the `install`
|
||||
# section runs. The below macro turns this behavior off for:
|
||||
# - runners, because they already have the correct shebang for the platform
|
||||
# they're meant for, and
|
||||
# - stages and assemblers, because they are run within osbuild build roots,
|
||||
# which are not required to contain the same OS as the host and might thus
|
||||
# have a different notion of "platform-python".
|
||||
# RHEL NB: Since assemblers and stages are not excluded from the dependency
|
||||
# generator, this also means that an additional dependency on /usr/bin/python3
|
||||
# will be added. This is intended and needed, so that in the host build root
|
||||
# /usr/bin/python3 is present so stages and assemblers can be run.
|
||||
%global __brp_mangle_shebangs_exclude_from ^%{pkgdir}/(assemblers|runners|stages)/.*$
|
||||
|
||||
%{?python_enable_dependency_generator}
|
||||
|
||||
%description
|
||||
A build system for OS images
|
||||
|
||||
%package -n python3-%{pypi_name}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python3-%{pypi_name}}
|
||||
|
||||
%description -n python3-%{pypi_name}
|
||||
A build system for OS images
|
||||
|
||||
%package lvm2
|
||||
Summary: LVM2 support
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: lvm2
|
||||
|
||||
%description lvm2
|
||||
Contains the necessary stages and device host
|
||||
services to build LVM2 based images.
|
||||
|
||||
%package luks2
|
||||
Summary: LUKS2 support
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: cryptsetup
|
||||
|
||||
%description luks2
|
||||
Contains the necessary stages and device host
|
||||
services to build LUKS2 encrypted images.
|
||||
|
||||
%package ostree
|
||||
Summary: OSTree support
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: ostree
|
||||
Requires: rpm-ostree
|
||||
|
||||
%description ostree
|
||||
Contains the necessary stages, assembler and source
|
||||
to build OSTree based images.
|
||||
|
||||
%package selinux
|
||||
Summary: SELinux policies
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: selinux-policy-%{selinuxtype}
|
||||
Requires(post): selinux-policy-%{selinuxtype}
|
||||
BuildRequires: selinux-policy-devel
|
||||
%{?selinux_requires}
|
||||
|
||||
%description selinux
|
||||
Contains the necessary SELinux policies that allows
|
||||
osbuild to use labels unknown to the host inside the
|
||||
containers it uses to build OS artifacts.
|
||||
|
||||
%package tools
|
||||
Summary: Extra tools and utilities
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: python3-pyyaml
|
||||
|
||||
# These are required for `osbuild-dev`, only packaged for Fedora
|
||||
%if 0%{?fedora}
|
||||
Requires: python3-rich
|
||||
Requires: python3-attrs
|
||||
Requires: python3-typer
|
||||
%endif
|
||||
|
||||
%description tools
|
||||
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
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
make man
|
||||
|
||||
# SELinux
|
||||
make -f /usr/share/selinux/devel/Makefile osbuild.pp
|
||||
bzip2 -9 osbuild.pp
|
||||
|
||||
%pre selinux
|
||||
%selinux_relabel_pre -s %{selinuxtype}
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
|
||||
ln -rs %{_builddir}/%{name}-%{version}/runners/org.osbuild.rhel82 %{_builddir}/%{name}-%{version}/runners/org.osbuild.almalinux8
|
||||
|
||||
%if 0%{?almalinux} >= 9
|
||||
ln -rs %{_builddir}/%{name}-%{version}/runners/org.osbuild.centos9 %{_builddir}/%{name}-%{version}/runners/org.osbuild.almalinux9
|
||||
%endif
|
||||
|
||||
mkdir -p %{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/
|
||||
|
||||
mkdir -p %{buildroot}%{pkgdir}/runners
|
||||
install -p -m 0755 $(find runners -type f -or -type l) %{buildroot}%{pkgdir}/runners
|
||||
|
||||
mkdir -p %{buildroot}%{pkgdir}/sources
|
||||
install -p -m 0755 $(find sources -type f) %{buildroot}%{pkgdir}/sources
|
||||
|
||||
mkdir -p %{buildroot}%{pkgdir}/devices
|
||||
install -p -m 0755 $(find devices -type f) %{buildroot}%{pkgdir}/devices
|
||||
|
||||
mkdir -p %{buildroot}%{pkgdir}/inputs
|
||||
install -p -m 0755 $(find inputs -type f) %{buildroot}%{pkgdir}/inputs
|
||||
|
||||
mkdir -p %{buildroot}%{pkgdir}/mounts
|
||||
install -p -m 0755 $(find mounts -type f) %{buildroot}%{pkgdir}/mounts
|
||||
|
||||
# mount point for bind mounting the osbuild library
|
||||
mkdir -p %{buildroot}%{pkgdir}/osbuild
|
||||
|
||||
# schemata
|
||||
mkdir -p %{buildroot}%{_datadir}/osbuild/schemas
|
||||
install -p -m 0644 $(find schemas/*.json) %{buildroot}%{_datadir}/osbuild/schemas
|
||||
ln -s %{_datadir}/osbuild/schemas %{buildroot}%{pkgdir}/schemas
|
||||
|
||||
# documentation
|
||||
mkdir -p %{buildroot}%{_mandir}/man1
|
||||
mkdir -p %{buildroot}%{_mandir}/man5
|
||||
install -p -m 0644 -t %{buildroot}%{_mandir}/man1/ docs/*.1
|
||||
install -p -m 0644 -t %{buildroot}%{_mandir}/man5/ docs/*.5
|
||||
|
||||
# SELinux
|
||||
install -D -m 0644 -t %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype} %{name}.pp.bz2
|
||||
install -D -m 0644 -t %{buildroot}%{_mandir}/man8 selinux/%{name}_selinux.8
|
||||
install -D -p -m 0644 selinux/osbuild.if %{buildroot}%{_datadir}/selinux/devel/include/distributed/%{name}.if
|
||||
|
||||
# Udev rules
|
||||
mkdir -p %{buildroot}%{_udevrulesdir}
|
||||
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
|
||||
# be an overkill for RPM check script.
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%{_bindir}/osbuild
|
||||
%{_mandir}/man1/%{name}.1*
|
||||
%{_mandir}/man5/%{name}-manifest.5*
|
||||
%{_datadir}/osbuild/schemas
|
||||
%{pkgdir}
|
||||
%{_udevrulesdir}/*.rules
|
||||
# the following files are in the lvm2 sub-package
|
||||
%exclude %{pkgdir}/devices/org.osbuild.lvm2*
|
||||
%exclude %{pkgdir}/stages/org.osbuild.lvm2*
|
||||
# the following files are in the luks2 sub-package
|
||||
%exclude %{pkgdir}/devices/org.osbuild.luks2*
|
||||
%exclude %{pkgdir}/stages/org.osbuild.crypttab
|
||||
%exclude %{pkgdir}/stages/org.osbuild.luks2*
|
||||
# the following files are in the ostree sub-package
|
||||
%exclude %{pkgdir}/assemblers/org.osbuild.ostree*
|
||||
%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}
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{python3_sitelib}/%{pypi_name}-*.egg-info/
|
||||
%{python3_sitelib}/%{pypi_name}/
|
||||
|
||||
%files lvm2
|
||||
%{pkgdir}/devices/org.osbuild.lvm2*
|
||||
%{pkgdir}/stages/org.osbuild.lvm2*
|
||||
|
||||
%files luks2
|
||||
%{pkgdir}/devices/org.osbuild.luks2*
|
||||
%{pkgdir}/stages/org.osbuild.crypttab
|
||||
%{pkgdir}/stages/org.osbuild.luks2*
|
||||
|
||||
%files ostree
|
||||
%{pkgdir}/assemblers/org.osbuild.ostree*
|
||||
%{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
|
||||
%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
|
||||
%{_mandir}/man8/%{name}_selinux.8.*
|
||||
%{_datadir}/selinux/devel/include/distributed/%{name}.if
|
||||
%ghost %verify(not md5 size mode mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name}
|
||||
|
||||
%post selinux
|
||||
%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
|
||||
|
||||
%postun selinux
|
||||
if [ $1 -eq 0 ]; then
|
||||
%selinux_modules_uninstall -s %{selinuxtype} %{name}
|
||||
fi
|
||||
|
||||
%posttrans selinux
|
||||
%selinux_relabel_post -s %{selinuxtype}
|
||||
|
||||
%files tools
|
||||
%{_bindir}/osbuild-mpp
|
||||
%{?fedora:%{_bindir}/osbuild-dev}
|
||||
|
||||
%files depsolve-dnf
|
||||
%{_libexecdir}/osbuild-depsolve-dnf
|
||||
|
||||
%changelog
|
||||
* Wed Mar 27 2024 Eduard Abdullin <eabdullin@almalinux.org> - 110-1.alma
|
||||
- Add AlmaLinux runners
|
||||
|
||||
* 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
|
||||
|
||||
* Tue Dec 19 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 101-1
|
||||
- New upstream release
|
||||
|
||||
* Mon Dec 11 2023 Paweł Poławski <ppolawsk@redhat.com> - 100-2
|
||||
- Change unit-test timeout from 3h to 4h
|
||||
|
||||
* Fri Nov 24 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 100-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
|
||||
|
||||
* Thu Aug 17 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 92-1
|
||||
- New upstream release
|
||||
|
||||
* Wed Aug 02 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 91-1
|
||||
- New upstream release
|
||||
|
||||
* Thu Jul 20 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 90-1
|
||||
- New upstream release
|
||||
|
||||
* Tue Jun 27 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 89-1
|
||||
- New upstream release
|
||||
|
||||
* Tue Jun 27 2023 Tomáš Hozza <thozza@redhat.com> - 88-3
|
||||
- Increase unit-test duration to 3h
|
||||
|
||||
* Fri Jun 23 2023 Tomáš Hozza <thozza@redhat.com> - 88-2
|
||||
- Fix unit tests in RHEL CI and rebuild RPM
|
||||
|
||||
* Wed Jun 21 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 88-1
|
||||
- New upstream release
|
||||
|
||||
* 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
|
||||
- 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
|
||||
|
||||
* Thu Apr 27 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 84-1
|
||||
- New upstream release
|
||||
|
||||
* Wed Mar 29 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 82-1
|
||||
- New upstream release
|
||||
|
||||
* Mon Feb 27 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 81-1
|
||||
- New upstream release
|
||||
|
||||
* Mon Feb 20 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 80-1
|
||||
- New upstream release
|
||||
|
||||
* Wed Feb 15 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 79-1
|
||||
- New upstream release
|
||||
|
||||
* Tue Feb 07 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 78-1
|
||||
- New upstream release
|
||||
|
||||
* Fri Jan 20 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 77-1
|
||||
- New upstream release
|
||||
|
||||
* Thu Jan 19 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 76-1
|
||||
- New upstream release
|
||||
|
||||
* Wed Jan 04 2023 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 75-1
|
||||
- New upstream release
|
||||
|
||||
* Wed Dec 07 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 73-1
|
||||
- New upstream release
|
||||
|
||||
* Wed Nov 23 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 72-1
|
||||
- New upstream release
|
||||
|
||||
* Wed Nov 09 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 71-1
|
||||
- New upstream release
|
||||
|
||||
* Wed Oct 26 2022 imagebuilder-bots+imagebuilder-bot@redhat.com <imagebuilder-bot> - 70-1
|
||||
- New upstream release
|
||||
|
||||
* Fri Aug 26 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 65-1
|
||||
- New upstream release
|
||||
|
||||
* Thu Aug 18 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 64-1
|
||||
- New upstream release
|
||||
|
||||
* Wed Aug 03 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 63-1
|
||||
- New upstream release
|
||||
|
||||
* Wed Jul 27 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 62-1
|
||||
- New upstream release
|
||||
|
||||
* 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
|
||||
- New upstream release
|
||||
|
||||
* Wed Jun 22 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 59-1
|
||||
- New upstream release
|
||||
|
||||
* 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
|
||||
- New upstream release
|
||||
|
||||
* Wed May 11 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 56-1
|
||||
- New upstream release
|
||||
|
||||
* 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
|
||||
- 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
|
||||
- New upstream release
|
||||
|
||||
* Sun Feb 27 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 50-1
|
||||
- New upstream release
|
||||
|
||||
* 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
|
||||
- New upstream release
|
||||
|
||||
* Thu Feb 03 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
|
||||
- New upstream release
|
||||
|
||||
* Wed Jan 05 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 44-1
|
||||
- New upstream release
|
||||
|
||||
* Wed Dec 01 2021 Achilleas Koutsou <achilleas@redhat.com> - 43-1
|
||||
- New upstream release
|
||||
|
||||
* Mon Nov 29 2021 Ondřej Budai <ondrej@budai.cz> - 42-1
|
||||
- New upstream release
|
||||
|
||||
* Fri Oct 15 2021 Achilleas Koutsou <achilleas@redhat.com> - 39-1
|
||||
- New upstream release
|
||||
|
||||
* Sun Aug 29 2021 Tom Gundersen <teg@jklm.no> - 35-1
|
||||
- Upstream release 35
|
||||
|
||||
* Sun Aug 29 2021 Tom Gundersen <teg@jklm.no> - 34-1
|
||||
- Upstream release 34
|
||||
|
||||
* Wed Aug 25 2021 Tom Gundersen <teg@jklm.no> - 33-1
|
||||
- Upstream release 33
|
||||
|
||||
* Tue Aug 24 2021 Tom Gundersen <teg@jklm.no> - 32-1
|
||||
- Upstream release 32
|
||||
|
||||
* Mon Aug 23 2021 Tom Gundersen <teg@jklm.no> - 31-1
|
||||
- Upstream release 31
|
||||
|
||||
* Fri Jul 23 2021 Christian Kellner <christian@kellner.me> - 30-1
|
||||
- Upstream release 30
|
||||
- Ship osbuild-mpp in new tools sub-package.
|
||||
- Remove executable bit from schemata files.
|
||||
|
||||
* Tue Apr 27 2021 Achilleas Koutsou <achilleas@redhat.com> - 28-1
|
||||
- Upstream release 28
|
||||
- Includes fixes and feature additions for multiple stages.
|
||||
|
||||
* Fri Feb 19 2021 Christian Kellner <ckellner@redhat.com> - 26-1
|
||||
- Upstream release 26
|
||||
- Includes the necessary stages to build boot isos.
|
||||
|
||||
* Fri Feb 12 2021 Christian Kellner <ckellner@redhat.com> - 25-1
|
||||
- Upstream 25 release
|
||||
- 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.
|
||||
|
||||
* 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.
|
||||
|
||||
* 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
|
||||
- Upstream release 22
|
||||
- Remove all patches since they are all in osbuild-22.
|
||||
- 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
|
||||
|
||||
* Fri Jun 26 2020 Christian Kellner <ckellner@redhat.com> - 18-2
|
||||
- Add patch to not pass floats to curl in the files source
|
||||
https://github.com/osbuild/osbuild/pull/459
|
||||
|
||||
* Tue Jun 23 2020 Christian Kellner <ckellner@redhat.com> - 18-1
|
||||
- Upstream release 18
|
||||
- All RHEL runners now use platform-python.
|
||||
|
||||
* Wed Jun 10 2020 Christian Kellner <ckellner@redhat.com> - 17-1
|
||||
- Upstream release 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
|
||||
- Drop sources-fix-break-when-secrets-is-None.patch included in
|
||||
osbuild-16.
|
||||
|
||||
* Tue May 26 2020 Christian Kellner <ckellner@redhat.com> - 15-2
|
||||
- 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
|
||||
|
||||
* Thu May 21 2020 Christian Kellner <ckellner@redhat.com> - 15-1
|
||||
- New upstream release 15
|
||||
- Drop draft4-validator.json patch, included in osbuild-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
|
||||
- Install schemata to <datadir>/osbuild/schemas and include a
|
||||
symlink to it in /usr/lib/osbuild/schemas
|
||||
- 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
|
||||
- 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
|
||||
|
||||
* Sun Dec 1 2019 Tom Gundersen <teg@jklm.no> - 6-2
|
||||
- New upstream release
|
||||
|
||||
* Thu Oct 24 2019 Lars Karlitski <lueberni@redhat.com> - 3-2
|
||||
- add gating infra and tests
|
||||
|
||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1-3
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Mon Jul 29 2019 Martin Sehnoutka <msehnout@redhat.com> - 1-2
|
||||
- update upstream URL to the new Github organization
|
||||
|
||||
* Wed Jul 17 2019 Martin Sehnoutka <msehnout@redhat.com> - 1-1
|
||||
- Initial package
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-10
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
1719
osbuild.spec
Normal file
1719
osbuild.spec
Normal file
File diff suppressed because it is too large
Load Diff
12
plans/integration-tests.fmf
Normal file
12
plans/integration-tests.fmf
Normal file
@ -0,0 +1,12 @@
|
||||
summary: Run osbuild integration tests
|
||||
prepare:
|
||||
how: install
|
||||
package:
|
||||
- osbuild
|
||||
discover:
|
||||
how: fmf
|
||||
filter: tag:integration-test
|
||||
execute:
|
||||
how: tmt
|
||||
provision:
|
||||
arch: x86_64
|
18
plans/unit-tests.fmf
Normal file
18
plans/unit-tests.fmf
Normal file
@ -0,0 +1,18 @@
|
||||
summary: Run osbuild unit tests from dist-git sources
|
||||
prepare:
|
||||
- how: install
|
||||
package:
|
||||
- git
|
||||
- make
|
||||
- osbuild
|
||||
- how: shell
|
||||
order: 20
|
||||
script: dnf config-manager --set-enabled testing-farm-tag-repository
|
||||
discover:
|
||||
how: fmf
|
||||
dist-git-source: true
|
||||
filter: tag:unit-test
|
||||
execute:
|
||||
how: tmt
|
||||
provision:
|
||||
arch: x86_64
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
||||
SHA512 (osbuild-132.tar.gz) = 07a2ffc33c600b7e300f31d493cd8c9f930008f40bb4852e9c1c6302e26a630ecf8aeefe9f1b7b36a2ed44a96415bbddfc541921b8c22cd81acd5012b70cfa59
|
57
tests/image-build/build-images.sh
Executable file
57
tests/image-build/build-images.sh
Executable file
@ -0,0 +1,57 @@
|
||||
#!/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"
|
||||
# NB: we are not failing here, because Testing Farm ignores the 'arch' field in the test plan spec
|
||||
# See https://docs.testing-farm.io/Testing%20Farm/0.1/test-request.html#architectures
|
||||
exit 0
|
||||
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"
|
||||
;;
|
||||
rhel-10.*)
|
||||
IMAGE_MANIFEST="${MANIFESTS_DIR}/rhel-10.json"
|
||||
;;
|
||||
centos-8)
|
||||
IMAGE_MANIFEST="${MANIFESTS_DIR}/centos-8.json"
|
||||
;;
|
||||
centos-9)
|
||||
IMAGE_MANIFEST="${MANIFESTS_DIR}/centos-9.json"
|
||||
;;
|
||||
centos-10)
|
||||
IMAGE_MANIFEST="${MANIFESTS_DIR}/centos-10.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}"
|
4
tests/image-build/main.fmf
Normal file
4
tests/image-build/main.fmf
Normal file
@ -0,0 +1,4 @@
|
||||
summary: Build simple image using osbuild
|
||||
tag: integration-test
|
||||
duration: 1h
|
||||
test: ./build-images.sh ./manifests
|
3518
tests/image-build/manifests/centos-10.json
Normal file
3518
tests/image-build/manifests/centos-10.json
Normal file
File diff suppressed because it is too large
Load Diff
7202
tests/image-build/manifests/centos-8.json
Normal file
7202
tests/image-build/manifests/centos-8.json
Normal file
File diff suppressed because it is too large
Load Diff
6799
tests/image-build/manifests/centos-9.json
Normal file
6799
tests/image-build/manifests/centos-9.json
Normal file
File diff suppressed because it is too large
Load Diff
7021
tests/image-build/manifests/fedora.json
Normal file
7021
tests/image-build/manifests/fedora.json
Normal file
File diff suppressed because it is too large
Load Diff
6711
tests/image-build/manifests/rhel-10.json
Normal file
6711
tests/image-build/manifests/rhel-10.json
Normal file
File diff suppressed because it is too large
Load Diff
4083
tests/image-build/manifests/rhel-8.json
Normal file
4083
tests/image-build/manifests/rhel-8.json
Normal file
File diff suppressed because it is too large
Load Diff
7021
tests/image-build/manifests/rhel-9.json
Normal file
7021
tests/image-build/manifests/rhel-9.json
Normal file
File diff suppressed because it is too large
Load Diff
4
tests/unit-tests/main.fmf
Normal file
4
tests/unit-tests/main.fmf
Normal 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
|
33
tests/unit-tests/prep-host-environment.sh
Executable file
33
tests/unit-tests/prep-host-environment.sh
Executable file
@ -0,0 +1,33 @@
|
||||
#!/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
|
||||
|
||||
# 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 \
|
||||
rpmdevtools \
|
||||
python3-mako \
|
||||
python3-pip \
|
||||
rpm-ostree \
|
||||
dosfstools
|
||||
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
|
71
tests/unit-tests/run-unit-tests.sh
Executable file
71
tests/unit-tests/run-unit-tests.sh
Executable file
@ -0,0 +1,71 @@
|
||||
#!/usr/bin/bash
|
||||
# Execute osbuild unit tests from a checked out dist-git repo
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
source /etc/os-release
|
||||
|
||||
# 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"
|
||||
# NB: we are not failing here, because Testing Farm ignores the 'arch' field in the test plan spec
|
||||
# See https://docs.testing-farm.io/Testing%20Farm/0.1/test-request.html#architectures
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# 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
|
||||
|
||||
if ([ "${ID}" == "rhel" ] || [ "${ID}" == "centos" ]) && [ "${VERSION_ID%%.*}" == "10" ]; then
|
||||
# tomli_w package has been remowed so writin TOML config will fail
|
||||
TEST_SELECTION_EXPR="${TEST_SELECTION_EXPR} and not (test_write_read)"
|
||||
# There is no gdisk package on el10
|
||||
TEST_SELECTION_EXPR="${TEST_SELECTION_EXPR} and not (TestStages and test_sgdisk)"
|
||||
fi
|
||||
|
||||
|
||||
# Move to the directory with sources
|
||||
cd "${TMT_SOURCE_DIR}"
|
||||
|
||||
# Extract the Source0 basename without extension
|
||||
SRC_DIR=$(spectool --source 0 osbuild.spec | sed 's/.\+\(osbuild-[0-9]\+\)\.tar\.gz/\1/')
|
||||
|
||||
# Move to the extracted sources directory (patches are applied by default)
|
||||
cd "${SRC_DIR}"
|
||||
|
||||
sudo python3 -m pytest \
|
||||
--rootdir "$(pwd)" \
|
||||
--ignore "$(pwd)/test/src" \
|
||||
${UNSUPPORTED_FS:-} \
|
||||
-k "${TEST_SELECTION_EXPR}" \
|
||||
-v \
|
||||
"$(pwd)/test/"
|
Loading…
Reference in New Issue
Block a user