Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:rwill:Factory
fwupdate
fwupdate-suse-build.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fwupdate-suse-build.patch of Package fwupdate
linux/libfwup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 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); diff --git a/Make.defaults b/Make.defaults index d386c23..57e3e12 100644 --- a/Make.defaults +++ b/Make.defaults @@ -25,24 +25,24 @@ ifeq ($(LIBDIR),unknown) $(error Architecture $(ARCH) is not a supported build target.) endif -GNUEFIDIR ?= $(LIBDIR)/gnuefi/ +GNUEFIDIR ?= $(LIBDIR)/gnuefi libdir ?= $(LIBDIR) -pcdir ?= $(libdir)/pkgconfig/ -mandir ?= $(prefix)share/man/ -includedir ?= $(prefix)include/ -bindir ?= $(prefix)bin/ -datadir ?= $(prefix)share/ -localedir ?= $(datadir)/locale/ -libexecdir ?= $(prefix)libexec/ -libdatadir ?= $(prefix)lib/ +pcdir ?= $(libdir)/pkgconfig +mandir ?= $(prefix)share/man +includedir ?= $(prefix)include +bindir ?= $(prefix)bin +datadir ?= $(prefix)share +localedir ?= $(datadir)/locale +libexecdir ?= $(prefix)libexec +libdatadir ?= $(prefix)lib EFIDIR ?= $(shell x=$$(which --skip-alias --skip-functions git 2>/dev/null) ; [ -n "$$x" ] && git config --get fwupdate.efidir) ifeq ($(EFIDIR),) EFIDIR_ERROR = $(error EFIDIR or .gitconfig fwupdate.efidir must be set to this distro's reserved EFI System Partition subdirectory name) endif -DEBUGINFO ?= $(prefix)lib/debug/ -DEBUGSOURCE ?= $(prefix)src/debug/ -TARGETDIR ?= /boot/efi/EFI/$(EFIDIR)/ +DEBUGINFO ?= $(prefix)lib/debug +DEBUGSOURCE ?= $(prefix)src/debug +TARGETDIR ?= /boot/efi/EFI/$(EFIDIR) .PHONY: check_efidir_error check_efidir_error : ; $(EFIDIR_ERROR) $(info Building with EFIDIR as $(EFIDIR)) diff --git a/docs/Makefile b/docs/Makefile index f265242..fdb3c2e 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -24,9 +24,9 @@ clean : test : install : - $(INSTALL) -d -m 755 $(DESTDIR)/$(mandir)/man1 - $(foreach x, $(MAN1TARGETS), $(INSTALL) -m 644 $(x) $(DESTDIR)/$(mandir)/man1/;) - $(INSTALL) -d -m 755 $(DESTDIR)/$(mandir)/man3 - $(foreach x, $(MAN3TARGETS), $(INSTALL) -m 644 $(x) $(DESTDIR)/$(mandir)/man3/;) + $(INSTALL) -d -m 755 $(DESTDIR)$(mandir)/man1/ + $(foreach x, $(MAN1TARGETS), $(INSTALL) -m 644 $(x) $(DESTDIR)$(mandir)/man1/;) + $(INSTALL) -d -m 755 $(DESTDIR)$(mandir)/man3/ + $(foreach x, $(MAN3TARGETS), $(INSTALL) -m 644 $(x) $(DESTDIR)$(mandir)/man3/;) .PHONY: all clean test install diff --git a/efi/Makefile b/efi/Makefile index 920c096..24952b8 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 @@ -97,18 +105,18 @@ clean : buildiddir = $(dirname $(shell cat $(1).build-id)) define inst = - $(INSTALL) -d -m 755 $(DESTDIR)$(TARGETDIR) - $(INSTALL) -m 755 $(1) $(DESTDIR)$(TARGETDIR)$(1) - $(INSTALL) -d -m 755 $(DESTDIR)$(DEBUGINFO)$(TARGETDIR) + $(INSTALL) -d -m 755 $(DESTDIR)$(TARGETDIR)/ + $(INSTALL) -m 755 $(1) $(DESTDIR)$(TARGETDIR)/$(1) + $(INSTALL) -d -m 755 $(DESTDIR)$(DEBUGINFO)$(TARGETDIR)/ $(INSTALL) -m 755 $(1).debug $(DESTDIR)$(DEBUGINFO)$(TARGETDIR)/$(1).debug - $(INSTALL) -d -m 755 $(DESTDIR)$(DEBUGINFO).build-id/$(dir $(shell cat $(1).build-id)) - ln -sf ../../../../..$(TARGETDIR)$(1) $(DESTDIR)$(DEBUGINFO).build-id/$(shell cat $(1).build-id) - ln -sf ../..$(TARGETDIR)$(1).debug $(DESTDIR)$(DEBUGINFO).build-id/$(shell cat $(1).build-id).debug + $(INSTALL) -d -m 755 $(DESTDIR)$(DEBUGINFO)/.build-id/$(dir $(shell cat $(1).build-id)) + ln -sf ../../../../..$(TARGETDIR)$(1) $(DESTDIR)$(DEBUGINFO)/.build-id/$(shell cat $(1).build-id) + ln -sf ../..$(TARGETDIR)$(1).debug $(DESTDIR)$(DEBUGINFO)/.build-id/$(shell cat $(1).build-id).debug endef install : | check_efidir_error install : $(FWUP).efi | $(FWUP).efi.debug $(FWUP).efi.build-id $(INSTALL) -d -m 755 $(DESTDIR)$(TARGETDIR)/fw/ $(foreach prog,$^,$(call inst,$(prog)) ; ) - $(INSTALL) -d -m 755 $(DESTDIR)$(DEBUGSOURCE)fwupdate-$(VERSION)/efi - $(foreach src,$(wildcard *.[chS]),$(INSTALL) -m 644 $(src) $(DESTDIR)$(DEBUGSOURCE)fwupdate-$(VERSION)/efi/$(src) ;) + $(INSTALL) -d -m 755 $(DESTDIR)$(DEBUGSOURCE)/fwupdate-$(VERSION)/efi/ + $(foreach src,$(wildcard *.[chS]),$(INSTALL) -m 644 $(src) $(DESTDIR)$(DEBUGSOURCE)/fwupdate-$(VERSION)/efi/$(src) ;) diff --git a/include/Makefile b/include/Makefile index 3195b92..00a5117 100644 --- a/include/Makefile +++ b/include/Makefile @@ -5,6 +5,6 @@ include $(TOPDIR)/Make.defaults all clean dep : install : - $(INSTALL) -d -m 755 $(DESTDIR)$(DEBUGSOURCE)fwupdate-$(VERSION)/include - $(foreach src,$(wildcard *.[chS]),$(INSTALL) -m 644 $(src) $(DESTDIR)$(DEBUGSOURCE)fwupdate-$(VERSION)/include/$(src) ;) + $(INSTALL) -d -m 755 $(DESTDIR)$(DEBUGSOURCE)/fwupdate-$(VERSION)/include + $(foreach src,$(wildcard *.[chS]),$(INSTALL) -m 644 $(src) $(DESTDIR)$(DEBUGSOURCE)/fwupdate-$(VERSION)/include/$(src) ;) diff --git a/linux/Makefile b/linux/Makefile index 5122e48..4c9c14e 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -7,13 +7,6 @@ include $(TOPDIR)/Make.defaults LIB_LIBS= pthread BIN_LIBS= popt pthread PKLIBS = efivar efiboot -HAVE_LIBSMBIOS=no -ifeq ($(ARCH),x86_64) - HAVE_LIBSMBIOS=yes -endif -ifeq ($(ARCH),ia32) - HAVE_LIBSMBIOS=yes -endif CFLAGS ?= -g -O0 PJONES = BIN_CCLDFLAGS = $(foreach lib,$(BIN_LIBS),-l$(lib)) \ @@ -25,6 +18,8 @@ LIB_CCLDFLAGS = $(foreach lib,$(LIB_LIBS),-l$(lib)) \ $(shell pkg-config --libs-only-l --libs-only-other $(pklib))) \ $(LDFLAGS) -shared -fPIC -Wl,-z,relro,-z,now +HAVE_LIBSMBIOS := $(shell pkg-config --exists libsmbios_c && \ + echo yes || echo no) ifeq ($(HAVE_LIBSMBIOS),yes) PKLIBS += libsmbios_c CFLAGS += -DFWUPDATE_HAVE_LIBSMBIOS__ @@ -99,19 +94,19 @@ clean : @rm -vf include/fwup-version.h install : check_efidir_error all - $(INSTALL) -d -m 755 $(DESTDIR)/$(libdir) - $(foreach x, $(LIBTARGETS), $(INSTALL) -m 755 $(x).1.$(VERSION) $(DESTDIR)/$(libdir);) - $(INSTALL) -d -m 755 $(DESTDIR)/$(pcdir) - $(foreach x, $(PCTARGETS), $(INSTALL) -m 644 $(x) $(DESTDIR)/$(pcdir) ;) - $(INSTALL) -d -m 755 $(DESTDIR)/$(includedir)/ - $(INSTALL) -m 644 $(INCTARGETS) $(DESTDIR)/$(includedir)/ - $(INSTALL) -d -m 755 $(DESTDIR)/$(localedir)/en/ - $(INSTALL) -m 644 $(POTARGETS) $(DESTDIR)/$(localedir)/en/ - $(INSTALL) -d -m 755 $(DESTDIR)/$(bindir) - $(foreach x, $(BINTARGETS), $(INSTALL) -m 755 $(x) $(DESTDIR)/$(bindir);) + $(INSTALL) -d -m 755 $(DESTDIR)$(libdir) + $(foreach x, $(LIBTARGETS), $(INSTALL) -m 755 $(x).1.$(VERSION) $(DESTDIR)$(libdir);) + $(INSTALL) -d -m 755 $(DESTDIR)$(pcdir) + $(foreach x, $(PCTARGETS), $(INSTALL) -m 644 $(x) $(DESTDIR)$(pcdir) ;) + $(INSTALL) -d -m 755 $(DESTDIR)$(includedir)/ + $(INSTALL) -m 644 $(INCTARGETS) $(DESTDIR)$(includedir)/ + $(INSTALL) -d -m 755 $(DESTDIR)$(localedir)/en/ + $(INSTALL) -m 644 $(POTARGETS) $(DESTDIR)$(localedir)/en/ + $(INSTALL) -d -m 755 $(DESTDIR)$(bindir)/ + $(foreach x, $(BINTARGETS), $(INSTALL) -m 755 $(x) $(DESTDIR)$(bindir);) $(foreach x, $(wildcard *.so.1.$(VERSION)), \ - ln -fs $(x) $(patsubst %.so.1.$(VERSION),%.so.1,$(DESTDIR)/$(libdir)/$(x)) ;\ - ln -fs $(x) $(patsubst %.so.1.$(VERSION),%.so,$(DESTDIR)/$(libdir)/$(x)) ;\ + ln -fs $(x) $(patsubst %.so.1.$(VERSION),%.so.1,$(DESTDIR)$(libdir)/$(x)) ;\ + ln -fs $(x) $(patsubst %.so.1.$(VERSION),%.so,$(DESTDIR)$(libdir)/$(x)) ;\ ) $(INSTALL) -d -m 755 $(DESTDIR)$(datadir)/fwupdate/ $(INSTALL) -d -m 755 $(DESTDIR)$(libexecdir)/fwupdate/ diff --git a/linux/cleanup.in b/linux/cleanup.in index 702dd2b..4b0e8bc 100755 --- a/linux/cleanup.in +++ b/linux/cleanup.in @@ -1,6 +1,6 @@ #!/bin/sh set -e -if [ -e "@@DATADIR@@fwupdate/done" ]; then +if [ -e "@@DATADIR@@/fwupdate/done" ]; then exit 0 fi diff --git a/linux/cleanup.service.in b/linux/cleanup.service.in index 537c6f2..af2f025 100644 --- a/linux/cleanup.service.in +++ b/linux/cleanup.service.in @@ -4,4 +4,4 @@ Description=fwupdate housekeeping [Service] PrivateTmp=true Type=oneshot -ExecStart=@@LIBEXECDIR@@fwupdate/cleanup +ExecStart=@@LIBEXECDIR@@/fwupdate/cleanup diff --git a/linux/fwupdate.c b/linux/fwupdate.c index 3414e0b..eaf07be 100644 --- a/linux/fwupdate.c +++ b/linux/fwupdate.c @@ -88,7 +88,7 @@ main(int argc, char *argv[]) { efi_guid_t guid; - setlocale(LC_ALL, ""); + setlocale(LC_ALL, EMPTY); bindtextdomain("fwupdate", LOCALEDIR); textdomain("fwupdate"); diff --git a/linux/libfwup.c b/linux/libfwup.c index fe4ece4..0461cf5 100644 --- a/linux/libfwup.c +++ b/linux/libfwup.c @@ -48,7 +48,7 @@ static char *arch_names_32[] = { #if defined(__x86_64__) || defined(__i386__) || defined(__i686__) "ia32", #endif - "" + EMPTY }; static int n_arches_32 = sizeof(arch_names_32) / sizeof(arch_names_32[0]); @@ -59,7 +59,7 @@ static char *arch_names_64[] = { #elif defined(__aarch64__) "aa64", #endif - "" + EMPTY }; static int n_arches_64 = sizeof(arch_names_64) / sizeof(arch_names_64[0]); diff --git a/linux/util.h b/linux/util.h index d8dcf3b..eef4ccf 100644 --- a/linux/util.h +++ b/linux/util.h @@ -22,6 +22,7 @@ #define N_(String) (String) #define C_(Context,String) dgettext (Context,String) #define NC_(Context, String) (String) +#define EMPTY "" extern int quiet;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor