forked from pool/pesign
Accepting request 312219 from home:gary_lin:branches:Base:System
Add patches to adopt the latest efivar OBS-URL: https://build.opensuse.org/request/show/312219 OBS-URL: https://build.opensuse.org/package/show/Base:System/pesign?expand=0&rev=32
This commit is contained in:
parent
91f29681d8
commit
59eb44c608
28
pesign-efivar-pkgconfig.patch
Normal file
28
pesign-efivar-pkgconfig.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 2a1de2b6535161b1bd600ec2262e81e9f7aeffcc Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 26 May 2015 09:43:10 -0400
|
||||
Subject: [PATCH] Make efivar compiler parameters come from pkg-config.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
src/Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 007505c..dd69425 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -3,8 +3,8 @@ TOPDIR = $(SRCDIR)/..
|
||||
|
||||
include $(TOPDIR)/Make.defaults
|
||||
|
||||
-PKLIBS = nss
|
||||
-LIBS = popt uuid efivar
|
||||
+PKLIBS = nss efivar
|
||||
+LIBS = popt uuid
|
||||
STATIC_LIBS = $(TOPDIR)/libdpe/libdpe.a
|
||||
LDFLAGS =
|
||||
CCLDFLAGS = -L../libdpe $(foreach pklib,$(PKLIBS), $(shell pkg-config --libs-only-L $(pklib))) -pie -fPIE -Wl,-z,relro,-z,now
|
||||
--
|
||||
2.1.4
|
||||
|
107
pesign-make-efi_guid_t-const.patch
Normal file
107
pesign-make-efi_guid_t-const.patch
Normal file
@ -0,0 +1,107 @@
|
||||
From 727f93f8ea3dc467694d541d28ba4f1ed0e0a671 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Fri, 7 Nov 2014 14:09:41 -0500
|
||||
Subject: [PATCH] make efi_guid_t's const.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
src/cms_common.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/cms_common.c b/src/cms_common.c
|
||||
index a360961..7e032c8 100644
|
||||
--- a/src/cms_common.c
|
||||
+++ b/src/cms_common.c
|
||||
@@ -45,7 +45,7 @@ struct digest_param {
|
||||
SECOidTag digest_tag;
|
||||
SECOidTag signature_tag;
|
||||
SECOidTag digest_encryption_tag;
|
||||
- efi_guid_t *efi_guid;
|
||||
+ const efi_guid_t *efi_guid;
|
||||
int size;
|
||||
};
|
||||
|
||||
--
|
||||
2.1.4
|
||||
|
||||
From ac9de615112114e222527b2eabc9b7f2642f01fe Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 26 May 2015 09:42:32 -0400
|
||||
Subject: [PATCH] Propogate some "const" declarations better.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
src/efisiglist.c | 2 +-
|
||||
src/siglist.c | 8 ++++----
|
||||
src/siglist.h | 2 +-
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/efisiglist.c b/src/efisiglist.c
|
||||
index aedfc4c..a078640 100644
|
||||
--- a/src/efisiglist.c
|
||||
+++ b/src/efisiglist.c
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
struct hash_param {
|
||||
char *name;
|
||||
- efi_guid_t *guid;
|
||||
+ const efi_guid_t *guid;
|
||||
int size;
|
||||
};
|
||||
|
||||
diff --git a/src/siglist.c b/src/siglist.c
|
||||
index 38a9a2a..a7154aa 100644
|
||||
--- a/src/siglist.c
|
||||
+++ b/src/siglist.c
|
||||
@@ -51,7 +51,7 @@ struct efi_signature_list {
|
||||
};
|
||||
|
||||
struct signature_list {
|
||||
- efi_guid_t *SignatureType;
|
||||
+ const efi_guid_t *SignatureType;
|
||||
uint32_t SignatureListSize;
|
||||
uint32_t SignatureHeaderSize;
|
||||
uint32_t SignatureSize;
|
||||
@@ -60,7 +60,7 @@ struct signature_list {
|
||||
};
|
||||
|
||||
struct sig_type {
|
||||
- efi_guid_t *type;
|
||||
+ const efi_guid_t *type;
|
||||
uint32_t size;
|
||||
};
|
||||
|
||||
@@ -78,7 +78,7 @@ static struct sig_type sig_types[] = {
|
||||
static int num_sig_types = sizeof (sig_types) / sizeof (struct sig_type);
|
||||
|
||||
static int32_t
|
||||
-get_sig_type_size(efi_guid_t *sig_type)
|
||||
+get_sig_type_size(const efi_guid_t *sig_type)
|
||||
{
|
||||
for (int i = 0; i < num_sig_types; i++) {
|
||||
if (!memcmp(sig_type, sig_types[i].type, sizeof (*sig_type)))
|
||||
@@ -88,7 +88,7 @@ get_sig_type_size(efi_guid_t *sig_type)
|
||||
}
|
||||
|
||||
signature_list *
|
||||
-signature_list_new(efi_guid_t *SignatureType)
|
||||
+signature_list_new(const efi_guid_t *SignatureType)
|
||||
{
|
||||
int32_t size = get_sig_type_size(SignatureType);
|
||||
if (size < 0)
|
||||
diff --git a/src/siglist.h b/src/siglist.h
|
||||
index e789264..2b72a27 100644
|
||||
--- a/src/siglist.h
|
||||
+++ b/src/siglist.h
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
typedef struct signature_list signature_list;
|
||||
|
||||
-extern signature_list *signature_list_new(efi_guid_t *SignatureType);
|
||||
+extern signature_list *signature_list_new(const efi_guid_t *SignatureType);
|
||||
extern int signature_list_add_sig(signature_list *sl, efi_guid_t owner,
|
||||
uint8_t *sig, uint32_t sigsize);
|
||||
extern int signature_list_realize(signature_list *sl,
|
||||
--
|
||||
2.1.4
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 16 06:52:21 UTC 2015 - glin@suse.com
|
||||
|
||||
- Add pesign-efivar-pkgconfig.patch to get the efivar compiler
|
||||
parameters from pkg-confg
|
||||
- Add pesign-make-efi_guid_t-const.patch to avoid the error from
|
||||
gcc
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 26 09:46:50 UTC 2014 - glin@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package pesign
|
||||
#
|
||||
# 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
|
||||
@ -40,6 +40,10 @@ Patch6: pesign-fix-authvar-write-loop.patch
|
||||
Patch7: pesign-install-supplementary-programs.patch
|
||||
# PATCH-FIX-UPSTREAM pesign-fix-import-sig-check.patch glin@suse.com -- Fix the signature size check while importing a signature
|
||||
Patch8: pesign-fix-import-sig-check.patch
|
||||
# PATCH-FIX-UPSTREAM pesign-efivar-pkgconfig.patch glin@suse.com -- Make efivar compiler parameters come from pkg-config
|
||||
Patch9: pesign-efivar-pkgconfig.patch
|
||||
# PATCH-FIX-UPSTREAM pesign-make-efi_guid_t-const.patch glin@suse.com -- make efi_guid_t's const
|
||||
Patch10: pesign-make-efi_guid_t-const.patch
|
||||
BuildRequires: efivar-devel
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: mozilla-nss-devel
|
||||
@ -70,6 +74,8 @@ Authors:
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags} OPTFLAGS="%{optflags}"
|
||||
|
Loading…
Reference in New Issue
Block a user