summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/keyutils/patches/patch-Makefile110
1 files changed, 110 insertions, 0 deletions
diff --git a/package/keyutils/patches/patch-Makefile b/package/keyutils/patches/patch-Makefile
new file mode 100644
index 000000000..3d111a5f8
--- /dev/null
+++ b/package/keyutils/patches/patch-Makefile
@@ -0,0 +1,110 @@
+--- keyutils-1.5.10.orig/Makefile 2017-03-15 21:57:15.000000000 +0100
++++ keyutils-1.5.10/Makefile 2017-07-30 13:08:55.000000000 +0200
+@@ -1,5 +1,5 @@
+-CPPFLAGS := -I.
+-CFLAGS := -g -Wall -Werror
++CPPFLAGS ?= -I.
++CFLAGS ?= -g -Wall -Werror
+ INSTALL := install
+ DESTDIR :=
+ SPECFILE := keyutils.spec
+@@ -56,27 +56,9 @@ LIBNAME := libkeyutils.so.$(APIVERSION)
+ # Guess at the appropriate lib directory and word size
+ #
+ ###############################################################################
+-ifeq ($(origin LIBDIR),undefined)
+-LIBDIR := $(shell ldd /usr/bin/make | grep '\(/libc\)' | sed -e 's!.*\(/.*\)/libc[.].*!\1!')
+-endif
+-ifeq ($(origin USRLIBDIR),undefined)
+-USRLIBDIR := $(patsubst /lib/%,/usr/lib/%,$(LIBDIR))
+-endif
+-BUILDFOR := $(shell file /usr/bin/make | sed -e 's!.*ELF \(32\|64\)-bit.*!\1!')-bit
+
+-ifeq ($(origin CFLAGS),undefined)
+-ifeq ($(BUILDFOR),32-bit)
+-CFLAGS += -m32
+ LIBDIR := /lib
+ USRLIBDIR := /usr/lib
+-else
+-ifeq ($(BUILDFOR),64-bit)
+-CFLAGS += -m64
+-LIBDIR := /lib64
+-USRLIBDIR := /usr/lib64
+-endif
+-endif
+-endif
+
+ ###############################################################################
+ #
+@@ -95,7 +77,7 @@ endif
+ # Normal build rule
+ #
+ ###############################################################################
+-all: keyctl request-key key.dns_resolver
++all:
+
+ ###############################################################################
+ #
+@@ -161,41 +143,18 @@ key.dns_resolver: key.dns_resolver.o $(L
+ ###############################################################################
+ install: all
+ ifeq ($(NO_ARLIB),0)
+- $(INSTALL) -D -m 0644 $(ARLIB) $(DESTDIR)$(USRLIBDIR)/$(ARLIB)
++ $(INSTALL) -d $(DESTDIR)$(USRLIBDIR)
++ $(INSTALL) -m 0644 $(ARLIB) $(DESTDIR)$(USRLIBDIR)/$(ARLIB)
+ endif
+ ifeq ($(NO_SOLIB),0)
+- $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
++ $(INSTALL) -d $(DESTDIR)$(LIBDIR)
++ $(INSTALL) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
+ $(LNS) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
+ mkdir -p $(DESTDIR)$(USRLIBDIR)
+ $(LNS) $(LIBDIR)/$(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB)
+ endif
+- $(INSTALL) -D keyctl $(DESTDIR)$(BINDIR)/keyctl
+- $(INSTALL) -D request-key $(DESTDIR)$(SBINDIR)/request-key
+- $(INSTALL) -D request-key-debug.sh $(DESTDIR)$(SHAREDIR)/request-key-debug.sh
+- $(INSTALL) -D key.dns_resolver $(DESTDIR)$(SBINDIR)/key.dns_resolver
+- $(INSTALL) -D -m 0644 request-key.conf $(DESTDIR)$(ETCDIR)/request-key.conf
+- mkdir -p $(DESTDIR)$(ETCDIR)/request-key.d
+- mkdir -p $(DESTDIR)$(MAN1)
+- $(INSTALL) -m 0644 $(wildcard man/*.1) $(DESTDIR)$(MAN1)
+- mkdir -p $(DESTDIR)$(MAN3)
+- $(INSTALL) -m 0644 $(wildcard man/*.3) $(DESTDIR)$(MAN3)
+- mkdir -p $(DESTDIR)$(MAN5)
+- $(INSTALL) -m 0644 $(wildcard man/*.5) $(DESTDIR)$(MAN5)
+- mkdir -p $(DESTDIR)$(MAN7)
+- $(INSTALL) -m 0644 $(wildcard man/*.7) $(DESTDIR)$(MAN7)
+- mkdir -p $(DESTDIR)$(MAN8)
+- $(INSTALL) -m 0644 $(wildcard man/*.8) $(DESTDIR)$(MAN8)
+- $(LNS) keyctl_describe.3 $(DESTDIR)$(MAN3)/keyctl_describe_alloc.3
+- $(LNS) keyctl_get_security.3 $(DESTDIR)$(MAN3)/keyctl_get_security_alloc.3
+- $(LNS) keyctl_instantiate.3 $(DESTDIR)$(MAN3)/keyctl_instantiate_iov.3
+- $(LNS) keyctl_instantiate.3 $(DESTDIR)$(MAN3)/keyctl_reject.3
+- $(LNS) keyctl_instantiate.3 $(DESTDIR)$(MAN3)/keyctl_negate.3
+- $(LNS) keyctl_instantiate.3 $(DESTDIR)$(MAN3)/keyctl_assume_authority.3
+- $(LNS) keyctl_link.3 $(DESTDIR)$(MAN3)/keyctl_unlink.3
+- $(LNS) keyctl_read.3 $(DESTDIR)$(MAN3)/keyctl_read_alloc.3
+- $(LNS) recursive_key_scan.3 $(DESTDIR)$(MAN3)/recursive_session_key_scan.3
+- $(LNS) keyctl_dh_compute.3 $(DESTDIR)$(MAN3)/keyctl_dh_compute_alloc.3
+- $(INSTALL) -D -m 0644 keyutils.h $(DESTDIR)$(INCLUDEDIR)/keyutils.h
++ $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
++ $(INSTALL) -m 0644 keyutils.h $(DESTDIR)$(INCLUDEDIR)/keyutils.h
+
+ ###############################################################################
+ #
+@@ -239,14 +198,6 @@ tarball: $(ZTARBALL)
+ SRCBALL := rpmbuild/SOURCES/$(TARBALL)
+ ZSRCBALL := rpmbuild/SOURCES/$(ZTARBALL)
+
+-BUILDID := .local
+-dist := $(word 2,$(shell grep -r "^%dist" /etc/rpm /usr/lib/rpm))
+-release := $(word 2,$(shell grep ^Release: $(SPECFILE)))
+-release := $(subst %{?dist},$(dist),$(release))
+-release := $(subst %{?buildid},$(BUILDID),$(release))
+-rpmver := $(VERSION)-$(release)
+-SRPM := rpmbuild/SRPMS/keyutils-$(rpmver).src.rpm
+-
+ RPMBUILDDIRS := \
+ --define "_srcrpmdir $(CURDIR)/rpmbuild/SRPMS" \
+ --define "_rpmdir $(CURDIR)/rpmbuild/RPMS" \