aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/shfmt/APKBUILD8
-rw-r--r--community/shfmt/fix-tests-32bit.patch87
2 files changed, 3 insertions, 92 deletions
diff --git a/community/shfmt/APKBUILD b/community/shfmt/APKBUILD
index c46e0407dd..08663283df 100644
--- a/community/shfmt/APKBUILD
+++ b/community/shfmt/APKBUILD
@@ -1,15 +1,14 @@
# Contributor: Olliver Schinagl <oliver@schinagl.nl>
# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
pkgname=shfmt
-pkgver=3.1.1
+pkgver=3.1.2
pkgrel=0
pkgdesc="A shell parser, formatter, and interpreter (sh/bash/mksh)"
url="https://mvdan.cc/sh"
arch="all"
license="BSD-3-Clause"
makedepends="go"
-source="$pkgname-$pkgver.tar.gz::https://github.com/mvdan/sh/archive/v$pkgver.tar.gz
- fix-tests-32bit.patch"
+source="$pkgname-$pkgver.tar.gz::https://github.com/mvdan/sh/archive/v$pkgver.tar.gz"
builddir="$srcdir/sh-$pkgver"
build() {
@@ -27,5 +26,4 @@ package() {
install -Dm755 shfmt "$pkgdir"/usr/bin/shfmt
}
-sha512sums="3cfca494b1c3d87b7b5cf6435909637ee6e15147fe35a1f628a1c9f127c884efa4aae9e2e1dec989ff6a32cbad08cea925c6c427f9fe7ebe41333326d1ea747c shfmt-3.1.1.tar.gz
-dcf910ee55f41a4b14ff78554103a8913820315975246bb2ba387a3ae872cbda4ec5082741e3bde8161daa1a61ef3c419f26db35c26d8a75d69803b3ab63352b fix-tests-32bit.patch"
+sha512sums="6e367a7a05c5e18d6de7f822ef181443b22d05f94a5fe5a0cf4759bc1e4a07dfac0e2704eb3025868e0f44c0e04a9cbd28dfe5a977381b2ba6fe274ac97ef29a shfmt-3.1.2.tar.gz"
diff --git a/community/shfmt/fix-tests-32bit.patch b/community/shfmt/fix-tests-32bit.patch
deleted file mode 100644
index b2e143a535..0000000000
--- a/community/shfmt/fix-tests-32bit.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 1fc115c28c80db7d0af25b87bdb35811ef7e10a3 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Daniel=20Mart=C3=AD?= <mvdan@mvdan.cc>
-Date: Sat, 23 May 2020 21:35:38 +0100
-Subject: [PATCH] interp: fix tests on 32-bit architectures
-
-Three test cases assumed 64-bit integer sizes. Fix that, and make sure
-that our amd64 CI runners also test with GOARCH=386, to catch such
-future mistakes.
-
-While at it, update the alpine image version for CI.
-
-Fixes #571.
----
- .github/workflows/test.yml | 5 ++++-
- interp/interp_test.go | 17 +++++++++++++----
- 2 files changed, 17 insertions(+), 5 deletions(-)
-
-diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
-index 166d9018..1d1375ea 100644
---- a/.github/workflows/test.yml
-+++ b/.github/workflows/test.yml
-@@ -21,6 +21,9 @@ jobs:
- - name: Test with -short -race
- run: go test -short -race -count=1 ./...
-
-+ - name: Test with GOARCH=386
-+ run: GOARCH=386 go test -count=1 ./...
-+ if: matrix.platform == 'ubuntu-latest'
- - name: gofmt check
- run: diff <(echo -n) <(gofmt -d .)
- if: matrix.platform == 'ubuntu-latest'
-@@ -31,7 +34,7 @@ jobs:
- - name: Checkout code
- uses: actions/checkout@v2
- - name: Test as root, without cgo, and with busybox
-- run: docker run -v="$PWD:/pwd" -w=/pwd -e=CGO_ENABLED=0 golang:1.14.1-alpine go test ./...
-+ run: docker run -v="$PWD:/pwd" -w=/pwd -e=CGO_ENABLED=0 golang:1.14.3-alpine go test ./...
-
- fuzz:
- runs-on: ubuntu-latest
-diff --git a/interp/interp_test.go b/interp/interp_test.go
-index 9b4d43e2..52589281 100644
---- a/interp/interp_test.go
-+++ b/interp/interp_test.go
-@@ -9,6 +9,7 @@ import (
- "fmt"
- "io"
- "io/ioutil"
-+ "math/bits"
- "os"
- "os/exec"
- "path/filepath"
-@@ -269,9 +270,6 @@ var runTests = []runTest{
- {"printf %d,%i 3 4", "3,4"},
- {"printf %d", "0"},
- {"printf %d,%d 010 0x10", "8,16"},
-- {"printf %i,%u -3 -3", "-3,18446744073709551613"},
-- {"printf %o -3", "1777777777777777777775"},
-- {"printf %x -3", "fffffffffffffffd"},
- {"printf %c,%c,%c foo àa", "f,\xc3,\x00"}, // TODO: use a rune?
- {"printf %3s a", " a"},
- {"printf %3i 1", " 1"},
-@@ -2624,12 +2622,23 @@ var runTestsWindows = []runTest{
- {"cmd() { :; }; command cmd /c 'echo foo'", "foo\r\n"},
- }
-
-+// These tests are specific to 64-bit architectures, and that's fine. We don't
-+// need to add explicit versions for 32-bit.
-+var runTests64bit = []runTest{
-+ {"printf %i,%u -3 -3", "-3,18446744073709551613"},
-+ {"printf %o -3", "1777777777777777777775"},
-+ {"printf %x -3", "fffffffffffffffd"},
-+}
-+
- func init() {
- if runtime.GOOS == "windows" {
- runTests = append(runTests, runTestsWindows...)
-- } else {
-+ } else { // Unix-y
- runTests = append(runTests, runTestsUnix...)
- }
-+ if bits.UintSize == 64 {
-+ runTests = append(runTests, runTests64bit...)
-+ }
- }
-
- // ln -s: wine doesn't implement symlinks; see https://bugs.winehq.org/show_bug.cgi?id=44948