gitea: Can not build anymore since version 1.9.0
- Gitea version (or commit ref): 1.9.2
- Git version:2.16.4
- Operating system: openSUSE Leap 15.1, openSUSE Leap 15.0, openSUSE Tumbleweed
- Database (use
[x]):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist:
Description
A build using opensuse build service and also local is not possible. First I want to build gitea in the opensuse build service. But this fails, because the build process would like to load different packages from github, even though the files actually exist in the vendor directory of the source. The buildservice does not allow external sources to be downloaded during the build process. Up to version 1.8.2 the build worked without problems. As of version 1.9.0, this is no longer possible. Even a build directly does not work. I first download the 1.9.2 release. Unzip the source and change to the directory. then I do the following: TAGS = “bindata” make generate all It then appears: github.com/klauspost/compress/gzip github.com/blevesearch/bleve/index/scorch make: *** [Makefile: 315: gitea] Error 1
Why are the files in the vendor directory no longer used? What do I have to do to reuse it so that I can recreate a package using opensuse buid service?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20 (9 by maintainers)
@irreleph4nt
Until the fixes land in a gittea release && compatible GO version lands in epel-7 i use this spec file (please feel free to comment) https://github.com/markVnl/gitea-SPEC/tree/next
test_build @copr: https://copr.fedorainfracloud.org/coprs/markvnl/gitea/
Hi,
Sorry for the edit spam, but the above alone won’t make 1.9.3 build for CentOS. I had to amend this:
GO111MODULE=on go run -mod=vendor main.goGOFLAGS := -i -v%globalThanks, and I can confirm it works like a charm on centOS with go1.13 installed from testing-epel-7
have the same problem on centos and was able to dissect this Issue to
make generateCan not give the “silver bullet solution” simply because i’m not really (understatement) an go(loang) expert.
somehow the
go:generate go run -mod=vendor main.godoes not honer the vendor directory in https://github.com/go-gitea/gitea/blob/master/modules/options/options.go#L7 https://github.com/go-gitea/gitea/blob/master/modules/public/public.go#L21 https://github.com/go-gitea/gitea/blob/master/modules/templates/templates.go#L7And causes go to pull in the dependency’s, which in a buildchroot without network capability throws all those errors.
the workaround I use is to omit
make generateand generate the bindata manually with a simple script in rhe (rpm) spec-file: