openwrt-packages/utils/cryptsetup/Makefile

107 lines
3.1 KiB
Makefile
Raw Permalink Normal View History

#
# Copyright (C) 2006-2014 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:=2.7.1
cryptsetup: update to version 2.6.1 Cryptsetup 2.6.1 Release Notes ============================== Stable bug-fix release with minor extensions. All users of cryptsetup 2.6.0 should upgrade to this version. Changes since version 2.6.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ * bitlk: Fixes for BitLocker-compatible on-disk metadata parser (found by new cryptsetup OSS-Fuzz fuzzers). - Fix a possible memory leak if the metadata contains more than one description field. - Harden parsing of metadata entries for key and description entries. - Fix broken metadata parsing that can cause a crash or out of memory. * Fix possible iteration overflow in OpenSSL2 PBKDF2 crypto backend. OpenSSL2 uses a signed integer for PBKDF2 iteration count. As cryptsetup uses an unsigned value, this can lead to overflow and a decrease in the actual iteration count. This situation can happen only if the user specifies --pbkdf-force-iterations option. OpenSSL3 (and other supported crypto backends) are not affected. * Fix compilation for new ISO C standards (gcc with -std=c11 and higher). * fvault2: Fix compilation with very old uuid.h. * verity: Fix possible hash offset setting overflow. * bitlk: Fix use of startup BEK key on big-endian platforms. * Fix compilation with latest musl library. Recent musl no longer implements lseek64() in some configurations. Use lseek() as 64-bit offset is mandatory for cryptsetup. * Do not initiate encryption (reencryption command) when the header and data devices are the same. If data device reduction is not requsted, this leads to data corruption since LUKS metadata was written over the data device. * Fix possible memory leak if crypt_load() fails. * Always use passphrases with a minimal 8 chars length for benchmarking. Some enterprise distributions decided to set an unconditional check for PBKDF2 password length when running in FIPS mode. This questionable change led to unexpected failures during LUKS format and keyslot operations, where short passwords were used for benchmarking PBKDF2 speed. PBKDF2 benchmark calculations should not be affected by this change. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-08-05 03:32:24 +02:00
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/cryptsetup/v$(subst $(space),.,$(wordlist 1, 2, $(subst .,$(space),$(PKG_VERSION))))
PKG_HASH:=da5d1419e2a86e01aa32fd79582cd54d208857cb541bca2fd426a5ff1aaabbc3
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING COPYING.LGPL
PKG_CPE_ID:=cpe:/a:cryptsetup_project:cryptsetup
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/cryptsetup
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Encryption
TITLE:=Cryptsetup
DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +libblkid +libuuid +libpopt +lvm2 \
+libdevmapper +libjson-c +@KERNEL_DIRECT_IO +kmod-crypto-user
URL:=https://gitlab.com/cryptsetup/cryptsetup/
endef
define Package/cryptsetup/description
Cryptsetup is utility used to conveniently setup disk encryption based on DMCrypt kernel module.
endef
define Package/cryptsetup-ssh
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Encryption
TITLE:=Cryptsetup SSH token
DEPENDS:=+cryptsetup +PACKAGE_cryptsetup-ssh:libssh
URL:=https://gitlab.com/cryptsetup/cryptsetup/
endef
define Package/cryptsetup-ssh/description
Experimental SSH token support for cryptsetup.
endef
CONFIGURE_ARGS += \
--disable-asciidoc \
--disable-cryptsetup-reencrypt \
--disable-integritysetup \
--disable-selinux \
--disable-rpath \
--disable-veritysetup \
--disable-udev \
--with-default-luks-format=LUKS2 \
--with-luks2-lock-path=/var/run/cryptsetup \
--with-crypto_backend=kernel
ifeq ($(CONFIG_PACKAGE_cryptsetup-ssh),)
CONFIGURE_ARGS += --disable-ssh-token
endif
CONFIGURE_VARS += \
LIBSSH_CFLAGS="-I$(STAGING_DIR)/usr/include" \
LIBSSH_LIBS="-L$(STAGING_DIR)/usr/lib -lssh"
TARGET_CFLAGS += -D_LARGEFILE64_SOURCE
TARGET_LDFLAGS += -Wl,--gc-sections $(if $(INTL_FULL),-lintl)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libcryptsetup.h $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcryptsetup.so* $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libcryptsetup.pc $(1)/usr/lib/pkgconfig
endef
define Package/cryptsetup/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcryptsetup.so* $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/cryptsetup $(1)/usr/sbin
endef
define Package/cryptsetup-ssh/install
$(INSTALL_DIR) $(1)/usr/lib/cryptsetup
$(CP) $(PKG_INSTALL_DIR)/usr/lib/cryptsetup/* $(1)/usr/lib/cryptsetup
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/cryptsetup-ssh $(1)/usr/sbin
endef
$(eval $(call BuildPackage,cryptsetup))
$(eval $(call BuildPackage,cryptsetup-ssh))