[arch-commits] Commit in fwupdate/repos (20 files)
Bruno Pagani
archange at archlinux.org
Wed Oct 18 18:42:22 UTC 2017
Date: Wednesday, October 18, 2017 @ 18:42:21
Author: archange
Revision: 263287
archrelease: copy trunk to community-testing-i686, community-testing-x86_64
Added:
fwupdate/repos/community-testing-i686/PKGBUILD
(from rev 263286, fwupdate/trunk/PKGBUILD)
fwupdate/repos/community-testing-i686/create-fw-directory.patch
(from rev 263286, fwupdate/trunk/create-fw-directory.patch)
fwupdate/repos/community-testing-i686/fix-sprintf-formatting.patch
(from rev 263286, fwupdate/trunk/fix-sprintf-formatting.patch)
fwupdate/repos/community-testing-i686/fix-uninitialized-variable.patch
(from rev 263286, fwupdate/trunk/fix-uninitialized-variable.patch)
fwupdate/repos/community-testing-i686/fwupdate.install
(from rev 263286, fwupdate/trunk/fwupdate.install)
fwupdate/repos/community-testing-x86_64/PKGBUILD
(from rev 263286, fwupdate/trunk/PKGBUILD)
fwupdate/repos/community-testing-x86_64/create-fw-directory.patch
(from rev 263286, fwupdate/trunk/create-fw-directory.patch)
fwupdate/repos/community-testing-x86_64/fix-sprintf-formatting.patch
(from rev 263286, fwupdate/trunk/fix-sprintf-formatting.patch)
fwupdate/repos/community-testing-x86_64/fix-uninitialized-variable.patch
(from rev 263286, fwupdate/trunk/fix-uninitialized-variable.patch)
fwupdate/repos/community-testing-x86_64/fwupdate.install
(from rev 263286, fwupdate/trunk/fwupdate.install)
Deleted:
fwupdate/repos/community-testing-i686/PKGBUILD
fwupdate/repos/community-testing-i686/create-fw-directory.patch
fwupdate/repos/community-testing-i686/fix-sprintf-formatting.patch
fwupdate/repos/community-testing-i686/fix-uninitialized-variable.patch
fwupdate/repos/community-testing-i686/fwupdate.install
fwupdate/repos/community-testing-x86_64/PKGBUILD
fwupdate/repos/community-testing-x86_64/create-fw-directory.patch
fwupdate/repos/community-testing-x86_64/fix-sprintf-formatting.patch
fwupdate/repos/community-testing-x86_64/fix-uninitialized-variable.patch
fwupdate/repos/community-testing-x86_64/fwupdate.install
-----------------------------------------------------------+
/PKGBUILD | 98 +++++++++
/create-fw-directory.patch | 124 ++++++++++++
/fix-sprintf-formatting.patch | 124 ++++++++++++
/fix-uninitialized-variable.patch | 74 +++++++
/fwupdate.install | 22 ++
community-testing-i686/PKGBUILD | 49 ----
community-testing-i686/create-fw-directory.patch | 62 ------
community-testing-i686/fix-sprintf-formatting.patch | 62 ------
community-testing-i686/fix-uninitialized-variable.patch | 37 ---
community-testing-i686/fwupdate.install | 11 -
community-testing-x86_64/PKGBUILD | 49 ----
community-testing-x86_64/create-fw-directory.patch | 62 ------
community-testing-x86_64/fix-sprintf-formatting.patch | 62 ------
community-testing-x86_64/fix-uninitialized-variable.patch | 37 ---
community-testing-x86_64/fwupdate.install | 11 -
15 files changed, 442 insertions(+), 442 deletions(-)
Deleted: community-testing-i686/PKGBUILD
===================================================================
--- community-testing-i686/PKGBUILD 2017-10-18 18:41:58 UTC (rev 263286)
+++ community-testing-i686/PKGBUILD 2017-10-18 18:42:21 UTC (rev 263287)
@@ -1,49 +0,0 @@
-# Maintainer: Bruno Pagani (a.k.a. ArchangeGabriel) <archange at archlinux.org>
-# Contributor: Mirco Tischler <mt-ml at gmx dot de>
-
-pkgname=fwupdate
-pkgver=9
-pkgrel=2
-pkgdesc="Tools for using the ESRT and UpdateCapsule() to apply firmware updates"
-arch=('i686' 'x86_64')
-url="https://github.com/rhinstaller/fwupdate"
-license=('GPL2')
-depends=('efivar' 'libsmbios' 'bash')
-makedepends=('pesign' 'gnu-efi-libs')
-source=("${url}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.bz2"
- 'fix-uninitialized-variable.patch'
- 'fix-sprintf-formatting.patch'
- 'create-fw-directory.patch')
-sha256sums=('e926a7b33a58f5dbf029a5a687375e88b18a41f0742ba871aff7d1d82d075c87'
- '56d27c36b7f1178c818c37153e3dbdd0a26036366b3dc935cd169b0c716cb610'
- '639114a5d98c688f92c59d08aac1b182da705ad443c8b1367160c7a8c4fcd115'
- '980ee0b2f08bea482575bfd6323dae907f44ff1ce2981f743c014809fb51b8d2')
-install=fwupdate.install
-
-_efidir=arch
-
-prepare() {
- cd ${pkgname}-${pkgver}
- patch -p1 -i ../fix-uninitialized-variable.patch
- patch -p1 -i ../fix-sprintf-formatting.patch
- patch -p1 -i ../create-fw-directory.patch
-}
-
-build() {
- cd ${pkgname}-${pkgver}
- make EFIDIR="${_efidir}" GNUEFIDIR=/usr/lib
-}
-
-package() {
- cd ${pkgname}-${pkgver}
-
- make LIBDIR=/usr/lib EFIDIR="${_efidir}" DESTDIR="${pkgdir}" libexecdir=/usr/lib/ install
-
- # Do not install anything under /boot. Copy files to /usr/lib/fwupdate for manual installation.
- install -d ${pkgdir}/usr/lib/fwupdate
- mv ${pkgdir}/boot/efi/EFI ${pkgdir}/usr/lib/fwupdate/EFI
- rm -rf ${pkgdir}/boot
- rm -rf ${pkgdir}/usr/src
- rm -rf ${pkgdir}/usr/lib/debug
- rmdir ${pkgdir}/usr/share/fwupdate
-}
Copied: fwupdate/repos/community-testing-i686/PKGBUILD (from rev 263286, fwupdate/trunk/PKGBUILD)
===================================================================
--- community-testing-i686/PKGBUILD (rev 0)
+++ community-testing-i686/PKGBUILD 2017-10-18 18:42:21 UTC (rev 263287)
@@ -0,0 +1,49 @@
+# Maintainer: Bruno Pagani (a.k.a. ArchangeGabriel) <archange at archlinux.org>
+# Contributor: Mirco Tischler <mt-ml at gmx dot de>
+
+pkgname=fwupdate
+pkgver=9
+pkgrel=3
+pkgdesc="Tools for using the ESRT and UpdateCapsule() to apply firmware updates"
+arch=('i686' 'x86_64')
+url="https://github.com/rhinstaller/fwupdate"
+license=('GPL2')
+depends=('efivar' 'libsmbios' 'bash')
+makedepends=('pesign' 'gnu-efi-libs')
+source=("${url}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.bz2"
+ 'fix-uninitialized-variable.patch'
+ 'fix-sprintf-formatting.patch'
+ 'create-fw-directory.patch')
+sha256sums=('e926a7b33a58f5dbf029a5a687375e88b18a41f0742ba871aff7d1d82d075c87'
+ '56d27c36b7f1178c818c37153e3dbdd0a26036366b3dc935cd169b0c716cb610'
+ '639114a5d98c688f92c59d08aac1b182da705ad443c8b1367160c7a8c4fcd115'
+ '980ee0b2f08bea482575bfd6323dae907f44ff1ce2981f743c014809fb51b8d2')
+install=fwupdate.install
+
+_efidir=arch
+
+prepare() {
+ cd ${pkgname}-${pkgver}
+ patch -p1 -i ../fix-uninitialized-variable.patch
+ patch -p1 -i ../fix-sprintf-formatting.patch
+ patch -p1 -i ../create-fw-directory.patch
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+ make EFIDIR="${_efidir}" GNUEFIDIR=/usr/lib
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+
+ make LIBDIR=/usr/lib EFIDIR="${_efidir}" DESTDIR="${pkgdir}" libexecdir=/usr/lib/ install
+
+ # Do not install anything under /boot. Copy files to /usr/lib/fwupdate for manual installation.
+ install -d ${pkgdir}/usr/lib/fwupdate
+ mv ${pkgdir}/boot/efi/EFI ${pkgdir}/usr/lib/fwupdate/EFI
+ rm -rf ${pkgdir}/boot
+ rm -rf ${pkgdir}/usr/src
+ rm -rf ${pkgdir}/usr/lib/debug
+ rmdir ${pkgdir}/usr/share/fwupdate
+}
Deleted: community-testing-i686/create-fw-directory.patch
===================================================================
--- community-testing-i686/create-fw-directory.patch 2017-10-18 18:41:58 UTC (rev 263286)
+++ community-testing-i686/create-fw-directory.patch 2017-10-18 18:42:21 UTC (rev 263287)
@@ -1,62 +0,0 @@
-From f713884b1766396aab4f0fb75a7cc7b8cb8319bb Mon Sep 17 00:00:00 2001
-From: Mario Limonciello <mario.limonciello at dell.com>
-Date: Tue, 11 Jul 2017 10:35:37 -0500
-Subject: [PATCH] create the 'fw' directory on the ESP if it doesn't exist
-
----
- linux/libfwup.c | 24 +++++++++++++++++++++---
- 1 file changed, 21 insertions(+), 3 deletions(-)
-
-diff --git a/linux/libfwup.c b/linux/libfwup.c
-index 4aa2bf3..d37f644 100644
---- a/linux/libfwup.c
-+++ b/linux/libfwup.c
-@@ -1177,6 +1177,8 @@ get_existing_media_path(update_info *info)
- static int
- get_fd_and_media_path(update_info *info, char **path)
- {
-+ struct stat st;
-+ char *directory = NULL;
- char *fullpath = NULL;
- int fd = -1;
- int rc;
-@@ -1193,13 +1195,28 @@ get_fd_and_media_path(update_info *info, char **path)
- }
- } else {
- /* fall back to creating a new file from scratch */
-- rc = asprintf(&fullpath,
-- "/boot/efi/EFI/%s/fw/fwupdate-XXXXXX.cap",
-+ rc = asprintf(&directory,
-+ "/boot/efi/EFI/%s/fw",
- FWUP_EFI_DIR_NAME);
- if (rc < 0) {
-- efi_error("asprintf failed");
-+ efi_error("asprintf directory failed");
- return fd;
- }
-+ if (stat(directory, &st) != 0 ||
-+ (st.st_mode & S_IFDIR) == 0) {
-+ rc = mkdir(directory, 0775);
-+ if (rc < 0) {
-+ efi_error("failed to make %s", directory);
-+ goto out;
-+ }
-+ }
-+ rc = asprintf(&fullpath,
-+ "%s/fwupdate-XXXXXX.cap",
-+ directory);
-+ if (rc < 0) {
-+ efi_error("asprintf fullpath failed");
-+ goto out;
-+ }
- fd = mkostemps(fullpath, 4, O_CREAT|O_TRUNC|O_CLOEXEC);
- if (fd < 0) {
- efi_error("mkostemps(%s) failed", fullpath);
-@@ -1213,6 +1230,7 @@ get_fd_and_media_path(update_info *info, char **path)
- fullpath = NULL;
- }
- out:
-+ free(directory);
- free(fullpath);
- return fd;
- }
Copied: fwupdate/repos/community-testing-i686/create-fw-directory.patch (from rev 263286, fwupdate/trunk/create-fw-directory.patch)
===================================================================
--- community-testing-i686/create-fw-directory.patch (rev 0)
+++ community-testing-i686/create-fw-directory.patch 2017-10-18 18:42:21 UTC (rev 263287)
@@ -0,0 +1,62 @@
+From f713884b1766396aab4f0fb75a7cc7b8cb8319bb Mon Sep 17 00:00:00 2001
+From: Mario Limonciello <mario.limonciello at dell.com>
+Date: Tue, 11 Jul 2017 10:35:37 -0500
+Subject: [PATCH] create the 'fw' directory on the ESP if it doesn't exist
+
+---
+ linux/libfwup.c | 24 +++++++++++++++++++++---
+ 1 file changed, 21 insertions(+), 3 deletions(-)
+
+diff --git a/linux/libfwup.c b/linux/libfwup.c
+index 4aa2bf3..d37f644 100644
+--- a/linux/libfwup.c
++++ b/linux/libfwup.c
+@@ -1177,6 +1177,8 @@ get_existing_media_path(update_info *info)
+ static int
+ get_fd_and_media_path(update_info *info, char **path)
+ {
++ struct stat st;
++ char *directory = NULL;
+ char *fullpath = NULL;
+ int fd = -1;
+ int rc;
+@@ -1193,13 +1195,28 @@ get_fd_and_media_path(update_info *info, char **path)
+ }
+ } else {
+ /* fall back to creating a new file from scratch */
+- rc = asprintf(&fullpath,
+- "/boot/efi/EFI/%s/fw/fwupdate-XXXXXX.cap",
++ rc = asprintf(&directory,
++ "/boot/efi/EFI/%s/fw",
+ FWUP_EFI_DIR_NAME);
+ if (rc < 0) {
+- efi_error("asprintf failed");
++ efi_error("asprintf directory failed");
+ return fd;
+ }
++ if (stat(directory, &st) != 0 ||
++ (st.st_mode & S_IFDIR) == 0) {
++ rc = mkdir(directory, 0775);
++ if (rc < 0) {
++ efi_error("failed to make %s", directory);
++ goto out;
++ }
++ }
++ rc = asprintf(&fullpath,
++ "%s/fwupdate-XXXXXX.cap",
++ directory);
++ if (rc < 0) {
++ efi_error("asprintf fullpath failed");
++ goto out;
++ }
+ fd = mkostemps(fullpath, 4, O_CREAT|O_TRUNC|O_CLOEXEC);
+ if (fd < 0) {
+ efi_error("mkostemps(%s) failed", fullpath);
+@@ -1213,6 +1230,7 @@ get_fd_and_media_path(update_info *info, char **path)
+ fullpath = NULL;
+ }
+ out:
++ free(directory);
+ free(fullpath);
+ return fd;
+ }
Deleted: community-testing-i686/fix-sprintf-formatting.patch
===================================================================
--- community-testing-i686/fix-sprintf-formatting.patch 2017-10-18 18:41:58 UTC (rev 263286)
+++ community-testing-i686/fix-sprintf-formatting.patch 2017-10-18 18:42:21 UTC (rev 263287)
@@ -1,62 +0,0 @@
-From cd8f7d79f84155d1dfbff3bb169558a8b06fb719 Mon Sep 17 00:00:00 2001
-From: Peter Jones <pjones at redhat.com>
-Date: Fri, 19 May 2017 16:39:56 -0400
-Subject: [PATCH] Fix sprintf formatting for Boot####.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-If you give it enough compiler flags, gcc believes the following:
------------------------
- libfwup.c: In function ‘set_up_boot_next’:
- libfwup.c:1049:27: error: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]
- sprintf(boot_next_name, "Boot%04X", boot_next);
- ^~~~~~~~~~
- In file included from /usr/include/stdio.h:939:0,
- from libfwup.c:17:
- /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 9 and 10 bytes into a destination of size 9
- return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- __bos (__s), __fmt, __va_arg_pack ());
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- cc1: all warnings being treated as errors
- make[1]: *** [Makefile:70: libfwup.o] Error 1
- make[1]: Leaving directory '/home/pjones/devel/rhel/fwupdate/fwupdate-9/linux'
- make: *** [Makefile:10: all] Error 2
------------------------
-
-The code in question is:
------------------------
- if (boot_next >= 0x10000) {
- efi_error("no free boot variables!");
- goto out;
- }
-
- sprintf(boot_next_name, "Boot%04X", boot_next);
------------------------
-
-It really should know it can't be a higher value than 0xffff. Even
-so, while it's not true that this can happen, since we never get to that
-code if boot_next is > 0xffff, the compiler can't figure that out, so
-it's complaining about an int being crammed into 4 bytes of hex.
-
-So this patch just tells it the maximum value is 0xffff.
-
-Signed-off-by: Peter Jones <pjones at redhat.com>
----
- linux/libfwup.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/linux/libfwup.c b/linux/libfwup.c
-index 929c106..1b9b72a 100644
---- a/linux/libfwup.c
-+++ b/linux/libfwup.c
-@@ -1046,7 +1046,7 @@ set_up_boot_next(void)
- goto out;
- }
-
-- sprintf(boot_next_name, "Boot%04X", boot_next);
-+ sprintf(boot_next_name, "Boot%04hX", boot_next & 0xffff);
- rc = efi_set_variable(efi_guid_global, boot_next_name, opt,
- opt_size,
- EFI_VARIABLE_NON_VOLATILE |
Copied: fwupdate/repos/community-testing-i686/fix-sprintf-formatting.patch (from rev 263286, fwupdate/trunk/fix-sprintf-formatting.patch)
===================================================================
--- community-testing-i686/fix-sprintf-formatting.patch (rev 0)
+++ community-testing-i686/fix-sprintf-formatting.patch 2017-10-18 18:42:21 UTC (rev 263287)
@@ -0,0 +1,62 @@
+From cd8f7d79f84155d1dfbff3bb169558a8b06fb719 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones at redhat.com>
+Date: Fri, 19 May 2017 16:39:56 -0400
+Subject: [PATCH] Fix sprintf formatting for Boot####.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If you give it enough compiler flags, gcc believes the following:
+-----------------------
+ libfwup.c: In function ‘set_up_boot_next’:
+ libfwup.c:1049:27: error: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]
+ sprintf(boot_next_name, "Boot%04X", boot_next);
+ ^~~~~~~~~~
+ In file included from /usr/include/stdio.h:939:0,
+ from libfwup.c:17:
+ /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 9 and 10 bytes into a destination of size 9
+ return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ __bos (__s), __fmt, __va_arg_pack ());
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ cc1: all warnings being treated as errors
+ make[1]: *** [Makefile:70: libfwup.o] Error 1
+ make[1]: Leaving directory '/home/pjones/devel/rhel/fwupdate/fwupdate-9/linux'
+ make: *** [Makefile:10: all] Error 2
+-----------------------
+
+The code in question is:
+-----------------------
+ if (boot_next >= 0x10000) {
+ efi_error("no free boot variables!");
+ goto out;
+ }
+
+ sprintf(boot_next_name, "Boot%04X", boot_next);
+-----------------------
+
+It really should know it can't be a higher value than 0xffff. Even
+so, while it's not true that this can happen, since we never get to that
+code if boot_next is > 0xffff, the compiler can't figure that out, so
+it's complaining about an int being crammed into 4 bytes of hex.
+
+So this patch just tells it the maximum value is 0xffff.
+
+Signed-off-by: Peter Jones <pjones at redhat.com>
+---
+ linux/libfwup.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/linux/libfwup.c b/linux/libfwup.c
+index 929c106..1b9b72a 100644
+--- a/linux/libfwup.c
++++ b/linux/libfwup.c
+@@ -1046,7 +1046,7 @@ set_up_boot_next(void)
+ goto out;
+ }
+
+- sprintf(boot_next_name, "Boot%04X", boot_next);
++ sprintf(boot_next_name, "Boot%04hX", boot_next & 0xffff);
+ rc = efi_set_variable(efi_guid_global, boot_next_name, opt,
+ opt_size,
+ EFI_VARIABLE_NON_VOLATILE |
Deleted: community-testing-i686/fix-uninitialized-variable.patch
===================================================================
--- community-testing-i686/fix-uninitialized-variable.patch 2017-10-18 18:41:58 UTC (rev 263286)
+++ community-testing-i686/fix-uninitialized-variable.patch 2017-10-18 18:42:21 UTC (rev 263287)
@@ -1,37 +0,0 @@
-From a9bfbb4a082c2a7e8917865877976e8008712ca6 Mon Sep 17 00:00:00 2001
-From: Mirco Tischler <mt-ml at gmx.de>
-Date: Mon, 6 Mar 2017 23:45:46 +0100
-Subject: [PATCH] Fix uninitialized variable.
-
-If boot_order_size is 0, i was never set. On gcc-6.3.1, this broke the
-build if compiled with -O2 (-Werror=maybe_uninitialized). This is the
-error:
-
-libfwup.c: In function 'set_up_boot_next':
-libfwup.c:818:16: error: 'i' may be used uninitialized in this function [-Werror=maybe-uninitialized]
- new_boot_order[i] = boot_entry;
- ^
-libfwup.c:780:15: note: 'i' was declared here
- unsigned int i;
- ^
-cc1: all warnings being treated as errors
----
- linux/libfwup.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/linux/libfwup.c b/linux/libfwup.c
-index fe4ece4..2cc03c0 100644
---- a/linux/libfwup.c
-+++ b/linux/libfwup.c
-@@ -777,7 +777,7 @@ add_to_boot_order(uint16_t boot_entry)
- size_t boot_order_size = 0;
- uint32_t attr;
- int rc;
-- unsigned int i;
-+ unsigned int i = 0;
-
- rc = efi_get_variable_size(efi_guid_global, "BootOrder",
- &boot_order_size);
---
-2.12.0
-
Copied: fwupdate/repos/community-testing-i686/fix-uninitialized-variable.patch (from rev 263286, fwupdate/trunk/fix-uninitialized-variable.patch)
===================================================================
--- community-testing-i686/fix-uninitialized-variable.patch (rev 0)
+++ community-testing-i686/fix-uninitialized-variable.patch 2017-10-18 18:42:21 UTC (rev 263287)
@@ -0,0 +1,37 @@
+From a9bfbb4a082c2a7e8917865877976e8008712ca6 Mon Sep 17 00:00:00 2001
+From: Mirco Tischler <mt-ml at gmx.de>
+Date: Mon, 6 Mar 2017 23:45:46 +0100
+Subject: [PATCH] Fix uninitialized variable.
+
+If boot_order_size is 0, i was never set. On gcc-6.3.1, this broke the
+build if compiled with -O2 (-Werror=maybe_uninitialized). This is the
+error:
+
+libfwup.c: In function 'set_up_boot_next':
+libfwup.c:818:16: error: 'i' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+ new_boot_order[i] = boot_entry;
+ ^
+libfwup.c:780:15: note: 'i' was declared here
+ unsigned int i;
+ ^
+cc1: all warnings being treated as errors
+---
+ linux/libfwup.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/linux/libfwup.c b/linux/libfwup.c
+index fe4ece4..2cc03c0 100644
+--- a/linux/libfwup.c
++++ b/linux/libfwup.c
+@@ -777,7 +777,7 @@ add_to_boot_order(uint16_t boot_entry)
+ size_t boot_order_size = 0;
+ uint32_t attr;
+ int rc;
+- unsigned int i;
++ unsigned int i = 0;
+
+ rc = efi_get_variable_size(efi_guid_global, "BootOrder",
+ &boot_order_size);
+--
+2.12.0
+
Deleted: community-testing-i686/fwupdate.install
===================================================================
--- community-testing-i686/fwupdate.install 2017-10-18 18:41:58 UTC (rev 263286)
+++ community-testing-i686/fwupdate.install 2017-10-18 18:42:21 UTC (rev 263287)
@@ -1,11 +0,0 @@
-post_install() {
- echo
- echo "To use the efi fimware update executable, copy the"
- echo "/usr/lib/fwupdate/EFI/ folder to your EFI partition,"
- echo "usually mounted at /boot/efi/."
- echo
-}
-
-post_upgrade() {
- post_install
-}
Copied: fwupdate/repos/community-testing-i686/fwupdate.install (from rev 263286, fwupdate/trunk/fwupdate.install)
===================================================================
--- community-testing-i686/fwupdate.install (rev 0)
+++ community-testing-i686/fwupdate.install 2017-10-18 18:42:21 UTC (rev 263287)
@@ -0,0 +1,11 @@
+post_install() {
+ echo
+ echo "To use the efi fimware update executable, copy the"
+ echo "/usr/lib/fwupdate/EFI/ folder to your EFI partition,"
+ echo "usually mounted at /boot/efi/."
+ echo
+}
+
+post_upgrade() {
+ post_install
+}
Deleted: community-testing-x86_64/PKGBUILD
===================================================================
--- community-testing-x86_64/PKGBUILD 2017-10-18 18:41:58 UTC (rev 263286)
+++ community-testing-x86_64/PKGBUILD 2017-10-18 18:42:21 UTC (rev 263287)
@@ -1,49 +0,0 @@
-# Maintainer: Bruno Pagani (a.k.a. ArchangeGabriel) <archange at archlinux.org>
-# Contributor: Mirco Tischler <mt-ml at gmx dot de>
-
-pkgname=fwupdate
-pkgver=9
-pkgrel=2
-pkgdesc="Tools for using the ESRT and UpdateCapsule() to apply firmware updates"
-arch=('i686' 'x86_64')
-url="https://github.com/rhinstaller/fwupdate"
-license=('GPL2')
-depends=('efivar' 'libsmbios' 'bash')
-makedepends=('pesign' 'gnu-efi-libs')
-source=("${url}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.bz2"
- 'fix-uninitialized-variable.patch'
- 'fix-sprintf-formatting.patch'
- 'create-fw-directory.patch')
-sha256sums=('e926a7b33a58f5dbf029a5a687375e88b18a41f0742ba871aff7d1d82d075c87'
- '56d27c36b7f1178c818c37153e3dbdd0a26036366b3dc935cd169b0c716cb610'
- '639114a5d98c688f92c59d08aac1b182da705ad443c8b1367160c7a8c4fcd115'
- '980ee0b2f08bea482575bfd6323dae907f44ff1ce2981f743c014809fb51b8d2')
-install=fwupdate.install
-
-_efidir=arch
-
-prepare() {
- cd ${pkgname}-${pkgver}
- patch -p1 -i ../fix-uninitialized-variable.patch
- patch -p1 -i ../fix-sprintf-formatting.patch
- patch -p1 -i ../create-fw-directory.patch
-}
-
-build() {
- cd ${pkgname}-${pkgver}
- make EFIDIR="${_efidir}" GNUEFIDIR=/usr/lib
-}
-
-package() {
- cd ${pkgname}-${pkgver}
-
- make LIBDIR=/usr/lib EFIDIR="${_efidir}" DESTDIR="${pkgdir}" libexecdir=/usr/lib/ install
-
- # Do not install anything under /boot. Copy files to /usr/lib/fwupdate for manual installation.
- install -d ${pkgdir}/usr/lib/fwupdate
- mv ${pkgdir}/boot/efi/EFI ${pkgdir}/usr/lib/fwupdate/EFI
- rm -rf ${pkgdir}/boot
- rm -rf ${pkgdir}/usr/src
- rm -rf ${pkgdir}/usr/lib/debug
- rmdir ${pkgdir}/usr/share/fwupdate
-}
Copied: fwupdate/repos/community-testing-x86_64/PKGBUILD (from rev 263286, fwupdate/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD (rev 0)
+++ community-testing-x86_64/PKGBUILD 2017-10-18 18:42:21 UTC (rev 263287)
@@ -0,0 +1,49 @@
+# Maintainer: Bruno Pagani (a.k.a. ArchangeGabriel) <archange at archlinux.org>
+# Contributor: Mirco Tischler <mt-ml at gmx dot de>
+
+pkgname=fwupdate
+pkgver=9
+pkgrel=3
+pkgdesc="Tools for using the ESRT and UpdateCapsule() to apply firmware updates"
+arch=('i686' 'x86_64')
+url="https://github.com/rhinstaller/fwupdate"
+license=('GPL2')
+depends=('efivar' 'libsmbios' 'bash')
+makedepends=('pesign' 'gnu-efi-libs')
+source=("${url}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.bz2"
+ 'fix-uninitialized-variable.patch'
+ 'fix-sprintf-formatting.patch'
+ 'create-fw-directory.patch')
+sha256sums=('e926a7b33a58f5dbf029a5a687375e88b18a41f0742ba871aff7d1d82d075c87'
+ '56d27c36b7f1178c818c37153e3dbdd0a26036366b3dc935cd169b0c716cb610'
+ '639114a5d98c688f92c59d08aac1b182da705ad443c8b1367160c7a8c4fcd115'
+ '980ee0b2f08bea482575bfd6323dae907f44ff1ce2981f743c014809fb51b8d2')
+install=fwupdate.install
+
+_efidir=arch
+
+prepare() {
+ cd ${pkgname}-${pkgver}
+ patch -p1 -i ../fix-uninitialized-variable.patch
+ patch -p1 -i ../fix-sprintf-formatting.patch
+ patch -p1 -i ../create-fw-directory.patch
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+ make EFIDIR="${_efidir}" GNUEFIDIR=/usr/lib
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+
+ make LIBDIR=/usr/lib EFIDIR="${_efidir}" DESTDIR="${pkgdir}" libexecdir=/usr/lib/ install
+
+ # Do not install anything under /boot. Copy files to /usr/lib/fwupdate for manual installation.
+ install -d ${pkgdir}/usr/lib/fwupdate
+ mv ${pkgdir}/boot/efi/EFI ${pkgdir}/usr/lib/fwupdate/EFI
+ rm -rf ${pkgdir}/boot
+ rm -rf ${pkgdir}/usr/src
+ rm -rf ${pkgdir}/usr/lib/debug
+ rmdir ${pkgdir}/usr/share/fwupdate
+}
Deleted: community-testing-x86_64/create-fw-directory.patch
===================================================================
--- community-testing-x86_64/create-fw-directory.patch 2017-10-18 18:41:58 UTC (rev 263286)
+++ community-testing-x86_64/create-fw-directory.patch 2017-10-18 18:42:21 UTC (rev 263287)
@@ -1,62 +0,0 @@
-From f713884b1766396aab4f0fb75a7cc7b8cb8319bb Mon Sep 17 00:00:00 2001
-From: Mario Limonciello <mario.limonciello at dell.com>
-Date: Tue, 11 Jul 2017 10:35:37 -0500
-Subject: [PATCH] create the 'fw' directory on the ESP if it doesn't exist
-
----
- linux/libfwup.c | 24 +++++++++++++++++++++---
- 1 file changed, 21 insertions(+), 3 deletions(-)
-
-diff --git a/linux/libfwup.c b/linux/libfwup.c
-index 4aa2bf3..d37f644 100644
---- a/linux/libfwup.c
-+++ b/linux/libfwup.c
-@@ -1177,6 +1177,8 @@ get_existing_media_path(update_info *info)
- static int
- get_fd_and_media_path(update_info *info, char **path)
- {
-+ struct stat st;
-+ char *directory = NULL;
- char *fullpath = NULL;
- int fd = -1;
- int rc;
-@@ -1193,13 +1195,28 @@ get_fd_and_media_path(update_info *info, char **path)
- }
- } else {
- /* fall back to creating a new file from scratch */
-- rc = asprintf(&fullpath,
-- "/boot/efi/EFI/%s/fw/fwupdate-XXXXXX.cap",
-+ rc = asprintf(&directory,
-+ "/boot/efi/EFI/%s/fw",
- FWUP_EFI_DIR_NAME);
- if (rc < 0) {
-- efi_error("asprintf failed");
-+ efi_error("asprintf directory failed");
- return fd;
- }
-+ if (stat(directory, &st) != 0 ||
-+ (st.st_mode & S_IFDIR) == 0) {
-+ rc = mkdir(directory, 0775);
-+ if (rc < 0) {
-+ efi_error("failed to make %s", directory);
-+ goto out;
-+ }
-+ }
-+ rc = asprintf(&fullpath,
-+ "%s/fwupdate-XXXXXX.cap",
-+ directory);
-+ if (rc < 0) {
-+ efi_error("asprintf fullpath failed");
-+ goto out;
-+ }
- fd = mkostemps(fullpath, 4, O_CREAT|O_TRUNC|O_CLOEXEC);
- if (fd < 0) {
- efi_error("mkostemps(%s) failed", fullpath);
-@@ -1213,6 +1230,7 @@ get_fd_and_media_path(update_info *info, char **path)
- fullpath = NULL;
- }
- out:
-+ free(directory);
- free(fullpath);
- return fd;
- }
Copied: fwupdate/repos/community-testing-x86_64/create-fw-directory.patch (from rev 263286, fwupdate/trunk/create-fw-directory.patch)
===================================================================
--- community-testing-x86_64/create-fw-directory.patch (rev 0)
+++ community-testing-x86_64/create-fw-directory.patch 2017-10-18 18:42:21 UTC (rev 263287)
@@ -0,0 +1,62 @@
+From f713884b1766396aab4f0fb75a7cc7b8cb8319bb Mon Sep 17 00:00:00 2001
+From: Mario Limonciello <mario.limonciello at dell.com>
+Date: Tue, 11 Jul 2017 10:35:37 -0500
+Subject: [PATCH] create the 'fw' directory on the ESP if it doesn't exist
+
+---
+ linux/libfwup.c | 24 +++++++++++++++++++++---
+ 1 file changed, 21 insertions(+), 3 deletions(-)
+
+diff --git a/linux/libfwup.c b/linux/libfwup.c
+index 4aa2bf3..d37f644 100644
+--- a/linux/libfwup.c
++++ b/linux/libfwup.c
+@@ -1177,6 +1177,8 @@ get_existing_media_path(update_info *info)
+ static int
+ get_fd_and_media_path(update_info *info, char **path)
+ {
++ struct stat st;
++ char *directory = NULL;
+ char *fullpath = NULL;
+ int fd = -1;
+ int rc;
+@@ -1193,13 +1195,28 @@ get_fd_and_media_path(update_info *info, char **path)
+ }
+ } else {
+ /* fall back to creating a new file from scratch */
+- rc = asprintf(&fullpath,
+- "/boot/efi/EFI/%s/fw/fwupdate-XXXXXX.cap",
++ rc = asprintf(&directory,
++ "/boot/efi/EFI/%s/fw",
+ FWUP_EFI_DIR_NAME);
+ if (rc < 0) {
+- efi_error("asprintf failed");
++ efi_error("asprintf directory failed");
+ return fd;
+ }
++ if (stat(directory, &st) != 0 ||
++ (st.st_mode & S_IFDIR) == 0) {
++ rc = mkdir(directory, 0775);
++ if (rc < 0) {
++ efi_error("failed to make %s", directory);
++ goto out;
++ }
++ }
++ rc = asprintf(&fullpath,
++ "%s/fwupdate-XXXXXX.cap",
++ directory);
++ if (rc < 0) {
++ efi_error("asprintf fullpath failed");
++ goto out;
++ }
+ fd = mkostemps(fullpath, 4, O_CREAT|O_TRUNC|O_CLOEXEC);
+ if (fd < 0) {
+ efi_error("mkostemps(%s) failed", fullpath);
+@@ -1213,6 +1230,7 @@ get_fd_and_media_path(update_info *info, char **path)
+ fullpath = NULL;
+ }
+ out:
++ free(directory);
+ free(fullpath);
+ return fd;
+ }
Deleted: community-testing-x86_64/fix-sprintf-formatting.patch
===================================================================
--- community-testing-x86_64/fix-sprintf-formatting.patch 2017-10-18 18:41:58 UTC (rev 263286)
+++ community-testing-x86_64/fix-sprintf-formatting.patch 2017-10-18 18:42:21 UTC (rev 263287)
@@ -1,62 +0,0 @@
-From cd8f7d79f84155d1dfbff3bb169558a8b06fb719 Mon Sep 17 00:00:00 2001
-From: Peter Jones <pjones at redhat.com>
-Date: Fri, 19 May 2017 16:39:56 -0400
-Subject: [PATCH] Fix sprintf formatting for Boot####.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-If you give it enough compiler flags, gcc believes the following:
------------------------
- libfwup.c: In function ‘set_up_boot_next’:
- libfwup.c:1049:27: error: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]
- sprintf(boot_next_name, "Boot%04X", boot_next);
- ^~~~~~~~~~
- In file included from /usr/include/stdio.h:939:0,
- from libfwup.c:17:
- /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 9 and 10 bytes into a destination of size 9
- return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- __bos (__s), __fmt, __va_arg_pack ());
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- cc1: all warnings being treated as errors
- make[1]: *** [Makefile:70: libfwup.o] Error 1
- make[1]: Leaving directory '/home/pjones/devel/rhel/fwupdate/fwupdate-9/linux'
- make: *** [Makefile:10: all] Error 2
------------------------
-
-The code in question is:
------------------------
- if (boot_next >= 0x10000) {
- efi_error("no free boot variables!");
- goto out;
- }
-
- sprintf(boot_next_name, "Boot%04X", boot_next);
------------------------
-
-It really should know it can't be a higher value than 0xffff. Even
-so, while it's not true that this can happen, since we never get to that
-code if boot_next is > 0xffff, the compiler can't figure that out, so
-it's complaining about an int being crammed into 4 bytes of hex.
-
-So this patch just tells it the maximum value is 0xffff.
-
-Signed-off-by: Peter Jones <pjones at redhat.com>
----
- linux/libfwup.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/linux/libfwup.c b/linux/libfwup.c
-index 929c106..1b9b72a 100644
---- a/linux/libfwup.c
-+++ b/linux/libfwup.c
-@@ -1046,7 +1046,7 @@ set_up_boot_next(void)
- goto out;
- }
-
-- sprintf(boot_next_name, "Boot%04X", boot_next);
-+ sprintf(boot_next_name, "Boot%04hX", boot_next & 0xffff);
- rc = efi_set_variable(efi_guid_global, boot_next_name, opt,
- opt_size,
- EFI_VARIABLE_NON_VOLATILE |
Copied: fwupdate/repos/community-testing-x86_64/fix-sprintf-formatting.patch (from rev 263286, fwupdate/trunk/fix-sprintf-formatting.patch)
===================================================================
--- community-testing-x86_64/fix-sprintf-formatting.patch (rev 0)
+++ community-testing-x86_64/fix-sprintf-formatting.patch 2017-10-18 18:42:21 UTC (rev 263287)
@@ -0,0 +1,62 @@
+From cd8f7d79f84155d1dfbff3bb169558a8b06fb719 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones at redhat.com>
+Date: Fri, 19 May 2017 16:39:56 -0400
+Subject: [PATCH] Fix sprintf formatting for Boot####.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If you give it enough compiler flags, gcc believes the following:
+-----------------------
+ libfwup.c: In function ‘set_up_boot_next’:
+ libfwup.c:1049:27: error: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]
+ sprintf(boot_next_name, "Boot%04X", boot_next);
+ ^~~~~~~~~~
+ In file included from /usr/include/stdio.h:939:0,
+ from libfwup.c:17:
+ /usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 9 and 10 bytes into a destination of size 9
+ return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ __bos (__s), __fmt, __va_arg_pack ());
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ cc1: all warnings being treated as errors
+ make[1]: *** [Makefile:70: libfwup.o] Error 1
+ make[1]: Leaving directory '/home/pjones/devel/rhel/fwupdate/fwupdate-9/linux'
+ make: *** [Makefile:10: all] Error 2
+-----------------------
+
+The code in question is:
+-----------------------
+ if (boot_next >= 0x10000) {
+ efi_error("no free boot variables!");
+ goto out;
+ }
+
+ sprintf(boot_next_name, "Boot%04X", boot_next);
+-----------------------
+
+It really should know it can't be a higher value than 0xffff. Even
+so, while it's not true that this can happen, since we never get to that
+code if boot_next is > 0xffff, the compiler can't figure that out, so
+it's complaining about an int being crammed into 4 bytes of hex.
+
+So this patch just tells it the maximum value is 0xffff.
+
+Signed-off-by: Peter Jones <pjones at redhat.com>
+---
+ linux/libfwup.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/linux/libfwup.c b/linux/libfwup.c
+index 929c106..1b9b72a 100644
+--- a/linux/libfwup.c
++++ b/linux/libfwup.c
+@@ -1046,7 +1046,7 @@ set_up_boot_next(void)
+ goto out;
+ }
+
+- sprintf(boot_next_name, "Boot%04X", boot_next);
++ sprintf(boot_next_name, "Boot%04hX", boot_next & 0xffff);
+ rc = efi_set_variable(efi_guid_global, boot_next_name, opt,
+ opt_size,
+ EFI_VARIABLE_NON_VOLATILE |
Deleted: community-testing-x86_64/fix-uninitialized-variable.patch
===================================================================
--- community-testing-x86_64/fix-uninitialized-variable.patch 2017-10-18 18:41:58 UTC (rev 263286)
+++ community-testing-x86_64/fix-uninitialized-variable.patch 2017-10-18 18:42:21 UTC (rev 263287)
@@ -1,37 +0,0 @@
-From a9bfbb4a082c2a7e8917865877976e8008712ca6 Mon Sep 17 00:00:00 2001
-From: Mirco Tischler <mt-ml at gmx.de>
-Date: Mon, 6 Mar 2017 23:45:46 +0100
-Subject: [PATCH] Fix uninitialized variable.
-
-If boot_order_size is 0, i was never set. On gcc-6.3.1, this broke the
-build if compiled with -O2 (-Werror=maybe_uninitialized). This is the
-error:
-
-libfwup.c: In function 'set_up_boot_next':
-libfwup.c:818:16: error: 'i' may be used uninitialized in this function [-Werror=maybe-uninitialized]
- new_boot_order[i] = boot_entry;
- ^
-libfwup.c:780:15: note: 'i' was declared here
- unsigned int i;
- ^
-cc1: all warnings being treated as errors
----
- linux/libfwup.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/linux/libfwup.c b/linux/libfwup.c
-index fe4ece4..2cc03c0 100644
---- a/linux/libfwup.c
-+++ b/linux/libfwup.c
-@@ -777,7 +777,7 @@ add_to_boot_order(uint16_t boot_entry)
- size_t boot_order_size = 0;
- uint32_t attr;
- int rc;
-- unsigned int i;
-+ unsigned int i = 0;
-
- rc = efi_get_variable_size(efi_guid_global, "BootOrder",
- &boot_order_size);
---
-2.12.0
-
Copied: fwupdate/repos/community-testing-x86_64/fix-uninitialized-variable.patch (from rev 263286, fwupdate/trunk/fix-uninitialized-variable.patch)
===================================================================
--- community-testing-x86_64/fix-uninitialized-variable.patch (rev 0)
+++ community-testing-x86_64/fix-uninitialized-variable.patch 2017-10-18 18:42:21 UTC (rev 263287)
@@ -0,0 +1,37 @@
+From a9bfbb4a082c2a7e8917865877976e8008712ca6 Mon Sep 17 00:00:00 2001
+From: Mirco Tischler <mt-ml at gmx.de>
+Date: Mon, 6 Mar 2017 23:45:46 +0100
+Subject: [PATCH] Fix uninitialized variable.
+
+If boot_order_size is 0, i was never set. On gcc-6.3.1, this broke the
+build if compiled with -O2 (-Werror=maybe_uninitialized). This is the
+error:
+
+libfwup.c: In function 'set_up_boot_next':
+libfwup.c:818:16: error: 'i' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+ new_boot_order[i] = boot_entry;
+ ^
+libfwup.c:780:15: note: 'i' was declared here
+ unsigned int i;
+ ^
+cc1: all warnings being treated as errors
+---
+ linux/libfwup.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/linux/libfwup.c b/linux/libfwup.c
+index fe4ece4..2cc03c0 100644
+--- a/linux/libfwup.c
++++ b/linux/libfwup.c
+@@ -777,7 +777,7 @@ add_to_boot_order(uint16_t boot_entry)
+ size_t boot_order_size = 0;
+ uint32_t attr;
+ int rc;
+- unsigned int i;
++ unsigned int i = 0;
+
+ rc = efi_get_variable_size(efi_guid_global, "BootOrder",
+ &boot_order_size);
+--
+2.12.0
+
Deleted: community-testing-x86_64/fwupdate.install
===================================================================
--- community-testing-x86_64/fwupdate.install 2017-10-18 18:41:58 UTC (rev 263286)
+++ community-testing-x86_64/fwupdate.install 2017-10-18 18:42:21 UTC (rev 263287)
@@ -1,11 +0,0 @@
-post_install() {
- echo
- echo "To use the efi fimware update executable, copy the"
- echo "/usr/lib/fwupdate/EFI/ folder to your EFI partition,"
- echo "usually mounted at /boot/efi/."
- echo
-}
-
-post_upgrade() {
- post_install
-}
Copied: fwupdate/repos/community-testing-x86_64/fwupdate.install (from rev 263286, fwupdate/trunk/fwupdate.install)
===================================================================
--- community-testing-x86_64/fwupdate.install (rev 0)
+++ community-testing-x86_64/fwupdate.install 2017-10-18 18:42:21 UTC (rev 263287)
@@ -0,0 +1,11 @@
+post_install() {
+ echo
+ echo "To use the efi fimware update executable, copy the"
+ echo "/usr/lib/fwupdate/EFI/ folder to your EFI partition,"
+ echo "usually mounted at /boot/efi/."
+ echo
+}
+
+post_upgrade() {
+ post_install
+}
More information about the arch-commits
mailing list