Skip to content

Commit 5e77982

Browse files
authored
Merge branch 'main' into lunny/refactor_org_setting
2 parents 63e0493 + 709535c commit 5e77982

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1722
-612
lines changed

.devcontainer/devcontainer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"name": "Gitea DevContainer",
33
"image": "mcr.microsoft.com/devcontainers/go:1.24-bookworm",
4+
"containerEnv": {
5+
// override "local" from packaged version
6+
"GOTOOLCHAIN": "auto"
7+
},
48
"features": {
59
// installs nodejs into container
610
"ghcr.io/devcontainers/features/node:1": {

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM docker.io/library/golang:1.24-alpine3.22 AS build-env
2+
FROM docker.io/library/golang:1.25-alpine3.22 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY=${GOPROXY:-direct}

Dockerfile.rootless

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM docker.io/library/golang:1.24-alpine3.22 AS build-env
2+
FROM docker.io/library/golang:1.25-alpine3.22 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY=${GOPROXY:-direct}

MAINTAINERS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ a1012112796 <[email protected]> (@a1012112796)
3636
Karl Heinz Marbaise <[email protected]> (@khmarbaise)
3737
Norwin Roosen <[email protected]> (@noerw)
3838
Kyle Dumont <[email protected]> (@kdumontnu)
39-
Patrick Schratz <[email protected]> (@pat-s)
4039
Janis Estelmann <[email protected]> (@KN4CK3R)
41-
Steven Kriegler <[email protected]> (@justusbunsi)
4240
Jimmy Praet <[email protected]> (@jpraet)
4341
Leon Hofmeister <[email protected]> (@delvh)
4442
Wim <[email protected]> (@42wim)

Makefile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ SHASUM ?= shasum -a 256
2323
HAS_GO := $(shell hash $(GO) > /dev/null 2>&1 && echo yes)
2424
COMMA := ,
2525

26-
XGO_VERSION := go-1.24.x
26+
XGO_VERSION := go-1.25.x
2727

2828
AIR_PACKAGE ?= github.com/air-verse/air@v1
2929
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3
3030
GOFUMPT_PACKAGE ?= mvdan.cc/[email protected]
31-
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6
31+
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.4.0
3232
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/[email protected]
3333
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/[email protected]
3434
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/[email protected]
@@ -48,6 +48,17 @@ ifeq ($(HAS_GO), yes)
4848
CGO_CFLAGS ?= $(shell $(GO) env CGO_CFLAGS) $(CGO_EXTRA_CFLAGS)
4949
endif
5050

51+
CGO_ENABLED ?= 0
52+
ifneq (,$(findstring sqlite,$(TAGS))$(findstring pam,$(TAGS)))
53+
CGO_ENABLED = 1
54+
endif
55+
56+
STATIC ?=
57+
EXTLDFLAGS ?=
58+
ifneq ($(STATIC),)
59+
EXTLDFLAGS = -extldflags "-static"
60+
endif
61+
5162
ifeq ($(GOOS),windows)
5263
IS_WINDOWS := yes
5364
else ifeq ($(patsubst Windows%,Windows,$(OS)),Windows)
@@ -746,7 +757,10 @@ security-check:
746757
go run $(GOVULNCHECK_PACKAGE) -show color ./...
747758

748759
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
749-
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
760+
ifneq ($(and $(STATIC),$(findstring pam,$(TAGS))),)
761+
$(error pam support set via TAGS doesn't support static builds)
762+
endif
763+
CGO_ENABLED="$(CGO_ENABLED)" CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(EXTLDFLAGS) $(LDFLAGS)' -o $@
750764

751765
.PHONY: release
752766
release: frontend generate release-windows release-linux release-darwin release-freebsd release-copy release-compress vendor release-sources release-check

contrib/upgrade.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ fi
8585
# confirm update
8686
echo "Checking currently installed version..."
8787
current=$(giteacmd --version | cut -d ' ' -f 3)
88-
[[ "$current" == "$giteaversion" ]] && echo "$current is already installed, stopping." && exit 1
88+
[[ "$current" == "$giteaversion" ]] && echo "$current is already installed, stopping." && exit 0
8989
if [[ -z "${no_confirm:-}" ]]; then
9090
echo "Make sure to read the changelog first: https://github.com/go-gitea/gitea/blob/main/CHANGELOG.md"
9191
echo "Are you ready to update Gitea from ${current} to ${giteaversion}? (y/N)"

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 49 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,58 @@
1111
pkgs = nixpkgs.legacyPackages.${system};
1212
in
1313
{
14-
devShells.default = pkgs.mkShell {
15-
buildInputs = with pkgs; [
16-
# generic
17-
git
18-
git-lfs
19-
gnumake
20-
gnused
21-
gnutar
22-
gzip
14+
devShells.default =
15+
with pkgs;
16+
let
17+
# only bump toolchain versions here
18+
go = go_1_25;
19+
nodejs = nodejs_24;
20+
python3 = python312;
2321

24-
# frontend
25-
nodejs_22
22+
# Platform-specific dependencies
23+
linuxOnlyInputs = lib.optionals pkgs.stdenv.isLinux [
24+
glibc.static
25+
];
2626

27-
# linting
28-
python312
29-
uv
27+
linuxOnlyEnv = lib.optionalAttrs pkgs.stdenv.isLinux {
28+
CFLAGS = "-I${glibc.static.dev}/include";
29+
LDFLAGS = "-L ${glibc.static}/lib";
30+
};
31+
in
32+
pkgs.mkShell (
33+
{
34+
buildInputs = [
35+
# generic
36+
git
37+
git-lfs
38+
gnumake
39+
gnused
40+
gnutar
41+
gzip
42+
zip
3043

31-
# backend
32-
go_1_24
33-
gofumpt
34-
sqlite
35-
];
36-
shellHook = ''
37-
export GO="${pkgs.go_1_24}/bin/go"
38-
export GOROOT="${pkgs.go_1_24}/share/go"
39-
'';
40-
};
44+
# frontend
45+
nodejs
46+
47+
# linting
48+
python3
49+
uv
50+
51+
# backend
52+
go
53+
gofumpt
54+
sqlite
55+
]
56+
++ linuxOnlyInputs;
57+
58+
GO = "${go}/bin/go";
59+
GOROOT = "${go}/share/go";
60+
61+
TAGS = "sqlite sqlite_unlock_notify";
62+
STATIC = "true";
63+
}
64+
// linuxOnlyEnv
65+
);
4166
}
4267
);
4368
}

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module code.gitea.io/gitea
22

3-
go 1.24.5
3+
go 1.24.6
44

55
// rfc5280 said: "The serial number is an integer assigned by the CA to each certificate."
66
// But some CAs use negative serial number, just relax the check. related:
@@ -27,7 +27,7 @@ require (
2727
github.com/ProtonMail/go-crypto v1.2.0
2828
github.com/PuerkitoBio/goquery v1.10.3
2929
github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.7.3
30-
github.com/alecthomas/chroma/v2 v2.17.0
30+
github.com/alecthomas/chroma/v2 v2.20.0
3131
github.com/aws/aws-sdk-go-v2/credentials v1.17.67
3232
github.com/aws/aws-sdk-go-v2/service/codecommit v1.28.2
3333
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.7.3/go.mod h1:hMNtySovKkn2
7878
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
7979
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
8080
github.com/alecthomas/chroma/v2 v2.2.0/go.mod h1:vf4zrexSH54oEjJ7EdB65tGNHmH3pGZmVkgTP5RHvAs=
81-
github.com/alecthomas/chroma/v2 v2.17.0 h1:3r2Cgk+nXNICMBxIFGnTRTbQFUwMiLisW+9uos0TtUI=
82-
github.com/alecthomas/chroma/v2 v2.17.0/go.mod h1:RVX6AvYm4VfYe/zsk7mjHueLDZor3aWCNE14TFlepBk=
81+
github.com/alecthomas/chroma/v2 v2.20.0 h1:sfIHpxPyR07/Oylvmcai3X/exDlE8+FA820NTz+9sGw=
82+
github.com/alecthomas/chroma/v2 v2.20.0/go.mod h1:e7tViK0xh/Nf4BYHl00ycY6rV7b8iXBksI9E359yNmA=
8383
github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8=
84-
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
85-
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
84+
github.com/alecthomas/repr v0.5.1 h1:E3G4t2QbHTSNpPKBgMTln5KLkZHLOcU7r37J4pXBuIg=
85+
github.com/alecthomas/repr v0.5.1/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
8686
github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa h1:LHTHcTQiSGT7VVbI0o4wBRNQIgn917usHWOd6VAffYI=
8787
github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4=
8888
github.com/anchore/archiver/v3 v3.5.2 h1:Bjemm2NzuRhmHy3m0lRe5tNoClB9A4zYyDV58PaB6aA=

0 commit comments

Comments
 (0)