mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 20:06:43 +02:00
parent
0439d4fae1
commit
0737b13e59
44
testing/kopia/APKBUILD
Normal file
44
testing/kopia/APKBUILD
Normal file
@ -0,0 +1,44 @@
|
||||
# Contributor: Michał Polański <michal@polanski.me>
|
||||
# Maintainer: Michał Polański <michal@polanski.me>
|
||||
pkgname=kopia
|
||||
pkgver=0.9.5
|
||||
pkgrel=0
|
||||
pkgdesc="Fast and secure backup tool"
|
||||
url="https://kopia.io/"
|
||||
license="Apache-2.0"
|
||||
arch="all !armhf !armv7 !x86" # tests fail with out of memory error
|
||||
makedepends="go"
|
||||
subpackages="$pkgname-bash-completion $pkgname-zsh-completion"
|
||||
checkdepends="openssh-keygen"
|
||||
source="https://github.com/kopia/kopia/archive/v$pkgver/kopia-$pkgver.tar.gz
|
||||
skip-docker-tests.patch
|
||||
fix-arch.patch
|
||||
"
|
||||
|
||||
export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw"
|
||||
export GOPATH="$srcdir"
|
||||
export CGO_ENABLED=0
|
||||
|
||||
build() {
|
||||
go build -ldflags "-s -w -X github.com/kopia/kopia/repo.BuildVersion=$pkgver"
|
||||
|
||||
./kopia --completion-script-bash > $pkgname.bash
|
||||
./kopia --completion-script-zsh > $pkgname.zsh
|
||||
}
|
||||
|
||||
check() {
|
||||
go test -tags testing ./...
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm755 kopia "$pkgdir"/usr/bin/kopia
|
||||
|
||||
install -Dm644 $pkgname.bash "$pkgdir"/usr/share/bash-completion/completions/$pkgname
|
||||
install -Dm644 $pkgname.zsh "$pkgdir"/usr/share/zsh/site-functions/_$pkgname
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
817375d81fa0bb540ccb500965a809e922d4f251d888d035d547be3d6ad7ac4a0f2a31bd50017da11103aa60184fb6a03856374ac3e9d55248a26ccbde57715b kopia-0.9.5.tar.gz
|
||||
6c1c8ca52d83c940c561f11adc18298147882b709810edd8c6560c8988ff1bd30dae2adba4c18055d283e7c2c655a6c6f10c3951829826d6fe5eea20c8cb821d skip-docker-tests.patch
|
||||
9d7ceb3018264680845b563c03a22d1a5919a317b1149bd45fd4d5ffd944787e0b33356ce43d71836e7d41a1b53ce1db85964d681fb7b7003c7e9897146153db fix-arch.patch
|
||||
"
|
||||
31
testing/kopia/fix-arch.patch
Normal file
31
testing/kopia/fix-arch.patch
Normal file
@ -0,0 +1,31 @@
|
||||
Waiting for feedback on a similar pull request:
|
||||
https://github.com/kopia/kopia/pull/1183
|
||||
|
||||
diff --git a/fs/localfs/local_fs_32bit.go b/fs/localfs/local_fs_32bit.go
|
||||
index 3c0763d5..f0cd28a4 100644
|
||||
--- a/fs/localfs/local_fs_32bit.go
|
||||
+++ b/fs/localfs/local_fs_32bit.go
|
||||
@@ -1,6 +1,6 @@
|
||||
-//go:build !windows && ((!amd64 && !arm64 && !arm) || darwin || openbsd)
|
||||
+//go:build !windows && ((!amd64 && !arm64 && !arm && !ppc64le && !s390x && !386) || darwin || openbsd)
|
||||
// +build !windows
|
||||
-// +build !amd64,!arm64,!arm darwin openbsd
|
||||
+// +build !amd64,!arm64,!arm,!ppc64le,!s390x,!386 darwin openbsd
|
||||
|
||||
package localfs
|
||||
|
||||
diff --git a/fs/localfs/local_fs_64bit.go b/fs/localfs/local_fs_64bit.go
|
||||
index b3ca663b..e980d371 100644
|
||||
--- a/fs/localfs/local_fs_64bit.go
|
||||
+++ b/fs/localfs/local_fs_64bit.go
|
||||
@@ -1,8 +1,8 @@
|
||||
-//go:build !windows && !openbsd && !darwin && (amd64 || arm64 || arm)
|
||||
+//go:build !windows && !openbsd && !darwin && (amd64 || arm64 || arm || ppc64le || s390x || 386)
|
||||
// +build !windows
|
||||
// +build !openbsd
|
||||
// +build !darwin
|
||||
-// +build amd64 arm64 arm
|
||||
+// +build amd64 arm64 arm ppc64le s390x 386
|
||||
|
||||
package localfs
|
||||
|
||||
13
testing/kopia/skip-docker-tests.patch
Normal file
13
testing/kopia/skip-docker-tests.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/internal/testutil/dockertestutil.go b/internal/testutil/dockertestutil.go
|
||||
index 9f5fa2f6..b5570f85 100644
|
||||
--- a/internal/testutil/dockertestutil.go
|
||||
+++ b/internal/testutil/dockertestutil.go
|
||||
@@ -12,6 +12,8 @@
|
||||
// RunDockerAndGetOutputOrSkip runs Docker and returns the output as a string.
|
||||
func RunDockerAndGetOutputOrSkip(tb testing.TB, args ...string) string {
|
||||
tb.Helper()
|
||||
+ tb.Skip("skipping test that runs docker...")
|
||||
+
|
||||
tb.Logf("running docker %v", args)
|
||||
|
||||
c := exec.Command("docker", args...)
|
||||
Loading…
x
Reference in New Issue
Block a user