Package Details: aws-sam-cli-bin 1.72.0-1

Git Clone URL: https://aur.archlinux.org/aws-sam-cli-bin.git (read-only, click to copy)
Package Base: aws-sam-cli-bin
Description: CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM
Upstream URL: https://github.com/aws/aws-sam-cli
Licenses: Apache
Conflicts: aws-sam-cli
Provides: aws-sam-cli
Submitter: aksel
Maintainer: kstolp
Last Packager: kstolp
Votes: 3
Popularity: 0.014291
First Submitted: 2021-02-16 11:00 (UTC)
Last Updated: 2023-02-03 08:42 (UTC)

Latest Comments

aksel commented on 2022-02-23 13:13 (UTC)

Thanks again - right you are. Fixed

ribugent commented on 2022-02-23 13:07 (UTC) (edited on 2022-02-23 13:10 (UTC) by ribugent)

Thanks for the update, but there's an small issue, the /usr/bin/sam symlink is pointing to the build cache

$ ls -l /usr/bin/sam
lrwxrwxrwx 1 root root 95 23 de febr. 13:58 /usr/bin/sam -> /home/ribu/.cache/yay/aws-sam-cli-bin/pkg/aws-sam-cli-bin/usr/share/aws-sam-cli/1.38.1/dist/sam

Here's the change to fix it:

diff --git a/PKGBUILD b/PKGBUILD
index cc6b3f7..12606e3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@

 pkgname=aws-sam-cli-bin
 pkgver=1.38.1
-pkgrel=2
+pkgrel=3
 pkgdesc="CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM"
 arch=("x86_64")
 url="https://github.com/aws/aws-sam-cli"
@@ -18,5 +18,5 @@ package() {
   $srcdir/install -i "$pkgdir/usr/share/aws-sam-cli" -b "$pkgdir/usr/bin" >/dev/null

   # symlink the binary
-  ln -sf "$pkgdir/usr/share/aws-sam-cli/$pkgver/dist/sam" "$pkgdir/usr/bin/sam"
+  ln -sf "/usr/share/aws-sam-cli/$pkgver/dist/sam" "$pkgdir/usr/bin/sam"
 }

Regarding your question /usr/local is more like intended for installing files by the admin, outside of the package manager, and since we're packaging it and then installing it, it's not the use case.

The symlink part you're right, for on symlink currently it's the best choice.

Thanks

aksel commented on 2022-02-23 12:58 (UTC)

Thanks for helping out!

I've updated it accordingly.

I didn't use the entirety of the package script. I am not sure the looping makes sense for this package, as there's only a single bin (sam) relevant, right?

Also, can you elaborate a bit on why /usr/local is not appropriate for this? It's a bit confusing to me, to be honest.

ribugent commented on 2022-02-23 07:46 (UTC) (edited on 2022-02-23 12:55 (UTC) by ribugent)

Hi

today updating I had issues because sha256 didn't validate, so I've opened and I found the following issues:

  • The downloaded file name does not change on every release, this is the reason why the sha256 sum fails
  • The arch is any and must be x86_64 because it includes binaries too
  • Installs the package contents in /usr/local and this location is for other purposes.

I've fixed the issues and you can find the updated version at https://gist.github.com/ribugent/653d48a441b6b75239b7e799dcdfe8ec

Some of changes(the install part) have been borrowed and adapted from aws-cli-v2-bin PKGBUILD

Hope this helps

aksel commented on 2022-01-20 08:09 (UTC)

Yeah it's because I'm an idiot, and I can't figure out how to package this properly.

If you're doing a clean build, it'll work.

If anyone can debug this, I'm all ears.

rafaeldelboni commented on 2022-01-17 13:01 (UTC)

I'm getting the following error in version v1.37.0:

==> Validating source files with sha256sums...
    aws-sam-cli-linux-x86_64.zip ... FAILED
==> ERROR: One or more files did not pass the validity check!
 -> error making: aws-sam-cli-bin