Blame SPECS/osbuild.spec

bcc1da
%global         forgeurl https://github.com/osbuild/osbuild
bcc1da
%global         selinuxtype targeted
bcc1da
cc6124
Version:        53.1
bcc1da
bcc1da
%forgemeta
bcc1da
bcc1da
%global         pypi_name osbuild
bcc1da
%global         pkgdir %{_prefix}/lib/%{pypi_name}
bcc1da
bcc1da
Name:           %{pypi_name}
bcc1da
Release:        1%{?dist}
bcc1da
License:        ASL 2.0
bcc1da
bcc1da
URL:            %{forgeurl}
bcc1da
bcc1da
Source0:        %{forgesource}
bcc1da
BuildArch:      noarch
bcc1da
Summary:        A build system for OS images
bcc1da
bcc1da
BuildRequires:  make
bcc1da
BuildRequires:  python3-devel
bcc1da
BuildRequires:  python3-docutils
bcc1da
BuildRequires:  systemd
bcc1da
bcc1da
Requires:       bash
bcc1da
Requires:       bubblewrap
bcc1da
Requires:       coreutils
bcc1da
Requires:       curl
bcc1da
Requires:       dnf
bcc1da
Requires:       e2fsprogs
bcc1da
Requires:       glibc
bcc1da
Requires:       policycoreutils
bcc1da
Requires:       qemu-img
bcc1da
Requires:       systemd
bcc1da
Requires:       tar
bcc1da
Requires:       util-linux
bcc1da
Requires:       python3-%{pypi_name} = %{version}-%{release}
bcc1da
Requires:       (%{name}-selinux if selinux-policy-%{selinuxtype})
bcc1da
bcc1da
# Turn off dependency generators for runners. The reason is that runners are
bcc1da
# tailored to the platform, e.g. on RHEL they are using platform-python. We
bcc1da
# don't want to pick up those dependencies on other platform.
bcc1da
%global __requires_exclude_from ^%{pkgdir}/(runners)/.*$
bcc1da
bcc1da
# Turn off shebang mangling on RHEL. brp-mangle-shebangs (from package
bcc1da
# redhat-rpm-config) is run on all executables in a package after the `install`
bcc1da
# section runs. The below macro turns this behavior off for:
bcc1da
#   - runners, because they already have the correct shebang for the platform
bcc1da
#     they're meant for, and
bcc1da
#   - stages and assemblers, because they are run within osbuild build roots,
bcc1da
#     which are not required to contain the same OS as the host and might thus
bcc1da
#     have a different notion of "platform-python".
bcc1da
# RHEL NB: Since assemblers and stages are not excluded from the dependency
bcc1da
# generator, this also means that an additional dependency on /usr/bin/python3
bcc1da
# will be added. This is intended and needed, so that in the host build root
bcc1da
# /usr/bin/python3 is present so stages and assemblers can be run.
bcc1da
%global __brp_mangle_shebangs_exclude_from ^%{pkgdir}/(assemblers|runners|stages)/.*$
bcc1da
bcc1da
%{?python_enable_dependency_generator}
bcc1da
bcc1da
%description
bcc1da
A build system for OS images
bcc1da
bcc1da
%package -n     python3-%{pypi_name}
bcc1da
Summary:        %{summary}
bcc1da
%{?python_provide:%python_provide python3-%{pypi_name}}
bcc1da
bcc1da
%description -n python3-%{pypi_name}
bcc1da
A build system for OS images
bcc1da
bcc1da
%package        lvm2
bcc1da
Summary:        LVM2 support
bcc1da
Requires:       %{name} = %{version}-%{release}
bcc1da
Requires:       lvm2
bcc1da
bcc1da
%description lvm2
bcc1da
Contains the necessary stages and device host
bcc1da
services to build LVM2 based images.
bcc1da
bcc1da
%package        luks2
bcc1da
Summary:        LUKS2 support
bcc1da
Requires:       %{name} = %{version}-%{release}
bcc1da
Requires:       cryptsetup
bcc1da
bcc1da
%description luks2
bcc1da
Contains the necessary stages and device host
bcc1da
services to build LUKS2 encrypted images.
bcc1da
bcc1da
%package        ostree
bcc1da
Summary:        OSTree support
bcc1da
Requires:       %{name} = %{version}-%{release}
bcc1da
Requires:       ostree
bcc1da
Requires:       rpm-ostree
bcc1da
bcc1da
%description ostree
bcc1da
Contains the necessary stages, assembler and source
bcc1da
to build OSTree based images.
bcc1da
bcc1da
%package        selinux
bcc1da
Summary:        SELinux policies
bcc1da
Requires:       %{name} = %{version}-%{release}
bcc1da
BuildRequires:  selinux-policy
bcc1da
BuildRequires:  selinux-policy-devel
bcc1da
%{?selinux_requires}
bcc1da
bcc1da
%description    selinux
bcc1da
Contains the necessary SELinux policies that allows
bcc1da
osbuild to use labels unknown to the host inside the
bcc1da
containers it uses to build OS artifacts.
bcc1da
bcc1da
%package        tools
bcc1da
Summary:        Extra tools and utilities
bcc1da
Requires:       %{name} = %{version}-%{release}
bcc1da
Requires:       python3-pyyaml
bcc1da
bcc1da
%description    tools
bcc1da
Contains additional tools and utilities for development of
bcc1da
manifests and osbuild.
bcc1da
bcc1da
%prep
bcc1da
%forgesetup
bcc1da
bcc1da
%build
bcc1da
%py3_build
bcc1da
make man
bcc1da
bcc1da
# SELinux
bcc1da
make -f /usr/share/selinux/devel/Makefile osbuild.pp
bcc1da
bzip2 -9 osbuild.pp
bcc1da
bcc1da
%pre
bcc1da
%selinux_relabel_pre -s %{selinuxtype}
bcc1da
bcc1da
%install
bcc1da
%py3_install
bcc1da
bcc1da
mkdir -p %{buildroot}%{pkgdir}/stages
bcc1da
install -p -m 0755 $(find stages -type f) %{buildroot}%{pkgdir}/stages/
bcc1da
bcc1da
mkdir -p %{buildroot}%{pkgdir}/assemblers
bcc1da
install -p -m 0755 $(find assemblers -type f) %{buildroot}%{pkgdir}/assemblers/
bcc1da
bcc1da
mkdir -p %{buildroot}%{pkgdir}/runners
bcc1da
install -p -m 0755 $(find runners -type f -or -type l) %{buildroot}%{pkgdir}/runners
bcc1da
bcc1da
mkdir -p %{buildroot}%{pkgdir}/sources
bcc1da
install -p -m 0755 $(find sources -type f) %{buildroot}%{pkgdir}/sources
bcc1da
bcc1da
mkdir -p %{buildroot}%{pkgdir}/devices
bcc1da
install -p -m 0755 $(find devices -type f) %{buildroot}%{pkgdir}/devices
bcc1da
bcc1da
mkdir -p %{buildroot}%{pkgdir}/inputs
bcc1da
install -p -m 0755 $(find inputs -type f) %{buildroot}%{pkgdir}/inputs
bcc1da
bcc1da
mkdir -p %{buildroot}%{pkgdir}/mounts
bcc1da
install -p -m 0755 $(find mounts -type f) %{buildroot}%{pkgdir}/mounts
bcc1da
bcc1da
# mount point for bind mounting the osbuild library
bcc1da
mkdir -p %{buildroot}%{pkgdir}/osbuild
bcc1da
bcc1da
# schemata
bcc1da
mkdir -p %{buildroot}%{_datadir}/osbuild/schemas
bcc1da
install -p -m 0644 $(find schemas/*.json) %{buildroot}%{_datadir}/osbuild/schemas
bcc1da
ln -s %{_datadir}/osbuild/schemas %{buildroot}%{pkgdir}/schemas
bcc1da
bcc1da
# documentation
bcc1da
mkdir -p %{buildroot}%{_mandir}/man1
bcc1da
mkdir -p %{buildroot}%{_mandir}/man5
bcc1da
install -p -m 0644 -t %{buildroot}%{_mandir}/man1/ docs/*.1
bcc1da
install -p -m 0644 -t %{buildroot}%{_mandir}/man5/ docs/*.5
bcc1da
bcc1da
# SELinux
bcc1da
install -D -m 0644 -t %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype} %{name}.pp.bz2
bcc1da
install -D -m 0644 -t %{buildroot}%{_mandir}/man8 selinux/%{name}_selinux.8
bcc1da
bcc1da
# Udev rules
bcc1da
mkdir -p %{buildroot}%{_udevrulesdir}
bcc1da
install -p -m 0755 data/10-osbuild-inhibitor.rules %{buildroot}%{_udevrulesdir}
bcc1da
bcc1da
%check
bcc1da
exit 0
bcc1da
# We have some integration tests, but those require running a VM, so that would
bcc1da
# be an overkill for RPM check script.
bcc1da
bcc1da
%files
bcc1da
%license LICENSE
bcc1da
%{_bindir}/osbuild
bcc1da
%{_mandir}/man1/%{name}.1*
bcc1da
%{_mandir}/man5/%{name}-manifest.5*
bcc1da
%{_datadir}/osbuild/schemas
bcc1da
%{pkgdir}
bcc1da
%{_udevrulesdir}/*.rules
bcc1da
# the following files are in the lvm2 sub-package
bcc1da
%exclude %{pkgdir}/devices/org.osbuild.lvm2*
bcc1da
%exclude %{pkgdir}/stages/org.osbuild.lvm2*
bcc1da
# the following files are in the luks2 sub-package
bcc1da
%exclude %{pkgdir}/devices/org.osbuild.luks2*
bcc1da
%exclude %{pkgdir}/stages/org.osbuild.crypttab
bcc1da
%exclude %{pkgdir}/stages/org.osbuild.luks2*
bcc1da
# the following files are in the ostree sub-package
bcc1da
%exclude %{pkgdir}/assemblers/org.osbuild.ostree*
bcc1da
%exclude %{pkgdir}/inputs/org.osbuild.ostree*
bcc1da
%exclude %{pkgdir}/sources/org.osbuild.ostree*
bcc1da
%exclude %{pkgdir}/stages/org.osbuild.ostree*
bcc1da
%exclude %{pkgdir}/stages/org.osbuild.rpm-ostree
bcc1da
bcc1da
%files -n       python3-%{pypi_name}
bcc1da
%license LICENSE
bcc1da
%doc README.md
bcc1da
%{python3_sitelib}/%{pypi_name}-*.egg-info/
bcc1da
%{python3_sitelib}/%{pypi_name}/
bcc1da
bcc1da
%files lvm2
bcc1da
%{pkgdir}/devices/org.osbuild.lvm2*
bcc1da
%{pkgdir}/stages/org.osbuild.lvm2*
bcc1da
bcc1da
%files luks2
bcc1da
%{pkgdir}/devices/org.osbuild.luks2*
bcc1da
%{pkgdir}/stages/org.osbuild.crypttab
bcc1da
%{pkgdir}/stages/org.osbuild.luks2*
bcc1da
bcc1da
%files ostree
bcc1da
%{pkgdir}/assemblers/org.osbuild.ostree*
bcc1da
%{pkgdir}/inputs/org.osbuild.ostree*
bcc1da
%{pkgdir}/sources/org.osbuild.ostree*
bcc1da
%{pkgdir}/stages/org.osbuild.ostree*
bcc1da
%{pkgdir}/stages/org.osbuild.rpm-ostree
bcc1da
bcc1da
%files selinux
bcc1da
%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
bcc1da
%{_mandir}/man8/%{name}_selinux.8.*
bcc1da
%ghost %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name}
bcc1da
bcc1da
%post selinux
bcc1da
%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
bcc1da
bcc1da
%postun selinux
bcc1da
if [ $1 -eq 0 ]; then
bcc1da
    %selinux_modules_uninstall -s %{selinuxtype} %{name}
bcc1da
fi
bcc1da
bcc1da
%posttrans selinux
bcc1da
%selinux_relabel_post -s %{selinuxtype}
bcc1da
bcc1da
%files tools
bcc1da
%{_bindir}/osbuild-mpp
bcc1da
bcc1da
bcc1da
%changelog
cc6124
* Thu Apr 28 2022 Ondřej Budai <ondrej@budai.cz> - 53.1-1
cc6124
- New upstream release
cc6124
bcc1da
* Thu Mar 24 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 53-1
bcc1da
- New upstream release
bcc1da
bcc1da
* Sun Feb 27 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 50-1
bcc1da
- New upstream release
bcc1da
bcc1da
* Wed Feb 23 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 49-1
bcc1da
- New upstream release
bcc1da
bcc1da
* Wed Feb 16 2022 Chloe Kaubisch <chloe.kaubisch@gmail.com> - 48-1
bcc1da
- New upstream release
bcc1da
bcc1da
* Wed Feb 02 2022 Jacob Kozol <jacobdkozol@gmail.com> - 47-1
bcc1da
- New upstream release
bcc1da
bcc1da
* Wed Jan 19 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 46-1
bcc1da
- New upstream release
bcc1da
bcc1da
* Fri Jan 07 2022 Tomas Hozza <thozza@redhat.com> - 45-1
bcc1da
- New upstream release
bcc1da
bcc1da
* Thu Dec 16 2021 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 44-1
bcc1da
- New upstream release
bcc1da
bcc1da
* Wed Dec 01 2021 Achilleas Koutsou <achilleas@koutsou.net> - 43-1
bcc1da
- New upstream release
bcc1da
bcc1da
* Wed Nov 17 2021 'Gianluca Zuccarelli' <'<gzuccare@redhat.com>'> - 42-1
bcc1da
- New upstream release
bcc1da
bcc1da
* Thu Oct 07 2021 Simon Steinbeiß <simon.steinbeiss@redhat.com> - 39-1
bcc1da
- New upstream release
bcc1da
bcc1da
* Sun Aug 29 2021 Tom Gundersen <tgunders@redhat.com> - 35-1
bcc1da
- Upstream release 35
bcc1da
bcc1da
* Sun Aug 29 2021 Tom Gundersen <tgunders@redhat.com> - 34-1
bcc1da
- Upstream release 34
bcc1da
bcc1da
* Wed Aug 25 2021 Tom Gundersen <tgunders@redhat.com> - 33-1
bcc1da
- Upstream release 33
bcc1da
bcc1da
* Tue Aug 24 2021 Tom Gundersen <tgunders@redhat.com> - 32-1
bcc1da
- Upstream release 32
bcc1da
bcc1da
* Mon Aug 23 2021 Tom Gundersen <tgunders@redhat.com> - 31-1
bcc1da
- Upstream release 31
bcc1da
bcc1da
* Thu Aug 12 2021 Ondřej Budai <ondrej@budai.cz> - 30-1
bcc1da
- Upstream release 30
bcc1da
- Many new stages for building ostree-based raw images
bcc1da
- Bootiso.mono stage was deprecated and split into smaller stages
bcc1da
- Mounts are now represented as an array in a manifest
bcc1da
- Various bug fixes and improvements to various stages
bcc1da
bcc1da
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 29-2
bcc1da
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
bcc1da
  Related: rhbz#1991688
bcc1da
bcc1da
* Tue Jun 29 2021 Ondřej Budai <ondrej@budai.cz> - 29-1
bcc1da
- Upstream release 29
bcc1da
- Adds host services
bcc1da
- Adds modprobe and logind stage
bcc1da
bcc1da
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 27-3
bcc1da
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
bcc1da
bcc1da
* Wed Mar 17 2021 Christian Kellner <ckellner@redhat.com> - 27-2
bcc1da
- Include Fedora 35 runner (upstream commit 337e0f0)
bcc1da
bcc1da
* Tue Mar 16 2021 Christian Kellner <ckellner@redhat.com> - 27-1
bcc1da
- Upstream release 27
bcc1da
- Various bug fixes related to the new container and installer
bcc1da
  stages introdcued in version 25 and 26.
bcc1da
bcc1da
* Sat Feb 20 2021 Christian Kellner <ckellner@redhat.com> - 26-1
bcc1da
- Upstream release 26
bcc1da
- Support for building boot isos
bcc1da
- Grub stage gained support for 'saved_entry' to fix grub tooling
bcc1da
bcc1da
* Fri Feb 12 2021 Christian Kellner <ckellner@redhat.com> - 25-1
bcc1da
- Upstream release 25
bcc1da
- First tech preview of the new manifest format. Includes
bcc1da
  various new stages and inputs to be able to build ostree
bcc1da
  commits contained in a oci archive.
bcc1da
bcc1da
* Thu Jan 28 2021 Christian Kellner <ckellner@redhat.com> - 24-1
bcc1da
- Upstream release 24
bcc1da
- Turn on dependency generator for everything but runners
bcc1da
- Include new 'input' binaries
bcc1da
bcc1da
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 23-2
bcc1da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
bcc1da
bcc1da
* Fri Oct 23 2020 Christian Kellner <ckellner@redhat.com> - 23-1
bcc1da
- Upstream release 23
bcc1da
- Do not mangle shebangs for assemblers, runners & stages.
bcc1da
bcc1da
* Mon Oct 12 2020 Christian Kellner <ckellner@redhat.com> - 22-1
bcc1da
- Upstream release 22
bcc1da
bcc1da
* Thu Sep 10 2020 Christian Kellner <ckellner@redhat.com> - 21-1
bcc1da
- Upstream reelase 21
bcc1da
bcc1da
* Thu Aug 13 2020 Christian Kellner <ckellner@redhat.com> - 20-1
bcc1da
- Upstream reelase 20
bcc1da
bcc1da
* Fri Aug  7 2020 Christian Kellner <ckellner@redhat.com> - 19-1
bcc1da
- Upstream release 19
bcc1da
- Drop no-floats-in-sources.patch included in release 19
bcc1da
- bubblewrap replaced systemd-nspawn for sandboxing; change the
bcc1da
  requirements accordingly.
bcc1da
bcc1da
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 18-3
bcc1da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
bcc1da
bcc1da
* Fri Jun 26 2020 Christian Kellner <ckellner@redhat.com> - 18-2
bcc1da
- Add patch to not pass floats to curl in the files source
bcc1da
  https://github.com/osbuild/osbuild/pull/459
bcc1da
bcc1da
* Tue Jun 23 2020 Christian Kellner <ckellner@redhat.com> - 18-1
bcc1da
- Upstream release 18
bcc1da
- All RHEL runners now use platform-python.
bcc1da
bcc1da
* Wed Jun 10 2020 Christian Kellner <ckellner@redhat.com> - 17-1
bcc1da
- new upstream relaese 17
bcc1da
- Add custom SELinux policy that lets osbuild set labels inside
bcc1da
  the build root that are unknown to the host.
bcc1da
bcc1da
* Thu Jun  4 2020 Christian Kellner <ckellner@redhat.com> - 16-1
bcc1da
- new upstream release 16
bcc1da
- Drop sources-fix-break-when-secrets-is-None.patch included in
bcc1da
  the new upstream reelase.
bcc1da
bcc1da
* Wed May 27 2020 Miro Hrončok <mhroncok@redhat.com> - 15-4
bcc1da
- Rebuilt for Python 3.9
bcc1da
bcc1da
* Tue May 26 2020 Christian Kellner <ckellner@redhat.com> - 15-3
bcc1da
- Add a patch to allow org.osbuild.files source in the new format
bcc1da
  but without actually containing the secrets key.
bcc1da
  Taken from merged PR: https://github.com/osbuild/osbuild/pull/416
bcc1da
bcc1da
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 15-2
bcc1da
- Rebuilt for Python 3.9
bcc1da
bcc1da
* Thu May 21 2020 Christian Kellner <ckellner@redhat.com> - 15-1
bcc1da
- new upstream release 15
bcc1da
bcc1da
* Wed May  6 2020 Christian Kellner <christian@kellner.me> - 14-2
bcc1da
- Install schemata to <datadir>/osbuild/schemas and include a
bcc1da
  symlink to it in /usr/lib/osbuild/schemas
bcc1da
bcc1da
* Wed May  6 2020 Christian Kellner <christian@kellner.me> - 14-1
bcc1da
- new upstream release 14
bcc1da
- The directories /usr/lib/osbuild/{assemblers, stages}/osbuild
bcc1da
  got removed. Changes to osbuild made them obsolete.
bcc1da
bcc1da
* Wed Apr 15 2020 Christian Kellner <ckellner@redhat.com> - 12-1
bcc1da
- new upstream release 12
bcc1da
- Specify the exact version in the 'python3-osbuild' requirement
bcc1da
  to avoid the library and the main binary being out of sync.
bcc1da
- osbuild-ostree sub-package with the necessary bits to create
bcc1da
  OSTree based images
bcc1da
bcc1da
* Thu Apr  2 2020 Christian Kellner <ckellner@redhat.com> - 11-1
bcc1da
- new upstream release 11
bcc1da
- Turn of dependency generator for internal components
bcc1da
bcc1da
* Thu Mar 19 2020 Christian Kellner <ckellner@redhat.com> - 10-1
bcc1da
- new upstream release 10
bcc1da
- build and include man pages, this adds 'make' and 'python3-docutils'
bcc1da
  to the build requirements
bcc1da
- add NEWS.md file with the release notes
bcc1da
bcc1da
* Thu Mar  5 2020 Christian Kellner <ckellner@redhat.com> - 9-1
bcc1da
- new upstream release: 9
bcc1da
- Remove host runner link, it now is being auto-detected
bcc1da
- Cleanup use of mixed use of spaces/tabs
bcc1da
bcc1da
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7-2
bcc1da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
bcc1da
bcc1da
* Mon Dec 16 2019 Packit Service <user-cont-team+packit-service@redhat.com> - 7-1
bcc1da
- new upstream release: 7
bcc1da
bcc1da
* Sat Nov 30 2019 Tom Gundersen <teg@jklm.no> - 6-1
bcc1da
- new upstream release: 6
bcc1da
bcc1da
* Wed Oct 30 2019 Lars Karlitski <lars@karlitski.net> - 5-1
bcc1da
- new upstream release: 5
bcc1da
bcc1da
* Wed Oct 16 2019 Tom Gundersen <tgunders@redhat.com> - 4-1
bcc1da
- new upstream release: 4
bcc1da
bcc1da
* Fri Oct 04 2019 Lars Karlitski <lars@karlitski.net> - 3-1
bcc1da
- new upstream release: 3
bcc1da
bcc1da
* Wed Sep 18 2019 Martin Sehnoutka <msehnout@redhat.com> - 2-1
bcc1da
- new upstream release: 2
bcc1da
bcc1da
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1-3
bcc1da
- Rebuilt for Python 3.8
bcc1da
bcc1da
* Mon Jul 29 2019 Martin Sehnoutka <msehnout@redhat.com> - 1-2
bcc1da
- update upstream URL to the new Github organization
bcc1da
bcc1da
* Wed Jul 17 2019 Martin Sehnoutka <msehnout@redhat.com> - 1-1
bcc1da
- Initial package