https://bugzilla.redhat.com/show_bug.cgi?id=2354888 --- Comment #10 from Nils Philippsen <nphilipp@xxxxxxxxxx> --- (In reply to Maxwell G from comment #6) > (In reply to Nils Philippsen from comment #5) > > (In reply to Maxwell G from comment #2) ... > > --- 8< --- > > $ go_vendor_license --version > > 0.7.0 > > $ go_vendor_license -c ../../go-vendor-tools.toml report all | grep scancode > > Using detector: scancode > > vendor/github.com/xi2/xz/LICENSE: > > LicenseRef-scancode-public-domain-disclaimer > > --- >8 --- > > > > One a file-by-file basis, the expressions are not normalized, but the final > expression generated at the end should now normalize > LicenseRef-scancode-public-domain-disclaimer to the Fedora version. 👍 > > > * This does not currently pass %gobuild_ldflags (the Go linker flags) to the > > > Makefile. You can look at how moby-engine does this (and the source code > > > comments in > > > https://pagure.io/go-rpm-macros/blob/master/f/rpm/macros.d/macros.go- > > > compilers-golang) … > > > > This breaks with: > > > > --- 8< --- > > … > > CGO_CFLAGS="-O2 -g -DSQLITE_MAX_VARIABLE_NUMBER=32766" > > /usr/lib/golang/bin/go build -v -buildmode pie -compiler gc -mod=vendor > > -tags 'rpm_crashtraceback bindata timetzdata sqlite sqlite_unlock_notify' > > -ldflags '-s -w -B 0x2bdce1ae78ced2c1250cb26e7a622c07ffe249b9 > > -compressdwarf=false -linkmode=external -extldflags '-Wl,-z,relro > > -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now > > -specs=/usr/lib/rpm/redhat/redhat-hardened-ld > > -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 > > -specs=/usr/lib/rpm/redhat/redhat-package-notes ' -X > > "code.gitea.io/gitea/modules/setting.CustomPath=/etc/forgejo" -X > > "code.gitea.io/gitea/modules/setting.CustomConf=/etc/forgejo/conf/app.ini" > > -X "code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/forgejo" -X > > "main.Version=10.0.1" -X "main.ReleaseVersion=10.0.1" -X > > "main.MakeVersion=GNU Make 4.4.1" -X "main.Version=10.0.1" -X > > "main.Tags=rpm_crashtraceback bindata timetzdata sqlite > > sqlite_unlock_notify" -X "main.ForgejoVersion=10.0.1"' -o gitea > > flag provided but not defined: -Wl,--as-needed > > usage: go build [-o output] [build flags] [packages] > > Run 'go help build' for details. > > make: *** [Makefile:858: gitea] Error 2 > > --- >8 --- > > > > I’ve searched up and down the net for what this type of error means, but > > wasn’t successful. > > > > What exactly did you try? It's possible there's a quoting issue in the > specfile or the Makefile. I’ll look into it. > > > … or just use the %gobuild macro which is probably a lot > > > easier. > > > > This yields me a lot of these errors, it doesn’t seem to find the main > > package …: > > > > --- 8< --- > > main.go:13:2: cannot find package "code.gitea.io/gitea/cmd" in any of: > > /usr/lib/golang/src/code.gitea.io/gitea/cmd (from $GOROOT) > > /builddir/go/src/code.gitea.io/gitea/cmd (from $GOPATH) > > main.go:14:2: cannot find package "code.gitea.io/gitea/modules/log" in any > > of: > > /usr/lib/golang/src/code.gitea.io/gitea/modules/log (from $GOROOT) > > /builddir/go/src/code.gitea.io/gitea/modules/log (from $GOPATH) > > --- >8 --- > > > > … even though it’s declared in top-level go.mod: > > > > --- 8< --- > > module code.gitea.io/gitea > > … > > --- >8 --- > > > > I”ve tried adding the source tree to GOPATH before, to no avail. > > This is normally handled by the `%goprep` macro. You can try setting > "%global gomodulesmode GO111MODULE=on" which will cause %gobuild to operate > in modules mode and then it should honor the go.mod. I’ll try that as well. I’ve tried both using the Makefile and using Go macros to build with various levels of success, but never 100% 😬. Unfortunately, I didn’t take notes… > Another note, can you update to the latest forgejo patch release? Will do. -- You are receiving this mail because: You are on the CC list for the bug. You are always notified about changes to this product and component https://bugzilla.redhat.com/show_bug.cgi?id=2354888 Report this comment as SPAM: https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202354888%23c10 -- _______________________________________________ package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue