efivar: update to 0.21
This commit is contained in:
parent
7de151d4aa
commit
41c306dca9
4 changed files with 110 additions and 44 deletions
|
@ -1677,7 +1677,8 @@ libgtest.so gtest-1.7.0_1
|
||||||
libgtest_main.so gtest-1.7.0_1
|
libgtest_main.so gtest-1.7.0_1
|
||||||
libxmlsec1-gcrypt.so.1 xmlsec1-1.2.20_2
|
libxmlsec1-gcrypt.so.1 xmlsec1-1.2.20_2
|
||||||
libxmlsec1-gnutls.so.1 xmlsec1-1.2.20_2
|
libxmlsec1-gnutls.so.1 xmlsec1-1.2.20_2
|
||||||
libefivar.so.0 libefivar-0.10_1
|
libefivar.so.0 libefivar-0.21_1
|
||||||
|
libefiboot.so.0 libefivar-0.21_1
|
||||||
libportaudio.so.2 portaudio-19.20140130_1
|
libportaudio.so.2 portaudio-19.20140130_1
|
||||||
libportaudiocpp.so.0 portaudio-cpp-19.20140130_1
|
libportaudiocpp.so.0 portaudio-cpp-19.20140130_1
|
||||||
libdar.so.5000 libdar-2.4.14_1
|
libdar.so.5000 libdar-2.4.14_1
|
||||||
|
|
39
srcpkgs/efivar/patches/efivar-0.21-initializer.patch
Normal file
39
srcpkgs/efivar/patches/efivar-0.21-initializer.patch
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
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;
|
|
@ -1,28 +1,62 @@
|
||||||
Portability fixes:
|
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
|
||||||
|
|
||||||
- Initialize outbuf with the expected size! fixes a segfault with musl.
|
-fshort-wchar makes wchar_t 16bit. We are not using wchar_t anywhere,
|
||||||
- Really use __builtin_va_arg_pack_len().
|
so we don't need it. Removing it fixes an compilation error with musl
|
||||||
|
libc:
|
||||||
|
|
||||||
--- src/makeguids.c 2014-12-28 10:30:36.731270900 +0100
|
In file included from dp-acpi.c:21:0:
|
||||||
+++ src/makeguids.c 2014-12-28 10:26:24.743259656 +0100
|
/usr/ligcc/armv7a-hardfloat-linux-musleabi/4.7.4/include/stddef.h:325:24: error: conflicting types for ‘wchar_t’
|
||||||
@@ -100,7 +100,7 @@ main(int argc, char *argv[])
|
In file included from /usr/include/inttypes.h:12:0,
|
||||||
err(1, "makeguids: could not read \"%s\"", argv[1]);
|
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(-)
|
||||||
|
|
||||||
/* strictly speaking, this *has* to be too large. */
|
diff --git Make.defaults Make.defaults
|
||||||
- struct guidname *outbuf = calloc(inlen, sizeof (char));
|
index cc2baa9..7f5ae5e 100644
|
||||||
+ struct guidname *outbuf = calloc(inlen, sizeof (struct guidname));
|
--- Make.defaults
|
||||||
if (!outbuf)
|
+++ Make.defaults
|
||||||
err(1, "makeguids");
|
@@ -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),) \
|
||||||
|
|
||||||
--- src/efivar.h 2014-12-28 10:30:36.731270900 +0100
|
From 841ae2fc8c911dbac595cbd228be6bfed7881cad Mon Sep 17 00:00:00 2001
|
||||||
+++ src/efivar.h 2014-12-28 10:26:57.359261112 +0100
|
From: Felix Janda <felix.janda@posteo.de>
|
||||||
@@ -85,7 +85,7 @@ efi_set_variable(efi_guid_t guid, const
|
Date: Tue, 14 Jul 2015 05:56:05 -0600
|
||||||
return -1;
|
Subject: [PATCH 2/2] Use the more portable major() instead of gnu_dev_major()
|
||||||
}
|
|
||||||
|
|
||||||
- if (__va_arg_pack_len() == 0)
|
Do the same for minor() and gnu_dev_minor()
|
||||||
+ if (__builtin_va_arg_pack_len() == 0)
|
---
|
||||||
return _efi_set_variable(guid, name, data, data_size,
|
src/linux.c | 4 ++--
|
||||||
attributes, 0644);
|
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,32 +1,24 @@
|
||||||
# Template file for 'efivar'
|
# Template file for 'efivar'
|
||||||
pkgname=efivar
|
pkgname=efivar
|
||||||
version=0.15
|
version=0.21
|
||||||
revision=3
|
revision=1
|
||||||
build_style=gnu-configure
|
build_pie=yes
|
||||||
makedepends="popt-devel"
|
makedepends="popt-devel"
|
||||||
short_desc="Tools to manipulate EFI variables"
|
short_desc="Tools to manipulate EFI variables"
|
||||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||||
license="LGPL-2.1"
|
license="LGPL-2.1"
|
||||||
homepage="https://github.com/vathpela/efivar"
|
homepage="https://github.com/rhinstaller/efivar"
|
||||||
|
|
||||||
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
|
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/$pkgname/archive/$version.tar.gz"
|
|
||||||
checksum=8e5a45ebbd116a96a43176e96b211c73f3ec8452da3bd0ce75a5716f86d4343f
|
|
||||||
|
|
||||||
do_configure() {
|
|
||||||
sed 's|-rpath=$(TOPDIR)/src/|-rpath=$(libdir)|g' -i src/test/Makefile
|
|
||||||
sed "s|-O0|${CFLAGS}|g" -i Make.defaults
|
|
||||||
}
|
|
||||||
do_build() {
|
do_build() {
|
||||||
make CC=$CC libdir="/usr/lib/" bindir="/usr/bin/" \
|
sed 's|-rpath=$(TOPDIR)/src/|-rpath=$(libdir)|g' -i src/test/Makefile
|
||||||
mandir="/usr/share/man/" includedir="/usr/include/" V=1
|
make CC=$CC libdir="/usr/lib/"
|
||||||
}
|
}
|
||||||
do_install() {
|
do_install() {
|
||||||
make -j1 V=1 DESTDIR=${DESTDIR} libdir="/usr/lib/" \
|
make DESTDIR=${DESTDIR} libdir="/usr/lib/" install
|
||||||
bindir="/usr/bin/" mandir="/usr/share/man/" \
|
vbin src/test/tester efivar-tester
|
||||||
includedir="/usr/include/" install
|
|
||||||
vinstall src/test/tester 755 usr/bin efivar-tester
|
|
||||||
}
|
}
|
||||||
|
|
||||||
libefivar_package() {
|
libefivar_package() {
|
||||||
|
|
Loading…
Reference in a new issue