Blame SPECS/osbuild.spec

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