Make this like the f28 package.

We need to cary this in f29 until we have the anaconda patches in and
get grubby out of the default install, so we'll have BLS configs and not
need grubby to update them.

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2018-07-10 13:11:43 -04:00
parent 214bb840df
commit 87beb89e75
3 changed files with 41 additions and 9 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@ grubby-*.tar.bz2
clog
*.rpm
/8.40-1.tar.gz
.build*log
grubby-*/

8
grubby.in Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
if [[ -x @@LIBEXECDIR@@/grubby-bls ]] ; then
exec @@LIBEXECDIR@@/grubby-bls "${@}"
elif [[ -x @@LIBEXECDIR@@/grubby ]] ; then
exec @@LIBEXECDIR@@/grubby "${@}"
fi
echo "Grubby is not installed correctly." >>/dev/stderr
exit 1

View File

@ -4,15 +4,13 @@ Release: 15%{?dist}
Summary: Command line tool for updating bootloader configs
License: GPLv2+
URL: https://github.com/rhinstaller/grubby
Obsoletes: %{name} <= 8.40-14
Obsoletes: %{name}-bls <= 8.40-14
# we only pull git snaps at the moment
# git clone git@github.com:rhinstaller/grubby.git
# git archive --format=tar --prefix=grubby-%%{version}/ HEAD |bzip2 > grubby-%%{version}.tar.bz2
# Source0: %%{name}-%%{version}.tar.bz2
Source0: https://github.com/rhboot/grubby/archive/%{version}-1.tar.gz
Source1: grubby-bls
Source2: grubby.in
Patch1: drop-uboot-uImage-creation.patch
Patch2: 0001-Change-return-type-in-getRootSpecifier.patch
Patch3: 0002-Add-btrfs-subvolume-support-for-grub2.patch
@ -20,8 +18,9 @@ Patch4: 0003-Add-tests-for-btrfs-support.patch
Patch5: 0004-Use-system-LDFLAGS.patch
Patch6: 0004-Honor-sbindir.patch
BuildRequires: gcc
BuildRequires: pkgconfig glib2-devel popt-devel
BuildRequires: libblkid-devel git-core
BuildRequires: libblkid-devel git-core sed
# for make test / getopt:
BuildRequires: util-linux-ng
%ifarch aarch64 i686 x86_64 %{power64}
@ -65,19 +64,42 @@ make test
%install
make install DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} sbindir=%{_sbindir}
rm %{buildroot}%{_sbindir}/installkernel
rm %{buildroot}%{_sbindir}/new-kernel-pkg
cp %{SOURCE1} %{buildroot}%{_sbindir}/grubby
mkdir -p %{buildroot}%{_libexecdir}/grubby/ %{buildroot}%{_sbindir}/
mv -v %{buildroot}%{_sbindir}/grubby %{buildroot}%{_libexecdir}/grubby/grubby
cp -v %{SOURCE1} %{buildroot}%{_libexecdir}/grubby/
sed -e "s,@@LIBEXECDIR@@,%{_libexecdir},g" %{SOURCE2} \
> %{buildroot}%{_sbindir}/grubby
%package bls
Summary: Command line tool for updating BootLoaderSpec files
Conflicts: %{name} <= 8.40-13
BuildArch: noarch
%description bls
This package provides a grubby wrapper that manages BootLoaderSpec files and is
meant to only be used for legacy compatibility users with existing grubby users.
%files
%{!?_licensedir:%global license %%doc}
%license COPYING
%dir %{_libexecdir}/grubby
%{_libexecdir}/grubby/grubby
%{_sbindir}/grubby
%{_sbindir}/installkernel
%{_sbindir}/new-kernel-pkg
%{_mandir}/man8/*.8*
%files bls
%{!?_licensedir:%global license %%doc}
%license COPYING
%dir %{_libexecdir}/grubby
%{_libexecdir}/grubby/grubby-bls
%{_sbindir}/grubby
%{_mandir}/man8/*.8*
%changelog
* Wed Jul 18 2018 Peter Jones <pjones@redhat.com> - 8.40-15
- Move grubby-bls to grubby and obsolete the old grubby package
* Fri Jul 13 2018 Javier Martinez Canillas <javierm@redhat.com> - 8.40-15
- Add a grubby-bls package that conflicts with grubby
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.40-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild