Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0dc92e096d12
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 862f05cb00da
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Oct 4, 2019

  1. Revert "grub2: 2.04-rc1 -> 2.04 (#67622)"

    This reverts commit 8ba94a8.
    
    See #61718 for rationale.
    lheckemann committed Oct 4, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    tadeokondrak Tadeo Kondrak
    Copy the full SHA
    4eb9725 View commit details
  2. Revert "grub: 2.02 -> 2.04-rc1"

    This reverts commit df4d0fa.
    
    See #61718 for rationale.
    lheckemann committed Oct 4, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    tadeokondrak Tadeo Kondrak
    Copy the full SHA
    862f05c View commit details
Showing with 43 additions and 17 deletions.
  1. +18 −17 pkgs/tools/misc/grub/2.0x.nix
  2. +25 −0 pkgs/tools/misc/grub/relocation-not-implemented.diff
35 changes: 18 additions & 17 deletions pkgs/tools/misc/grub/2.0x.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchgit, flex, bison, python, autoconf, automake, gnulib, libtool
{ stdenv, fetchurl, fetchpatch, flex, bison, python
, gettext, ncurses, libusb, freetype, qemu, lvm2, unifont, pkgconfig
, fuse # only needed for grub-mount
, zfs ? null
@@ -31,7 +31,7 @@ let
canEfi = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild);
inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems);

version = "2.04";
version = "2.02";

in (

@@ -43,18 +43,28 @@ stdenv.mkDerivation rec {
pname = "grub";
inherit version;

src = fetchgit {
url = "git://git.savannah.gnu.org/grub.git";
rev = "${pname}-${version}";
sha256 = "02gly3xw88pj4zzqjniv1fxa1ilknbq1mdk30bj6qy8n44g90i8w";
src = fetchurl {
url = "mirror://gnu/grub/${pname}-${version}.tar.xz";
sha256 = "03vvdfhdmf16121v7xs8is2krwnv15wpkhkf16a4yf8nsfc3f2w1";
};

patches = [
./fix-bash-completion.patch
# This patch makes grub compatible with the XFS sparse inode
# feature introduced by xfsprogs-4.16.
# to be removed in grub-2.03
(fetchpatch {
url = https://git.savannah.gnu.org/cgit/grub.git/patch/?id=cda0a857dd7a27cd5d621747464bfe71e8727fff;
sha256 = "0k9qrkdxwdqk6sz05q9smqwjr6pvgc9adx1mlf0807g4im91xnm0";
})
./relocation-not-implemented.diff
];
postPatch = ''
substituteInPlace ./configure --replace '/usr/share/fonts/unifont' '${unifont}/share/fonts'
'';

nativeBuildInputs = [ bison flex python pkgconfig autoconf automake ];
buildInputs = [ ncurses libusb freetype gettext lvm2 fuse libtool ]
nativeBuildInputs = [ bison flex python pkgconfig ];
buildInputs = [ ncurses libusb freetype gettext lvm2 fuse ]
++ optional doCheck qemu
++ optional zfsSupport zfs;

@@ -82,15 +92,6 @@ stdenv.mkDerivation rec {
-e's/qemu-system-i386/qemu-system-x86_64 -nodefaults/g'
unset CPP # setting CPP intereferes with dependency calculation
cp -r ${gnulib} $PWD/gnulib
chmod u+w -R $PWD/gnulib
patchShebangs .
./bootstrap --no-git --gnulib-srcdir=$PWD/gnulib
substituteInPlace ./configure --replace '/usr/share/fonts/unifont' '${unifont}/share/fonts'
'';

configureFlags = [ "--enable-grub-mount" ] # dep of os-prober
25 changes: 25 additions & 0 deletions pkgs/tools/misc/grub/relocation-not-implemented.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
https://git.savannah.gnu.org/cgit/grub.git/commit/util?id=842c390469e2c2e10b5
diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
index a2bb054..39d7efb 100644
--- a/util/grub-mkimagexx.c
+++ b/util/grub-mkimagexx.c
@@ -841,6 +841,7 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections,
break;

case R_X86_64_PC32:
+ case R_X86_64_PLT32:
{
grub_uint32_t *t32 = (grub_uint32_t *) target;
*t32 = grub_host_to_target64 (grub_target_to_host32 (*t32)
diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c
index 9179285..a79271f 100644
--- a/util/grub-module-verifier.c
+++ b/util/grub-module-verifier.c
@@ -19,6 +19,7 @@ struct grub_module_verifier_arch archs[] = {
-1
}, (int[]){
R_X86_64_PC32,
+ R_X86_64_PLT32,
-1
}
},