summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore14
-rw-r--r--LICENSE.txt12
-rw-r--r--PKGBUILD64
-rw-r--r--aws-cli-v2-bin.install12
-rw-r--r--aws_bash_completer6
-rw-r--r--aws_zsh_completer.sh60
-rw-r--r--keys/pgp/FB5DB77FD5C118B80511ADA8A6310ACC4672475C.asc29
7 files changed, 176 insertions, 21 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..defcc06def98
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,14 @@
+*.tar
+*.tar.*
+*.jar
+*.exe
+*.msi
+*.zip
+*.tgz
+*.log
+*.log.*
+*.sig
+*.zst
+
+pkg/
+src/
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 000000000000..37014e831ce5
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,12 @@
+Copyright 2012-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License"). You
+may not use this file except in compliance with the License. A copy of
+the License is located at
+
+ http://aws.amazon.com/apache2.0/
+
+or in the "license" file accompanying this file. This file is
+distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+ANY KIND, either express or implied. See the License for the specific
+language governing permissions and limitations under the License.
diff --git a/PKGBUILD b/PKGBUILD
index 197b91696a17..5f13c60151a3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,52 @@
-# Maintainer: Steve Engledow <steve@engledow.me>
+# Maintainer: Nick Syntychakis <nsyntych@punkops.dev>
+# Contributor: Steve Engledow <steve@engledow.me>
+
pkgname=aws-cli-v2-bin
-pkgver=2.8.3
+# https://github.com/aws/aws-cli/raw/v2/CHANGELOG.rst
+pkgver=2.15.51
pkgrel=1
-pkgdesc='Universal Command Line Interface for Amazon Web Services version 2'
-arch=('aarch64' 'x86_64')
-url='https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html'
+epoch=1
+pkgdesc='Unified command line interface for Amazon Web Services (version 2) (binary release)'
+arch=(x86_64 aarch64)
+url='https://github.com/aws/aws-cli/tree/v2'
license=('Apache')
-provides=('aws-cli' 'aws-cli-v2')
-conflicts=('aws-cli' 'aws-cli-v2')
makedepends=('unzip')
depends=('less')
-source_aarch64=("https://awscli.amazonaws.com/awscli-exe-linux-aarch64-$pkgver.zip")
-source_x86_64=("https://awscli.amazonaws.com/awscli-exe-linux-x86_64-$pkgver.zip")
-sha256sums_aarch64=('07d432065bac792c1f8fc9cd652b68943c5288bd37f4f6d7eea15323a7c35169')
-sha256sums_x86_64=('471a40dbcb97a061c07095576fee3f9e89ae74d8b9d4d671fa1145539542f6d2')
+optdepends=()
+provides=(aws-cli)
+conflicts=(aws-cli aws-cli-v2)
+install=aws-cli-v2-bin.install
+
+source=("aws_bash_completer"
+ "aws_zsh_completer.sh"
+ "LICENSE.txt")
+
+sha256sums=('451a681062516a0473c8764a6593b0a65b6e558bf6128899b1d5e19b258f679e'
+ '426e99f1e8cd00cce9263693d29ceac5b4834f6cf1766cd57b985a440eea2e87'
+ 'a395e1165c2ed0e2bf041ae28e528245aedd4009b7e94ad407780257f704afc1')
+
+source_x86_64=(${pkgname}-${pkgver}-x86_64.zip::https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${pkgver}.zip)
+source_aarch64=(${pkgname}-${pkgver}-aarch64.zip::https://awscli.amazonaws.com/awscli-exe-linux-aarch64-${pkgver}.zip)
+
+sha256sums_x86_64=('0dbb53f5cf49c9699d0a7b7fb7cd70f2b2b50e664928cdd645377557f2df7a1c')
+sha256sums_aarch64=('ab9ac09ea7a02c775859235b055af48c24c9f007fcbe1c8b7ef632eef47b68b8')
+validpgpkeys=(
+ 'FB5DB77FD5C118B80511ADA8A6310ACC4672475C' # the key mentioned on https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
+)
package() {
- $srcdir/aws/install -i "$pkgdir/usr/share/aws-cli" -b "$pkgdir/usr/bin" >/dev/null
+ # Create the install dir and move the binary files there
+ mkdir -p $pkgdir/usr/local/aws-cli
+ mv aws/dist $pkgdir/usr/local/aws-cli/v2
- # Install binary symlinks
- BIN_DIR="/usr/share/aws-cli/v2/$pkgver/bin"
- for i in $pkgdir/$BIN_DIR/*; do
- ln -sf "$BIN_DIR/$(basename $i)" "$pkgdir/usr/bin/"
- done
-
- # Fix symlink for current version
- rm "$pkgdir/usr/share/aws-cli/v2/current"
- ln -s "/usr/share/aws-cli/v2/$pkgver" "$pkgdir/usr/share/aws-cli/v2/current"
+ # Install completions scripts
+ install -Dm644 aws_bash_completer $pkgdir/usr/share/bash-completion/completions/aws
+ install -Dm644 aws_zsh_completer.sh $pkgdir/usr/bin/aws_zsh_completer.sh
+
+ # Install license
+ install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # aws and aws_completer symlinks to /usr/bin
+ ln -sf /usr/local/aws-cli/v2/aws $pkgdir/usr/bin/aws
+ ln -sf /usr/local/aws-cli/v2/aws_completer $pkgdir/usr/bin/aws_completer
}
diff --git a/aws-cli-v2-bin.install b/aws-cli-v2-bin.install
new file mode 100644
index 000000000000..118b791e81b2
--- /dev/null
+++ b/aws-cli-v2-bin.install
@@ -0,0 +1,12 @@
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ if [ "$(vercmp $2 2.13.25)" -le 0 ]; then
+ cat << EOF
+===> zsh completions are no longer automatically enabled.
+===> You can put the following line in a zsh startup script
+===> or run it manually before using aws zsh completions.
+===> source /usr/bin/aws_zsh_completer.sh
+EOF
+ fi
+}
diff --git a/aws_bash_completer b/aws_bash_completer
new file mode 100644
index 000000000000..32cd1dd8fd49
--- /dev/null
+++ b/aws_bash_completer
@@ -0,0 +1,6 @@
+# Typically that would be added under one of the following paths:
+# - /etc/bash_completion.d
+# - /usr/local/etc/bash_completion.d
+# - /usr/share/bash-completion/completions
+
+complete -C aws_completer aws
diff --git a/aws_zsh_completer.sh b/aws_zsh_completer.sh
new file mode 100644
index 000000000000..c1b2c124477e
--- /dev/null
+++ b/aws_zsh_completer.sh
@@ -0,0 +1,60 @@
+# Source this file to activate auto completion for zsh using the bash
+# compatibility helper. Make sure to run `compinit` before, which should be
+# given usually.
+#
+# % source /path/to/zsh_complete.sh
+#
+# Typically that would be called somewhere in your .zshrc.
+#
+# Note, the overwrite of _bash_complete() is to export COMP_LINE and COMP_POINT
+# That is only required for zsh <= edab1d3dbe61da7efe5f1ac0e40444b2ec9b9570
+#
+# https://github.com/zsh-users/zsh/commit/edab1d3dbe61da7efe5f1ac0e40444b2ec9b9570
+#
+# zsh releases prior to that version do not export the required env variables!
+
+autoload -Uz bashcompinit
+bashcompinit -i
+
+_bash_complete() {
+ local ret=1
+ local -a suf matches
+ local -x COMP_POINT COMP_CWORD
+ local -a COMP_WORDS COMPREPLY BASH_VERSINFO
+ local -x COMP_LINE="$words"
+ local -A savejobstates savejobtexts
+
+ (( COMP_POINT = 1 + ${#${(j. .)words[1,CURRENT]}} + $#QIPREFIX + $#IPREFIX + $#PREFIX ))
+ (( COMP_CWORD = CURRENT - 1))
+ COMP_WORDS=( $words )
+ BASH_VERSINFO=( 2 05b 0 1 release )
+
+ savejobstates=( ${(kv)jobstates} )
+ savejobtexts=( ${(kv)jobtexts} )
+
+ [[ ${argv[${argv[(I)nospace]:-0}-1]} = -o ]] && suf=( -S '' )
+
+ matches=( ${(f)"$(compgen $@ -- ${words[CURRENT]})"} )
+
+ if [[ -n $matches ]]; then
+ if [[ ${argv[${argv[(I)filenames]:-0}-1]} = -o ]]; then
+ compset -P '*/' && matches=( ${matches##*/} )
+ compset -S '/*' && matches=( ${matches%%/*} )
+ compadd -Q -f "${suf[@]}" -a matches && ret=0
+ else
+ compadd -Q "${suf[@]}" -a matches && ret=0
+ fi
+ fi
+
+ if (( ret )); then
+ if [[ ${argv[${argv[(I)default]:-0}-1]} = -o ]]; then
+ _default "${suf[@]}" && ret=0
+ elif [[ ${argv[${argv[(I)dirnames]:-0}-1]} = -o ]]; then
+ _directories "${suf[@]}" && ret=0
+ fi
+ fi
+
+ return ret
+}
+
+complete -C aws_completer aws
diff --git a/keys/pgp/FB5DB77FD5C118B80511ADA8A6310ACC4672475C.asc b/keys/pgp/FB5DB77FD5C118B80511ADA8A6310ACC4672475C.asc
new file mode 100644
index 000000000000..0dcdfccc0bb1
--- /dev/null
+++ b/keys/pgp/FB5DB77FD5C118B80511ADA8A6310ACC4672475C.asc
@@ -0,0 +1,29 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQINBF2Cr7UBEADJZHcgusOJl7ENSyumXh85z0TRV0xJorM2B/JL0kHOyigQluUG
+ZMLhENaG0bYatdrKP+3H91lvK050pXwnO/R7fB/FSTouki4ciIx5OuLlnJZIxSzx
+PqGl0mkxImLNbGWoi6Lto0LYxqHN2iQtzlwTVmq9733zd3XfcXrZ3+LblHAgEt5G
+TfNxEKJ8soPLyWmwDH6HWCnjZ/aIQRBTIQ05uVeEoYxSh6wOai7ss/KveoSNBbYz
+gbdzoqI2Y8cgH2nbfgp3DSasaLZEdCSsIsK1u05CinE7k2qZ7KgKAUIcT/cR/grk
+C6VwsnDU0OUCideXcQ8WeHutqvgZH1JgKDbznoIzeQHJD238GEu+eKhRHcz8/jeG
+94zkcgJOz3KbZGYMiTh277Fvj9zzvZsbMBCedV1BTg3TqgvdX4bdkhf5cH+7NtWO
+lrFj6UwAsGukBTAOxC0l/dnSmZhJ7Z1KmEWilro/gOrjtOxqRQutlIqG22TaqoPG
+fYVN+en3Zwbt97kcgZDwqbuykNt64oZWc4XKCa3mprEGC3IbJTBFqglXmZ7l9ywG
+EEUJYOlb2XrSuPWml39beWdKM8kzr1OjnlOm6+lpTRCBfo0wa9F8YZRhHPAkwKkX
+XDeOGpWRj4ohOx0d2GWkyV5xyN14p2tQOCdOODmz80yUTgRpPVQUtOEhXQARAQAB
+tCFBV1MgQ0xJIFRlYW0gPGF3cy1jbGlAYW1hem9uLmNvbT6JAlQEEwEIAD4CGwMF
+Cw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