-
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #876 from hardenedvault/cryptsetup-2.3
Upgrade to cryptsetup 2.3 and make cryptsetup1/cryptsetup2 optionals
- Loading branch information
Showing
7 changed files
with
632 additions
and
515 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
modules-$(CONFIG_CRYPTSETUP2) += cryptsetup2 | ||
|
||
cryptsetup2_depends := util-linux popt lvm2 json-c $(musl_dep) | ||
|
||
cryptsetup2_version := 2.3.3 | ||
cryptsetup2_dir := cryptsetup-$(cryptsetup2_version) | ||
cryptsetup2_tar := cryptsetup-$(cryptsetup2_version).tar.xz | ||
cryptsetup2_url := https://www.kernel.org/pub/linux/utils/cryptsetup/v2.3/cryptsetup-$(cryptsetup2_version).tar.xz | ||
cryptsetup2_hash := 3bca4ffe39e2f94cef50f6ea65acb873a6dbce5db34fc6bcefe38b6d095e82df | ||
|
||
# Use an empty prefix so that the executables will not include the | ||
# build path. | ||
cryptsetup2_configure := ./configure \ | ||
$(CROSS_TOOLS) \ | ||
--host i386-elf-linux \ | ||
--prefix "/" \ | ||
--disable-rpath \ | ||
--disable-gcrypt-pbkdf2 \ | ||
--enable-cryptsetup-reencrypt \ | ||
--with-crypto_backend=kernel \ | ||
--with-tmpfilesdir=$(INSTALL)/lib/tmpfiles.d | ||
|
||
# but after building, replace prefix so that they will be installed | ||
# in the correct directory. | ||
cryptsetup2_target := \ | ||
$(MAKE_JOBS) \ | ||
&& $(MAKE) \ | ||
-C $(build)/$(cryptsetup2_dir) \ | ||
prefix="$(INSTALL)" \ | ||
install | ||
|
||
cryptsetup2_output := \ | ||
.libs/cryptsetup \ | ||
.libs/cryptsetup-reencrypt \ | ||
.libs/veritysetup \ | ||
|
||
cryptsetup2_libraries := \ | ||
.libs/libcryptsetup.so.12 \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
modules-$(CONFIG_CRYPTSETUP2) += json-c | ||
|
||
json-c_version := 0.14 | ||
json-c_dir := json-c-$(json-c_version) | ||
json-c_tar := json-c-$(json-c_version).tar.gz | ||
json-c_url := https://s3.amazonaws.com/json-c_releases/releases/json-c-$(json-c_version)-nodoc.tar.gz | ||
json-c_hash := 99914e644a25201d82ccefa20430f7515c110923360f9ef46755527c02412afa | ||
|
||
# there is a bug in cmake-configure so that it can not be used with a "=", fxed in next | ||
# release though (then it needs to read '--prefix="$(INSTALL)"' here instead | ||
define toolchain_file = | ||
set\(CMAKE_SYSTEM_NAME Linux\)\n\ | ||
set\(CMAKE_SYSROOT $(INSTALL)\)\n\ | ||
set\(CMAKE_C_COMPILER $(CROSS)gcc\)\n\ | ||
set\(CMAKE_AR $(CROSS)ar\)\n\ | ||
set\(CMAKE_LINKER $(CROSS)ld\)\n\ | ||
set\(CMAKE_NM $(CROSS)nm\)\n\ | ||
set\(CMAKE_OBJCOPY $(CROSS)objcopy\)\n\ | ||
set\(CMAKE_OBJDUMP $(CROSS)objdump\)\n\ | ||
set\(INSTALL_PKGCONFIG_DIR $(INSTALL)/lib/pkgconfig\)\n\ | ||
set\(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER\)\n\ | ||
set\(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY\)\n\ | ||
set\(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY\)\n\ | ||
set\(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY\) | ||
endef | ||
|
||
json-c_configure := \ | ||
echo -e "$(toolchain_file)" | sed 's/\\//g' > toolchain && \ | ||
mkdir -p build && \ | ||
cd build && \ | ||
cmake .. -DCMAKE_INSTALL_PREFIX="$(INSTALL)" -DCMAKE_TOOLCHAIN_FILE=../toolchain | ||
|
||
json-c_target := \ | ||
$(CROSS_TOOLS) -C $(build)/$(json-c_dir)/build \ | ||
all install | ||
|
||
json-c_libraries := build/libjson-c.so.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.