8d6536d
%global summary A set of libraries and tools for managing boot loader entries
8d6536d
%global sphinx_docs 1
8d6536d
8d6536d
Name:		boom-boot
8d6536d
Version:	0.9
8d6536d
Release:	4%{?dist}
8d6536d
Summary:	%{summary}
8d6536d
8d6536d
License:	GPLv2
8d6536d
URL:		https://github.com/bmr-cymru/boom
8d6536d
Source0:	https://github.com/bmr-cymru/boom/archive/%{version}/boom-%{version}.tar.gz
8d6536d
8d6536d
BuildArch:	noarch
8d6536d
8d6536d
BuildRequires:	python3-setuptools
8d6536d
BuildRequires:	python3-devel
8d6536d
%if 0%{?sphinx_docs}
8d6536d
BuildRequires:	python3-sphinx
8d6536d
%endif
8d6536d
8d6536d
Requires: python3-boom
8d6536d
Requires: %{name}-conf
8d6536d
8d6536d
%package -n python3-boom
8d6536d
Summary: %{summary}
8d6536d
%{?python_provide:%python_provide python3-boom}
8d6536d
Requires: python3
8d6536d
Recommends: (lvm2 or brtfs-progs)
8d6536d
Recommends: %{name}-conf
8d6536d
8d6536d
# There used to be a boom package in fedora, and there is boom packaged in
8d6536d
# copr. How to tell which one is installed? We need python3-boom and no boom
8d6536d
# only.
8d6536d
Conflicts: boom
8d6536d
8d6536d
%package conf
8d6536d
Summary: %{summary}
8d6536d
8d6536d
%package grub2
8d6536d
Summary: %{summary}
8d6536d
Supplements: (grub2 and boom-boot)
8d6536d
8d6536d
%description
8d6536d
Boom is a boot manager for Linux systems using boot loaders that support
8d6536d
the BootLoader Specification for boot entry configuration.
8d6536d
8d6536d
Boom requires a BLS compatible boot loader to function: either the
8d6536d
systemd-boot project, or Grub2 with the BLS patch (Red Hat Grub2 builds
8d6536d
include this support in both Red Hat Enterprise Linux 7 and Fedora).
8d6536d
8d6536d
%description -n python3-boom
8d6536d
Boom is a boot manager for Linux systems using boot loaders that support
8d6536d
the BootLoader Specification for boot entry configuration.
8d6536d
8d6536d
Boom requires a BLS compatible boot loader to function: either the
8d6536d
systemd-boot project, or Grub2 with the BLS patch (Red Hat Grub2 builds
8d6536d
include this support in both Red Hat Enterprise Linux 7 and Fedora).
8d6536d
8d6536d
This package provides python3 boom module.
8d6536d
8d6536d
%description conf
8d6536d
Boom is a boot manager for Linux systems using boot loaders that support
8d6536d
the BootLoader Specification for boot entry configuration.
8d6536d
8d6536d
Boom requires a BLS compatible boot loader to function: either the
8d6536d
systemd-boot project, or Grub2 with the BLS patch (Red Hat Grub2 builds
8d6536d
include this support in both Red Hat Enterprise Linux 7 and Fedora).
8d6536d
8d6536d
This package provides configuration files for boom.
8d6536d
8d6536d
%description grub2
8d6536d
Boom is a boot manager for Linux systems using boot loaders that support
8d6536d
the BootLoader Specification for boot entry configuration.
8d6536d
8d6536d
Boom requires a BLS compatible boot loader to function: either the
8d6536d
systemd-boot project, or Grub2 with the BLS patch (Red Hat Grub2 builds
8d6536d
include this support in both Red Hat Enterprise Linux 7 and Fedora).
8d6536d
8d6536d
This package provides integration scripts for grub2 bootloader.
8d6536d
8d6536d
%prep
8d6536d
%setup -q -n boom-%{version}
8d6536d
# NOTE: Do not use backup extension - MANIFEST.in is picking them
8d6536d
8d6536d
%build
8d6536d
%if 0%{?sphinx_docs}
8d6536d
make -C doc html
8d6536d
rm doc/_build/html/.buildinfo
8d6536d
mv doc/_build/html doc/html
8d6536d
rm -r doc/_build
8d6536d
%endif
8d6536d
8d6536d
%py3_build
8d6536d
8d6536d
%install
8d6536d
%py3_install
8d6536d
8d6536d
# Install Grub2 integration scripts
8d6536d
mkdir -p ${RPM_BUILD_ROOT}/etc/grub.d
8d6536d
mkdir -p ${RPM_BUILD_ROOT}/etc/default
8d6536d
install -m 755 etc/grub.d/42_boom ${RPM_BUILD_ROOT}/etc/grub.d
8d6536d
install -m 644 etc/default/boom ${RPM_BUILD_ROOT}/etc/default
8d6536d
8d6536d
# Make configuration directories
8d6536d
# mode 0700 - in line with /boot/grub2 directory:
8d6536d
install -d -m 700 ${RPM_BUILD_ROOT}/boot/boom/profiles
8d6536d
install -d -m 700 ${RPM_BUILD_ROOT}/boot/loader/entries
8d6536d
install -m 644 examples/boom.conf ${RPM_BUILD_ROOT}/boot/boom
8d6536d
8d6536d
mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man8
8d6536d
mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man5
8d6536d
install -m 644 man/man8/boom.8 ${RPM_BUILD_ROOT}/%{_mandir}/man8
8d6536d
install -m 644 man/man5/boom.5 ${RPM_BUILD_ROOT}/%{_mandir}/man5
8d6536d
8d6536d
rm doc/Makefile
8d6536d
rm doc/conf.py
8d6536d
8d6536d
# Test suite currently does not operate in rpmbuild environment
8d6536d
#%%check
8d6536d
#%%{__python3} setup.py test
8d6536d
8d6536d
%files
8d6536d
%license COPYING
8d6536d
%doc README.md
8d6536d
%{_bindir}/boom
8d6536d
%doc %{_mandir}/man*/boom.*
8d6536d
8d6536d
%files -n python3-boom
8d6536d
%license COPYING
8d6536d
%doc README.md
8d6536d
%{python3_sitelib}/*
8d6536d
%doc doc
8d6536d
%doc examples
8d6536d
%doc tests
8d6536d
8d6536d
%files conf
8d6536d
%license COPYING
8d6536d
%doc README.md
8d6536d
%dir /boot/boom
8d6536d
%config(noreplace) /boot/boom/boom.conf
8d6536d
%dir /boot/boom/profiles
8d6536d
%dir /boot/loader/entries
8d6536d
8d6536d
%files grub2
8d6536d
%license COPYING
8d6536d
%doc README.md
8d6536d
%{_sysconfdir}/grub.d/42_boom
8d6536d
%config(noreplace) %{_sysconfdir}/default/boom
8d6536d
8d6536d
8d6536d
%changelog
8d6536d
* Tue Jul 17 2018 Marian Csontos <mcsontos@redhat.com> 0.9-4
8d6536d
- Change dependencies.
8d6536d
8d6536d
* Mon Jul 16 2018 Marian Csontos <mcsontos@redhat.com> 0.9-3
8d6536d
- Split executable, python module and configuration.
8d6536d
8d6536d
* Wed Jun 27 2018 Marian Csontos <mcsontos@redhat.com> 0.9-2
8d6536d
- Spin off grub2 into subpackage
8d6536d
8d6536d
* Wed Jun 27 2018 Marian Csontos <mcsontos@redhat.com> 0.9-1
8d6536d
- Update to new upstream 0.9.
8d6536d
- Fix boot_id caching.
8d6536d
8d6536d
* Fri Jun 08 2018 Marian Csontos <mcsontos@redhat.com> 0.8.5-6.2
8d6536d
- Remove example files from /boot/boom/profiles.
8d6536d
8d6536d
* Fri May 11 2018 Marian Csontos <mcsontos@redhat.com> 0.8.5-6.1
8d6536d
- Files in /boot are treated as configuration files.
8d6536d
8d6536d
* Thu Apr 26 2018 Marian Csontos <mcsontos@redhat.com> 0.8.5-6
8d6536d
- Package upstream version 0.8-5.6
8d6536d