Blame SPECS/osbuild.spec

eda038
%global         forgeurl https://github.com/osbuild/osbuild
eda038
%global         selinuxtype targeted
eda038
eda038
Version:        18
eda038
eda038
%forgemeta
eda038
eda038
%global         pypi_name osbuild
eda038
%global         pkgdir %{_prefix}/lib/%{pypi_name}
eda038
eda038
Name:           %{pypi_name}
eda038
Release:        2%{?dist}
eda038
License:        ASL 2.0
eda038
eda038
URL:            %{forgeurl}
eda038
eda038
Source0:        %{forgesource}
eda038
Patch0:         no-floats-in-sources.patch
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
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:       systemd-container
eda038
Requires:       tar
eda038
Requires:       util-linux
eda038
Requires:       python3-%{pypi_name} = %{version}-%{release}
eda038
Requires:       (%{name}-selinux if selinux-policy-%{selinuxtype})
eda038
eda038
# Turn off dependency generators for assemblers, runners and stages.
eda038
# They run in a container, so there's no reason to generate dependencies
eda038
# from them. As of 2020-03-25 this filters out python3.6 dependency generated
eda038
# by rhel runner.
eda038
%global __requires_exclude_from ^%{pkgdir}/(assemblers|runners|stages)/.*$
eda038
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
eda038
%prep
eda038
%forgesetup
eda038
%patch0 -p1
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
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
eda038
install -p -m 0755 $(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
eda038
install -D -m 644 -t %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype} %{name}.pp.bz2
eda038
install -D -m 644 -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
eda038
%exclude %{pkgdir}/assemblers/org.osbuild.ostree.commit
eda038
%exclude %{pkgdir}/sources/org.osbuild.ostree
eda038
%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
eda038
%{pkgdir}/assemblers/org.osbuild.ostree.commit
eda038
%{pkgdir}/sources/org.osbuild.ostree
eda038
%{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
eda038
eda038
%changelog
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