aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorW. Michael Petullo <mike@flyn.org>2018-08-26 02:37:40 -0400
committerW. Michael Petullo <mike@flyn.org>2018-08-26 02:37:40 -0400
commitd71da004d9ac0bc05fa6319630b6382f486d47fa (patch)
treeec01ec76acb5bfe9b7b53a5e999e6c6922280993
parent77d8472ed57a67bb5f116c6f34b327ac19abc2ef (diff)
keyutils: add new package
This is based on earlier work by Tobias Waldvogel. Signed-off-by: W. Michael Petullo <mike@flyn.org>
-rw-r--r--libs/keyutils/Makefile47
-rw-r--r--libs/keyutils/patches/03-cifs.patch13
-rw-r--r--libs/keyutils/patches/04-cflags.patch19
3 files changed, 79 insertions, 0 deletions
diff --git a/libs/keyutils/Makefile b/libs/keyutils/Makefile
new file mode 100644
index 000000000..91b5ca8c3
--- /dev/null
+++ b/libs/keyutils/Makefile
@@ -0,0 +1,47 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=keyutils
+PKG_VERSION:=1.5.10
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://people.redhat.com/dhowells/keyutils/
+PKG_HASH:=115c3deae7f181778fd0e0ffaa2dad1bf1fe2f5677cf2e0e348cdb7a1c93afb6
+
+PKG_FIXUP:=libtool
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libkeyutils
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Key utilities library
+ URL:=http://people.redhat.com/dhowells/keyutils/
+endef
+
+define Package/keyutils/description
+ Key utilities library
+endef
+
+define Build/Install
+ make -C $(PKG_BUILD_DIR) DESTDIR=$(PKG_INSTALL_DIR) LIBDIR=/usr/lib install
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkeyutils.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libkeyutils/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkeyutils.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libkeyutils))
diff --git a/libs/keyutils/patches/03-cifs.patch b/libs/keyutils/patches/03-cifs.patch
new file mode 100644
index 000000000..6d87633da
--- /dev/null
+++ b/libs/keyutils/patches/03-cifs.patch
@@ -0,0 +1,13 @@
+Author: Marcus Meissner <meissner@suse.de>
+Description: Added 2 cifs helpers to request-key.conf (for CIFS DFS support)
+
+diff -Naurp keyutils.orig/request-key.conf keyutils/request-key.conf
+--- keyutils.orig/request-key.conf 2011-08-22 11:46:30.332025250 +0200
++++ keyutils/request-key.conf 2011-08-22 11:49:40.096967441 +0200
+@@ -38,4 +38,6 @@ create user debug:* expired
+ create user debug:* revoked /bin/keyctl reject %k 30 %c %S
+ create user debug:loop:* * |/bin/cat
+ create user debug:* * /usr/share/keyutils/request-key-debug.sh %k %d %c %S
++create cifs.spnego * * /usr/sbin/cifs.upcall -c %k
++create dns_resolver * * /usr/sbin/cifs.upcall %k
+ negate * * * /bin/keyctl negate %k 30 %S
diff --git a/libs/keyutils/patches/04-cflags.patch b/libs/keyutils/patches/04-cflags.patch
new file mode 100644
index 000000000..44f4baa76
--- /dev/null
+++ b/libs/keyutils/patches/04-cflags.patch
@@ -0,0 +1,19 @@
+Author: Nobuhiro Iwamatsu <iwamatsu@debian.org>
+Description: Avoid setting Intel Architecture specific CFLAGS (Closes: #638925).
+
+diff -Naurp keyutils.orig/Makefile keyutils/Makefile
+--- keyutils.orig/Makefile 2011-08-22 11:51:20.521464216 +0200
++++ keyutils/Makefile 2011-08-24 19:17:09.855361713 +0200
+@@ -56,12 +56,10 @@ BUILDFOR := $(shell file /usr/bin/make |
+ LNS := ln -sf
+
+ ifeq ($(BUILDFOR),32-bit)
+-CFLAGS += -m32
+ LIBDIR := /lib
+ USRLIBDIR := /usr/lib
+ else
+ ifeq ($(BUILDFOR),64-bit)
+-CFLAGS += -m64
+ LIBDIR := /lib64
+ USRLIBDIR := /usr/lib64
+ endif