[OpenWrt-Devel] [PATCH v2 05/12] tools/cryptsetup: new package

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Nov 21 11:23:15 EST 2019


cryptsetup for the host will be needed to create the hash tree of a
dm-verity volume.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
 tools/Makefile                                |  1 +
 tools/cryptsetup/Makefile                     | 28 +++++++++++++++++++
 .../patches/0001-dont-use-c89.patch           | 11 ++++++++
 3 files changed, 40 insertions(+)
 create mode 100644 tools/cryptsetup/Makefile
 create mode 100644 tools/cryptsetup/patches/0001-dont-use-c89.patch

diff --git a/tools/Makefile b/tools/Makefile
index 26e2d19fee..cf91f04100 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -79,6 +79,7 @@ $(curdir)/lzma-old/compile := $(curdir)/zlib/compile
 $(curdir)/make-ext4fs/compile := $(curdir)/zlib/compile
 $(curdir)/cbootimage/compile += $(curdir)/automake/compile
 $(curdir)/lvm2/compile := $(curdir)/pkg-config/compile $(curdir)/libaio/compile
+$(curdir)/cryptsetup/compile := $(curdir)/pkg-config/compile $(curdir)/libressl/compile $(curdir)/lvm2/compile $(curdir)/popt/compile $(curdir)/libjson-c/compile
 
 ifneq ($(HOST_OS),Linux)
   $(curdir)/squashfskit4/compile += $(curdir)/coreutils/compile
diff --git a/tools/cryptsetup/Makefile b/tools/cryptsetup/Makefile
new file mode 100644
index 0000000000..3e500b81ea
--- /dev/null
+++ b/tools/cryptsetup/Makefile
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2010-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cryptsetup
+PKG_VERSION_MAJOR:=2.0
+PKG_VERSION:=$(PKG_VERSION_MAJOR).6
+PKG_HASH:=7c51fae0f0e7ea9af0f515b2ac77009fb2969a6619ebab47d097dca38b083d30
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=@KERNEL/linux/utils/cryptsetup/v$(PKG_VERSION_MAJOR)/
+
+HOST_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/host-build.mk
+
+HOST_CONFIGURE_ARGS += \
+	--with-crypto-backend=openssl \
+	--disable-kernel_crypto \
+	--disable-blkid
+
+$(eval $(call HostBuild))
diff --git a/tools/cryptsetup/patches/0001-dont-use-c89.patch b/tools/cryptsetup/patches/0001-dont-use-c89.patch
new file mode 100644
index 0000000000..84ee9c0ec2
--- /dev/null
+++ b/tools/cryptsetup/patches/0001-dont-use-c89.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -901,7 +901,7 @@ tmpfilesd_DATA = $(am__append_5)
+ @PYTHON_CRYPTSETUP_TRUE at pycryptsetup_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS) $(PYTHON_INCLUDES) -fno-strict-aliasing
+ @PYTHON_CRYPTSETUP_TRUE at pycryptsetup_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+ @PYTHON_CRYPTSETUP_TRUE at pycryptsetup_la_LIBADD = libcryptsetup.la $(PYTHON_LIBS)
+- at CRYPTO_INTERNAL_ARGON2_TRUE@libargon2_la_CFLAGS = $(AM_CFLAGS) -std=c89 -pthread -O3
++ at CRYPTO_INTERNAL_ARGON2_TRUE@libargon2_la_CFLAGS = $(AM_CFLAGS) -pthread -O3
+ @CRYPTO_INTERNAL_ARGON2_TRUE at libargon2_la_CPPFLAGS = $(AM_CPPFLAGS) \
+ @CRYPTO_INTERNAL_ARGON2_TRUE@	-I lib/crypto_backend/argon2 \
+ @CRYPTO_INTERNAL_ARGON2_TRUE@	-I lib/crypto_backend/argon2/blake2
-- 
2.23.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list