Blame SPECS/osbuild.spec

9e7e45
%global         forgeurl https://github.com/osbuild/osbuild
9e7e45
%global         selinuxtype targeted
9e7e45
ce6d79
Version:        65
9e7e45
9e7e45
%forgemeta
9e7e45
9e7e45
%global         pypi_name osbuild
9e7e45
%global         pkgdir %{_prefix}/lib/%{pypi_name}
9e7e45
9e7e45
Name:           %{pypi_name}
ce6d79
Release:        1%{?dist}
9e7e45
License:        ASL 2.0
9e7e45
9e7e45
URL:            %{forgeurl}
9e7e45
9e7e45
Source0:        %{forgesource}
9e7e45
BuildArch:      noarch
9e7e45
Summary:        A build system for OS images
9e7e45
9e7e45
BuildRequires:  make
9e7e45
BuildRequires:  python3-devel
9e7e45
BuildRequires:  python3-docutils
73e6b5
BuildRequires:  systemd
9e7e45
9e7e45
Requires:       bash
0fc96b
Requires:       bubblewrap
9e7e45
Requires:       coreutils
9e7e45
Requires:       curl
9e7e45
Requires:       dnf
9e7e45
Requires:       e2fsprogs
9e7e45
Requires:       glibc
9e7e45
Requires:       policycoreutils
9e7e45
Requires:       qemu-img
9e7e45
Requires:       systemd
9e7e45
Requires:       tar
9e7e45
Requires:       util-linux
9e7e45
Requires:       python3-%{pypi_name} = %{version}-%{release}
9e7e45
Requires:       (%{name}-selinux if selinux-policy-%{selinuxtype})
9e7e45
0fc96b
# Turn off dependency generators for runners. The reason is that runners are
0fc96b
# tailored to the platform, e.g. on RHEL they are using platform-python. We
0fc96b
# don't want to pick up those dependencies on other platform.
0fc96b
%global __requires_exclude_from ^%{pkgdir}/(runners)/.*$
0fc96b
0fc96b
# Turn off shebang mangling on RHEL. brp-mangle-shebangs (from package
0fc96b
# redhat-rpm-config) is run on all executables in a package after the `install`
0fc96b
# section runs. The below macro turns this behavior off for:
0fc96b
#   - runners, because they already have the correct shebang for the platform
0fc96b
#     they're meant for, and
0fc96b
#   - stages and assemblers, because they are run within osbuild build roots,
0fc96b
#     which are not required to contain the same OS as the host and might thus
0fc96b
#     have a different notion of "platform-python".
0fc96b
# RHEL NB: Since assemblers and stages are not excluded from the dependency
0fc96b
# generator, this also means that an additional dependency on /usr/bin/python3
0fc96b
# will be added. This is intended and needed, so that in the host build root
0fc96b
# /usr/bin/python3 is present so stages and assemblers can be run.
0fc96b
%global __brp_mangle_shebangs_exclude_from ^%{pkgdir}/(assemblers|runners|stages)/.*$
0fc96b
9e7e45
%{?python_enable_dependency_generator}
9e7e45
9e7e45
%description
9e7e45
A build system for OS images
9e7e45
9e7e45
%package -n     python3-%{pypi_name}
9e7e45
Summary:        %{summary}
9e7e45
%{?python_provide:%python_provide python3-%{pypi_name}}
9e7e45
9e7e45
%description -n python3-%{pypi_name}
9e7e45
A build system for OS images
9e7e45
73e6b5
%package        lvm2
73e6b5
Summary:        LVM2 support
73e6b5
Requires:       %{name} = %{version}-%{release}
73e6b5
Requires:       lvm2
73e6b5
73e6b5
%description lvm2
73e6b5
Contains the necessary stages and device host
73e6b5
services to build LVM2 based images.
73e6b5
73e6b5
%package        luks2
73e6b5
Summary:        LUKS2 support
73e6b5
Requires:       %{name} = %{version}-%{release}
73e6b5
Requires:       cryptsetup
73e6b5
73e6b5
%description luks2
73e6b5
Contains the necessary stages and device host
73e6b5
services to build LUKS2 encrypted images.
73e6b5
9e7e45
%package        ostree
9e7e45
Summary:        OSTree support
9e7e45
Requires:       %{name} = %{version}-%{release}
9e7e45
Requires:       ostree
9e7e45
Requires:       rpm-ostree
9e7e45
9e7e45
%description ostree
9e7e45
Contains the necessary stages, assembler and source
9e7e45
to build OSTree based images.
9e7e45
9e7e45
%package        selinux
9e7e45
Summary:        SELinux policies
9e7e45
Requires:       %{name} = %{version}-%{release}
9e7e45
BuildRequires:  selinux-policy
9e7e45
BuildRequires:  selinux-policy-devel
9e7e45
%{?selinux_requires}
9e7e45
9e7e45
%description    selinux
9e7e45
Contains the necessary SELinux policies that allows
9e7e45
osbuild to use labels unknown to the host inside the
9e7e45
containers it uses to build OS artifacts.
9e7e45
f0f7a0
%package        tools
f0f7a0
Summary:        Extra tools and utilities
f0f7a0
Requires:       %{name} = %{version}-%{release}
73e6b5
Requires:       python3-pyyaml
f0f7a0
f0f7a0
%description    tools
f0f7a0
Contains additional tools and utilities for development of
f0f7a0
manifests and osbuild.
f0f7a0
9e7e45
%prep
9e7e45
%forgesetup
9e7e45
9e7e45
%build
9e7e45
%py3_build
9e7e45
make man
9e7e45
9e7e45
# SELinux
9e7e45
make -f /usr/share/selinux/devel/Makefile osbuild.pp
9e7e45
bzip2 -9 osbuild.pp
9e7e45
9e7e45
%pre
9e7e45
%selinux_relabel_pre -s %{selinuxtype}
9e7e45
9e7e45
%install
9e7e45
%py3_install
9e7e45
9e7e45
mkdir -p %{buildroot}%{pkgdir}/stages
9e7e45
install -p -m 0755 $(find stages -type f) %{buildroot}%{pkgdir}/stages/
9e7e45
9e7e45
mkdir -p %{buildroot}%{pkgdir}/assemblers
9e7e45
install -p -m 0755 $(find assemblers -type f) %{buildroot}%{pkgdir}/assemblers/
9e7e45
9e7e45
mkdir -p %{buildroot}%{pkgdir}/runners
9e7e45
install -p -m 0755 $(find runners -type f -or -type l) %{buildroot}%{pkgdir}/runners
9e7e45
9e7e45
mkdir -p %{buildroot}%{pkgdir}/sources
9e7e45
install -p -m 0755 $(find sources -type f) %{buildroot}%{pkgdir}/sources
9e7e45
f0f7a0
mkdir -p %{buildroot}%{pkgdir}/devices
f0f7a0
install -p -m 0755 $(find devices -type f) %{buildroot}%{pkgdir}/devices
f0f7a0
0fc96b
mkdir -p %{buildroot}%{pkgdir}/inputs
0fc96b
install -p -m 0755 $(find inputs -type f) %{buildroot}%{pkgdir}/inputs
0fc96b
f0f7a0
mkdir -p %{buildroot}%{pkgdir}/mounts
f0f7a0
install -p -m 0755 $(find mounts -type f) %{buildroot}%{pkgdir}/mounts
f0f7a0
9e7e45
# mount point for bind mounting the osbuild library
9e7e45
mkdir -p %{buildroot}%{pkgdir}/osbuild
9e7e45
9e7e45
# schemata
9e7e45
mkdir -p %{buildroot}%{_datadir}/osbuild/schemas
f0f7a0
install -p -m 0644 $(find schemas/*.json) %{buildroot}%{_datadir}/osbuild/schemas
9e7e45
ln -s %{_datadir}/osbuild/schemas %{buildroot}%{pkgdir}/schemas
9e7e45
9e7e45
# documentation
9e7e45
mkdir -p %{buildroot}%{_mandir}/man1
9e7e45
mkdir -p %{buildroot}%{_mandir}/man5
9e7e45
install -p -m 0644 -t %{buildroot}%{_mandir}/man1/ docs/*.1
9e7e45
install -p -m 0644 -t %{buildroot}%{_mandir}/man5/ docs/*.5
9e7e45
9e7e45
# SELinux
f0f7a0
install -D -m 0644 -t %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype} %{name}.pp.bz2
f0f7a0
install -D -m 0644 -t %{buildroot}%{_mandir}/man8 selinux/%{name}_selinux.8
9e7e45
73e6b5
# Udev rules
73e6b5
mkdir -p %{buildroot}%{_udevrulesdir}
73e6b5
install -p -m 0755 data/10-osbuild-inhibitor.rules %{buildroot}%{_udevrulesdir}
73e6b5
9e7e45
%check
9e7e45
exit 0
9e7e45
# We have some integration tests, but those require running a VM, so that would
9e7e45
# be an overkill for RPM check script.
9e7e45
9e7e45
%files
9e7e45
%license LICENSE
9e7e45
%{_bindir}/osbuild
9e7e45
%{_mandir}/man1/%{name}.1*
9e7e45
%{_mandir}/man5/%{name}-manifest.5*
9e7e45
%{_datadir}/osbuild/schemas
9e7e45
%{pkgdir}
73e6b5
%{_udevrulesdir}/*.rules
73e6b5
# the following files are in the lvm2 sub-package
73e6b5
%exclude %{pkgdir}/devices/org.osbuild.lvm2*
73e6b5
%exclude %{pkgdir}/stages/org.osbuild.lvm2*
73e6b5
# the following files are in the luks2 sub-package
73e6b5
%exclude %{pkgdir}/devices/org.osbuild.luks2*
73e6b5
%exclude %{pkgdir}/stages/org.osbuild.crypttab
73e6b5
%exclude %{pkgdir}/stages/org.osbuild.luks2*
9e7e45
# the following files are in the ostree sub-package
f0f7a0
%exclude %{pkgdir}/assemblers/org.osbuild.ostree*
f0f7a0
%exclude %{pkgdir}/inputs/org.osbuild.ostree*
f0f7a0
%exclude %{pkgdir}/sources/org.osbuild.ostree*
f0f7a0
%exclude %{pkgdir}/stages/org.osbuild.ostree*
9e7e45
%exclude %{pkgdir}/stages/org.osbuild.rpm-ostree
9e7e45
9e7e45
%files -n       python3-%{pypi_name}
9e7e45
%license LICENSE
73e6b5
%doc README.md
9e7e45
%{python3_sitelib}/%{pypi_name}-*.egg-info/
9e7e45
%{python3_sitelib}/%{pypi_name}/
9e7e45
73e6b5
%files lvm2
73e6b5
%{pkgdir}/devices/org.osbuild.lvm2*
73e6b5
%{pkgdir}/stages/org.osbuild.lvm2*
73e6b5
73e6b5
%files luks2
73e6b5
%{pkgdir}/devices/org.osbuild.luks2*
73e6b5
%{pkgdir}/stages/org.osbuild.crypttab
73e6b5
%{pkgdir}/stages/org.osbuild.luks2*
73e6b5
9e7e45
%files ostree
f0f7a0
%{pkgdir}/assemblers/org.osbuild.ostree*
f0f7a0
%{pkgdir}/inputs/org.osbuild.ostree*
f0f7a0
%{pkgdir}/sources/org.osbuild.ostree*
f0f7a0
%{pkgdir}/stages/org.osbuild.ostree*
9e7e45
%{pkgdir}/stages/org.osbuild.rpm-ostree
9e7e45
9e7e45
%files selinux
9e7e45
%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
9e7e45
%{_mandir}/man8/%{name}_selinux.8.*
9e7e45
%ghost %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name}
9e7e45
9e7e45
%post selinux
9e7e45
%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
9e7e45
9e7e45
%postun selinux
9e7e45
if [ $1 -eq 0 ]; then
9e7e45
    %selinux_modules_uninstall -s %{selinuxtype} %{name}
9e7e45
fi
9e7e45
9e7e45
%posttrans selinux
9e7e45
%selinux_relabel_post -s %{selinuxtype}
9e7e45
f0f7a0
%files tools
f0f7a0
%{_bindir}/osbuild-mpp
9e7e45
73e6b5
9e7e45
%changelog
ce6d79
* Fri Aug 26 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 65-1
ce6d79
- New upstream release
ce6d79
ce6d79
* Thu Aug 18 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 64-1
ce6d79
- New upstream release
ce6d79
ce6d79
* Wed Aug 03 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 63-1
ce6d79
- New upstream release
ce6d79
ce6d79
* Wed Jul 27 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 62-1
ce6d79
- New upstream release
ce6d79
ce6d79
* Wed Jul 20 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 61-1
ce6d79
- New upstream release
ce6d79
ce6d79
* Thu Jul 07 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 60-1
ce6d79
- New upstream release
ce6d79
ce6d79
* Wed Jun 22 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 59-1
ce6d79
- New upstream release
ce6d79
ce6d79
* Wed Jun 08 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 58-1
ce6d79
- New upstream release
ce6d79
ce6d79
* Thu May 26 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 57-1
ce6d79
- New upstream release
ce6d79
ce6d79
* Wed May 11 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 56-1
ce6d79
- New upstream release
ce6d79
ce6d79
* Wed Apr 27 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 55-1
ce6d79
- New upstream release
ce6d79
ce6d79
* Fri Apr 15 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 54-1
ce6d79
- New upstream release
73e6b5
73e6b5
* Thu Mar 24 2022 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 53-1
73e6b5
- New upstream release
73e6b5
ce6d79
* Tue Mar 08 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 52-1
ce6d79
- New upstream release
ce6d79
73e6b5
* Sun Feb 27 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 50-1
73e6b5
- New upstream release
73e6b5
73e6b5
* Wed Feb 23 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 49-1
73e6b5
- New upstream release
73e6b5
73e6b5
* Thu Feb 17 2022 Chloe Kaubisch <chloe.kaubisch@gmail.com> - 48-1
73e6b5
- New upstream release
73e6b5
73e6b5
* Thu Feb 03 2022 Jacob Kozol <jacobdkozol@gmail.com> - 47-1
73e6b5
- New upstream release
73e6b5
73e6b5
* Wed Jan 19 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 46-1
73e6b5
- New upstream release
73e6b5
73e6b5
* Mon Jan 10 2022 Tomas Hozza <thozza@redhat.com> - 45-1
73e6b5
- New upstream release
73e6b5
73e6b5
* Wed Jan 05 2022 Simon Steinbeiss <simon.steinbeiss@redhat.com> - 44-1
73e6b5
- New upstream release
73e6b5
73e6b5
* Wed Dec 01 2021 Achilleas Koutsou <achilleas@redhat.com> - 43-1
73e6b5
- New upstream release
73e6b5
73e6b5
* Mon Nov 29 2021 Ondřej Budai <ondrej@budai.cz> - 42-1
73e6b5
- New upstream release
73e6b5
73e6b5
* Fri Oct 15 2021 Achilleas Koutsou <achilleas@redhat.com> - 39-1
73e6b5
- New upstream release
f0f7a0
f0f7a0
* Sun Aug 29 2021 Tom Gundersen <teg@jklm.no> - 35-1
f0f7a0
- Upstream release 35
f0f7a0
f0f7a0
* Sun Aug 29 2021 Tom Gundersen <teg@jklm.no> - 34-1
f0f7a0
- Upstream release 34
f0f7a0
f0f7a0
* Wed Aug 25 2021 Tom Gundersen <teg@jklm.no> - 33-1
f0f7a0
- Upstream release 33
f0f7a0
f0f7a0
* Tue Aug 24 2021 Tom Gundersen <teg@jklm.no> - 32-1
f0f7a0
- Upstream release 32
f0f7a0
f0f7a0
* Mon Aug 23 2021 Tom Gundersen <teg@jklm.no> - 31-1
f0f7a0
- Upstream release 31
f0f7a0
f0f7a0
* Fri Jul 23 2021 Christian Kellner <christian@kellner.me> - 30-1
f0f7a0
- Upstream release 30
f0f7a0
- Ship osbuild-mpp in new tools sub-package.
f0f7a0
- Remove executable bit from schemata files.
f0f7a0
f0f7a0
* Tue Apr 27 2021 Achilleas Koutsou <achilleas@redhat.com> - 28-1
f0f7a0
- Upstream release 28
f0f7a0
- Includes fixes and feature additions for multiple stages.
0fc96b
0fc96b
* Fri Feb 19 2021 Christian Kellner <ckellner@redhat.com> - 26-1
0fc96b
- Upstream release 26
0fc96b
- Includes the necessary stages to build boot isos.
0fc96b
0fc96b
* Fri Feb 12 2021 Christian Kellner <ckellner@redhat.com> - 25-1
0fc96b
- Upstream 25 release
0fc96b
- First tech preview of the new manifest format. Includes
0fc96b
  various new stages and inputs to be able to build ostree
0fc96b
  commits contained in a oci archive.
0fc96b
0fc96b
* Thu Jan 28 2021 Christian Kellner <ckellner@redhat.com> - 24-1
0fc96b
- Upstream 24 release
0fc96b
- Include new `Input` modules.
0fc96b
0fc96b
* Mon Nov 23 2020 Christian Kellner <ckellner@redhat.com> - 23-3
0fc96b
- only disable the dep. generator for runners, remove explicity
0fc96b
  python3 requirement again. The dependency should be picked up
0fc96b
  via the dependency generator now.
0fc96b
0fc96b
* Fri Nov 13 2020 Christian Kellner <ckellner@redhat.com> - 23-2
0fc96b
- Explicilty require python3. See the comment above the Requires
0fc96b
  for an explanation why this is needed.
0fc96b
0fc96b
* Fri Oct 23 2020 Christian Kellner <ckellner@redhat.com> - 23-1
0fc96b
- Upstream release 23
0fc96b
- Do not mangle shebangs for assemblers, runners & stages.
0fc96b
0fc96b
* Wed Oct 14 2020 Christian Kellner <ckellner@redhat.com> - 22-1
0fc96b
- Upstream release 22
0fc96b
- Remove all patches since they are all in osbuild-22.
0fc96b
- bubblewrap replaced systemd-nspawn for sandboxing; change the
0fc96b
  requirements accordingly.
0fc96b
9e7e45
* Thu Aug 13 2020 Christian Kellner <ckellner@redhat.com> - 18-3
9e7e45
- Add patch to allow nnp and nosuid domain transitions
9e7e45
  https://github.com/osbuild/osbuild/pull/495
9e7e45
9e7e45
* Fri Jun 26 2020 Christian Kellner <ckellner@redhat.com> - 18-2
9e7e45
- Add patch to not pass floats to curl in the files source
9e7e45
  https://github.com/osbuild/osbuild/pull/459
9e7e45
9e7e45
* Tue Jun 23 2020 Christian Kellner <ckellner@redhat.com> - 18-1
9e7e45
- Upstream release 18
9e7e45
- All RHEL runners now use platform-python.
9e7e45
9e7e45
* Wed Jun 10 2020 Christian Kellner <ckellner@redhat.com> - 17-1
9e7e45
- Upstream release 17
9e7e45
- Add custom SELinux policy that lets osbuild set labels inside
9e7e45
  the build root that are unknown to the host.
9e7e45
9e7e45
* Thu Jun  4 2020 Christian Kellner <christian@kellner.me> - 16-1
9e7e45
- Upstream release 16
9e7e45
- Drop sources-fix-break-when-secrets-is-None.patch included in
9e7e45
  osbuild-16.
9e7e45
9e7e45
* Tue May 26 2020 Christian Kellner <ckellner@redhat.com> - 15-2
9e7e45
- Add a patch to allow org.osbuild.files source in the new format
9e7e45
  but without actually containing the secrets key.
9e7e45
  Taken from merged PR: https://github.com/osbuild/osbuild/pull/416
9e7e45
9e7e45
* Thu May 21 2020 Christian Kellner <ckellner@redhat.com> - 15-1
9e7e45
- New upstream release 15
9e7e45
- Drop draft4-validator.json patch, included in osbuild-15
9e7e45
9e7e45
* Wed May 13 2020 Christian Kellner <ckellner@redhat.com> - 14-2
9e7e45
- Add draft4-validator.json patch
9e7e45
  python3-jsonschema in RHEL currently has version 2.6.0 which
9e7e45
  has support validating up to and including draft4 of jsonschema.
9e7e45
  See https://github.com/osbuild/osbuild/pull/394
9e7e45
9e7e45
* Wed May 13 2020 Christian Kellner <ckellner@redhat.com> - 14-1
9e7e45
- Upstream release 14
9e7e45
- Install schemata to <datadir>/osbuild/schemas and include a
9e7e45
  symlink to it in /usr/lib/osbuild/schemas
9e7e45
- The directories /usr/lib/osbuild/{assemblers, stages}/osbuild
9e7e45
  got removed. Changes to osbuild made them obsolete.
9e7e45
9e7e45
* Wed Apr 15 2020 Christian Kellner <ckellner@redhat.com> - 12-1
9e7e45
- Sync with Fedora and use upstream release 12
9e7e45
- Specify the exact version in the 'python3-osbuild' requirement
9e7e45
  to avoid the library and the main binary being out of sync.
9e7e45
- osbuild-ostree sub-package with the necessary bits to create
9e7e45
  OSTree based images
9e7e45
- Turn off dependency generator for internal components
9e7e45
- Add NEWS.md file with the release notes and man pages
9e7e45
9e7e45
* Mon Dec 16 2019 Lars Karlitski <lars@karlitski.net> - 7-1
9e7e45
- New upstream release
9e7e45
9e7e45
* Sun Dec 1 2019 Tom Gundersen <teg@jklm.no> - 6-2
9e7e45
- New upstream release
9e7e45
9e7e45
* Thu Oct 24 2019 Lars Karlitski <lueberni@redhat.com> - 3-2
9e7e45
- add gating infra and tests
9e7e45
9e7e45
* Mon Aug 19 2019 Miro HronĨok <mhroncok@redhat.com> - 1-3
9e7e45
- Rebuilt for Python 3.8
9e7e45
9e7e45
* Mon Jul 29 2019 Martin Sehnoutka <msehnout@redhat.com> - 1-2
9e7e45
- update upstream URL to the new Github organization
9e7e45
9e7e45
* Wed Jul 17 2019 Martin Sehnoutka <msehnout@redhat.com> - 1-1
9e7e45
- Initial package