2020-03-05 12:35:49 +00:00
|
|
|
%global forgeurl https://github.com/osbuild/osbuild
|
2020-06-10 14:24:02 +00:00
|
|
|
%global selinuxtype targeted
|
2020-02-24 11:59:13 +00:00
|
|
|
|
2021-09-08 21:44:36 +00:00
|
|
|
Version: 36
|
2020-02-24 11:59:13 +00:00
|
|
|
|
|
|
|
%forgemeta
|
|
|
|
|
2019-07-31 06:22:30 +00:00
|
|
|
%global pypi_name osbuild
|
2019-11-30 14:38:11 +00:00
|
|
|
%global pkgdir %{_prefix}/lib/%{pypi_name}
|
2019-07-31 06:22:30 +00:00
|
|
|
|
|
|
|
Name: %{pypi_name}
|
2021-08-24 12:51:42 +00:00
|
|
|
Release: 1%{?dist}
|
2019-07-31 06:22:30 +00:00
|
|
|
License: ASL 2.0
|
|
|
|
|
2020-02-24 11:59:13 +00:00
|
|
|
URL: %{forgeurl}
|
2019-07-31 06:22:30 +00:00
|
|
|
|
2020-02-24 11:59:13 +00:00
|
|
|
Source0: %{forgesource}
|
2019-07-31 06:22:30 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
Summary: A build system for OS images
|
|
|
|
|
2020-03-19 08:58:16 +00:00
|
|
|
BuildRequires: make
|
2019-07-31 06:22:30 +00:00
|
|
|
BuildRequires: python3-devel
|
2020-03-19 08:58:16 +00:00
|
|
|
BuildRequires: python3-docutils
|
|
|
|
|
|
|
|
Requires: bash
|
2020-08-07 11:43:35 +00:00
|
|
|
Requires: bubblewrap
|
2020-03-19 08:58:16 +00:00
|
|
|
Requires: coreutils
|
|
|
|
Requires: curl
|
|
|
|
Requires: dnf
|
|
|
|
Requires: e2fsprogs
|
|
|
|
Requires: glibc
|
|
|
|
Requires: policycoreutils
|
|
|
|
Requires: qemu-img
|
|
|
|
Requires: systemd
|
|
|
|
Requires: tar
|
|
|
|
Requires: util-linux
|
2020-04-15 18:44:24 +00:00
|
|
|
Requires: python3-%{pypi_name} = %{version}-%{release}
|
2020-06-10 14:24:02 +00:00
|
|
|
Requires: (%{name}-selinux if selinux-policy-%{selinuxtype})
|
2019-07-31 06:22:30 +00:00
|
|
|
|
2021-01-28 05:02:57 +00:00
|
|
|
# Turn off dependency generators for runners. The reason is that runners are
|
|
|
|
# tailored to the platform, e.g. on RHEL they are using platform-python. We
|
|
|
|
# don't want to pick up those dependencies on other platform.
|
|
|
|
%global __requires_exclude_from ^%{pkgdir}/(runners)/.*$
|
2020-04-02 11:58:45 +00:00
|
|
|
|
2020-10-23 14:55:56 +00:00
|
|
|
# Turn off shebang mangling on RHEL. brp-mangle-shebangs (from package
|
|
|
|
# redhat-rpm-config) is run on all executables in a package after the `install`
|
|
|
|
# section runs. The below macro turns this behavior off for:
|
|
|
|
# - runners, because they already have the correct shebang for the platform
|
|
|
|
# they're meant for, and
|
|
|
|
# - stages and assemblers, because they are run within osbuild build roots,
|
|
|
|
# which are not required to contain the same OS as the host and might thus
|
|
|
|
# have a different notion of "platform-python".
|
2021-01-28 05:02:57 +00:00
|
|
|
# RHEL NB: Since assemblers and stages are not excluded from the dependency
|
|
|
|
# generator, this also means that an additional dependency on /usr/bin/python3
|
|
|
|
# will be added. This is intended and needed, so that in the host build root
|
|
|
|
# /usr/bin/python3 is present so stages and assemblers can be run.
|
2020-10-23 14:55:56 +00:00
|
|
|
%global __brp_mangle_shebangs_exclude_from ^%{pkgdir}/(assemblers|runners|stages)/.*$
|
|
|
|
|
2019-07-31 06:22:30 +00:00
|
|
|
%{?python_enable_dependency_generator}
|
|
|
|
|
|
|
|
%description
|
|
|
|
A build system for OS images
|
|
|
|
|
|
|
|
%package -n python3-%{pypi_name}
|
|
|
|
Summary: %{summary}
|
|
|
|
%{?python_provide:%python_provide python3-%{pypi_name}}
|
|
|
|
|
2020-03-19 08:58:16 +00:00
|
|
|
%description -n python3-%{pypi_name}
|
2019-07-31 06:22:30 +00:00
|
|
|
A build system for OS images
|
|
|
|
|
2020-04-15 18:44:24 +00:00
|
|
|
%package ostree
|
|
|
|
Summary: OSTree support
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Requires: ostree
|
|
|
|
Requires: rpm-ostree
|
|
|
|
|
|
|
|
%description ostree
|
|
|
|
Contains the necessary stages, assembler and source
|
|
|
|
to build OSTree based images.
|
|
|
|
|
2020-06-10 14:24:02 +00:00
|
|
|
%package selinux
|
|
|
|
Summary: SELinux policies
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
BuildRequires: selinux-policy
|
|
|
|
BuildRequires: selinux-policy-devel
|
|
|
|
%{?selinux_requires}
|
|
|
|
|
|
|
|
%description selinux
|
|
|
|
Contains the necessary SELinux policies that allows
|
|
|
|
osbuild to use labels unknown to the host inside the
|
|
|
|
containers it uses to build OS artifacts.
|
|
|
|
|
2021-07-23 09:16:08 +00:00
|
|
|
%package tools
|
|
|
|
Summary: Extra tools and utilities
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description tools
|
|
|
|
Contains additional tools and utilities for development of
|
|
|
|
manifests and osbuild.
|
|
|
|
|
2019-07-31 06:22:30 +00:00
|
|
|
%prep
|
2020-02-24 11:59:13 +00:00
|
|
|
%forgesetup
|
2019-07-31 06:22:30 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%py3_build
|
2020-03-19 08:58:16 +00:00
|
|
|
make man
|
2019-07-31 06:22:30 +00:00
|
|
|
|
2020-06-10 14:24:02 +00:00
|
|
|
# SELinux
|
|
|
|
make -f /usr/share/selinux/devel/Makefile osbuild.pp
|
|
|
|
bzip2 -9 osbuild.pp
|
|
|
|
|
|
|
|
%pre
|
|
|
|
%selinux_relabel_pre -s %{selinuxtype}
|
|
|
|
|
2019-07-31 06:22:30 +00:00
|
|
|
%install
|
|
|
|
%py3_install
|
|
|
|
|
2019-10-04 08:52:22 +00:00
|
|
|
mkdir -p %{buildroot}%{pkgdir}/stages
|
|
|
|
install -p -m 0755 $(find stages -type f) %{buildroot}%{pkgdir}/stages/
|
2019-07-31 06:22:30 +00:00
|
|
|
|
2019-10-04 08:52:22 +00:00
|
|
|
mkdir -p %{buildroot}%{pkgdir}/assemblers
|
|
|
|
install -p -m 0755 $(find assemblers -type f) %{buildroot}%{pkgdir}/assemblers/
|
2019-07-31 06:22:30 +00:00
|
|
|
|
2019-11-30 14:38:11 +00:00
|
|
|
mkdir -p %{buildroot}%{pkgdir}/runners
|
2020-02-24 11:59:13 +00:00
|
|
|
install -p -m 0755 $(find runners -type f -or -type l) %{buildroot}%{pkgdir}/runners
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{pkgdir}/sources
|
|
|
|
install -p -m 0755 $(find sources -type f) %{buildroot}%{pkgdir}/sources
|
2019-11-30 14:38:11 +00:00
|
|
|
|
2021-06-21 10:15:32 +00:00
|
|
|
mkdir -p %{buildroot}%{pkgdir}/devices
|
|
|
|
install -p -m 0755 $(find devices -type f) %{buildroot}%{pkgdir}/devices
|
|
|
|
|
2021-01-28 05:02:57 +00:00
|
|
|
mkdir -p %{buildroot}%{pkgdir}/inputs
|
|
|
|
install -p -m 0755 $(find inputs -type f) %{buildroot}%{pkgdir}/inputs
|
|
|
|
|
2021-06-21 10:15:32 +00:00
|
|
|
mkdir -p %{buildroot}%{pkgdir}/mounts
|
|
|
|
install -p -m 0755 $(find mounts -type f) %{buildroot}%{pkgdir}/mounts
|
|
|
|
|
2020-05-06 18:31:01 +00:00
|
|
|
# mount point for bind mounting the osbuild library
|
|
|
|
mkdir -p %{buildroot}%{pkgdir}/osbuild
|
2019-07-31 06:22:30 +00:00
|
|
|
|
2020-05-06 19:06:45 +00:00
|
|
|
# schemata
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/osbuild/schemas
|
2021-07-23 09:16:08 +00:00
|
|
|
install -p -m 0644 $(find schemas/*.json) %{buildroot}%{_datadir}/osbuild/schemas
|
2020-05-06 19:06:45 +00:00
|
|
|
ln -s %{_datadir}/osbuild/schemas %{buildroot}%{pkgdir}/schemas
|
|
|
|
|
2020-03-19 08:58:16 +00:00
|
|
|
# documentation
|
|
|
|
mkdir -p %{buildroot}%{_mandir}/man1
|
|
|
|
mkdir -p %{buildroot}%{_mandir}/man5
|
|
|
|
install -p -m 0644 -t %{buildroot}%{_mandir}/man1/ docs/*.1
|
|
|
|
install -p -m 0644 -t %{buildroot}%{_mandir}/man5/ docs/*.5
|
|
|
|
|
2020-06-10 14:24:02 +00:00
|
|
|
# SELinux
|
2021-07-23 09:16:08 +00:00
|
|
|
install -D -m 0644 -t %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype} %{name}.pp.bz2
|
|
|
|
install -D -m 0644 -t %{buildroot}%{_mandir}/man8 selinux/%{name}_selinux.8
|
2020-06-10 14:24:02 +00:00
|
|
|
|
2019-07-31 06:22:30 +00:00
|
|
|
%check
|
|
|
|
exit 0
|
|
|
|
# We have some integration tests, but those require running a VM, so that would
|
|
|
|
# be an overkill for RPM check script.
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE
|
|
|
|
%{_bindir}/osbuild
|
2020-03-19 08:58:16 +00:00
|
|
|
%{_mandir}/man1/%{name}.1*
|
|
|
|
%{_mandir}/man5/%{name}-manifest.5*
|
2020-05-06 19:06:45 +00:00
|
|
|
%{_datadir}/osbuild/schemas
|
2019-10-04 08:52:22 +00:00
|
|
|
%{pkgdir}
|
2020-04-15 18:44:24 +00:00
|
|
|
# the following files are in the ostree sub-package
|
2021-06-21 10:15:32 +00:00
|
|
|
%exclude %{pkgdir}/assemblers/org.osbuild.ostree*
|
|
|
|
%exclude %{pkgdir}/inputs/org.osbuild.ostree*
|
|
|
|
%exclude %{pkgdir}/sources/org.osbuild.ostree*
|
|
|
|
%exclude %{pkgdir}/stages/org.osbuild.ostree*
|
2020-04-15 18:44:24 +00:00
|
|
|
%exclude %{pkgdir}/stages/org.osbuild.rpm-ostree
|
2019-07-31 06:22:30 +00:00
|
|
|
|
2020-03-19 08:58:16 +00:00
|
|
|
%files -n python3-%{pypi_name}
|
2019-07-31 06:22:30 +00:00
|
|
|
%license LICENSE
|
2020-03-19 08:58:16 +00:00
|
|
|
%doc README.md NEWS.md
|
2019-07-31 06:22:30 +00:00
|
|
|
%{python3_sitelib}/%{pypi_name}-*.egg-info/
|
|
|
|
%{python3_sitelib}/%{pypi_name}/
|
|
|
|
|
2020-04-15 18:44:24 +00:00
|
|
|
%files ostree
|
2021-06-21 10:15:32 +00:00
|
|
|
%{pkgdir}/assemblers/org.osbuild.ostree*
|
|
|
|
%{pkgdir}/inputs/org.osbuild.ostree*
|
|
|
|
%{pkgdir}/sources/org.osbuild.ostree*
|
|
|
|
%{pkgdir}/stages/org.osbuild.ostree*
|
2020-04-15 18:44:24 +00:00
|
|
|
%{pkgdir}/stages/org.osbuild.rpm-ostree
|
|
|
|
|
2020-06-10 14:24:02 +00:00
|
|
|
%files selinux
|
|
|
|
%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
|
|
|
|
%{_mandir}/man8/%{name}_selinux.8.*
|
|
|
|
%ghost %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name}
|
|
|
|
|
|
|
|
%post selinux
|
|
|
|
%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
|
|
|
|
|
|
|
|
%postun selinux
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
%selinux_modules_uninstall -s %{selinuxtype} %{name}
|
|
|
|
fi
|
|
|
|
|
|
|
|
%posttrans selinux
|
|
|
|
%selinux_relabel_post -s %{selinuxtype}
|
|
|
|
|
2021-07-23 09:16:08 +00:00
|
|
|
%files tools
|
|
|
|
%{_bindir}/osbuild-mpp
|
|
|
|
|
2021-06-21 10:15:32 +00:00
|
|
|
|
2019-07-31 06:22:30 +00:00
|
|
|
%changelog
|
2021-09-08 21:44:36 +00:00
|
|
|
* Wed Sep 08 2021 Packit Service <user-cont-team+packit-service@redhat.com> - 36-1
|
|
|
|
- 36 (Diaa Sami)
|
|
|
|
- Add a new stage `org.osbuild.tmpfilesd` for configuring tmpfiles.d (Tomas Hozza)
|
|
|
|
- Add a new stage for configuring SELinux state on the system (Tomas Hozza)
|
|
|
|
- Add a new `org.osbuild.dnf.config` stage for configuring DNF (Tomas Hozza)
|
|
|
|
- Add new `org.osbuild.tuned` stage for setting active TuneD profile (Tomas Hozza)
|
|
|
|
- util/rhsm: Check if repositories is None before iterating (Sanne Raymaekers)
|
|
|
|
- stages/kickstart: set passwords with --iscrypted (Achilleas Koutsou)
|
|
|
|
|
2021-08-29 18:37:19 +00:00
|
|
|
* Sun Aug 29 2021 Packit Service <user-cont-team+packit-service@redhat.com> - 35-1
|
|
|
|
- 35 (Tom Gundersen)
|
|
|
|
- stages/kickstart: quote ssh-key (Christian Kellner)
|
2019-09-18 08:17:22 +00:00
|
|
|
|
2019-08-19 08:21:35 +00:00
|
|
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1-3
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
2019-07-31 06:24:25 +00:00
|
|
|
* Mon Jul 29 2019 Martin Sehnoutka <msehnout@redhat.com> - 1-2
|
|
|
|
- update upstream URL to the new Github organization
|
|
|
|
|
2019-07-31 06:22:30 +00:00
|
|
|
* Wed Jul 17 2019 Martin Sehnoutka <msehnout@redhat.com> - 1-1
|
|
|
|
- Initial package
|