efibootmgr: Update 0.5.4 -> 0.7.0

This commit is contained in:
William A. Kennington III 2014-06-10 18:15:58 -05:00 committed by Bjørn Forsman
parent 830f3b6b55
commit 58485aa2c7
2 changed files with 13 additions and 41 deletions

View File

@ -1,24 +0,0 @@
diff -Naur efibootmgr-0.5.4-orig/src/lib/efi.c efibootmgr-0.5.4/src/lib/efi.c
--- efibootmgr-0.5.4-orig/src/lib/efi.c 2008-01-03 15:34:01.000000000 +0100
+++ efibootmgr-0.5.4/src/lib/efi.c 2012-03-13 22:25:51.000000000 +0100
@@ -495,7 +495,8 @@
int rc, edd_version=0;
uint8_t mbr_type=0, signature_type=0;
uint64_t start=0, size=0;
- efi_char16_t os_loader_path[40];
+ efi_char16_t *os_loader_path;
+ size_t os_loader_path_size;
memset(signature, 0, sizeof(signature));
@@ -535,7 +536,9 @@
signature,
mbr_type, signature_type);
- efichar_from_char(os_loader_path, opts.loader, sizeof(os_loader_path));
+ os_loader_path_size = sizeof(efi_char16_t) * (1 + strlen(opts.loader) / sizeof(char));
+ os_loader_path = malloc(os_loader_path_size);
+ efichar_from_char(os_loader_path, opts.loader, os_loader_path_size);
p += make_file_path_device_path (p, os_loader_path);
p += make_end_device_path (p);

View File

@ -1,17 +1,15 @@
{stdenv, fetchurl, pciutils, perl, zlib}:
{ stdenv, fetchgit, perl, efivar, pciutils, zlib }:
let version = "0.5.4"; in
stdenv.mkDerivation {
stdenv.mkDerivation rec {
name = "efibootmgr-${version}";
version = "0.7.0";
buildInputs = [ pciutils zlib perl ];
buildInputs = [ perl efivar pciutils zlib ];
patches = [ ./arbitrary-filenames.patch ];
src = fetchurl {
url = "http://linux.dell.com/efibootmgr/permalink/efibootmgr-${version}.tar.gz";
sha256 = "0wcfgf8x4p4xfh38m9x3njwsxibm9bhnmvpjj94lj9sk9xxa8qmm";
src = fetchgit {
url = "git://github.com/vathpela/efibootmgr.git";
rev = "refs/tags/${name}";
sha256 = "1nazmqxppx2xa8clv4bjdb1b6gyyimgjdj85n2hmf1smqr8krrmz";
};
postPatch = ''
@ -19,16 +17,14 @@ stdenv.mkDerivation {
--replace "/usr/bin/perl" "${perl}/bin/perl"
'';
preBuild = ''
export makeFlags="BINDIR=$out/sbin"
'';
installFlags = [ "BINDIR=$(out)/sbin" ];
meta = {
meta = with stdenv.lib; {
description = "A Linux user-space application to modify the Intel Extensible Firmware Interface (EFI) Boot Manager";
homepage = http://linux.dell.com/efibootmgr/;
license = "GPLv2";
maintainers = [ stdenv.lib.maintainers.shlevy ];
platforms = stdenv.lib.platforms.linux;
license = licenses.gpl2;
maintainers = with maintainers; [ shlevy ];
platforms = platforms.linux;
};
}