Hello community,

here is the log from the commit of package trustedgrub2 for openSUSE:Factory 
checked in at 2018-06-25 11:39:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/trustedgrub2 (Old)
 and      /work/SRC/openSUSE:Factory/.trustedgrub2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "trustedgrub2"

Mon Jun 25 11:39:25 2018 rev:6 rq:618458 version:1.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/trustedgrub2/trustedgrub2.changes        
2017-07-27 11:13:46.916438540 +0200
+++ /work/SRC/openSUSE:Factory/.trustedgrub2.new/trustedgrub2.changes   
2018-06-25 11:39:35.499702104 +0200
@@ -1,0 +2,12 @@
+Fri Jun 22 09:08:22 UTC 2018 - [email protected]
+
+- Fix packed-not-aligned error on GCC 8 (bsc#1084632)
+  * 0001-Fix-packed-not-aligned-error-on-GCC-8.patch
+
+-------------------------------------------------------------------
+Mon Oct 30 08:35:42 UTC 2017 - [email protected]
+
+- Allow to execute menuentry unrestricted as default (fate#318574) 
(bsc#1052420)
+  * added grub2-menu-unrestricted.patch 
+
+-------------------------------------------------------------------

New:
----
  0001-Fix-packed-not-aligned-error-on-GCC-8.patch
  grub2-menu-unrestricted.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ trustedgrub2.spec ++++++
--- /var/tmp/diff_new_pack.ttyeeY/_old  2018-06-25 11:39:38.327597720 +0200
+++ /var/tmp/diff_new_pack.ttyeeY/_new  2018-06-25 11:39:38.331597572 +0200
@@ -40,12 +40,15 @@
 Patch9:         0003-Add-gnulib-fix-gcc7-fallthrough.diff.patch
 # fix build against flex-2.6.4
 Patch10:        grub2-fix-build-with-flex-2.6.4.patch
+# fix build against GCC-8
+Patch11:        0001-Fix-packed-not-aligned-error-on-GCC-8.patch
 # Btrfs snapshot booting related patches
 Patch101:       grub2-btrfs-01-add-ability-to-boot-from-subvolumes.patch
 Patch102:       grub2-btrfs-02-export-subvolume-envvars.patch
 Patch103:       grub2-btrfs-03-follow_default.patch
 Patch104:       grub2-btrfs-04-subvol-mount.patch
 Patch105:       grub2-btrfs-05-subvol-fallback.patch
+Patch110:       grub2-menu-unrestricted.patch
 BuildRequires:  automake
 BuildRequires:  bison
 BuildRequires:  flex
@@ -100,11 +103,13 @@
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
+%patch11 -p1
 %patch101 -p1
 %patch102 -p1
 %patch103 -p1
 %patch104 -p1
 %patch105 -p1
+%patch110 -p1
 
 # HOWTO.luks-keyfile
 cp %{SOURCE2} .

++++++ 0001-Fix-packed-not-aligned-error-on-GCC-8.patch ++++++
>From 721f75ff7de467717658d2de9c20bbb18145790a Mon Sep 17 00:00:00 2001
From: Michael Chang <[email protected]>
Date: Mon, 26 Mar 2018 16:52:34 +0800
Subject: Fix packed-not-aligned error on GCC 8

When building with GCC 8, there are several errors regarding packed-not-aligned.

./include/grub/gpt_partition.h:79:1: error: alignment 1 of 'struct 
grub_gpt_partentry' is less than 8 [-Werror=packed-not-aligned]

This patch tries to fix the build error by cleaning up the ambiguity of placing
aligned structure in a packed one. In "struct grub_btrfs_time" and "struct
grub_gpt_part_type", the aligned attribute seems to be superfluous, and also
has to be packed, to ensure the structure is bit-to-bit mapped to the format
laid on disk. I think we could blame to copy and paste error here for the
mistake. In "struct efi_variable", we have to use grub_efi_packed_guid_t, as
the name suggests. :)

Signed-off-by: Michael Chang <[email protected]>
Tested-by: Michael Chang <[email protected]>
---
 grub-core/fs/btrfs.c          | 2 +-
 include/grub/efiemu/runtime.h | 2 +-
 include/grub/gpt_partition.h  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Index: grub-2.02/grub-core/fs/btrfs.c
===================================================================
--- grub-2.02.orig/grub-core/fs/btrfs.c
+++ grub-2.02/grub-core/fs/btrfs.c
@@ -175,7 +175,7 @@ struct grub_btrfs_time
 {
   grub_int64_t sec;
   grub_uint32_t nanosec;
-} __attribute__ ((aligned (4)));
+} GRUB_PACKED;
 
 struct grub_btrfs_inode
 {
Index: grub-2.02/include/grub/efiemu/runtime.h
===================================================================
--- grub-2.02.orig/include/grub/efiemu/runtime.h
+++ grub-2.02/include/grub/efiemu/runtime.h
@@ -29,7 +29,7 @@ struct grub_efiemu_ptv_rel
 
 struct efi_variable
 {
-  grub_efi_guid_t guid;
+  grub_efi_packed_guid_t guid;
   grub_uint32_t namelen;
   grub_uint32_t size;
   grub_efi_uint32_t attributes;
Index: grub-2.02/include/grub/gpt_partition.h
===================================================================
--- grub-2.02.orig/include/grub/gpt_partition.h
+++ grub-2.02/include/grub/gpt_partition.h
@@ -28,7 +28,7 @@ struct grub_gpt_part_type
   grub_uint16_t data2;
   grub_uint16_t data3;
   grub_uint8_t data4[8];
-} __attribute__ ((aligned(8)));
+} GRUB_PACKED;
 typedef struct grub_gpt_part_type grub_gpt_part_type_t;
 
 #define GRUB_GPT_PARTITION_TYPE_EMPTY \
++++++ grub2-menu-unrestricted.patch ++++++
Index: grub-2.02~beta2/grub-core/normal/menu.c
===================================================================
--- grub-2.02~beta2.orig/grub-core/normal/menu.c
+++ grub-2.02~beta2/grub-core/normal/menu.c
@@ -213,7 +213,17 @@ grub_menu_execute_entry(grub_menu_entry_
   grub_size_t sz = 0;
 
   if (entry->restricted)
-    err = grub_auth_check_authentication (entry->users);
+    {
+      int auth_check = 1;
+      if (entry->users && entry->users[0] == 0)
+       {
+         const char *unr = grub_env_get ("unrestricted_menu");
+         if (unr && (unr[0] == '1' || unr[0] == 'y'))
+           auth_check = 0;
+       }
+      if (auth_check)
+       err = grub_auth_check_authentication (entry->users);
+    }
 
   if (err)
     {

Reply via email to