diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-10-26 14:55:29 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-10-26 14:57:20 +0000 |
commit | ccc967e0f3d093a3fbaf9ad3cd5451d71fd0d9ec (patch) | |
tree | 3286c7d29a24e3b04025f47711b852ed9f865158 | |
parent | 5a5dd7f7e5c96b007cf6bb03aeaa1d117feacef2 (diff) | |
download | aports-ccc967e0f3d093a3fbaf9ad3cd5451d71fd0d9ec.tar.bz2 aports-ccc967e0f3d093a3fbaf9ad3cd5451d71fd0d9ec.tar.xz |
community/lastpass-cli: fix tests on various architectures
upstream report: https://github.com/lastpass/lastpass-cli/issues/345
-rw-r--r-- | community/lastpass-cli/0001-generate-fix-type-for-option-parsing.patch | 35 | ||||
-rw-r--r-- | community/lastpass-cli/APKBUILD | 9 |
2 files changed, 41 insertions, 3 deletions
diff --git a/community/lastpass-cli/0001-generate-fix-type-for-option-parsing.patch b/community/lastpass-cli/0001-generate-fix-type-for-option-parsing.patch new file mode 100644 index 0000000000..6cc03a787f --- /dev/null +++ b/community/lastpass-cli/0001-generate-fix-type-for-option-parsing.patch @@ -0,0 +1,35 @@ +From d170eb7809501ef16108c27be24ba4ab5797a9c3 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Thu, 26 Oct 2017 14:49:07 +0000 +Subject: [PATCH] generate: fix type for option parsing + +char may or may not be signed depending on architecture. If char is +unsigned on a given architecture, then will the testing the return value +from getopt_long (which is int) always fail. This happened on some +architectures like ppc64le, aarch64 and s390x. + +To fix this we use same type as getopt_long return value: int. + +fixes #345 + +Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> +--- + cmd-generate.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmd-generate.c b/cmd-generate.c +index ce16c25..9eff89a 100644 +--- a/cmd-generate.c ++++ b/cmd-generate.c +@@ -61,7 +61,7 @@ int cmd_generate(int argc, char **argv) + {"clip", no_argument, NULL, 'c'}, + {0, 0, 0, 0} + }; +- char option; ++ int option; + int option_index; + char *username = NULL; + char *url = NULL; +-- +2.14.3 + diff --git a/community/lastpass-cli/APKBUILD b/community/lastpass-cli/APKBUILD index 1c93abc340..936d87edec 100644 --- a/community/lastpass-cli/APKBUILD +++ b/community/lastpass-cli/APKBUILD @@ -2,14 +2,16 @@ # Maintainer: Francesco Colista <fcolista@alpinelinux.org> pkgname=lastpass-cli pkgver=1.2.1 -pkgrel=0 +pkgrel=1 pkgdesc="LastPass command line interface tool" url="https://lastpass.com/" arch="all" license="GPL2" makedepends="libressl-dev curl-dev libxml2-dev asciidoc cmake bash" subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch" -source="$pkgname-$pkgver.tar.gz::https://github.com/${pkgname/-*/}/$pkgname/archive/v${pkgver}.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/${pkgname/-*/}/$pkgname/archive/v${pkgver}.tar.gz + 0001-generate-fix-type-for-option-parsing.patch + " builddir="$srcdir/$pkgname-$pkgver" build() { @@ -34,4 +36,5 @@ bashcomp() { "$subpkgdir"/usr/share/bash-completion/completions/lpass } -sha512sums="c7c9f20dbc083873b815834320828a30a1c488571efbfc5aea47c3bd2073819d713810c785855d4c0c208e1b95aa0e5fc550a0b6b5c0f787eca1f54589e18e62 lastpass-cli-1.2.1.tar.gz" +sha512sums="c7c9f20dbc083873b815834320828a30a1c488571efbfc5aea47c3bd2073819d713810c785855d4c0c208e1b95aa0e5fc550a0b6b5c0f787eca1f54589e18e62 lastpass-cli-1.2.1.tar.gz +7d40b54d6378ef2f79850f444113157334f5a7e76030cb2f5d0b962d0ebe87958859d3799420d19790b33deaf0453daab5645c8157a0e2d7eead158bb002c675 0001-generate-fix-type-for-option-parsing.patch" |