diff --git a/util/admin/fwupdate/actions.py b/util/admin/fwupdate/actions.py new file mode 100644 index 0000000000..fd242b9f10 --- /dev/null +++ b/util/admin/fwupdate/actions.py @@ -0,0 +1,33 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Copyright 2017 TUBITAK/UEKAE +# Licensed under the GNU General Public License, version 2. +# See the file http://www.gnu.org/copyleft/gpl.txt. + +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools +from pisi.actionsapi import get + +# WorkDir = "" +# NoStrip = "/" + +#def setup(): +# shelltools.system("sed 's@ -Werror\([[:space:]]\|\n\)@\1@' -i linux/Makefile") + +def build(): + autotools.make("V=1 EFIDIR=org.pisilinux GNUEFIDIR=/usr/lib") + +def install(): + pisitools.dodir("/usr/include") + autotools.rawInstall("LIBDIR=/usr/lib libexecdir=/usr/lib/ EFIDIR=org.pisilinux GNUEFIDIR=/usr/lib DESTDIR=%s" % get.installDIR()) + + pisitools.domove("/boot/efi/EFI", "/usr/lib/fwupdate/EFI") + pisitools.removeDir("/boot") + pisitools.removeDir("/usr/lib/debug") + pisitools.removeDir("/usr/src") + pisitools.removeDir("/usr/share/fwupdate") + + + #pisitools.dodoc("AUTHORS", "ChangeLog", "README*", "NEWS") diff --git a/util/admin/fwupdate/files/build.patch b/util/admin/fwupdate/files/build.patch new file mode 100644 index 0000000000..c989ebc3e4 --- /dev/null +++ b/util/admin/fwupdate/files/build.patch @@ -0,0 +1,22 @@ +--- fwupdate-9/efi/Makefile~ 2017-03-06 20:36:55.000000000 +0000 ++++ fwupdate-9/efi/Makefile 2017-05-12 18:10:02.737950709 +0000 +@@ -14,7 +14,7 @@ + -Wl,--no-undefined -Wl,--fatal-warnings \ + -Wl,-shared -Wl,-Bsymbolic -L$(LIBDIR) -L$(GNUEFIDIR) \ + -Wl,--build-id=sha1 -Wl,--hash-style=sysv \ +- $(GNUEFIDIR)/crt0-efi-$(ARCH).o ++ $(GNUEFIDIR)/crt0-efi-$(ARCH).o + OBJCOPY_GTE224 = $(shell expr `$(OBJCOPY) --version |grep ^"GNU objcopy" | sed 's/^[^0-9]*//g' | cut -f1-2 -d.` \>= 2.24) + + FWUP = fwupdate +--- fwupdate-9/linux/Makefile~ 2017-03-06 20:36:55.000000000 +0000 ++++ fwupdate-9/linux/Makefile 2017-05-12 20:39:51.049592296 +0000 +@@ -29,7 +29,7 @@ + PKLIBS += libsmbios_c + CFLAGS += -DFWUPDATE_HAVE_LIBSMBIOS__ + endif +-BUILDFLAGS := $(CFLAGS) -Wall -Wextra -Werror -Wno-error=cpp \ ++BUILDFLAGS := $(CFLAGS) -Wall -Wextra -Wno-error=cpp \ + -Wno-unused-result -Wno-unused-function \ + -Wsign-compare -Werror=sign-compare \ + -fshort-wchar --std=gnu11 \ diff --git a/util/admin/fwupdate/files/fwupdate-9-objcopy_detection.patch b/util/admin/fwupdate/files/fwupdate-9-objcopy_detection.patch new file mode 100644 index 0000000000..d41462397f --- /dev/null +++ b/util/admin/fwupdate/files/fwupdate-9-objcopy_detection.patch @@ -0,0 +1,45 @@ +From affc219a5bac93cb6e774879c874c203f755ba11 Mon Sep 17 00:00:00 2001 +From: Raymund Will +Date: Mon, 13 Mar 2017 12:57:07 +0100 +Subject: [PATCH] Fix regression in "objcopy version check" (AKA `expr: syntax + error`) + +While commit 8418fee4 may have fixed the check for "some distributions" +it broke the same check for others, like + +`GNU objcopy (WinAVR 20090313) 2.19` +`GNU objcopy (AVR_8_bit_GNU_Toolchain_3.4.3_1072) 2.23.2` +`GNU objcopy (Codescape GNU Tools 2016.05-03 for MIPS MTI Bare Metal) 2.24.90` +`GNU objcopy (GNU Binutils; openSUSE Leap 42.2) 2.26.1` +`GNU objcopy (GNU Binutils; SUSE Linux Enterprise 12) 2.26.1` + +(some more, some less relevant... ;) + +This version is meant to cover them all (or at least be easily extensible). + +Signed-off-by: Raymund Will +--- + efi/Makefile | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/efi/Makefile b/efi/Makefile +index 920c096..faf8ee2 100644 +--- a/efi/Makefile ++++ b/efi/Makefile +@@ -15,7 +15,15 @@ CCLDFLAGS ?= -nostdlib -Wl,--warn-common \ + -Wl,-shared -Wl,-Bsymbolic -L$(LIBDIR) -L$(GNUEFIDIR) \ + -Wl,--build-id=sha1 -Wl,--hash-style=sysv \ + $(GNUEFIDIR)/crt0-efi-$(ARCH).o +-OBJCOPY_GTE224 = $(shell expr `$(OBJCOPY) --version |grep ^"GNU objcopy" | sed 's/^[^0-9]*//g' | cut -f1-2 -d.` \>= 2.24) ++ ++define objcopy_version = ++ $(OBJCOPY) --version | ++ sed -e '/^GNU objcopy/! d; ++ : loop1; s/([^)(]*)//g; t loop1; ++ : loop2; s/\[[^][]*\]//g; t loop2; ++ s/.* \([0-9][0-9]*\.[0-9][0-9]*\).*/\1/;' ++endef ++OBJCOPY_GTE224 := $(shell expr `$(objcopy_version)` \>= 2.24) + + FWUP = fwupdate + diff --git a/util/admin/fwupdate/pspec.xml b/util/admin/fwupdate/pspec.xml new file mode 100644 index 0000000000..1afc34c428 --- /dev/null +++ b/util/admin/fwupdate/pspec.xml @@ -0,0 +1,64 @@ + + + + + fwupdate + https://github.com/rhinstaller/fwupdate + + Ertuğrul Erata + ertugrulerata@gmail.com + + GPLv2 + app:console + Tools for using the ESRT and UpdateCapsule() to apply firmware updates + Tools for using the ESRT and UpdateCapsule() to apply firmware updates + https://github.com/rhboot/fwupdate/archive/9.tar.gz + + gnu-efi + efivar-devel + popt-devel + libsmbios-devel + + + build.patch + fwupdate-9-objcopy_detection.patch + + + + + fwupdate + + popt + efivar + libsmbios + + + /usr/bin + /usr/lib + /usr/share/man + /usr/share/bash-completion + /usr/share/locale + + + + + fwupdate-devel + + fwupdate + + + /usr/include + /usr/lib/pkgconfig + + + + + + 2017-12-11 + 9 + First release + Ertuğrul Erata + ertugrulerata@gmail.com + + +