Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKGBUILD fails to build #262

Open
rien333 opened this issue Sep 11, 2024 · 1 comment
Open

PKGBUILD fails to build #262

rien333 opened this issue Sep 11, 2024 · 1 comment

Comments

@rien333
Copy link

rien333 commented Sep 11, 2024

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.)

@rien333 rien333 changed the title PKGBUILD is outdated PKGBUILD fails to build Sep 11, 2024
@richardlehane
Copy link
Owner

Hi @rien333 many thanks for this. Steffen Fritz (ampoffcom) owns the arch packaging. It'd be great if you could work with him to update it or alternatively if you publish a new up-to-date version on AUR I could update the links to point users there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants