===> License MIT accepted by the user ===> gitea-1.11.2 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by gitea-1.11.2 for building ===> Extracting for gitea-1.11.2 => SHA256 Checksum OK for gitea-src-1.11.2.tar.gz. ===> Patching for gitea-1.11.2 echo 1.11.2 >/tmp/ports/usr/ports/www/gitea/work/gitea-1.11.2/VERSION ===> gitea-1.11.2 depends on executable: gmake - found ===> gitea-1.11.2 depends on file: /usr/local/bin/go - found ===> gitea-1.11.2 depends on file: /usr/local/bin/ccache - found ===> Configuring for gitea-1.11.2 ===> Building for gitea-1.11.2 gmake[2]: Entering directory '/tmp/ports/usr/ports/www/gitea/work/gitea-1.11.2' grep: repetition-operator operand invalid Gitea requires Go 1.11.0 or greater to build. You can get it at https://golang.org/dl/ gmake[2]: *** [Makefile:127: go-check] Error 1 gmake[2]: Leaving directory '/tmp/ports/usr/ports/www/gitea/work/gitea-1.11.2' *** Error code 1
Let me take a peek. I swear this was working just fine yesterday. Which FreeBSD version are you on, and which architecture?
It's working fine in my test system FreeBSD 12.1-RELEASE-p1 GENERIC amd64. I have all the latest packages installed, in particular go-1.13.5,1.
12.1 stable Also I use: WITH_BSD_GREP= # Install BSD-licensed grep as '[ef]grep' instead of GNU grep. probably this changes grep behavior.
Makefile in gitea src contains: go-check: $(eval GO_VERSION := $(shell printf "%03d%03d%03d" $(shell go version | grep -Eo '[0-9]+\.?[0-9]+?\.?[0-9]?[[:space:]]' | tr '.' ' ');)) ... node-check: $(eval NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v | grep -Eo '[0-9]+\.?[0-9]+?\.?[0-9]?' | tr '.' ' ');)) I try in console: go version | grep -Eo '[0-9]+\.?[0-9]+?\.?[0-9]?[[:space:]]' grep: repetition-operator operand invalid
Created attachment 212284 [details] patch This patch fix build issue for me.
I don't have any boxes with WITH_BSD_GREP, but can you try go version | grep -Eo '[0-9]+\.?[0-9]*\.?[0-9]?[[:space:]]' `[0-9]+?` seems like a silly way to express `[0-9]*`, so I wonder if BSD grep chokes on it.
(In reply to Adam Weinberger from comment #6) # go version | grep -Eo '[0-9]+\.?[0-9]*\.?[0-9]?[[:space:]]' 1.14
Ok. Then it's probably better to turn the regex into that, rather than removing the checks entirely.
Agree
Hi. Maintainer, do you know what you'd like to do here? Should we utilize the regex?
(In reply to Adam Weinberger from comment #10) Changing the expression seems reasonable. bsdgrep is included in the base as bsdgrep, so I tried: [vagrant@porttest-12 ~]$ go version | grep -Eo '[0-9]+\.?[0-9]*\.?[0-9]?[[:space:]]' 1.13.5 [vagrant@porttest-12 ~]$ go version | bsdgrep -Eo '[0-9]+\.?[0-9]*\.?[0-9]?[[:space:]]' 1.13.5 I think we can do this. I will open a Github issue to have that changed upstream, but we can use a patch in the meantime. I'm still looking at the LDFLAGS issue.
https://github.com/go-gitea/gitea/pull/10765
Should be fixed by bug 244898. Thanks adamw!
Can this PR be closed?
Thanks!
Again: ===> Building for gitea-1.11.8 gmake[2]: Entering directory '/tmp/ports/usr/ports/www/gitea/work/gitea-1.11.8' grep: repetition-operator operand invalid Gitea requires Go 1.11.0 or greater to build. You can get it at https://golang.org/dl/
My apologies, I did not remember that there was an issue with bsdgrep, and only tested with the default base grep. Since Gitea changed the grep expressions, I assumed that our local patch was not needed anymore. I'll investigate.
I've just submitted 247613 a patch to update the port to 1.12.2, and I've tested with bsdgrep. It seems the upstream Makefile now works correctly with both kinds of grep.
Ivan, If you can confirm that 1.12.2 builds correctly with bsdgrep, I'll close this PR out.
Fixed, thanks!