forked from linuxboot/heads
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use cryptsetup2-2.2.2 and make cryptsetup1/cryptsetup2 optionals
- Loading branch information
1 parent
e2eabb0
commit ce94c05
Showing
6 changed files
with
106 additions
and
20 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
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.2.2 | ||
cryptsetup2_dir := cryptsetup-$(cryptsetup2_version) | ||
cryptsetup2_tar := cryptsetup-$(cryptsetup2_version).tar.xz | ||
cryptsetup2_url := https://www.kernel.org/pub/linux/utils/cryptsetup/v2.2/cryptsetup-$(cryptsetup2_version).tar.xz | ||
cryptsetup2_hash := 2af0ec9551ab9c870074cae9d3f68d82cab004f4095fa89db0e4413713424a46 | ||
|
||
# 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
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,21 @@ | ||
diff -u --recursive ../../clean/cryptsetup-1.7.3/src/Makefile.in ./cryptsetup-1.7.3/src/Makefile.in | ||
--- ../../clean/cryptsetup-1.7.3/src/Makefile.in 2016-10-28 09:45:06.000000000 -0400 | ||
+++ cryptsetup-1.7.3/src/Makefile.in 2017-01-27 17:24:13.115962328 -0500 | ||
@@ -479,6 +479,8 @@ | ||
cryptsetup_LDADD = \ | ||
$(top_builddir)/lib/libcryptsetup.la \ | ||
@POPT_LIBS@ \ | ||
+ @UUID_LIBS@ \ | ||
+ @DEVMAPPER_LIBS@ \ | ||
@PWQUALITY_LIBS@ \ | ||
@PASSWDQC_LIBS@ | ||
|
||
@@ -503,6 +505,8 @@ | ||
|
||
@VERITYSETUP_TRUE@veritysetup_LDADD = \ | ||
@VERITYSETUP_TRUE@ $(top_builddir)/lib/libcryptsetup.la \ | ||
+@VERITYSETUP_TRUE@ @UUID_LIBS@ \ | ||
+@VERITYSETUP_TRUE@ @DEVMAPPER_LIBS@ \ | ||
@VERITYSETUP_TRUE@ @POPT_LIBS@ | ||
|
||
@VERITYSETUP_TRUE@veritysetup_CFLAGS = $(cryptsetup_CFLAGS) |
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
30 changes: 30 additions & 0 deletions
30
patches/cryptsetup2-2.2.2/0000-use-json-c-get-uint64.patch
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,30 @@ | ||
diff -u -r cryptsetup-2.2.2-clean/lib/luks2/luks2_internal.h cryptsetup-2.2.2/lib/luks2/luks2_internal.h | ||
--- cryptsetup-2.2.2-clean/lib/luks2/luks2_internal.h 1970-01-01 00:00:00.0 +0000 | ||
+++ cryptsetup-2.2.2/lib/luks2/luks2_internal.h 1970-01-01 00:00:00.0 +0000 | ||
@@ -59,7 +59,8 @@ | ||
void hexprint_base64(struct crypt_device *cd, json_object *jobj, | ||
const char *sep, const char *line_sep); | ||
|
||
-uint64_t json_object_get_uint64(json_object *jobj); | ||
+#define FALSE 0 | ||
+#define TRUE 1 | ||
uint32_t json_object_get_uint32(json_object *jobj); | ||
json_object *json_object_new_uint64(uint64_t value); | ||
|
||
diff -u -r cryptsetup-2.2.2-clean/lib/luks2/luks2_json_metadata.c cryptsetup-2.2.2/lib/luks2/luks2_json_metadata.c | ||
--- cryptsetup-2.2.2-clean/lib/luks2/luks2_json_metadata.c 1970-01-01 00:00:00.0 +0000 | ||
+++ cryptsetup-2.2.2/lib/luks2/luks2_json_metadata.c 1970-01-01 00:00:00.0 +0000 | ||
@@ -241,13 +241,6 @@ | ||
return TRUE; | ||
} | ||
|
||
-uint64_t json_object_get_uint64(json_object *jobj) | ||
-{ | ||
- uint64_t r; | ||
- json_str_to_uint64(jobj, &r); | ||
- return r; | ||
-} | ||
- | ||
json_object *json_object_new_uint64(uint64_t value) | ||
{ | ||
/* 18446744073709551615 */ |