622d0f
Name: grubby
622d0f
Version: 8.28
775cb0
Release: 11%{?dist}
622d0f
Summary: Command line tool for updating bootloader configs
622d0f
Group: System Environment/Base
622d0f
License: GPLv2+
622d0f
URL: http://git.fedorahosted.org/git/grubby.git
ae2804
Source0: https://git.fedorahosted.org/cgit/grubby.git/snapshot/%{name}-%{version}-1.tar.bz2
775cb0
Patch0001: 0001-Use-PREFIX-during-make-install.patch
775cb0
Patch0002: 0002-Honor-linux16-and-initrd16.patch
775cb0
Patch0003: 0003-Only-set-RPM_OPT_FLAGS-if-undefined.patch
775cb0
Patch0004: 0004-Drop-SEGV-handler.patch
775cb0
Patch0005: 0005-grub-Fix-a-crash-with-kernel-line-without-being-prec.patch
775cb0
Patch0006: 0006-Support-devicetree-directive-in-grub2.patch
775cb0
Patch0007: 0007-Actually-USE-DEVTREE-in-new-kernel-pkg.patch
775cb0
Patch0008: 0008-Fix-bad-check-for-new-kernel-pkg-s-command-line-argu.patch
775cb0
Patch0009: 0009-Actually-do-a-fix-for-rhbz-1082318-that-fixes-the-is.patch
775cb0
Patch0010: 0010-Use-the-correct-load-commands-for-aarch64-efi.patch
775cb0
Patch0011: 0011-Tell-a-slightly-better-fib-about-default-bootloader-.patch
775cb0
Patch0012: 0012-Make-findTemplate-actually-return-the-saved-default.patch
775cb0
Patch0013: 0013-If-we-re-using-multiboot-add-a-new-mbmodule-not-an-i.patch
775cb0
Patch0014: 0014-Support-filtering-update-kernel-by-title-as-well.patch
775cb0
Patch0015: 0015-If-we-re-on-a-zipl-based-platform-use-banner-passed-.patch
775cb0
Patch0016: 0016-Conditionally-create-debug-entries-when-installing-k.patch
775cb0
Patch0017: 0001-Don-t-put-spaces-in-debug-entries-on-zipl-platforms.patch
775cb0
Patch0018: 0002-Strdup-the-right-place-in-title-extraction.patch
622d0f
622d0f
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
622d0f
BuildRequires: pkgconfig glib2-devel popt-devel 
622d0f
BuildRequires: libblkid-devel git
622d0f
# for make test / getopt:
622d0f
BuildRequires: util-linux-ng
622d0f
%ifarch aarch64 i686 x86_64 ppc ppc64
622d0f
BuildRequires: /usr/bin/grub2-editenv
622d0f
%endif
622d0f
%ifarch s390 s390x
622d0f
Requires: s390utils-base
622d0f
%endif
622d0f
%ifarch %{arm}
622d0f
Requires: uboot-tools
622d0f
%endif
622d0f
622d0f
%description
622d0f
grubby  is  a command line tool for updating and displaying information about 
622d0f
the configuration files for the grub, lilo, elilo (ia64),  yaboot (powerpc)  
622d0f
and zipl (s390) boot loaders. It is primarily designed to be used from scripts
622d0f
which install new kernels and need to find information about the current boot 
622d0f
environment.
622d0f
622d0f
%prep
ae2804
%setup -q -n %{name}-%{version}-1
622d0f
622d0f
git init
622d0f
git config user.email "noone@example.com"
622d0f
git config user.name "no one"
622d0f
git add .
622d0f
git commit -a -q -m "%{version} baseline"
622d0f
git am %{patches} 
775cb0
git config --unset user.email
775cb0
git config --unset user.name
622d0f
622d0f
%build
622d0f
make %{?_smp_mflags}
622d0f
622d0f
%check
622d0f
make test
622d0f
622d0f
%install
622d0f
rm -rf $RPM_BUILD_ROOT
622d0f
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} mandir=%{_mandir}
622d0f
%ifarch %{arm}
622d0f
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/
622d0f
install -p uboot $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/uboot
775cb0
touch $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/kernel
622d0f
mkdir -p $RPM_BUILD_ROOT/boot
622d0f
echo " " >> $RPM_BUILD_ROOT/boot/boot.scr
622d0f
%endif
622d0f
622d0f
%clean
622d0f
rm -rf $RPM_BUILD_ROOT
622d0f
622d0f
622d0f
%files
622d0f
%defattr(-,root,root,-)
622d0f
%doc COPYING
622d0f
%{_prefix}/sbin/installkernel
622d0f
%{_prefix}/sbin/new-kernel-pkg
622d0f
%{_prefix}/sbin/grubby
622d0f
%{_mandir}/man8/*.8*
775cb0
%ghost %config(noreplace) %{_sysconfdir}/sysconfig/kernel
622d0f
%ifarch %{arm}
622d0f
%config(noreplace) %{_sysconfdir}/sysconfig/uboot
622d0f
%config(noreplace) /boot/boot.scr
622d0f
%endif
622d0f
622d0f
%changelog
775cb0
* Tue Nov 11 2014 Peter Jones <pjones@redhat.com> - 8.28-11
775cb0
- Fix a memory corruption issue we're hitting on s390/s390x
775cb0
  Resolves: rhbz#1152152
775cb0
- Don't use spaces on zipl platforms to describe debugging entries
775cb0
  Related: rhbz#1152152
775cb0
775cb0
* Thu Sep 25 2014 Peter Jones <pjones@redhat.com> - 8.28-10
775cb0
- Use the correct load commands for aarch64 efi.
775cb0
  Resolves: rhbz#1081269
775cb0
- Support "devicetree" directive in grub2.
775cb0
  Resolves: rhbz#1063534
775cb0
- Explain the default bootloaders and configuration paths slightly better
775cb0
  in the manual.
775cb0
  Resolves: rhbz#1001664
775cb0
- Conditionally create debug entries when installing kernels.
775cb0
  Resolves: rhbz#957681
775cb0
- Make sure --banner from the command line is used correctly.
775cb0
  Resolves: rhbz#1032048
775cb0
ae2804
* Thu Mar 06 2014 Peter Jones <pjones@redhat.com> - 8.28-8
ae2804
- Fix crash when config file doesn't match command line.
ae2804
  Related: rhbz#1070646
ae2804
- Make crashes work with abrt better.
ae2804
  Resolves: rhbz#1070646
ae2804
ae2804
* Wed Jan 29 2014 Peter Jones <pjones@redhat.com> - 8.28-7
ae2804
- Update to make sure the source url is correct.
ae2804
  Related: rhbz#1034743
ae2804
ae2804
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 8.28-6
ae2804
- Mass rebuild 2014-01-24
ae2804
ae2804
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 8.28-5
ae2804
- Mass rebuild 2013-12-27
ae2804
ae2804
* Fri Dec 06 2013 Peter Jones <pjones@redhat.com> - 8.28-4
ae2804
- Make patch from -3 only do that on x86.
ae2804
  Resolves: rhbz#1034743
ae2804
ae2804
* Wed Nov 27 2013 d.marlin <dmarlin@redhat.com>
ae2804
- Only set RPM_OPT_FLAGS if undefined to avoid overwriting 
ae2804
  the platform defaults.
ae2804
  Resolves: rhbz#1023793
ae2804
622d0f
* Mon Nov 18 2013 Peter Jones <pjones@redhat.com> - 8.28-3
622d0f
- Honor linux16 and initrd16 in grub.cfg
622d0f
  Resolves: rhbz#1031192
622d0f
622d0f
* Fri Sep 13 2013 Peter Jones <pjones@redhat.com> - 8.28-2
622d0f
- Use %%{_prefix} during "make install" (rpmdiff)
622d0f
622d0f
* Fri Aug 02 2013 Peter Jones <pjones@redhat.com> - 8.28-1
622d0f
- More work on grub's "saved_entry" system.
622d0f
  Resolves: rhbz#808021
622d0f
622d0f
* Tue Jul 30 2013 Peter Jones <pjones@redhat.com> - 8.27-1
622d0f
- Make grubby understand grub's "saved_entry" system
622d0f
  Resolves: rhbz#808021
622d0f
- BuildRequire grub2 on appropriate platforms, for the test suite.
622d0f
  Related: rhbz#808021
622d0f
622d0f
* Fri Jun 07 2013 Dennis Gilmore <dennis@ausil.us> - 8.26-2
622d0f
- add patch to update extlinux.conf file on arm if it exists
622d0f
622d0f
* Fri May 10 2013 Peter Jones <pjones@redhat.com> - 8.26-1
622d0f
- Conditionally call arm-boot-config's boot.scr generator if available
622d0f
  Resolves: rhbz#952428
622d0f
622d0f
* Tue Apr 09 2013 Peter Jones <pjones@redhat.com> - 8.25-1
622d0f
- Error instead of segfaulting if we can't find any working config
622d0f
  Resolves: rhbz#912873
622d0f
  Resolves: rhbz#751608
622d0f
622d0f
* Tue Mar 19 2013 Peter Jones <pjones@redhat.com> - 8.24-1
622d0f
- Fix module remove code from Harald (#923441)
622d0f
622d0f
* Mon Mar 11 2013 Peter Jones <pjones@redhat.com> - 8.23-1
622d0f
- Update to 8.23
622d0f
- Fix empty root device in case of an empty /etc/fstab (lemenkov)
622d0f
- General refactoring and cleanup (harald)
622d0f
- Don't clean up modules.* so aggressively (harald)
622d0f
622d0f
* Wed Feb 20 2013 Peter Jones <pjones@redhat.com> - 8.22-3
622d0f
- Add --debug style logging (for both success and failures) to /var/log/grubby
622d0f
622d0f
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.22-2
622d0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
622d0f
622d0f
* Fri Jan 04 2013 Peter Jones <pjones@redhat.com> - 8.22-1
622d0f
- Revert test case for rhbz#742885 - it's a work in progress that isn't
622d0f
  ready yet.
622d0f
622d0f
* Fri Jan 04 2013 Peter Jones <pjones@redhat.com> - 8.21-1
622d0f
- Use systemd vconsole.conf and locale.conf if present
622d0f
  Resolves rhbz#881908
622d0f
- Avoid unnecessary stat calls (from Ville Skyttä)
622d0f
  Resolves rhbz#741135
622d0f
- Spelling fixes (Ville Skyttä)
622d0f
- Add a test case for rhbz#742885
622d0f
- Handle case-insensitive extlinux config files properly (from Johannes Weiner)
622d0f
622d0f
* Tue Oct 02 2012 Peter Jones <pjones@redhat.com> - 8.20-1
622d0f
- Handle linuxefi initrd and removal correctly.
622d0f
  Resolves: rhbz#859285
622d0f
622d0f
* Wed Sep 26 2012 Peter Jones <pjones@redhat.com> - 8.19-1
622d0f
- Don't accidentally migrate from linuxefi back to linux
622d0f
  Related: rhbz#859285
622d0f
622d0f
* Fri Sep 21 2012 Peter Jones <pjones@redhat.com> - 8.18-1
622d0f
- Change the way the kernel load address is determined for ARM U-Boot.
622d0f
622d0f
* Wed Aug 08 2012 Peter Jones <pjones@redhat.com> - 8.17-1
622d0f
- Update to 8.17
622d0f
- Fixes a "make test" failure.
622d0f
622d0f
* Wed Aug 08 2012 Peter Jones <pjones@redhat.com> - 8.16-1
622d0f
- Update to 8.16
622d0f
- Handle "linuxefi" directive on grub2/uefi machines.
622d0f
622d0f
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.15-2
622d0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
622d0f
622d0f
* Mon Jun 25 2012 Peter Jones <pjones@redhat.com> - 8.15-1
622d0f
- Update to 8.15
622d0f
- Revert dirname change from 8.13; it was wrong.
622d0f
622d0f
* Thu Jun 14 2012 Peter Jones <pjones@redhat.com> - 8.14-1
622d0f
- Update to 8.14 to fix a build problem.
622d0f
622d0f
* Thu Jun 14 2012 Peter Jones <pjones@redhat.com> - 8.13-1
622d0f
- Update to 8.13
622d0f
- Add some more ARM tweaks (dmartin)
622d0f
- Better support for other distros (crosa)
622d0f
622d0f
* Tue Jun 12 2012 Peter Jones <pjones@redhat.com> - 8.12-2
622d0f
- Support UBOOT_IMGADDR override on ARM (blc)
622d0f
622d0f
* Thu May 31 2012 Peter Jones <pjones@redhat.com> - 8.12-1
622d0f
- Update to 8.12
622d0f
- Preserve trailing indentation when splitting line elements (mads)
622d0f
  Resolves: rhbz#742720
622d0f
- Pick last device mounted on / (pjones,bcl)
622d0f
  Related: rhbz#820340
622d0f
  Related: rhbz#820351
622d0f
622d0f
* Wed Mar 21 2012 Peter Jones <pjones@redhat.com> - 8.11-1
622d0f
- Update to 8.11
622d0f
  Resolves: rhbz#805310
622d0f
622d0f
* Thu Mar 15 2012 Peter Jones <pjones@redhat.com> - 8.10-1
622d0f
- Update to 8.10
622d0f
- Use "isquote" where appropriate
622d0f
- Make --remove-kenrel support titles in grub2 (jianzhong.huang)
622d0f
- Use grub2 if it's there on ppc.
622d0f
622d0f
* Fri Mar 02 2012 Peter Jones <pjones@redhat.com> - 8.9-1
622d0f
- Refactor grub2 title extraction, making it a function (Cleber Rosa)
622d0f
- Include prefix when printing kernel information (Cleber Rosa)
622d0f
- Implement support for "default saved" for grub2 (Cleber Rosa)
622d0f
- Try to display title when printing information with '--info' (Cleber Rosa)
622d0f
- new-kernel-pkg fails to find U-Boot. (D. Marlin)
622d0f
- Add support to new-kernel-pkg to recognize ARCH == armv5tel needed for Kir
622d0f
  (D.Marlin)
622d0f
- Include a / when one is missing in paths (#769641)
622d0f
- Fix hard coded paths so kernel's "make install" will DTRT.
622d0f
- Fix endswith() to correctly test its input for validity.
622d0f
622d0f
* Tue Feb 07 2012 Dennis Gilmore <dennis@ausil.us> - 8.8-3
622d0f
- add uboot-tools requires on arm arches
622d0f
- add uboot config file on arm arches
622d0f
622d0f
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.8-2
622d0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
622d0f
622d0f
* Tue Dec 20 2011 Peter Jones <pjones@redhat.com> - 8.8-1
622d0f
- Fix test cases from 8.7 to work on a system without /boot mounted.
622d0f
622d0f
* Tue Dec 20 2011 Peter Jones <pjones@redhat.com> - 8.7-1
622d0f
- Add a --debug to try to help diagnose "No suitable template". (sandeen,pjones)
622d0f
622d0f
* Mon Dec 19 2011 Peter Jones <pjones@redhat.com> - 8.6-1
622d0f
- Fix a "make test" errors introduced in 8.4-1
622d0f
622d0f
* Sat Dec 17 2011 Peter Jones <pjones@redhat.com> - 8.5-1
622d0f
- Don't hardcode dracut path
622d0f
  Resolves: #768645
622d0f
622d0f
* Thu Dec 08 2011 Adam Williamson <awilliam@redhat.com> - 8.4-1
622d0f
- Update to 8.4:
622d0f
	+ fix Loading... line for updated kernels
622d0f
	+ Add new '--default-title' feature
622d0f
	+ Add new '--default-index' feature
622d0f
	+ add feature for testing the output of a grubby command
622d0f
	+ Fix detection when comparing stage1 to MBR
622d0f
	+ do not link against glib-2.0
622d0f
	+ Don't crash if grubConfig not found
622d0f
	+ Adding extlinux support for new-kernel-pkg
622d0f
	+ Look for Debian / Ubuntu grub config files (#703260)
622d0f
	+ Make grubby recognize Ubuntu's spin of Grub2 (#703260)
622d0f
622d0f
* Thu Sep 29 2011 Peter Jones <pjones@redhat.com> - 8.3-1
622d0f
- Fix new-kernel-pkg invocation of grubby for grub (patch from Mads Kiilerich)
622d0f
  Resolves: rhbz#725185
622d0f
622d0f
* Wed Sep 14 2011 Peter Jones <pjones@redhat.com> - 8.2-1
622d0f
- Fixes for xen (from Michael Petullo)
622d0f
  Resolves: rhbz#658387
622d0f
622d0f
* Fri Jul 22 2011 Peter Jones <pjones@redhat.com> - 8.1-1
622d0f
- Update to 8.1
622d0f
- Fix miss-spelled variable name in new-kernel-pkg
622d0f
622d0f
* Thu Jul 21 2011 Peter Jones <pjones@redhat.com> - 8.0-1
622d0f
- Add support for grub2.
622d0f
622d0f
* Tue Jun 07 2011 Brian C. Lane <bcl@redhat.com> - 7.0.18-1
622d0f
- Bump version to 7.0.18 (bcl)
622d0f
- Fixup new-kernel-pkg errors (#711493) (bcl)
622d0f
622d0f
* Mon Jun 06 2011 Peter Jones <pjones@redhat.com> - 7.0.17-1
622d0f
- Fix references to wrong program name in new-kernel-pkg.8
622d0f
  Resolves: rhbz#663981
622d0f
622d0f
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.0.16-3
622d0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
622d0f
622d0f
* Mon Jan 24 2011 Karsten Hopp <karsten@redhat.com> 7.0.16-2
622d0f
- add BR utils-linux-ng for getopt
622d0f
622d0f
* Tue Jul 13 2010 Brian C. Lane <bcl@redhat.com> - 7.0.16-1
622d0f
- Update to 7.0.16
622d0f
- Add patch to check the return value of getuuidbydev
622d0f
- Resolves: rhbz#592294
622d0f
622d0f
* Wed Apr 14 2010 Peter Jones <pjones@redhat.com> - 7.0.15-1
622d0f
- Update to 7.0.15
622d0f
- Add man pages for installkernel and new-kernel-pkg
622d0f
  Resolves: rhbz#529333
622d0f
622d0f
* Wed Apr 14 2010 Peter Jones <pjones@redhat.com> - 7.0.14-1
622d0f
- Update to 7.0.14
622d0f
622d0f
* Thu Feb 11 2010 Peter Jones <pjones@redhat.com> - 7.0.13-1
622d0f
- Strip boot partition prefix from initrd path if present during --update.
622d0f
  Related: rhbz#557922
622d0f
- add host only support for local kernel compiles (airlied)
622d0f
622d0f
* Mon Feb 08 2010 Peter Jones <pjones@redhat.com> - 7.0.12-1
622d0f
- compare rootdev using uuid instead of stat, for better btrfs support (josef)
622d0f
  Resolves: rhbz#530108
622d0f
622d0f
* Mon Feb 08 2010 Peter Jones <pjones@redhat.com> - 7.0.11-1
622d0f
- Make it possible to update the initrd without any other change.
622d0f
  Related: rhbz#557922
622d0f
622d0f
* Fri Feb 05 2010 Peter Jones <pjones@redhat.com> - 7.0.10-1
622d0f
- Make --update able to add an initramfs.
622d0f
  Related: rhbz#557922
622d0f
622d0f
* Mon Nov 30 2009 Peter Jones <pjones@redhat.com> - 7.0.9-3
622d0f
- Use s390utils-base as the s390 dep, not s390utils
622d0f
  Related: rhbz#540565
622d0f
622d0f
* Tue Nov 24 2009 Peter Jones <pjones@redhat.com> - 7.0.9-2
622d0f
- Add s390utils dep when on s390, since new-kernel-package needs it.
622d0f
  Resolves: rhbz#540565
622d0f
622d0f
* Fri Oct 30 2009 Peter Jones <pjones@redhat.com> - 7.0.9-1
622d0f
- Add support for dracut to installkernel (notting)
622d0f
622d0f
* Thu Oct  1 2009 Hans de Goede <hdegoede@redhat.com> - 7.0.8-1
622d0f
- Stop using nash
622d0f
622d0f
* Fri Sep 11 2009 Hans de Goede <hdegoede@redhat.com> - 7.0.7-1
622d0f
- Remove writing rd_plytheme=$theme to kernel args in dracut mode (hansg)
622d0f
- Add a couple of test cases for extra initrds (rstrode)
622d0f
- Allow tmplLine to be NULL in getInitrdVal (rstrode)
622d0f
622d0f
* Fri Sep 11 2009 Peter Jones <pjones@redhat.com> - 7.0.6-1
622d0f
- Fix test case breakage from 7.0.5 (rstrode)
622d0f
622d0f
* Fri Sep 11 2009 Peter Jones <pjones@redhat.com> - 7.0.5-1
622d0f
- Add support for plymouth as a second initrd. (rstrode)
622d0f
  Resolves: rhbz#520515
622d0f
622d0f
* Wed Sep 09 2009 Hans de Goede <hdegoede@redhat.com> - 7.0.4-1
622d0f
- Add --dracut cmdline argument for %post generation of dracut initrd
622d0f
622d0f
* Wed Aug 26 2009 Hans de Goede <hdegoede@redhat.com> - 7.0.3-1
622d0f
- Silence error when no /etc/sysconfig/keyboard (#517187)
622d0f
622d0f
* Fri Aug  7 2009 Hans de Goede <hdegoede@redhat.com> - 7.0.2-1
622d0f
- Add --add-dracut-args new-kernel-pkg cmdline option
622d0f
622d0f
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.0.1-2
622d0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
622d0f
622d0f
* Fri Jul 17 2009 Jeremy Katz <katzj@redhat.com> - 7.0.1-1
622d0f
- Fix blkid usage (#124246)
622d0f
622d0f
* Wed Jun 24 2009 Jeremy Katz <katzj@redhat.com> - 7.0-1
622d0f
- BR libblkid-devel now instead of e2fsprogs-devel
622d0f
- Add bits to switch to using dracut for new-kernel-pkg
622d0f
622d0f
* Wed Jun  3 2009 Jeremy Katz <katzj@redhat.com> - 6.0.86-2
622d0f
- add instructions for checking out from git
622d0f
622d0f
* Tue Jun  2 2009 Jeremy Katz <katzj@redhat.com> - 6.0.86-1
622d0f
- initial build after splitting out from mkinitrd
622d0f