aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Larsson <who+github@cnackers.org>2020-11-25 19:39:49 +0100
committerAndy Postnikov <apostnikov@gmail.com>2020-11-26 00:17:34 +0000
commit212b29557f75005266973548c9fe6e8e5454fb24 (patch)
tree7feb1c8adf787050b5d2f342a3a323f81b9f458a
parent1fa393f5e62857c33c1e412030f27af0049b0045 (diff)
downloadaports-212b29557f75005266973548c9fe6e8e5454fb24.tar.gz
aports-212b29557f75005266973548c9fe6e8e5454fb24.tar.bz2
aports-212b29557f75005266973548c9fe6e8e5454fb24.tar.xz
testing/tpm2-tools: upgrade to 5.0
-rw-r--r--testing/tpm2-tools/APKBUILD12
-rw-r--r--testing/tpm2-tools/argc-fix.patch35
2 files changed, 42 insertions, 5 deletions
diff --git a/testing/tpm2-tools/APKBUILD b/testing/tpm2-tools/APKBUILD
index 6a98a74668..ab9eafcd1b 100644
--- a/testing/tpm2-tools/APKBUILD
+++ b/testing/tpm2-tools/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Alexander Sack <asac@pantacor.com>
# Maintainer: Alexander Sack <asac@pantacor.com>
pkgname=tpm2-tools
-pkgver=4.3.0
-pkgrel=1
+pkgver=5.0
+pkgrel=0
pkgdesc="TPM2 Tools"
url="https://github.com/tpm2-software/tpm2-tools/"
arch="all"
@@ -11,7 +11,8 @@ makedepends="tpm2-tss-dev openssl-dev curl-dev util-linux-dev libtool
autoconf automake"
subpackages="$pkgname-bash-completion"
source="https://github.com/tpm2-software/tpm2-tools/releases/download/$pkgver/tpm2-tools-$pkgver.tar.gz
- dont-generate-manpages-without-pandoc.patch"
+ dont-generate-manpages-without-pandoc.patch
+ argc-fix.patch"
options="!check"
prepare() {
@@ -32,5 +33,6 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="4e622bbc8642ba7fd93a7343900560fe3779cba03e363d16f391fc8929724a11913d238e3986de06982cbced27c3c2ca8c7e73d75796407b8646c101ccf393a8 tpm2-tools-4.3.0.tar.gz
-2e0862c3c5d07cd40f655fa762a881a243fcf63c966f9867032057f7d7373fea94785929d8ef8bba8961bafa7d4549ebb3b90a09b15d6cfd8d3f08acfd488364 dont-generate-manpages-without-pandoc.patch"
+sha512sums="ea57a28a61e28b78cae7067ff58facd8754fafab7a2689fd93f8b3374073b6ac30301a75f8ff5c654800ab469ee6604d0b8a86c310631b9545b816ecaa05968e tpm2-tools-5.0.tar.gz
+2e0862c3c5d07cd40f655fa762a881a243fcf63c966f9867032057f7d7373fea94785929d8ef8bba8961bafa7d4549ebb3b90a09b15d6cfd8d3f08acfd488364 dont-generate-manpages-without-pandoc.patch
+068fadf650e76fd520135844368d68f883065d7eeeac3c2715f207d585cf9d71cd779c9fdd06c007f21e4ad81f2ffaf65ed953ed9c59151a539d5582ab742c1e argc-fix.patch"
diff --git a/testing/tpm2-tools/argc-fix.patch b/testing/tpm2-tools/argc-fix.patch
new file mode 100644
index 0000000000..ab52659bad
--- /dev/null
+++ b/testing/tpm2-tools/argc-fix.patch
@@ -0,0 +1,35 @@
+just running tpm2 will segfault without this patch.
+In upstream master branch, but not yet in a release, see https://github.com/tpm2-software/tpm2-tools/commit/fb1e0d98eca5279bf33304deedd9019b0130393a
+Can probably be removed after 5.0.1 is released.
+
+index e9aaa036..9fa583c6 100644
+--- a/lib/tpm2_options.c
++++ b/lib/tpm2_options.c
+@@ -300,7 +300,7 @@ tpm2_option_code tpm2_handle_options(int argc, char **argv,
+ if (argv[optind - 1]) {
+ if (!strcmp(argv[optind - 1], "--help=no-man") ||
+ !strcmp(argv[optind - 1], "-h=no-man") ||
+- (argv[optind] && !strcmp(argv[optind], "no-man"))) {
++ (argc < optind && !strcmp(argv[optind], "no-man"))) {
+ manpager = false;
+ optind++;
+ /*
+@@ -309,7 +309,7 @@ tpm2_option_code tpm2_handle_options(int argc, char **argv,
+ */
+ } else if (!strcmp(argv[optind - 1], "--help=man") ||
+ !strcmp(argv[optind - 1], "-h=man") ||
+- (argv[optind] && !strcmp(argv[optind], "man"))) {
++ (argc < optind && !strcmp(argv[optind], "man"))) {
+ manpager = true;
+ explicit_manpager = true;
+ optind++;
+@@ -318,7 +318,7 @@ tpm2_option_code tpm2_handle_options(int argc, char **argv,
+ * argv[0] = "tool name"
+ * argv[1] = "--help" argv[2] = 0
+ */
+- if (!argv[optind] && argc == 2) {
++ if (optind >= argc && argc == 2) {
+ manpager = false;
+ } else {
+ /*
+