Merge pull request #5754 from pullmoll/efi
efivar, efibootmgr: update to 31, 14
This commit is contained in:
commit
e4f8c5e0df
@ -1691,8 +1691,8 @@ libgtest.so gtest-1.7.0_1
|
||||
libgtest_main.so gtest-1.7.0_1
|
||||
libxmlsec1-gcrypt.so.1 xmlsec1-1.2.20_2
|
||||
libxmlsec1-gnutls.so.1 xmlsec1-1.2.20_2
|
||||
libefivar.so.0 libefivar-0.21_1
|
||||
libefiboot.so.0 libefivar-0.21_1
|
||||
libefivar.so.1 libefivar-31_1
|
||||
libefiboot.so.1 libefivar-31_1
|
||||
libportaudio.so.2 portaudio-19.20140130_1
|
||||
libportaudiocpp.so.0 portaudio-cpp-19.20140130_1
|
||||
libdar.so.5000 libdar-2.4.14_1
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- src/efibootmgr/efibootmgr.c
|
||||
+++ src/efibootmgr/efibootmgr.c
|
||||
@@ -985,8 +985,8 @@ usage()
|
||||
--- src/efibootmgr.c 2016-09-27 23:00:36.000000000 +0200
|
||||
+++ src/efibootmgr.c 2017-02-18 03:38:27.121886861 +0100
|
||||
@@ -1199,8 +1199,8 @@
|
||||
printf("\t --ip-port <local>,<remote> set local and remote IP ports\n");
|
||||
printf("\t --ip-origin { {dhcp|static} | { static|stateless|stateful} }\n");
|
||||
#endif
|
||||
@ -8,10 +8,10 @@
|
||||
- printf("\t-L | --label label Boot manager display label (defaults to \"Linux\")\n");
|
||||
+ printf("\t-l | --loader name (defaults to \\EFI\\void\\grubx64.efi)\n");
|
||||
+ printf("\t-L | --label label Boot manager display label (defaults to \"Void Linux (GRUB2)\")\n");
|
||||
printf("\t-m | --mirror-below-4G t|f mirror memory below 4GB\n");
|
||||
printf("\t-M | --mirror-above-4G X percentage memory to mirror above 4GB\n");
|
||||
printf("\t-n | --bootnext XXXX set BootNext to XXXX (hex)\n");
|
||||
printf("\t-N | --delete-bootnext delete BootNext\n");
|
||||
printf("\t-o | --bootorder XXXX,YYYY,ZZZZ,... explicitly set BootOrder (hex)\n");
|
||||
@@ -1012,8 +1012,8 @@ set_default_opts()
|
||||
@@ -1229,8 +1229,8 @@
|
||||
opts.active = -1; /* Don't set it */
|
||||
opts.timeout = -1; /* Don't set it */
|
||||
opts.edd10_devicenum = 0x80;
|
||||
|
@ -1,24 +1,28 @@
|
||||
# Template file for 'efibootmgr'
|
||||
pkgname=efibootmgr
|
||||
version=0.12
|
||||
revision=3
|
||||
version=14
|
||||
revision=1
|
||||
hostmakedepends="pkg-config"
|
||||
makedepends="libefivar-devel zlib-devel pciutils-devel"
|
||||
short_desc="Tool to modify UEFI Firmware Boot Manager Variables"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
license="GPL-2"
|
||||
homepage="https://github.com/rhinstaller/efibootmgr"
|
||||
distfiles="https://github.com/rhinstaller/efibootmgr/releases/download/efibootmgr-${version}/efibootmgr-${version}.tar.bz2"
|
||||
checksum=a66f5850677e86255d93cb1cead04c3c48a823a2b864c579321f2a07f00256e6
|
||||
distfiles="https://github.com/rhinstaller/efibootmgr/releases/download/${version}/${pkgname}-${version}.tar.bz2"
|
||||
checksum=377ec16484414b80afd1b8a586153d7ef55ccf048638080101d49b7c77f37ad8
|
||||
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
|
||||
conf_files="/etc/default/efibootmgr-kernel-hook"
|
||||
|
||||
CPPFLAGS="-I${XBPS_CROSS_BASE}/usr/include/efivar"
|
||||
|
||||
do_build() {
|
||||
make EXTRA_CFLAGS="$CFLAGS" ${makejobs}
|
||||
}
|
||||
do_install() {
|
||||
vbin src/efibootmgr/efibootmgr
|
||||
vman src/man/man8/efibootmgr.8
|
||||
vbin src/efibootdump
|
||||
vman src/efibootdump.8
|
||||
vbin src/efibootmgr
|
||||
vman src/efibootmgr.8
|
||||
}
|
||||
post_install() {
|
||||
vlicense COPYING
|
||||
|
13
srcpkgs/efivar/files/bswap_constant.h
Normal file
13
srcpkgs/efivar/files/bswap_constant.h
Normal file
@ -0,0 +1,13 @@
|
||||
#ifndef _BSWAP_CONSTANT_H_
|
||||
#define _BSWAP_CONSTANT_H_
|
||||
|
||||
/* Swap bytes in 16 bit value. */
|
||||
#define __bswap_constant_16(x) \
|
||||
((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
|
||||
|
||||
/* Swap bytes in 32 bit value. */
|
||||
#define __bswap_constant_32(x) \
|
||||
((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
|
||||
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
|
||||
|
||||
#endif /* _BSWAP_CONSTANT_H_ */
|
10
srcpkgs/efivar/files/makeguids.patch
Normal file
10
srcpkgs/efivar/files/makeguids.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- src/makeguids.c 2017-02-13 17:52:14.000000000 +0100
|
||||
+++ src/makeguids.c 2017-02-18 04:12:12.474373950 +0100
|
||||
@@ -151,6 +151,7 @@
|
||||
|
||||
fprintf(symout, "#include <efivar.h>\n");
|
||||
fprintf(symout, "#include <endian.h>\n");
|
||||
+ fprintf(symout, "#include \"bswap_constant.h\"\n");
|
||||
fprintf(symout, """\n\
|
||||
#if BYTE_ORDER == BIG_ENDIAN\n\
|
||||
#define cpu_to_be32(n) (n)\n\
|
@ -1,39 +0,0 @@
|
||||
From a3606c02fd271d32e364fcc540e34ba1899309f6 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 14 Jul 2015 09:33:54 -0400
|
||||
Subject: [PATCH] Sometimes the compiler doesn't like { 0, } as an
|
||||
initializer...
|
||||
|
||||
Because it really wants to be { {0, },} or something, and sometimes the
|
||||
compiler, knowing full well what we're trying to do, likes to complain
|
||||
about the rigor applied to our technique in doing it.
|
||||
|
||||
memset() the struct ifreq to 0 instead so I don't need to figure out its
|
||||
internal structure just to zero it out.
|
||||
|
||||
Resolves #28
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
src/linux.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git src/linux.c src/linux.c
|
||||
index 57f71f3..817b8e6 100644
|
||||
--- src/linux.c
|
||||
+++ src/linux.c
|
||||
@@ -847,12 +847,13 @@ ssize_t
|
||||
__attribute__((__visibility__ ("hidden")))
|
||||
make_mac_path(uint8_t *buf, ssize_t size, const char * const ifname)
|
||||
{
|
||||
- struct ifreq ifr = { 0, };
|
||||
+ struct ifreq ifr;
|
||||
struct ethtool_drvinfo drvinfo = { 0, };
|
||||
int fd, rc;
|
||||
ssize_t ret = -1, sz, off=0;
|
||||
char busname[PATH_MAX+1] = "";
|
||||
|
||||
+ memset(&ifr, 0, sizeof (ifr));
|
||||
strncpy(ifr.ifr_name, ifname, IF_NAMESIZE);
|
||||
drvinfo.cmd = ETHTOOL_GDRVINFO;
|
||||
ifr.ifr_data = (caddr_t)&drvinfo;
|
13
srcpkgs/efivar/patches/musl-strndupa.patch
Normal file
13
srcpkgs/efivar/patches/musl-strndupa.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- src/linux.c 2017-02-13 17:52:14.000000000 +0100
|
||||
+++ src/linux.c 2017-02-18 04:42:13.893911649 +0100
|
||||
@@ -44,6 +44,10 @@
|
||||
#include <efivar.h>
|
||||
#include <efiboot.h>
|
||||
|
||||
+#if !defined(__GLIBC__)
|
||||
+#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s)
|
||||
+#endif
|
||||
+
|
||||
#include "dp.h"
|
||||
#include "linux.h"
|
||||
#include "util.h"
|
@ -1,62 +0,0 @@
|
||||
From 262acfc7c4fbb4bbc76f4235220336fd41993ca8 Mon Sep 17 00:00:00 2001
|
||||
From: Felix Janda <felix.janda@posteo.de>
|
||||
Date: Tue, 14 Jul 2015 05:53:04 -0600
|
||||
Subject: [PATCH 1/2] Remove -fshort-wchar from CFLAGS
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
-fshort-wchar makes wchar_t 16bit. We are not using wchar_t anywhere,
|
||||
so we don't need it. Removing it fixes an compilation error with musl
|
||||
libc:
|
||||
|
||||
In file included from dp-acpi.c:21:0:
|
||||
/usr/ligcc/armv7a-hardfloat-linux-musleabi/4.7.4/include/stddef.h:325:24: error: conflicting types for ‘wchar_t’
|
||||
In file included from /usr/include/inttypes.h:12:0,
|
||||
from dp-acpi.c:20:
|
||||
/usr/include/bits/alltypes.h:18:18: note: previous declaration of ‘wchar_t’ was here
|
||||
make[1]: *** [dp-acpi.o] Error 1
|
||||
make: *** [src] Error 2
|
||||
---
|
||||
Make.defaults | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git Make.defaults Make.defaults
|
||||
index cc2baa9..7f5ae5e 100644
|
||||
--- Make.defaults
|
||||
+++ Make.defaults
|
||||
@@ -13,7 +13,7 @@ clang_cflags =
|
||||
gcc_cflags = -Wmaybe-uninitialized
|
||||
cflags := $(CFLAGS) \
|
||||
-Werror -Wall -Wsign-compare -Wstrict-aliasing \
|
||||
- -std=gnu11 -fshort-wchar -fPIC \
|
||||
+ -std=gnu11 -fPIC \
|
||||
-fvisibility=hidden \
|
||||
-D_GNU_SOURCE -I${TOPDIR}/src/include/efivar/ \
|
||||
$(if $(filter $(CC),clang),$(clang_cflags),) \
|
||||
|
||||
From 841ae2fc8c911dbac595cbd228be6bfed7881cad Mon Sep 17 00:00:00 2001
|
||||
From: Felix Janda <felix.janda@posteo.de>
|
||||
Date: Tue, 14 Jul 2015 05:56:05 -0600
|
||||
Subject: [PATCH 2/2] Use the more portable major() instead of gnu_dev_major()
|
||||
|
||||
Do the same for minor() and gnu_dev_minor()
|
||||
---
|
||||
src/linux.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git src/linux.c src/linux.c
|
||||
index c4d099e..0cbd94a 100644
|
||||
--- src/linux.c
|
||||
+++ src/linux.c
|
||||
@@ -129,8 +129,8 @@ get_partition_number(const char *devpath)
|
||||
return -1;
|
||||
}
|
||||
|
||||
- maj = gnu_dev_major(statbuf.st_rdev);
|
||||
- min = gnu_dev_minor(statbuf.st_rdev);
|
||||
+ maj = major(statbuf.st_rdev);
|
||||
+ min = minor(statbuf.st_rdev);
|
||||
|
||||
rc = sysfs_readlink(&linkbuf, "/sys/dev/block/%u:%u", maj, min);
|
||||
if (rc < 0)
|
@ -1,6 +1,6 @@
|
||||
# Template file for 'efivar'
|
||||
pkgname=efivar
|
||||
version=0.21
|
||||
version=31
|
||||
revision=1
|
||||
makedepends="popt-devel"
|
||||
short_desc="Tools to manipulate EFI variables"
|
||||
@ -8,15 +8,21 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
license="LGPL-2.1"
|
||||
homepage="https://github.com/rhinstaller/efivar"
|
||||
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
|
||||
distfiles="https://github.com/rhinstaller/efivar/releases/download/${version}/efivar-${version}.tar.bz2"
|
||||
checksum=04b9b9de9d9a1a013395400438a033daf4a4290f497ec5be04a120e2ac535094
|
||||
distfiles="https://github.com/rhinstaller/efivar/archive/${version}/${version}.tar.gz>${pkgname}-${version}.tar.gz"
|
||||
checksum=b825680dc8b2165cd71131277f5a9cd632f9e43a84a33756543b24e7a251b9e0
|
||||
|
||||
CFLAGS="-Wno-error -Wno-error=nonnull-compare -Wno-error=unused-const-variable=\
|
||||
-Wno-error=deprecated-declarations -Wno-error=strict-aliasing"
|
||||
CFLAGS="-D_GNU_SOURCE"
|
||||
|
||||
do_build() {
|
||||
sed 's|-rpath=$(TOPDIR)/src/|-rpath=$(libdir)|g' -i src/test/Makefile
|
||||
make CC=$CC libdir="/usr/lib/"
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl)
|
||||
cp ${FILESDIR}/bswap_constant.h src/include/efivar/
|
||||
patch -p0 < ${FILESDIR}/makeguids.patch
|
||||
;;
|
||||
esac
|
||||
sed -i Make.rules -e s';-o $@ $^ $(LDLIBS);-o $@ $^ $(LDLIBS) -lpopt;'
|
||||
make ${makejobs} CC=$CC libdir="/usr/lib/"
|
||||
make -C src/test ${makejobs} CC=$CC libdir="/usr/lib/"
|
||||
}
|
||||
do_install() {
|
||||
make DESTDIR=${DESTDIR} libdir="/usr/lib/" install
|
||||
@ -31,7 +37,7 @@ libefivar_package() {
|
||||
}
|
||||
libefivar-devel_package() {
|
||||
short_desc="Library to manipulate EFI variables - development files"
|
||||
depends="libefivar>=${version}_${revision}"
|
||||
depends="${makedepends} libefivar>=${version}_${revision}"
|
||||
pkg_install() {
|
||||
vmove usr/include
|
||||
vmove usr/lib/pkgconfig
|
||||
|
Loading…
x
Reference in New Issue
Block a user