Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: New package: infisical 0.14.2
Date: Fri, 13 Oct 2023 19:21:20 +0200	[thread overview]
Message-ID: <20231013172120.UBIbM_v5XwwcO9b2BwBJb6vE9FY_a49g9r-SA5P_i6k@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: 4320 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/46653#issuecomment-1761886216

Comment:
- no need to restrict the architectures (especially as what you put limits you to glibc only)
- use the go `build_style`, as it takes care of most things for you
- `build_helper=qemu` allows the `go run` to work in cross
- don't override `do_extract`, use `build_wrksrc` to change the working directory of the build
- `XBPS_CHECK_PKGS` should never be set in templates, that's internal to xbps-src
- there's no need to use `wget`, the default (`xbps-fetch`) should work fine
- indent with tabs
- gzipping the manpage is useless because `vman` will ungz the file

```patch
From aa70f48c14a71f0101b1a1400baa79621a45337d Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 13 Oct 2023 13:16:27 -0400
Subject: [PATCH] fixup! New package: infisical 0.14.2

---
 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 39d05f4f62b..90bcc9ba20b 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 5f7ddd57399..5ee034221e5 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
+}
-- 
2.42.0

```

  parent reply	other threads:[~2023-10-13 17:21 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 [this message]
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 ` [PR PATCH] [Updated] " 0xdeadbad
2023-10-14 15:55 ` 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=20231013172120.UBIbM_v5XwwcO9b2BwBJb6vE9FY_a49g9r-SA5P_i6k@z \
    --to=classabbyamp@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).