lmiphay / gentoo.overlay

lmiphay gentoo overlay
4 stars 3 forks source link

www-apps/gitea #6

Open neoteknic opened 5 years ago

neoteknic commented 5 years ago

Error on emerge : code.gitea.io/gitea/vendor/gopkg.in/testfixtures.v2 make: *** [Makefile:253: gitea] Error 1 make: Leaving directory '/var/tmp/portage/www-apps/gitea-1.6.0_rc2/work/gitea-1.6.0_rc2/src/code.gitea.io/gitea'

GCC : 8.2, kernel ovh : 4.11.0-xxxx-std-ipv6-64

lmiphay commented 5 years ago

Hi @neoteknic

That compiles fine for me on two different servers with:

$ go version
go version go1.10.3 linux/amd64
$

Anything else in your build log?

...
go build -i -v  -tags 'bindata pam sqlite' -ldflags ' -w -X "main.Version=1.6.0_rc2"' -o gitea
... 
...

code.gitea.io/gitea/vendor/golang.org/x/text/encoding/traditionalchinese
code.gitea.io/gitea/vendor/golang.org/x/text/encoding/unicode
code.gitea.io/gitea/vendor/gopkg.in/testfixtures.v2
code.gitea.io/gitea/modules/markup/external
...
neoteknic commented 5 years ago

Hi @lmiphay

go version go1.11.2 linux/amd64

emerge -pv go [ebuild R ] dev-lang/go-1.11.2:0/1.11.2::gentoo USE="-gccgo" 0 KiB

my build log after emerge -u gitea (I have gitea 1.5.2 gentoo no overlay) :
.... code.gitea.io/gitea/vendor/golang.org/x/text/encoding/traditionalchinese code.gitea.io/gitea/vendor/golang.org/x/text/encoding/unicode code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index/scorch code.gitea.io/gitea/vendor/github.com/klauspost/cpuid code.gitea.io/gitea/vendor/gopkg.in/testfixtures.v2 code.gitea.io/gitea/vendor/github.com/klauspost/compress/flate code.gitea.io/gitea/vendor/github.com/klauspost/crc32 code.gitea.io/gitea/vendor/github.com/facebookgo/clock code.gitea.io/gitea/vendor/github.com/facebookgo/stats code.gitea.io/gitea/vendor/github.com/urfave/cli code.gitea.io/gitea/vendor/github.com/shurcooL/sanitized_anchor_name code.gitea.io/gitea/vendor/github.com/chaseadamsio/goorgeous code.gitea.io/gitea/vendor/golang.org/x/text/encoding/htmlindex code.gitea.io/gitea/vendor/github.com/klauspost/compress/gzip code.gitea.io/gitea/vendor/golang.org/x/net/html/charset make: *** [Makefile:253: gitea] Error 1 make: Leaving directory '/var/tmp/portage/www-apps/gitea-1.6.0_rc2/work/gitea-1.6.0_rc2/src/code.gitea.io/gitea'

lmiphay commented 5 years ago

Hi @neoteknic

Yes, confirmed when I unmask go 1.11.1, the result is an unstable build.

go version go1.11.1 linux/amd64 

gitea only specify a lower go version here: https://docs.gitea.io/en-us/install-from-source/

Part of it might be sandbox related writes to e.g.:

code.gitea.io/gitea/vendor/github.com/chaseadamsio/goorgeous
go build runtime/cgo: open /usr/lib/go/pkg/linux_amd64/runtime/cgo.a: permission denied
code.gitea.io/gitea/vendor/github.com/blevesearch/bleve/index/scorch

Patching out the -i passed to go build does give me an successful build - but I will need to investigate how safe that isl:

--- gitea-1.6.0_rc2.ebuild      2018-11-14 11:00:49.517105142 +0000
+++ gitea-1.6.0_rc2-r1.ebuild   2018-11-14 11:01:16.609201376 +0000
@@ -28,7 +28,9 @@
 src_prepare() {
        default
        sed -i -e "s/\"main.Version.*$/\"main.Version=${PV}\"/"\
-               -e "s/-ldflags '-s/-ldflags '/" src/${EGO_PN}/Makefile || die
+               -e "s/-ldflags '-s/-ldflags '/" \
+               -e "s/GOFLAGS := -i -v/GOFLAGS := -v/" \
+               src/${EGO_PN}/Makefile || die
 }

Ref: https://github.com/golang/go/issues/24674

neoteknic commented 5 years ago

Can you update the ebuild on the overlay ? I will test it. Of course a RC is not really "safe".

lmiphay commented 5 years ago

Ok gitea-1.6.0_rc2-r1.ebuild is up there now.

It starts and appears to run fine for me. Let me know if you see any issues.

lmiphay commented 5 years ago

And the actual 1.6.0 release is there now.

And appears to be running fine for me without the -i flag - here is the migration from an 1.5.3 instance:

2018/11/24 15:40:25 [I] Migration: add issue_dependencies
2018/11/24 15:40:25 [I] Migration: protect each scratch token
2018/11/24 15:40:25 [W] Unable to drop columns in SQLite
2018/11/24 15:40:25 [I] Migration: add review
2018/11/24 15:40:25 [I] Migration: add must_change_password column for users table