From: 0xdeadbad <0xdeadbad@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: infisical 0.14.2
Date: Sat, 14 Oct 2023 17:32:25 +0200 [thread overview]
Message-ID: <20231014153225.9bgazzWFV6G1PPsv8fesJyxXtO9ybukhtVK63ZFD00Q@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-46653@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1198 bytes --]
There is an updated pull request by 0xdeadbad against master on the void-packages repository
https://github.com/0xdeadbad/void-packages infisical
https://github.com/void-linux/void-packages/pull/46653
New package: infisical 0.14.2
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-glibc
A patch file from https://github.com/void-linux/void-packages/pull/46653.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-infisical-46653.patch --]
[-- Type: text/x-diff, Size: 9335 bytes --]
From 50eae55ae6fe2d7ca8842839a21cf2404e14e5cf Mon Sep 17 00:00:00 2001
From: Matheus Garcias <matheus.dasilva.garcias@gmail.com>
Date: Fri, 13 Oct 2023 07:36:17 -0300
Subject: [PATCH 1/4] New package: infisical 0.14.2
---
srcpkgs/infisical/patches/fix_login..go.patch | 11 ++++
srcpkgs/infisical/template | 54 +++++++++++++++++++
2 files changed, 65 insertions(+)
create mode 100644 srcpkgs/infisical/patches/fix_login..go.patch
create mode 100644 srcpkgs/infisical/template
diff --git a/srcpkgs/infisical/patches/fix_login..go.patch b/srcpkgs/infisical/patches/fix_login..go.patch
new file mode 100644
index 0000000000000..39d05f4f62bac
--- /dev/null
+++ b/srcpkgs/infisical/patches/fix_login..go.patch
@@ -0,0 +1,11 @@
+--- a/packages/cmd/login.go 2023-10-13 03:18:59.436901696 -0300
++++ b/packages/cmd/login.go 2023-10-13 03:23:37.911320438 -0300
+@@ -117,7 +117,7 @@
+
+ err = util.StoreUserCredsInKeyRing(&userCredentialsToBeStored)
+ if err != nil {
+- log.Error().Msgf("Unable to store your credentials in system vault [%s]")
++ log.Error().Msgf("Unable to store your credentials in system vault [%s]", err.Error())
+ log.Error().Msgf("\nTo trouble shoot further, read https://infisical.com/docs/cli/faq")
+ log.Debug().Err(err)
+ //return here
diff --git a/srcpkgs/infisical/template b/srcpkgs/infisical/template
new file mode 100644
index 0000000000000..5f7ddd57399e7
--- /dev/null
+++ b/srcpkgs/infisical/template
@@ -0,0 +1,54 @@
+# Template file for 'infisical'
+pkgname=infisical
+version=0.14.2
+revision=1
+archs="x86_64 aarch64"
+create_wrksrc=true
+makedepends="go wget tar"
+checkdepends="go git"
+short_desc="CLI tool for infisical, an open-source secret management platform"
+maintainer="Matheus Garcias <matheus.dasilva.garcias@gmail.com>"
+license="MIT"
+homepage="https://infisical.com"
+distfiles="https://github.com/Infisical/infisical/archive/refs/tags/infisical-cli/v${version}.tar.gz"
+checksum=313caf8d4e6ca5fd88d4f2adf72c721958d602404b6f80611a78a2f757d993f1
+fetch_cmd="wget"
+nopie=true
+XBPS_CHECK_PKGS=true
+
+unset build_style
+
+function do_extract() {
+ tar -xvzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/v${version}.tar.gz \
+ --strip-components=2 \
+ infisical-infisical-cli-v${version}/cli
+}
+
+function do_build() {
+ go build \
+ -o infisical \
+ --ldflags="-X \"github.com/Infisical/infisical-merge/packages/util.CLI_VERSION=${version}\"" \
+ ${XBPS_BUILDDIR}/${pkgname}-${version}
+}
+
+function do_check() {
+ [ "$(./infisical --version)" = "infisical version ${version}" ] || return 1
+ go test github.com/Infisical/infisical-merge/packages/cmd
+ go test github.com/Infisical/infisical-merge/report
+ go test github.com/Infisical/infisical-merge/config
+ go test github.com/Infisical/infisical-merge/detect
+}
+
+function do_install() {
+ vbin infisical
+}
+
+function post_install() {
+ go run . man | gzip -c > "infisical.1.gz"
+ vman "infisical.1.gz"
+
+ for sh in bash zsh fish; do
+ go run . completion "$sh" > "infisical.$sh"
+ vcompletion "infisical.$sh" "$sh"
+ done
+}
\ No newline at end of file
From 68d6ffd6746f5624b737838198ad57c7ece77ec3 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 13 Oct 2023 13:16:27 -0400
Subject: [PATCH 2/4] fixup! New package: infisical 0.14.2
Signed-off-by: Matheus Garcias <matheus.dasilva.garcias@gmail.com>
---
srcpkgs/infisical/patches/fix_login..go.patch | 4 +-
srcpkgs/infisical/template | 58 ++++++-------------
2 files changed, 21 insertions(+), 41 deletions(-)
diff --git a/srcpkgs/infisical/patches/fix_login..go.patch b/srcpkgs/infisical/patches/fix_login..go.patch
index 39d05f4f62bac..90bcc9ba20b9f 100644
--- a/srcpkgs/infisical/patches/fix_login..go.patch
+++ b/srcpkgs/infisical/patches/fix_login..go.patch
@@ -1,5 +1,5 @@
---- a/packages/cmd/login.go 2023-10-13 03:18:59.436901696 -0300
-+++ b/packages/cmd/login.go 2023-10-13 03:23:37.911320438 -0300
+--- a/cli/packages/cmd/login.go 2023-10-13 03:18:59.436901696 -0300
++++ b/cli/packages/cmd/login.go 2023-10-13 03:23:37.911320438 -0300
@@ -117,7 +117,7 @@
err = util.StoreUserCredsInKeyRing(&userCredentialsToBeStored)
diff --git a/srcpkgs/infisical/template b/srcpkgs/infisical/template
index 5f7ddd57399e7..5ee034221e585 100644
--- a/srcpkgs/infisical/template
+++ b/srcpkgs/infisical/template
@@ -2,53 +2,33 @@
pkgname=infisical
version=0.14.2
revision=1
-archs="x86_64 aarch64"
-create_wrksrc=true
-makedepends="go wget tar"
-checkdepends="go git"
-short_desc="CLI tool for infisical, an open-source secret management platform"
+build_style=go
+build_helper="qemu"
+build_wrksrc="cli"
+go_import_path="github.com/Infisical/infisical-merge"
+go_ldflags="-X github.com/Infisical/infisical-merge/packages/util.CLI_VERSION=${version}"
+checkdepends="git"
+short_desc="Open-source secret management platform (CLI)"
maintainer="Matheus Garcias <matheus.dasilva.garcias@gmail.com>"
license="MIT"
homepage="https://infisical.com"
distfiles="https://github.com/Infisical/infisical/archive/refs/tags/infisical-cli/v${version}.tar.gz"
checksum=313caf8d4e6ca5fd88d4f2adf72c721958d602404b6f80611a78a2f757d993f1
-fetch_cmd="wget"
-nopie=true
-XBPS_CHECK_PKGS=true
-unset build_style
-
-function do_extract() {
- tar -xvzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/v${version}.tar.gz \
- --strip-components=2 \
- infisical-infisical-cli-v${version}/cli
-}
-
-function do_build() {
- go build \
- -o infisical \
- --ldflags="-X \"github.com/Infisical/infisical-merge/packages/util.CLI_VERSION=${version}\"" \
- ${XBPS_BUILDDIR}/${pkgname}-${version}
+do_check() {
+ go test ./...
}
-function do_check() {
- [ "$(./infisical --version)" = "infisical version ${version}" ] || return 1
- go test github.com/Infisical/infisical-merge/packages/cmd
- go test github.com/Infisical/infisical-merge/report
- go test github.com/Infisical/infisical-merge/config
- go test github.com/Infisical/infisical-merge/detect
-}
+post_install() {
+ mv "${DESTDIR}"/usr/bin/infisical-merge "${DESTDIR}"/usr/bin/infisical
-function do_install() {
- vbin infisical
-}
+ go run . man > infisical.1
+ vman infisical.1
-function post_install() {
- go run . man | gzip -c > "infisical.1.gz"
- vman "infisical.1.gz"
+ for sh in bash zsh fish; do
+ go run . completion "$sh" > "infisical.$sh"
+ vcompletion "infisical.$sh" "$sh"
+ done
- for sh in bash zsh fish; do
- go run . completion "$sh" > "infisical.$sh"
- vcompletion "infisical.$sh" "$sh"
- done
-}
\ No newline at end of file
+ vlicense "${wrksrc}"/LICENSE
+}
From fb6e2ad9e2c8ab28ba90ec14c4aadcd581b718da Mon Sep 17 00:00:00 2001
From: Matheus Garcias <matheus.dasilva.garcias@gmail.com>
Date: Sat, 14 Oct 2023 00:25:20 -0300
Subject: [PATCH 3/4] fix: use vtargetrun for cross-compile
---
srcpkgs/infisical/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/infisical/template b/srcpkgs/infisical/template
index 5ee034221e585..3c194ab788f45 100644
--- a/srcpkgs/infisical/template
+++ b/srcpkgs/infisical/template
@@ -22,11 +22,11 @@ do_check() {
post_install() {
mv "${DESTDIR}"/usr/bin/infisical-merge "${DESTDIR}"/usr/bin/infisical
- go run . man > infisical.1
+ vtargetrun "${DESTDIR}"/usr/bin/infisical man > infisical.1
vman infisical.1
for sh in bash zsh fish; do
- go run . completion "$sh" > "infisical.$sh"
+ vtargetrun "${DESTDIR}"/usr/bin/infisical completion "$sh" > "infisical.$sh"
vcompletion "infisical.$sh" "$sh"
done
From 2d75e83e4043621d517c1b0caad9fd7c7a425032 Mon Sep 17 00:00:00 2001
From: Matheus Garcias <matheus.dasilva.garcias@gmail.com>
Date: Sat, 14 Oct 2023 12:31:56 -0300
Subject: [PATCH 4/4] [PATCH] default telemetry to false Co-authored-by:
chrysos349 <chrysostom349@gmail.com>
---
srcpkgs/infisical/patches/notelemetry_root..go.patch | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 srcpkgs/infisical/patches/notelemetry_root..go.patch
diff --git a/srcpkgs/infisical/patches/notelemetry_root..go.patch b/srcpkgs/infisical/patches/notelemetry_root..go.patch
new file mode 100644
index 0000000000000..203d72a6fbc69
--- /dev/null
+++ b/srcpkgs/infisical/patches/notelemetry_root..go.patch
@@ -0,0 +1,11 @@
+--- a/cli/packages/cmd/root.go
++++ b/cli/packages/cmd/root.go
+@@ -38,7 +38,7 @@ func Execute() {
+ func init() {
+ cobra.OnInitialize(initLog)
+ rootCmd.PersistentFlags().StringP("log-level", "l", "info", "log level (trace, debug, info, warn, error, fatal)")
+- rootCmd.PersistentFlags().Bool("telemetry", true, "Infisical collects non-sensitive telemetry data to enhance features and improve user experience. Participation is voluntary")
++ rootCmd.PersistentFlags().Bool("telemetry", false, "Infisical collects non-sensitive telemetry data to enhance features and improve user experience. Participation is voluntary")
+ rootCmd.PersistentFlags().StringVar(&config.INFISICAL_URL, "domain", util.INFISICAL_DEFAULT_API_URL, "Point the CLI to your own backend [can also set via environment variable name: INFISICAL_API_URL]")
+ rootCmd.PersistentPreRun = func(cmd *cobra.Command, args []string) {
+ if !util.IsRunningInDocker() {
next prev parent reply other threads:[~2023-10-14 15:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 11:45 [PR PATCH] " 0xdeadbad
2023-10-13 16:50 ` 0xdeadbad
2023-10-13 17:21 ` classabbyamp
2023-10-14 2:40 ` [PR PATCH] [Updated] " 0xdeadbad
2023-10-14 2:58 ` classabbyamp
2023-10-14 3:25 ` [PR PATCH] [Updated] " 0xdeadbad
2023-10-14 3:37 ` 0xdeadbad
2023-10-14 12:27 ` chrysos349
2023-10-14 14:53 ` 0xdeadbad
2023-10-14 15:32 ` 0xdeadbad [this message]
2023-10-14 15:55 ` [PR PATCH] [Updated] " 0xdeadbad
2023-10-14 21:33 ` 0xdeadbad
2023-10-14 21:34 ` classabbyamp
2023-10-14 21:37 ` [PR PATCH] [Updated] " 0xdeadbad
2023-10-14 21:40 ` 0xdeadbad
2024-01-13 1:46 ` github-actions
2024-01-13 1:47 ` chrysos349
2024-04-14 1:59 ` github-actions
2024-04-14 10:17 ` chrysos349
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231014153225.9bgazzWFV6G1PPsv8fesJyxXtO9ybukhtVK63ZFD00Q@z \
--to=0xdeadbad@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).