Accepting request 311729 from home:pluskalm:branches:Base:System

- Update to 0.12
  * This release is mostly a maintenance release that uses 
    libefivar's new library API for creating device paths and load 
    options.
  * Also DHCPv4 network boot entries are now something you can 
    create without knowing an awful lot about ACPI.
- Refresh patches
  efibootmgr-0.11.0-derhat.diff as efibootmgr-derhat.diff
  efibootmgr-0.11.0-check-boot-order.diff as 
  efibootmgr-check-boot-order.diff
- Update project and download url

OBS-URL: https://build.opensuse.org/request/show/311729
OBS-URL: https://build.opensuse.org/package/show/Base:System/efibootmgr?expand=0&rev=30
This commit is contained in:
Raymund Will 2015-06-12 07:46:58 +00:00 committed by Git OBS Bridge
parent aacc1af843
commit 660597f14d
7 changed files with 75 additions and 55 deletions

View File

@ -1,16 +0,0 @@
---
src/efibootmgr/efibootmgr.c | 3 +++
1 file changed, 3 insertions(+)
--- a/src/efibootmgr/efibootmgr.c
+++ b/src/efibootmgr/efibootmgr.c
@@ -467,6 +467,9 @@ remove_from_boot_order(uint16_t num)
}
}
+ if (new_i == 0)
+ return efi_del_variable(EFI_GLOBAL_GUID, "BootOrder");
+
/* Now new_data has what we need */
free(boot_order->data);
boot_order->data = (uint8_t *)new_data;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c569f654d22788881a2b76f84eb9d708de2d91664689a5cfe8bed61ad134be42
size 62328

3
efibootmgr-0.12.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a66f5850677e86255d93cb1cead04c3c48a823a2b864c579321f2a07f00256e6
size 35816

View File

@ -0,0 +1,18 @@
---
src/efibootmgr/efibootmgr.c | 3 +++
1 file changed, 3 insertions(+)
Index: efibootmgr-0.12/src/efibootmgr/efibootmgr.c
===================================================================
--- efibootmgr-0.12.orig/src/efibootmgr/efibootmgr.c
+++ efibootmgr-0.12/src/efibootmgr/efibootmgr.c
@@ -451,6 +451,9 @@ remove_dupes_from_boot_order(void)
/* Adjust the size if we didn't copy everything. */
new_data_size = sizeof(new_data[0]) * new_i;
+ if (new_i == 0)
+ return efi_del_variable(EFI_GLOBAL_GUID, "BootOrder");
+
/* Now new_data has what we need */
free(boot_order->data);
boot_order->data = (uint8_t *)new_data;

View File

