aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2021-08-18 03:09:49 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2021-08-18 03:09:49 +0200
commitf8500bc4d3233c10c14a38950c38c9c85c3bae0d (patch)
tree1299f739ca9562fe910f022ee854430a1b723291
parent1db86a6e236a9479c0d72f8f5596d752a8a4ddf8 (diff)
downloadaports-f8500bc4d3233c10c14a38950c38c9c85c3bae0d.tar.gz
aports-f8500bc4d3233c10c14a38950c38c9c85c3bae0d.tar.bz2
aports-f8500bc4d3233c10c14a38950c38c9c85c3bae0d.tar.xz
main/cryptsetup: upgrade to 2.4.0
Disable support for external tokens (new feature in 2.4.0) since it requires dlvsym which is a GNU extension that is presently not supported by musl libc. Similarly the all-symbols-test is affected by the same problem and thus disabled.
-rw-r--r--main/cryptsetup/APKBUILD17
-rw-r--r--main/cryptsetup/disable-all-symbols-test.patch35
-rw-r--r--main/cryptsetup/flush-stdout.patch12
3 files changed, 53 insertions, 11 deletions
diff --git a/main/cryptsetup/APKBUILD b/main/cryptsetup/APKBUILD
index ee50ce4d38..10d931ff8e 100644
--- a/main/cryptsetup/APKBUILD
+++ b/main/cryptsetup/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cryptsetup
-pkgver=2.3.6
+pkgver=2.4.0
pkgrel=0
pkgdesc="Userspace setup tool for transparent encryption of block devices using the Linux 2.6 cryptoapi"
url="https://gitlab.com/cryptsetup/cryptsetup"
@@ -15,7 +15,9 @@ subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-openrc"
source="https://www.kernel.org/pub/linux/utils/cryptsetup/v${pkgver%.*}/cryptsetup-$pkgver.tar.gz
dmcrypt.initd
dmcrypt.confd
+
flush-stdout.patch
+ disable-all-symbols-test.patch
"
# secfixes:
@@ -23,6 +25,8 @@ source="https://www.kernel.org/pub/linux/utils/cryptsetup/v${pkgver%.*}/cryptset
# - CVE-2020-14382
build() {
+ # Disable support for external tokens since it requires
+ # dlvsym(3) which is a GNU extension and not available in musl.
./configure \
--build="$CBUILD" \
--host="$CHOST" \
@@ -31,7 +35,9 @@ build() {
--sbindir=/sbin \
--disable-static \
--enable-libargon2 \
- --with-crypto_backend=openssl
+ --with-crypto_backend=openssl \
+ --disable-external-tokens \
+ --disable-ssh-token
make
}
@@ -49,7 +55,7 @@ package() {
install -Dm755 "$srcdir"/dmcrypt.initd "$pkgdir"/etc/init.d/dmcrypt
mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
- install -m644 README TODO FAQ NEWS docs/v$pkgver-ReleaseNotes \
+ install -m644 README.md FAQ docs/v$pkgver-ReleaseNotes \
"$pkgdir"/usr/share/doc/$pkgname/
}
@@ -60,8 +66,9 @@ libs() {
}
sha512sums="
-a0ec8dcb7082e458660f6379a532cffb56561488288e514db2ebceab11779c7d94aa732660b24f85e46a333a969d8d39aed9ca9b2e9ac0af724cabb07488e2f5 cryptsetup-2.3.6.tar.gz
+0572a1c213a1343b7cee89e1d5355e61ee2e334b0814eceac4028376e70c0f9582c6be6984bcffca48dfec4377834fc9766a3a260d69091c4eb075d69a80abc4 cryptsetup-2.4.0.tar.gz
a3ca3e648749136ee724692b61488cd855f118eb93435942c2b04964a34fe49d0f0da4ef64cd2531c1c0f650e77808cf5d802789fd7664398248ead668bb35e5 dmcrypt.initd
74422d5e1614b43af894ea01da1ea80d805ec7f77981cbb80a6b1a4becad737a8825d7269812499095a7f50d39fa7da5bf4e4edae63529b1fe87b9176943a733 dmcrypt.confd
-dc896fdb7697d01443a168819f01af02db00a9de75589f062a1ebbfc0bc185b6d2109b18352309c41b818e3ad89609dcea3660d6f3cda890de825f053f94de97 flush-stdout.patch
+529187851def5fbc08e995eba90d3f013f1cf8469dcb9344f83d1e3c73c71467ca4ed62c8282ec27ebfa30ccc33653fdd1aea8d1d80e1ac4293d51865c9a6200 flush-stdout.patch
+62ba40047110a5ac9bd51584b9c66aec11f2fe08d7c7512bf38e7f6965666c42b49cdc409619dc0c9e4d8c36578dcafd4b7b57b493231b99cddea6a856021238 disable-all-symbols-test.patch
"
diff --git a/main/cryptsetup/disable-all-symbols-test.patch b/main/cryptsetup/disable-all-symbols-test.patch
new file mode 100644
index 0000000000..fd4fb007ea
--- /dev/null
+++ b/main/cryptsetup/disable-all-symbols-test.patch
@@ -0,0 +1,35 @@
+The all-symbol-test.c file requires dlvsym which is a GNU extension and
+presently not available on musl libc. This patch essentially makes
+check_all_symbols a no-op, thereby disabling it without requiring
+rebuilding the automake Makefiles.
+
+diff -upr cryptsetup-2.4.0.orig/tests/all-symbols-test.c cryptsetup-2.4.0/tests/all-symbols-test.c
+--- cryptsetup-2.4.0.orig/tests/all-symbols-test.c 2021-08-18 19:40:14.751188763 +0200
++++ cryptsetup-2.4.0/tests/all-symbols-test.c 2021-08-18 19:42:29.727938025 +0200
+@@ -70,6 +70,7 @@ static void test_logf(int level, const c
+
+ static int check_all_symbols(void *h)
+ {
++#ifdef __GLIBC__
+ void *sym;
+ char *err;
+ unsigned scount = 0;
+@@ -98,15 +99,15 @@ do { \
+ scount++; \
+ } while (0);
+
+-#include "test-symbols-list.h"
+-#undef CHECK_SYMBOL
+-
+ if (!scount) {
+ log_err("test-symbols-list.h file is probably empty.");
+ return 1;
+ }
+
+ log_std("Performed %u symbol checks in total\n.", scount);
++#include "test-symbols-list.h"
++#undef CHECK_SYMBOL
++#endif
+
+ return 0;
+ }
diff --git a/main/cryptsetup/flush-stdout.patch b/main/cryptsetup/flush-stdout.patch
index a39aec5474..9698460b29 100644
--- a/main/cryptsetup/flush-stdout.patch
+++ b/main/cryptsetup/flush-stdout.patch
@@ -1,15 +1,15 @@
-diff -upr cryptsetup-2.1.0.orig/src/utils_tools.c cryptsetup-2.1.0/src/utils_tools.c
---- cryptsetup-2.1.0.orig/src/utils_tools.c 2019-01-31 21:37:12.000000000 +0100
-+++ cryptsetup-2.1.0/src/utils_tools.c 2019-03-16 16:33:13.000000000 +0100
-@@ -105,10 +105,13 @@ void tool_log(int level, const char *msg
+diff -upr cryptsetup-2.4.0.orig/src/utils_tools.c cryptsetup-2.4.0/src/utils_tools.c
+--- cryptsetup-2.4.0.orig/src/utils_tools.c 2021-08-29 15:17:46.989874344 +0200
++++ cryptsetup-2.4.0/src/utils_tools.c 2021-08-29 15:18:45.543241866 +0200
+@@ -79,10 +79,13 @@ void tool_log(int level, const char *msg
case CRYPT_LOG_NORMAL:
fprintf(stdout, "%s", msg);
+ fflush(stdout);
break;
case CRYPT_LOG_VERBOSE:
-- if (opt_verbose)
-+ if (opt_verbose) {
+- if (params && params->verbose)
++ if (params && params->verbose) {
fprintf(stdout, "%s", msg);
+ fflush(stdout);
+ }