Package Details: jetporch-git 0.0.1.r126.g565e639-1

Git Clone URL: https://aur.archlinux.org/jetporch-git.git (read-only, click to copy)
Package Base: jetporch-git
Description: Jet is a general-purpose, community-driven IT automation platform for configuration, deployment, orchestration, patching, and arbitrary task execution workflows.
Upstream URL: https://www.jetporch.com/
Licenses: GPL
Conflicts: jetporch
Provides: jetporch
Submitter: jvybihal
Maintainer: jvybihal
Last Packager: jvybihal
Votes: 0
Popularity: 0.000000
First Submitted: 2023-10-06 07:20 (UTC)
Last Updated: 2023-10-27 10:13 (UTC)

Dependencies (4)

Required by (0)

Sources (1)

Latest Comments

Mr.Smith1974 commented on 2024-01-28 10:50 (UTC)

Thanks for the package.

alerque commented on 2023-10-27 07:53 (UTC)

The author originally posted the code to GitHub, then migrated it to SourceHut. He neglected to push the tags across when he did, but there is an official 0.0.1 tag. The easiest way to fix this is to check if the tag exists and if not add it before getting the version. This patch should be versioning that keeps working after the tagging issue is fixed upstream. Save to a file and apply with git am < file.patch:

From a16b599256c211a584b1f69ce4feb6c7678c1700 Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Fri, 27 Oct 2023 10:51:49 +0300
Subject: [PATCH] Setup VCS versioning that includes upstream tag

Signed-off-by: Caleb Maclennan <caleb@alerque.com>
---
 .SRCINFO |  4 ++--
 PKGBUILD | 15 ++++++++-------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index fb43f1b..6100b37 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
 pkgbase = jetporch-git
    pkgdesc = Jet is a general-purpose, community-driven IT automation platform for configuration, deployment, orchestration, patching, and arbitrary task execution workflows.
-   pkgver = r315.61c94e3
+   pkgver = 0.0.1.r126.g565e639
    pkgrel = 1
    url = https://www.jetporch.com/
    arch = x86_64
@@ -9,7 +9,7 @@ pkgbase = jetporch-git
    makedepends = rust
    makedepends = cargo
    makedepends = openssl
-   provides = jetporch
+   provides = jetporch=0.0.1.r126.g565e639
    conflicts = jetporch
    source = git+https://git.sr.ht/~mpdehaan/jetporch
    b2sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 43bfc7b..5a79495 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,9 @@
 # Maintainer: Josef Vybíhal <josef.vybihal@gmail.com>
+# Contributor: Caleb Maclennan <caleb@alerque.com>

 #  shellcheck disable=SC2034
 pkgname=jetporch-git
-pkgver=r315.61c94e3
+pkgver=0.0.1.r126.g565e639
 pkgrel=1
 pkgdesc='Jet is a general-purpose, community-driven IT automation platform for configuration, deployment, orchestration, patching, and arbitrary task execution workflows.'
 #arch=('i686' 'x86_64' 'armv6h')
@@ -12,18 +13,18 @@ license=('GPL')
 #depends=('')
 makedepends=('git' 'rust' 'cargo' 'openssl')
 #optdepends=('')
-provides=('jetporch')
+provides=("jetporch=$pkgver")
 conflicts=('jetporch')
 source=('git+https://git.sr.ht/~mpdehaan/jetporch')
 b2sums=('SKIP')
 _gitname=${pkgname%-git}

-pkgver() {
+pkgver () {
   cd "$_gitname"
-  ( set -o pipefail
-    git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
-    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
-  )
+  # Add tag from GH mirror to SH source repo; https://github.com/jetporch/jetporch/releases/tag/v0.0.1
+  git tag | grep -Fq 'v0.0.1' || git tag 'v0.0.1' 9bf80bd4
+  git describe --long --tags --abbrev=7 --match='v[0-9]*' |
+    sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
 }

 build() {
-- 
2.42.0

jvybihal commented on 2023-10-25 10:37 (UTC)

@alerque Thanks! I have made appropriate changes. Re-tested building in clean chroot and pushed to aur. The source repo is not tagged.

alerque commented on 2023-10-25 09:14 (UTC)

Please remove the replaces=() line, that is completely inappropriate for a VCS package. That is only for use when a project is deprecated and re-introduced under a different name. Also the pkgver() function should return a value relative to the last stable tag (0.0.1 in this case) plus a counter. The Wiki VCS package guidelines have info on how to dot that. I believe the pkg-config dependency is going to turn out to me a makedepends as well.