@ -17,8 +17,10 @@ Signed-off-by: Raymund Will <rw@suse.com>
src/efibootmgr/efibootmgr.c | 12 ++++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
--- a/Makefile
+++ b/Makefile
Index: efibootmgr-0.12/Makefile
===================================================================
--- efibootmgr-0.12.orig/Makefile
+++ efibootmgr-0.12/Makefile
@@ -1,5 +1,8 @@
default: all
@ -27,17 +29,19 @@ Signed-off-by: Raymund Will <rw@suse.com>
+
SIGNING_KEY := pjones
RELEASE_MAJOR := 0
RELEASE_MINOR := 11
RELEASE_MINOR := 12
@@ -8,6 +11,7 @@
RELEASE_STRING := $(RELEASE_NAME)-$(RELEASE_MAJOR).$(RELEASE_MINOR).$(RELEASE_SUBLEVEL)
RELEASE_STRING := $(RELEASE_NAME)-$(RELEASE_MAJOR).$(RELEASE_MINOR)
CFLAGS = $(EXTRA_CFLAGS) -DEFIBOOTMGR_VERSION=\"$(RELEASE_MAJOR).$(RELEASE_MINOR).$(RELEASE_SUBLEVEL)\" \
+ -DDEFAULT_LOADER=\"\\\\efi\\\\$(OS_VENDOR)\\\\$(EFI_LOADER)\" \
-Wsign-compare -Wall -Werror -g -D_FILE_OFFSET_BITS=64
CFLAGS = $(EXTRA_CFLAGS) -DEFIBOOTMGR_VERSION=\"$(RELEASE_MAJOR).$(RELEASE_MINOR)\" \
+ -DDEFAULT_LOADER=\"\\\\efi\\\\$(OS_VENDOR)\\\\$(EFI_LOADER)\" \
-Wsign-compare -Wall -Werror -g -D_FILE_OFFSET_BITS=64 \
-I/usr/include/efivar
MODULES := src
--- a/src/efibootmgr/efibootmgr.c
+++ b/src/efibootmgr/efibootmgr.c
Index: efibootmgr-0.12/src/efibootmgr/efibootmgr.c
===================================================================
--- efibootmgr-0.12.orig/src/efibootmgr/efibootmgr.c
+++ efibootmgr-0.12/src/efibootmgr/efibootmgr.c
@@ -1,5 +1,6 @@
/*
- efibootmgr.c - Manipulates EFI variables as exported in /proc/efi/vars
@ -55,7 +59,7 @@ Signed-off-by: Raymund Will <rw@suse.com>
The EFI_DEVICE_PATH will look something like:
ACPI device path, length 12 bytes
Hardware Device Path, PCI, length 6 bytes
@@ -59,6 +60,9 @@
@@ -58,6 +59,9 @@
#define EFIBOOTMGR_VERSION "unknown (fix Makefile!)"
#endif
@ -65,21 +69,20 @@ Signed-off-by: Raymund Will <rw@suse.com>
typedef struct _var_entry {
char *name;
@@ -965,7 +969,7 @@ usage()
printf("\t-g | --gpt force disk with invalid PMBR to be treated as GPT\n");
printf("\t-H | --acpi_hid XXXX set the ACPI HID (used with -i)\n");
printf("\t-i | --iface name create a netboot entry for the named interface\n");
@@ -985,7 +989,7 @@ usage()
printf("\t --ip-port <local>,<remote> set local and remote IP ports\n");
printf("\t --ip-origin { {dhcp|static} | { static|stateless|stateful} }\n");
#endif
- printf("\t-l | --loader name (defaults to \\EFI\\redhat\\grub.efi)\n");
+ printf("\t-l | --loader name (defaults to \""DEFAULT_LOADER"\")\n");
+ printf("\t-l | --loader name (defaults to \""DEFAULT_LOADER"\")\n");
printf("\t-L | --label label Boot manager display label (defaults to \"Linux\")\n");
printf("\t-n | --bootnext XXXX set BootNext to XXXX (hex)\n");
printf("\t-N | --delete-bootnext delete BootNext\n");
@@ -993,7 +997,7 @@ set_default_opts()
opts.active = -1; /* Don't set it */
@@ -1013,6 +1017,7 @@ set_default_opts()
opts.timeout = -1; /* Don't set it */
opts.edd10_devicenum = 0x80;
- opts.loader = "\\EFI\\redhat\\grub.efi";
+ opts.loader = DEFAULT_LOADER;
opts.label = "Linux";
opts.loader = "\\EFI\\redhat\\grub.efi";
+ opts.loader = DEFAULT_LOADER;
opts.label = (unsigned char *)"Linux";
opts.disk = "/dev/sda";
opts.iface = NULL;
opts.part = 1;

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Fri Jun 12 07:45:20 UTC 2015 - mpluskal@suse.com
- Update to 0.12
* This release is mostly a maintenance release that uses
libefivar's new library API for creating device paths and load
options.
* Also DHCPv4 network boot entries are now something you can
create without knowing an awful lot about ACPI.
- Refresh patches
efibootmgr-0.11.0-derhat.diff as efibootmgr-derhat.diff
efibootmgr-0.11.0-check-boot-order.diff as
efibootmgr-check-boot-order.diff
- Update project and download url
-------------------------------------------------------------------
Mon Dec 22 21:43:12 UTC 2014 - mpluskal@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package efibootmgr
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,20 +17,20 @@
Name: efibootmgr
Version: 0.12
Release: 0
Summary: EFI Boot Manager
License: GPL-2.0+
Group: System/Boot
Version: 0.11.0
Release: 0
Url: https://github.com/vathpela/efibootmgr
Source: https://github.com/vathpela/efibootmgr/releases/download/efibootmgr-%{version}/efibootmgr-%{version}.tar.gz
Patch1: %{name}-0.11.0-derhat.diff
Patch2: %{name}-0.11.0-check-boot-order.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: https://github.com/rhinstaller/efibootmgr
Source: https://github.com/rhinstaller/efibootmgr/releases/download/efibootmgr-%{version}/efibootmgr-%{version}.tar.bz2
Patch1: %{name}-derhat.diff
Patch2: %{name}-check-boot-order.diff
BuildRequires: efivar-devel
BuildRequires: pciutils-devel
BuildRequires: pkg-config
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: ia64 x86_64 i586 aarch64
%description
@ -54,14 +54,14 @@ case "%{_repository}" in
(SUSE*|SLE*) VENDOR="SUSE";;
(*) VENDOR="linux";;
esac
make %{?_smp_mflags} EXTRA_CFLAGS="$RPM_OPT_FLAGS" \
make %{?_smp_mflags} EXTRA_CFLAGS="%{optflags}" \
OS_VENDOR="$VENDOR" EFI_LOADER="$LOADER"
%install
install -d $RPM_BUILD_ROOT%{_sbindir}
make install BINDIR=$RPM_BUILD_ROOT%{_sbindir}
install -d $RPM_BUILD_ROOT%{_mandir}/man8
install -m 644 src/man/man8/efibootmgr.8 $RPM_BUILD_ROOT%{_mandir}/man8
install -d %{buildroot}%{_sbindir}
make install BINDIR=%{buildroot}%{_sbindir}
install -d %{buildroot}%{_mandir}/man8
install -m 644 src/man/man8/efibootmgr.8 %{buildroot}%{_mandir}/man8
%files
%defattr(-, root, root)