Accepting request 783047 from Base:System
OBS-URL: https://build.opensuse.org/request/show/783047 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnu-efi?expand=0&rev=30
This commit is contained in:
commit
24f0ed4bcf
3
gnu-efi-3.0.11.tar.bz2
Normal file
3
gnu-efi-3.0.11.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f28da792a2532e91e18e0101468811739a22cde9eee5eacfd0efb9bf3a61d6b9
|
||||
size 154456
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:76006d8ea8d67bcf72f35d09d43e9ef6a69400d6d5d4bf64baf1ab7434e2b722
|
||||
size 154397
|
@ -1,151 +0,0 @@
|
||||
From 85f1c797f6935223205159dd108e4871b2e55500 Mon Sep 17 00:00:00 2001
|
||||
From: Pete Batard <pete@akeo.ie>
|
||||
Date: Tue, 24 Apr 2018 13:45:11 +0100
|
||||
Subject: [PATCH 1/4] Fix conversion from 'UINTN' to 'UINT8' warnings
|
||||
|
||||
* MSVC generates two of the following in rtstr.c:
|
||||
warning C4244: 'function': conversion from 'UINTN' to 'UINT8', possible loss of data
|
||||
---
|
||||
lib/runtime/rtstr.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/runtime/rtstr.c b/lib/runtime/rtstr.c
|
||||
index 80ff489..dcc1a2a 100644
|
||||
--- a/lib/runtime/rtstr.c
|
||||
+++ b/lib/runtime/rtstr.c
|
||||
@@ -71,7 +71,7 @@ RtStrnCpy (
|
||||
{
|
||||
UINTN Size = RtStrnLen(Src, Len);
|
||||
if (Size != Len)
|
||||
- RtSetMem(Dest + Len, '\0', (Len - Size) * sizeof(CHAR16));
|
||||
+ RtSetMem(Dest + Len, '\0', (UINT8)((Len - Size) * sizeof(CHAR16)));
|
||||
RtCopyMem(Dest, Src, Size * sizeof(CHAR16));
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ RtStpnCpy (
|
||||
{
|
||||
UINTN Size = RtStrnLen(Src, Len);
|
||||
if (Size != Len)
|
||||
- RtSetMem(Dest + Len, '\0', (Len - Size) * sizeof(CHAR16));
|
||||
+ RtSetMem(Dest + Len, '\0', (UINT8)((Len - Size) * sizeof(CHAR16)));
|
||||
RtCopyMem(Dest, Src, Size * sizeof(CHAR16));
|
||||
return Dest + Size;
|
||||
}
|
||||
--
|
||||
2.19.0
|
||||
|
||||
|
||||
From 4889dc561f905406f3d0a648321589bd47703fdc Mon Sep 17 00:00:00 2001
|
||||
From: Gary Lin <glin@suse.com>
|
||||
Date: Tue, 9 Oct 2018 18:35:21 +0800
|
||||
Subject: [PATCH 2/4] Set '\0' properly in StrnCpy()
|
||||
|
||||
The arguments to SetMem() were wrong. Besides, SetMem() should start at
|
||||
"Dest + Size" since "Size" will be smaller than "Len" if they are not
|
||||
equal.
|
||||
|
||||
Signed-off-by: Gary Lin <glin@suse.com>
|
||||
---
|
||||
lib/runtime/rtstr.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/runtime/rtstr.c b/lib/runtime/rtstr.c
|
||||
index dcc1a2a..949f938 100644
|
||||
--- a/lib/runtime/rtstr.c
|
||||
+++ b/lib/runtime/rtstr.c
|
||||
@@ -71,7 +71,7 @@ RtStrnCpy (
|
||||
{
|
||||
UINTN Size = RtStrnLen(Src, Len);
|
||||
if (Size != Len)
|
||||
- RtSetMem(Dest + Len, '\0', (UINT8)((Len - Size) * sizeof(CHAR16)));
|
||||
+ RtSetMem(Dest + Size, (Len - Size) * sizeof(CHAR16), '\0');
|
||||
RtCopyMem(Dest, Src, Size * sizeof(CHAR16));
|
||||
}
|
||||
|
||||
--
|
||||
2.19.0
|
||||
|
||||
|
||||
From 38a9921bc39fea25b0ca62d6eb1595bf15d05839 Mon Sep 17 00:00:00 2001
|
||||
From: Gary Lin <glin@suse.com>
|
||||
Date: Thu, 11 Oct 2018 12:02:27 +0800
|
||||
Subject: [PATCH 3/4] Implement StrnCat() without StrnCpy()
|
||||
|
||||
StrnCpy() doesn't guarantee the dest string will be null-terminated, so
|
||||
we shouldn't use StrnCpy().
|
||||
|
||||
Signed-off-by: Gary Lin <glin@suse.com>
|
||||
---
|
||||
lib/runtime/rtstr.c | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/runtime/rtstr.c b/lib/runtime/rtstr.c
|
||||
index 949f938..fe65d96 100644
|
||||
--- a/lib/runtime/rtstr.c
|
||||
+++ b/lib/runtime/rtstr.c
|
||||
@@ -126,7 +126,7 @@ RtStrCat (
|
||||
}
|
||||
|
||||
#ifndef __GNUC__
|
||||
-#pragma RUNTIME_CODE(RtStrCat)
|
||||
+#pragma RUNTIME_CODE(RtStrnCat)
|
||||
#endif
|
||||
VOID
|
||||
RUNTIMEFUNCTION
|
||||
@@ -136,7 +136,12 @@ RtStrnCat (
|
||||
IN UINTN Len
|
||||
)
|
||||
{
|
||||
- RtStrnCpy(Dest+StrLen(Dest), Src, Len);
|
||||
+ UINTN DestSize, Size;
|
||||
+
|
||||
+ DestSize = StrLen(Dest);
|
||||
+ Size = RtStrnLen(Src, Len);
|
||||
+ RtCopyMem(Dest + DestSize, Src, Size * sizeof(CHAR16));
|
||||
+ Dest[DestSize + Size] = '\0';
|
||||
}
|
||||
|
||||
#ifndef __GNUC__
|
||||
--
|
||||
2.19.0
|
||||
|
||||
|
||||
From 134587ea094a4974e5773bf228f6436535f50f1a Mon Sep 17 00:00:00 2001
|
||||
From: Gary Lin <glin@suse.com>
|
||||
Date: Thu, 11 Oct 2018 16:10:26 +0800
|
||||
Subject: [PATCH 4/4] Set '\0' properly in StpnCpy()
|
||||
|
||||
The arguments to SetMem() were wrong. Besides, SetMem() should start at
|
||||
"Dest + Size" since "Size" will be smaller than "Len" if they are not
|
||||
equal.
|
||||
|
||||
Signed-off-by: Gary Lin <glin@suse.com>
|
||||
---
|
||||
lib/runtime/rtstr.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/runtime/rtstr.c b/lib/runtime/rtstr.c
|
||||
index fe65d96..73965ca 100644
|
||||
--- a/lib/runtime/rtstr.c
|
||||
+++ b/lib/runtime/rtstr.c
|
||||
@@ -94,7 +94,7 @@ RtStpCpy (
|
||||
}
|
||||
|
||||
#ifndef __GNUC__
|
||||
-#pragma RUNTIME_CODE(RtStrnCpy)
|
||||
+#pragma RUNTIME_CODE(RtStpnCpy)
|
||||
#endif
|
||||
CHAR16 *
|
||||
RUNTIMEFUNCTION
|
||||
@@ -107,7 +107,7 @@ RtStpnCpy (
|
||||
{
|
||||
UINTN Size = RtStrnLen(Src, Len);
|
||||
if (Size != Len)
|
||||
- RtSetMem(Dest + Len, '\0', (UINT8)((Len - Size) * sizeof(CHAR16)));
|
||||
+ RtSetMem(Dest + Size, (Len - Size) * sizeof(CHAR16), '\0');
|
||||
RtCopyMem(Dest, Src, Size * sizeof(CHAR16));
|
||||
return Dest + Size;
|
||||
}
|
||||
--
|
||||
2.19.0
|
||||
|
@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 11 03:23:55 UTC 2019 - Gary Ching-Pang Lin <glin@suse.com>
|
||||
|
||||
- Update to gnu-efi 3.0.11
|
||||
+ Revert "efilink: fix build with gcc 4.8"
|
||||
+ Do not include efisetjmp.h on efi.h
|
||||
+ efiapi.h: fix EventGroup parameter of EFI_CREATE_EVENT_EX
|
||||
prototype
|
||||
+ Make.rules incomplete/wrong; make -r failure
|
||||
+ Redefine jmp_buf to comply with C calling convention
|
||||
+ Fix for problem with undeclared intptr_t type
|
||||
+ efilink: fix build with gcc 4.8
|
||||
+ Fix typos
|
||||
+ Set '\0' properly in StrnCpy()
|
||||
+ Implement StrnCat() without StrnCpy()
|
||||
+ Set '\0' properly in StpnCpy()
|
||||
+ Fix conversion from 'UINTN' to 'UINT8' warnings
|
||||
- Drop upstreamed gnu-efi-fix-strncpy-stpncpy-strncat.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 11 08:15:40 UTC 2018 - Gary Ching-Pang Lin <glin@suse.com>
|
||||
|
||||
|
10
gnu-efi.spec
10
gnu-efi.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package gnu-efi
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -12,20 +12,19 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: gnu-efi
|
||||
Version: 3.0.8
|
||||
Version: 3.0.11
|
||||
Release: 0
|
||||
Summary: Library for EFI Applications
|
||||
License: BSD-3-Clause AND GPL-2.0-or-later
|
||||
Group: Development/Libraries/Other
|
||||
Url: http://sourceforge.net/projects/gnu-efi
|
||||
URL: http://sourceforge.net/projects/gnu-efi
|
||||
Source: http://sourceforge.net/projects/gnu-efi/files/gnu-efi-%{version}.tar.bz2
|
||||
Source1: %{name}-rpmlintrc
|
||||
Patch1: %{name}-fix-strncpy-stpncpy-strncat.patch
|
||||
BuildRequires: kernel-source
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
ExclusiveArch: ia64 %ix86 x86_64 aarch64 %arm
|
||||
@ -37,7 +36,6 @@ environment.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
##########################
|
||||
|
Loading…
Reference in New Issue
Block a user