diff --git a/initrd/run/cryptsetup/.placeholder b/initrd/run/cryptsetup/.placeholder new file mode 100644 index 000000000..e69de29bb diff --git a/modules/cryptsetup b/modules/cryptsetup index 4f810dc97..87f304732 100644 --- a/modules/cryptsetup +++ b/modules/cryptsetup @@ -14,9 +14,11 @@ cryptsetup_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. @@ -28,10 +30,10 @@ cryptsetup_target := \ install cryptsetup_output := \ - src/.libs/cryptsetup \ - src/.libs/cryptsetup-reencrypt \ - src/.libs/veritysetup \ + .libs/cryptsetup \ + .libs/cryptsetup-reencrypt \ + .libs/veritysetup \ cryptsetup_libraries := \ - lib/.libs/libcryptsetup.so.12.6.0 \ + .libs/libcryptsetup.so.12 \ diff --git a/modules/json-c b/modules/json-c index 9fba28949..661662178 100644 --- a/modules/json-c +++ b/modules/json-c @@ -8,12 +8,30 @@ 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 -json-c_configure := mkdir -p build && \ +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-configure --prefix "$(INSTALL)" + 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 := .libs/libjson-c.so.5.0.0 +json-c_libraries := build/libjson-c.so.5 diff --git a/modules/util-linux b/modules/util-linux index 70d2c9d3d..908ff3e79 100644 --- a/modules/util-linux +++ b/modules/util-linux @@ -26,7 +26,9 @@ util-linux_target := \ $(MAKE_JOBS) \ $(CROSS_TOOLS) \ DESTDIR="$(INSTALL)" \ - install + install && \ + rm $(INSTALL)/lib/libblkid.la && \ + rm $(INSTALL)/lib/libuuid.la util-linux_libraries += \ .libs/libuuid.so.1 \ diff --git a/patches/cryptsetup-2.3.3.patch b/patches/cryptsetup-2.3.3.patch index 644d9a6c0..8a673ef86 100644 --- a/patches/cryptsetup-2.3.3.patch +++ b/patches/cryptsetup-2.3.3.patch @@ -511,17 +511,36 @@ diff -u -r cryptsetup-2.3.3-clean/Makefile.in cryptsetup-2.3.3/Makefile.in @CRYPTSETUP_TRUE@cryptsetup_LDADD = $(LDADD) \ @CRYPTSETUP_TRUE@ libcryptsetup.la \ @CRYPTSETUP_TRUE@ @POPT_LIBS@ \ -+@CRYPTSETUP_TRUE@ @UUID_LIBS@ \ +@CRYPTSETUP_TRUE@ @DEVMAPPER_LIBS@ \ ++@CRYPTSETUP_TRUE@ @JSON_C_LIBS@ \ @CRYPTSETUP_TRUE@ @PWQUALITY_LIBS@ \ @CRYPTSETUP_TRUE@ @PASSWDQC_LIBS@ \ @CRYPTSETUP_TRUE@ @UUID_LIBS@ \ -@@ -1060,6 +1062,8 @@ +@@ -1060,6 +1062,9 @@ @VERITYSETUP_TRUE@veritysetup_LDADD = $(LDADD) \ @VERITYSETUP_TRUE@ libcryptsetup.la \ @VERITYSETUP_TRUE@ @POPT_LIBS@ \ +@VERITYSETUP_TRUE@ @UUID_LIBS@ \ +@VERITYSETUP_TRUE@ @DEVMAPPER_LIBS@ \ ++@VERITYSETUP_TRUE@ @JSON_C_LIBS@ \ @VERITYSETUP_TRUE@ @PWQUALITY_LIBS@ \ @VERITYSETUP_TRUE@ @PASSWDQC_LIBS@ \ @VERITYSETUP_TRUE@ @BLKID_LIBS@ +@@ -1093,6 +1093,8 @@ + @INTEGRITYSETUP_TRUE@ libcryptsetup.la \ + @INTEGRITYSETUP_TRUE@ @POPT_LIBS@ \ + @INTEGRITYSETUP_TRUE@ @UUID_LIBS@ \ ++@INTEGRITYSETUP_TRUE@ @DEVMAPPER_LIBS@ \ ++@INTEGRITYSETUP_TRUE@ @JSON_C_LIBS@ \ + @INTEGRITYSETUP_TRUE@ @BLKID_LIBS@ + + @INTEGRITYSETUP_TRUE@@STATIC_TOOLS_TRUE@integritysetup_static_SOURCES = $(integritysetup_SOURCES) +@@ -1122,6 +1122,8 @@ + @REENCRYPT_TRUE@ @POPT_LIBS@ \ + @REENCRYPT_TRUE@ @PWQUALITY_LIBS@ \ + @REENCRYPT_TRUE@ @PASSWDQC_LIBS@ \ ++@REENCRYPT_TRUE@ @DEVMAPPER_LIBS@ \ ++@REENCRYPT_TRUE@ @JSON_C_LIBS@ \ + @REENCRYPT_TRUE@ @UUID_LIBS@ \ + @REENCRYPT_TRUE@ @BLKID_LIBS@ +