Date: Saturday, April 8, 2023 @ 11:08:06
Author: seblu
Revision: 1442296
archrelease: copy trunk to community-x86_64
Added:
scaleway-cli/repos/community-x86_64/0001-Disable-version-check-and-error-reporting.patch
(from rev 1442295,
scaleway-cli/trunk/0001-Disable-version-check-and-error-reporting.patch)
scaleway-cli/repos/community-x86_64/PKGBUILD
(from rev 1442295, scaleway-cli/trunk/PKGBUILD)
Deleted:
scaleway-cli/repos/community-x86_64/0001-Disable-online-version-check.patch
scaleway-cli/repos/community-x86_64/PKGBUILD
------------------------------------------------------+
0001-Disable-online-version-check.patch | 24 --
0001-Disable-version-check-and-error-reporting.patch | 35 ++++
PKGBUILD | 148 ++++++++---------
3 files changed, 109 insertions(+), 98 deletions(-)
Deleted: 0001-Disable-online-version-check.patch
===================================================================
--- 0001-Disable-online-version-check.patch 2023-04-08 11:07:56 UTC (rev
1442295)
+++ 0001-Disable-online-version-check.patch 2023-04-08 11:08:06 UTC (rev
1442296)
@@ -1,24 +0,0 @@
-From 06d7914bd5da89335c95793a3bc1903675f7a3b8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= <[email protected]>
-Date: Sat, 8 Oct 2022 17:31:34 +0200
-Subject: [PATCH] Disable online version check
-
----
- internal/core/build_info.go | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/internal/core/build_info.go b/internal/core/build_info.go
-index c3f7799e..be80db7d 100644
---- a/internal/core/build_info.go
-+++ b/internal/core/build_info.go
-@@ -57,6 +57,7 @@ func (b *BuildInfo) GetUserAgent() string {
- }
-
- func (b *BuildInfo) checkVersion(ctx context.Context) {
-+ return
- if !b.IsRelease() || ExtractEnv(ctx, scwDisableCheckVersionEnv) ==
"true" {
- ExtractLogger(ctx).Debug("skipping check version")
- return
---
-2.37.3
-
Copied:
scaleway-cli/repos/community-x86_64/0001-Disable-version-check-and-error-reporting.patch
(from rev 1442295,
scaleway-cli/trunk/0001-Disable-version-check-and-error-reporting.patch)
===================================================================
--- 0001-Disable-version-check-and-error-reporting.patch
(rev 0)
+++ 0001-Disable-version-check-and-error-reporting.patch 2023-04-08
11:08:06 UTC (rev 1442296)
@@ -0,0 +1,35 @@
+From 9d5627266d23ba41f98de72ffcdaa6a8a922d263 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= <[email protected]>
+Date: Sat, 8 Apr 2023 12:57:52 +0200
+Subject: [PATCH] Disable version check and error reporting
+
+We do not want version to be checked by default, this is the job of pacman.
+We do not want either have errors pushed to Scaleway sentry without proper
+opt-in.
+In order to avoid that we declare ourself has a non official release.
+---
+ internal/core/build_info.go | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/internal/core/build_info.go b/internal/core/build_info.go
+index ad00e83e..31192891 100644
+--- a/internal/core/build_info.go
++++ b/internal/core/build_info.go
+@@ -43,10 +43,11 @@ const (
+ )
+
+ // IsRelease returns true when the version of the CLI is an official release:
+-// - version must be non-empty (exclude tests)
+-// - version must not contain metadata (e.g. '+dev')
++// Arch Linux release always returns false here in order to:
++// - Disable online version check. This is package manager job.
++// - Mandatory error reporting to Scaleway.
+ func (b *BuildInfo) IsRelease() bool {
+- return b.Version != nil && b.Version.Metadata() == ""
++ return false
+ }
+
+ func (b *BuildInfo) GetUserAgent() string {
+--
+2.40.0
+
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2023-04-08 11:07:56 UTC (rev 1442295)
+++ PKGBUILD 2023-04-08 11:08:06 UTC (rev 1442296)
@@ -1,74 +0,0 @@
-# Maintainer: Sébastien Luttringer
-# Contributor: Patrik Cyvoct <patrik at ptrk dot io>
-# Contributor: Mikkel Oscar Lyderik <mikkeloscar at gmail dot com>
-
-pkgname=scaleway-cli
-pkgver=2.13.0
-pkgrel=1
-pkgdesc='Command line interface for Scaleway Cloud'
-arch=('x86_64')
-url='https://www.scaleway.com/en/cli/'
-license=('Apache')
-depends=('glibc')
-options=(!debug)
-makedepends=('go' 'git')
-source=("git+https://github.com/scaleway/scaleway-cli.git#tag=v$pkgver"
- '0001-Disable-online-version-check.patch')
-sha256sums=('SKIP'
- '04ad12a62aa7e9e80707a809e8a800c4b706475fa86a461d99f6791df92b0d2c')
-
-prepare() {
- cd $pkgname
- # apply patch from the source array (should be a pacman feature)
- local src
- for src in "${source[@]}"; do
- src="${src%%::*}"
- src="${src##*/}"
- [[ $src = *.patch ]] || continue
- echo "Applying patch $src..."
- patch -Np1 < "../$src"
- done
- # remove online check tests
- rm -vf internal/core/build_info_test.go
- :
-}
-
-build() {
- cd $pkgname
- export CGO_CPPFLAGS="$CPPFLAGS"
- export CGO_CFLAGS="$CFLAGS"
- export CGO_CXXFLAGS="$CXXFLAGS"
- export CGO_LDFLAGS="$LDFLAGS"
- go build \
- -buildmode=pie \
- -trimpath \
- -mod=readonly \
- -modcacherw \
- -ldflags "-linkmode external -extldflags \"${LDFLAGS}\" -X
main.Version=$pkgver-$pkgrel -X main.BuildDate=$(date -u
'+%Y-%m-%dT%I:%M:%S%p')" \
- -o scw ./cmd/scw/main.go
- PATH=. scw autocomplete script shell=zsh > zshcomp
- PATH=. scw autocomplete script shell=bash > bashcomp
-}
-
-check() {
- cd $pkgname
- export CGO_CPPFLAGS="$CPPFLAGS"
- export CGO_CFLAGS="$CFLAGS"
- export CGO_CXXFLAGS="$CXXFLAGS"
- export CGO_LDFLAGS="$LDFLAGS"
- go test ./... \
- -buildmode=pie \
- -trimpath \
- -mod=readonly \
- -modcacherw \
- -ldflags "-linkmode external -extldflags \"${LDFLAGS}\" -X
main.Version=$pkgver-$pkgrel -X main.BuildDate=$(date -u
'+%Y-%m-%dT%I:%M:%S%p')"
-}
-
-package() {
- cd $pkgname
- install -Dm755 scw "$pkgdir"/usr/bin/scw
- install -Dm644 bashcomp "$pkgdir"/usr/share/bash-completion/completions/scw
- install -Dm644 zshcomp "$pkgdir"/usr/share/zsh/site-functions/_scw
-}
-
-# vim:set ts=2 sw=2 ft=PKGBUILD et:
Copied: scaleway-cli/repos/community-x86_64/PKGBUILD (from rev 1442295,
scaleway-cli/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2023-04-08 11:08:06 UTC (rev 1442296)
@@ -0,0 +1,74 @@
+# Maintainer: Sébastien Luttringer
+# Contributor: Patrik Cyvoct <patrik at ptrk dot io>
+# Contributor: Mikkel Oscar Lyderik <mikkeloscar at gmail dot com>
+
+pkgname=scaleway-cli
+pkgver=2.14.0
+pkgrel=1
+pkgdesc='Command line interface for Scaleway Cloud'
+arch=('x86_64')
+url='https://www.scaleway.com/en/cli/'
+license=('Apache')
+depends=('glibc')
+options=(!debug)
+makedepends=('go' 'git')
+source=("git+https://github.com/scaleway/scaleway-cli.git#tag=v$pkgver"
+ '0001-Disable-version-check-and-error-reporting.patch')
+sha256sums=('SKIP'
+ '86729f02b9da43d651eb099a040ba9a6c7c35e38730296b05163058b768a5730')
+
+prepare() {
+ cd $pkgname
+ # apply patch from the source array (should be a pacman feature)
+ local src
+ for src in "${source[@]}"; do
+ src="${src%%::*}"
+ src="${src##*/}"
+ [[ $src = *.patch ]] || continue
+ echo "Applying patch $src..."
+ patch -Np1 < "../$src"
+ done
+ # remove online check tests
+ rm -vf internal/core/build_info_test.go
+ :
+}
+
+build() {
+ cd $pkgname
+ export CGO_CPPFLAGS="$CPPFLAGS"
+ export CGO_CFLAGS="$CFLAGS"
+ export CGO_CXXFLAGS="$CXXFLAGS"
+ export CGO_LDFLAGS="$LDFLAGS"
+ go build \
+ -buildmode=pie \
+ -trimpath \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-linkmode external -extldflags \"${LDFLAGS}\" -X
main.Version=$pkgver-$pkgrel -X main.BuildDate=$(date -u
'+%Y-%m-%dT%I:%M:%S%p')" \
+ -o scw ./cmd/scw/main.go
+ PATH=. scw autocomplete script shell=zsh > zshcomp
+ PATH=. scw autocomplete script shell=bash > bashcomp
+}
+
+check() {
+ cd $pkgname
+ export CGO_CPPFLAGS="$CPPFLAGS"
+ export CGO_CFLAGS="$CFLAGS"
+ export CGO_CXXFLAGS="$CXXFLAGS"
+ export CGO_LDFLAGS="$LDFLAGS"
+ go test ./... \
+ -buildmode=pie \
+ -trimpath \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-linkmode external -extldflags \"${LDFLAGS}\" -X
main.Version=$pkgver-$pkgrel -X main.BuildDate=$(date -u
'+%Y-%m-%dT%I:%M:%S%p')"
+}
+
+package() {
+ cd $pkgname
+ install -Dm755 scw "$pkgdir"/usr/bin/scw
+ install -Dm644 bashcomp "$pkgdir"/usr/share/bash-completion/completions/scw
+ install -Dm644 zshcomp "$pkgdir"/usr/share/zsh/site-functions/_scw
+}
+
+# vim:set ts=2 sw=2 ft=PKGBUILD et: