[Bug 2354888] Review Request: forgejo - A lightweight software forge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=2354888



--- Comment #6 from Maxwell G <maxwell@xxxxxxx> ---
(In reply to Nils Philippsen from comment #5)
> (In reply to Maxwell G from comment #2)
> > Some notes (as a member of the Go SIG and author of go-vendor-tools)
> 
> Thanks!
> 
> > * LicenseRef-scancode-public-domain-disclaimer should be changed to
> > LicenseRef-Fedora-Public-Domain.
> > LicenseRef-scancode-public-domain-disclaimer is not a Fedora-approved
> > license. You will need to depend on go-vendor-tools >= 0.7.0 (currently only
> > available in rawhide, stable updated in progress) that performs this
> > normalization automatically …
> 
> I updated to the package from Koji and it doesn’t 😬:
> 
> --- 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.


> > * CC0-1.0 is not allowed for code in Fedora anymore. HINT: Inspect the
> > go_vendor_license report and figure out which library this license applies
> > to. If it is available as a golang-*-devel package, you can probably cite
> > the "Existing uses of CC0-1.0 on code files in Fedora packages prior to
> > 2022-08-01" exception as a specfile comment.
> 
> Thanks for the info, I’ll add this to the spec file to clarify:
> 
> --- 8< ---
> # CC0-1.0 is normally not permissible for code in Fedora. Because the
> vendored Go package
> # github.com/zeebo/blake3 it applies to has been available in Fedora as
> golang-github-zeebo-blake3
> # since before the cutoff date 2022-08-01, the exception to use it also
> applies here.
> License: …
> --- >8 ---

Cool.

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

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

> > * You should use the Fedora compiler flags and disable static linking
> > instead of turning off debug_package.
> 
> Agreed.
> 
> > * The scancode-toolkit package is broken on s390x on Fedora releases other
> > than rawhide. Working on fixing this.
> 
> Should I filter this arch for the time being?

The scancode updates for stable releases are all in testing now, so probably
not. 

Another note, can you update to the latest forgejo patch release?


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
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%23c6

-- 
_______________________________________________
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




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux