From 335175b00c4da80dbba18b6f1c75c52a35b7adcf Mon Sep 17 00:00:00 2001 From: Matheus Garcias Date: Sat, 14 Oct 2023 18:36:24 -0300 Subject: [PATCH] New package: infisical 0.14.2 --- srcpkgs/infisical/patches/fix_login..go.patch | 11 ++++++ .../patches/notelemetry_root..go.patch | 11 ++++++ srcpkgs/infisical/template | 34 +++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 srcpkgs/infisical/patches/fix_login..go.patch create mode 100644 srcpkgs/infisical/patches/notelemetry_root..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..90bcc9ba20b9f --- /dev/null +++ b/srcpkgs/infisical/patches/fix_login..go.patch @@ -0,0 +1,11 @@ +--- 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) + 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/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() { diff --git a/srcpkgs/infisical/template b/srcpkgs/infisical/template new file mode 100644 index 0000000000000..3c194ab788f45 --- /dev/null +++ b/srcpkgs/infisical/template @@ -0,0 +1,34 @@ +# Template file for 'infisical' +pkgname=infisical +version=0.14.2 +revision=1 +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 " +license="MIT" +homepage="https://infisical.com" +distfiles="https://github.com/Infisical/infisical/archive/refs/tags/infisical-cli/v${version}.tar.gz" +checksum=313caf8d4e6ca5fd88d4f2adf72c721958d602404b6f80611a78a2f757d993f1 + +do_check() { + go test ./... +} + +post_install() { + mv "${DESTDIR}"/usr/bin/infisical-merge "${DESTDIR}"/usr/bin/infisical + + vtargetrun "${DESTDIR}"/usr/bin/infisical man > infisical.1 + vman infisical.1 + + for sh in bash zsh fish; do + vtargetrun "${DESTDIR}"/usr/bin/infisical completion "$sh" > "infisical.$sh" + vcompletion "infisical.$sh" "$sh" + done + + vlicense "${wrksrc}"/LICENSE +}