Page Menu
Home
Solus
Search
Configure Global Search
Log In
Files
F11046650
D2379.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
9 KB
Referenced Files
None
Subscribers
None
D2379.id.diff
View Options
diff --git a/Makefile b/Makefile
new file mode 100644
--- /dev/null
+++ b/Makefile
@@ -0,0 +1 @@
+include ../Makefile.common
diff --git a/abi_symbols b/abi_symbols
new file mode 100644
--- /dev/null
+++ b/abi_symbols
@@ -0,0 +1,18 @@
+libfwup.so.1:fwup_clear_status
+libfwup.so.1:fwup_enable_esrt
+libfwup.so.1:fwup_esrt_disabled
+libfwup.so.1:fwup_get_attempt_status
+libfwup.so.1:fwup_get_fw_type
+libfwup.so.1:fwup_get_fw_version
+libfwup.so.1:fwup_get_guid
+libfwup.so.1:fwup_get_last_attempt_info
+libfwup.so.1:fwup_get_lowest_supported_fw_version
+libfwup.so.1:fwup_last_attempt_status_to_string
+libfwup.so.1:fwup_print_update_info
+libfwup.so.1:fwup_resource_iter_create
+libfwup.so.1:fwup_resource_iter_destroy
+libfwup.so.1:fwup_resource_iter_next
+libfwup.so.1:fwup_set_guid
+libfwup.so.1:fwup_set_up_update
+libfwup.so.1:fwup_set_up_update_with_buf
+libfwup.so.1:fwup_supported
diff --git a/abi_used_libs b/abi_used_libs
new file mode 100644
--- /dev/null
+++ b/abi_used_libs
@@ -0,0 +1,6 @@
+libc.so.6
+libefiboot.so.1
+libefivar.so.1
+libpopt.so.0
+libpthread.so.0
+libsmbios_c.so.2
diff --git a/files/fix-sprintf-formatting.patch b/files/fix-sprintf-formatting.patch
new file mode 100644
--- /dev/null
+++ b/files/fix-sprintf-formatting.patch
@@ -0,0 +1,62 @@
+From cd8f7d79f84155d1dfbff3bb169558a8b06fb719 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones@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@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 |
diff --git a/files/fix-uninitialized-variable.patch b/files/fix-uninitialized-variable.patch
new file mode 100644
--- /dev/null
+++ b/files/fix-uninitialized-variable.patch
@@ -0,0 +1,37 @@
+From a9bfbb4a082c2a7e8917865877976e8008712ca6 Mon Sep 17 00:00:00 2001
+From: Mirco Tischler <mt-ml@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
+
diff --git a/package.yml b/package.yml
new file mode 100644
--- /dev/null
+++ b/package.yml
@@ -0,0 +1,37 @@
+name : fwupdate
+version : '9'
+release : 1
+source :
+ - https://github.com/rhboot/fwupdate/releases/download/9/fwupdate-9.tar.bz2 : e926a7b33a58f5dbf029a5a687375e88b18a41f0742ba871aff7d1d82d075c87
+license : GPL-2.0
+component : system.boot
+summary : Tools for using the ESRT and UpdateCapsule() to apply firmware updates
+description: |
+ Tools for using the ESRT and UpdateCapsule() to apply firmware updates
+patterns :
+ - devel:
+ - /usr/share/man/man3/
+builddeps :
+ - pkgconfig(efivar)
+ - pkgconfig(libsmbios_c)
+ - pkgconfig(popt)
+ - gnu-efi-devel
+setup : |
+ %patch -p1 < $pkgfiles/fix-uninitialized-variable.patch
+ %patch -p1 < $pkgfiles/fix-sprintf-formatting.patch
+build : |
+ export EFIDIR=$workdir/arch
+ %make GNUEFIDIR=/usr/lib
+install : |
+ %make_install EFIDIR=/
+
+ # Don't install to actual $EFIDIR
+ install -d $installdir/%libdir%/fwupdate/
+ mv $installdir/boot/efi/EFI/ $installdir/%libdir%/fwupdate/
+ rm -fr $installdir/boot
+
+ # Cleanup
+ rm -fr $installdir/usr/src
+ rm -fr $installdir/usr/lib/debug
+ rm -fr $installdir/usr/share/fwupdate
+ rm -fr $installdir/usr/lib64/fwupdate/fw
diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml
new file mode 100644
--- /dev/null
+++ b/pspec_x86_64.xml
@@ -0,0 +1,58 @@
+<PISI>
+ <Source>
+ <Name>fwupdate</Name>
+ <Packager>
+ <Name>Joey Riches</Name>
+ <Email>josephriches@gmail.com</Email>
+ </Packager>
+ <License>GPL-2.0</License>
+ <PartOf>system.boot</PartOf>
+ <Summary xml:lang="en">Tools for using the ESRT and UpdateCapsule() to apply firmware updates</Summary>
+ <Description xml:lang="en">Tools for using the ESRT and UpdateCapsule() to apply firmware updates
+</Description>
+ <Archive type="binary" sha1sum="79eb0752a961b8e0d15c77d298c97498fbc89c5a">https://solus-project.com/sources/README.Solus</Archive>
+ </Source>
+ <Package>
+ <Name>fwupdate</Name>
+ <Summary xml:lang="en">Tools for using the ESRT and UpdateCapsule() to apply firmware updates</Summary>
+ <Description xml:lang="en">Tools for using the ESRT and UpdateCapsule() to apply firmware updates
+</Description>
+ <PartOf>system.boot</PartOf>
+ <Files>
+ <Path fileType="executable">/usr/bin</Path>
+ <Path fileType="library">/usr/lib/systemd/system/fwupdate-cleanup.service</Path>
+ <Path fileType="library">/usr/lib64/fwupdate/EFI/fw</Path>
+ <Path fileType="library">/usr/lib64/fwupdate/EFI/fwupx64.efi</Path>
+ <Path fileType="library">/usr/lib64/lib*.so.*</Path>
+ <Path fileType="executable">/usr/libexec/fwupdate/cleanup</Path>
+ <Path fileType="data">/usr/share/bash-completion/completions/fwupdate</Path>
+ <Path fileType="localedata">/usr/share/locale</Path>
+ <Path fileType="man">/usr/share/man</Path>
+ </Files>
+ </Package>
+ <Package>
+ <Name>fwupdate-devel</Name>
+ <Summary xml:lang="en">Development files for fwupdate</Summary>
+ <Description xml:lang="en">Tools for using the ESRT and UpdateCapsule() to apply firmware updates
+</Description>
+ <PartOf>programming.devel</PartOf>
+ <RuntimeDependencies>
+ <Dependency release="1">fwupdate</Dependency>
+ </RuntimeDependencies>
+ <Files>
+ <Path fileType="header">/usr/include/</Path>
+ <Path fileType="library">/usr/lib64/lib*.so</Path>
+ <Path fileType="data">/usr/lib64/pkgconfig/*.pc</Path>
+ <Path fileType="man">/usr/share/man/man3/</Path>
+ </Files>
+ </Package>
+ <History>
+ <Update release="1">
+ <Date>2018-02-24</Date>
+ <Version>9</Version>
+ <Comment>Packaging update</Comment>
+ <Name>Joey Riches</Name>
+ <Email>josephriches@gmail.com</Email>
+ </Update>
+ </History>
+</PISI>
\ No newline at end of file
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 11, 1:53 PM (2 h, 40 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5792283
Default Alt Text
D2379.id.diff (9 KB)
Attached To
Mode
D2379: Initial inclusion of fwupdate
Attached
Detach File
Event Timeline
Log In to Comment