Skip to content

PKGBUILD fails to build #262

@rien333

Description

@rien333

Not sure if I'm in the right repo, since the PKGBUILD doesn't seem to be hosted here, but the installation steps for Arch currently result in an error related to go get being deprecated.

$ makepkg -sir
==> Starting build()...
go: go.mod file not found in current directory or any parent directory.
        'go get' is no longer supported outside a module.
        To build and install a command, use 'go install' with a version,
        like 'go install example.com/cmd@latest'

(Also: how is it possible that I can git clone https://aur.archlinux.org/siegfried.git, but that siegfried is not listed when I search for it on the AUR search page?)

Quick Fix

Not familiair with go, but the following patch fixes the PKGBUILD on my end (though I think one should actually be using the source=(...) array. See here for Arch's Go packaging guidelines):

diff --git a/PKGBUILD b/PKGBUILD
index 0241053..61aa57c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Steffen Fritz <aur AT fritz DOT wtf>
 
 pkgname=siegfried
-pkgver=1.7.6
+pkgver=1.11.1
 pkgrel=1
 pkgdesc="Siegfried is a signature-based file format identification tool, implementing the National Archives UK's PRONOM
 file format signatures and freedesktop.org's MIME-info file format signatures.
@@ -12,10 +12,10 @@ license=('APACHE')
 depends=('go')
 makedepends=('git')
 options=('!strip' '!emptydirs')
-_gourl=github.com/richardlehane/siegfried/cmd/sf
+_gourl=github.com/richardlehane/siegfried/cmd/sf@v${pkgver}
 
 build() {
-  GOPATH="$srcdir" go get ${_gourl}
+  GOPATH="$srcdir" go install ${_gourl}
 }
 
 check() {

If you want, I can open a PR where I add a PKGBUILD that follows Arch's packaging guidelines? (there are possibly more issues: I think go should be a makedep, I'm not sure if disabling binary stripping is appropriate, etc.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions