Blame SPECS/osbuild.spec

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