Skip to content

Commit 53e3aff

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Fix different behavior in status check pattern matching with double stars (go-gitea#35474) Replace webpack with rspack (go-gitea#35460) Don't store repo archives on `gitea dump` (go-gitea#35467) Fix SSH signing key path will be displayed in the pull request UI (go-gitea#35381) [skip ci] Updated translations via Crowdin Update image name in integration README (go-gitea#35465)
2 parents bdd3669 + 325e059 commit 53e3aff

File tree

22 files changed

+2155
-310
lines changed

22 files changed

+2155
-310
lines changed

Makefile

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64,linux/r
135135
GO_TEST_PACKAGES ?= $(filter-out $(shell $(GO) list code.gitea.io/gitea/models/migrations/...) code.gitea.io/gitea/tests/integration/migration-test code.gitea.io/gitea/tests code.gitea.io/gitea/tests/integration code.gitea.io/gitea/tests/e2e,$(shell $(GO) list ./... | grep -v /vendor/))
136136
MIGRATE_TEST_PACKAGES ?= $(shell $(GO) list code.gitea.io/gitea/models/migrations/...)
137137

138-
WEBPACK_SOURCES := $(shell find web_src/js web_src/css -type f)
139-
WEBPACK_CONFIGS := webpack.config.ts tailwind.config.ts
140-
WEBPACK_DEST := public/assets/js/index.js public/assets/css/index.css
141-
WEBPACK_DEST_ENTRIES := public/assets/js public/assets/css public/assets/fonts
138+
RSPACK_SOURCES := $(shell find web_src/js web_src/css -type f)
139+
RSPACK_CONFIGS := rspack.config.ts tailwind.config.ts
140+
RSPACK_DEST := public/assets/js/index.js public/assets/css/index.css
141+
RSPACK_DEST_ENTRIES := public/assets/js public/assets/css public/assets/fonts
142142

143143
BINDATA_DEST_WILDCARD := modules/migration/bindata.* modules/public/bindata.* modules/options/bindata.* modules/templates/bindata.*
144144

@@ -238,7 +238,7 @@ node-check:
238238

239239
.PHONY: clean-all
240240
clean-all: clean ## delete backend, frontend and integration files
241-
rm -rf $(WEBPACK_DEST_ENTRIES) node_modules
241+
rm -rf $(RSPACK_DEST_ENTRIES) node_modules
242242

243243
.PHONY: clean
244244
clean: ## delete backend and integration files
@@ -428,8 +428,8 @@ watch: ## watch everything and continuously rebuild
428428

429429
.PHONY: watch-frontend
430430
watch-frontend: node-check node_modules ## watch frontend files and continuously rebuild
431-
@rm -rf $(WEBPACK_DEST_ENTRIES)
432-
NODE_ENV=development $(NODE_VARS) pnpm exec webpack --watch --progress --disable-interpret
431+
@rm -rf $(RSPACK_DEST_ENTRIES)
432+
NODE_ENV=development $(NODE_VARS) pnpm exec rspack --watch
433433

434434
.PHONY: watch-backend
435435
watch-backend: go-check ## watch backend files and continuously rebuild
@@ -747,7 +747,7 @@ install: $(wildcard *.go)
747747
build: frontend backend ## build everything
748748

749749
.PHONY: frontend
750-
frontend: $(WEBPACK_DEST) ## build frontend files
750+
frontend: $(RSPACK_DEST) ## build frontend files
751751

752752
.PHONY: backend
753753
backend: go-check generate-backend $(EXECUTABLE) ## build backend files
@@ -878,15 +878,15 @@ update-py: node-check | node_modules ## update py dependencies
878878
uv sync
879879
@touch .venv
880880

881-
.PHONY: webpack
882-
webpack: $(WEBPACK_DEST) ## build webpack files
881+
.PHONY: rspack
882+
rspack: $(RSPACK_DEST) ## build rspack files
883883

884-
$(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) pnpm-lock.yaml
884+
$(RSPACK_DEST): $(RSPACK_SOURCES) $(RSPACK_CONFIGS) pnpm-lock.yaml
885885
@$(MAKE) -s node-check node_modules
886-
@rm -rf $(WEBPACK_DEST_ENTRIES)
887-
@echo "Running webpack..."
888-
@BROWSERSLIST_IGNORE_OLD_DATA=true $(NODE_VARS) pnpm exec webpack --disable-interpret
889-
@touch $(WEBPACK_DEST)
886+
@rm -rf $(RSPACK_DEST_ENTRIES)
887+
@echo "Running rspack..."
888+
@$(NODE_VARS) pnpm exec rspack
889+
@touch $(RSPACK_DEST)
890890

891891
.PHONY: svg
892892
svg: node-check | node_modules ## build svg files

cmd/dump.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ func runDump(ctx context.Context, cmd *cli.Command) error {
265265
excludes = append(excludes, setting.LFS.Storage.Path)
266266
excludes = append(excludes, setting.Attachment.Storage.Path)
267267
excludes = append(excludes, setting.Packages.Storage.Path)
268+
excludes = append(excludes, setting.RepoArchive.Storage.Path)
268269
excludes = append(excludes, setting.Log.RootPath)
269270
if err := dumper.AddRecursiveExclude("data", setting.AppDataPath, excludes); err != nil {
270271
fatal("Failed to include data directory: %v", err)

models/asymkey/gpg_key_commit_verification.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type CommitVerification struct {
2525
SigningUser *user_model.User // if Verified, then SigningUser is non-nil
2626
CommittingUser *user_model.User // if Verified, then CommittingUser is non-nil
2727
SigningEmail string
28-
SigningKey *GPGKey
28+
SigningKey *GPGKey // FIXME: need to refactor it to a new name like "SigningGPGKey", it is also used in some templates
2929
SigningSSHKey *PublicKey
3030
TrustStatus string
3131
}

models/asymkey/key_display.go

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Copyright 2025 The Gitea Authors. All rights reserved.
2+
// SPDX-License-Identifier: MIT
3+
4+
package asymkey
5+
6+
import (
7+
"os"
8+
9+
"code.gitea.io/gitea/modules/git"
10+
"code.gitea.io/gitea/modules/log"
11+
"code.gitea.io/gitea/modules/setting"
12+
)
13+
14+
func GetDisplaySigningKey(key *git.SigningKey) string {
15+
if key == nil || key.Format == "" {
16+
return ""
17+
}
18+
19+
switch key.Format {
20+
case git.SigningKeyFormatOpenPGP:
21+
return key.KeyID
22+
case git.SigningKeyFormatSSH:
23+
content, err := os.ReadFile(key.KeyID)
24+
if err != nil {
25+
log.Error("Unable to read SSH key %s: %v", key.KeyID, err)
26+
return "(Unable to read SSH key)"
27+
}
28+
display, err := CalcFingerprint(string(content))
29+
if err != nil {
30+
log.Error("Unable to calculate fingerprint for SSH key %s: %v", key.KeyID, err)
31+
return "(Unable to calculate fingerprint for SSH key)"
32+
}
33+
return display
34+
}
35+
setting.PanicInDevOrTesting("Unknown signing key format: %s", key.Format)
36+
return "(Unknown key format)"
37+
}

modules/git/key.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,24 @@
33

44
package git
55

6+
import "code.gitea.io/gitea/modules/setting"
7+
68
// Based on https://git-scm.com/docs/git-config#Documentation/git-config.txt-gpgformat
79
const (
810
SigningKeyFormatOpenPGP = "openpgp" // for GPG keys, the expected default of git cli
911
SigningKeyFormatSSH = "ssh"
1012
)
1113

14+
// SigningKey represents an instance key info which will be used to sign git commits.
15+
// FIXME: need to refactor it to a new name, this name conflicts with the variable names for "asymkey.GPGKey" in many places.
1216
type SigningKey struct {
1317
KeyID string
1418
Format string
1519
}
20+
21+
func (s *SigningKey) String() string {
22+
// Do not expose KeyID
23+
// In case the key is a file path and the struct is rendered in a template, then the server path will be exposed.
24+
setting.PanicInDevOrTesting("don't call SigningKey.String() - it exposes the KeyID which might be a local file path")
25+
return "SigningKey:" + s.Format
26+
}

options/locale/locale_ga-IE.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3729,10 +3729,14 @@ swift.install=Cuir an pacáiste i do <code>chomhad Package.swift</code>:
37293729
swift.install2=agus reáchtáil an t-ordú seo a leanas:
37303730
vagrant.install=Chun bosca Vagrant a chur leis, reáchtáil an t-ordú seo a leanas:
37313731
settings.link=Nasc an pacáiste seo le stóras
3732+
settings.link.description=Má nascann tú pacáiste le stórlann, beidh an pacáiste le feiceáil i liosta pacáistí an stórlainne. Ní féidir ach stórlanna faoin úinéir céanna a nascadh. Má fhágtar an réimse folamh, bainfear an nasc.
37323733
settings.link.select=Roghnaigh Stóras
37333734
settings.link.button=Nuashonraigh Nasc Stórais
37343735
settings.link.success=D'éirigh le nasc an stórais a nuashonrú.
37353736
settings.link.error=Theip ar an nasc stóras a nuashonrú.
3737+
settings.link.repo_not_found=Níor aimsíodh an stóras %s.
3738+
settings.unlink.error=Theip ar nasc an stórais a bhaint.
3739+
settings.unlink.success=Baineadh an nasc chuig an stóras go rathúil.
37363740
settings.delete=Scrios pacáiste
37373741
settings.delete.description=Tá pacáiste a scriosadh buan agus ní féidir é a chur ar ais.
37383742
settings.delete.notice=Tá tú ar tí %s (%s) a scriosadh. Tá an oibríocht seo dochúlaithe, an bhfuil tú cinnte?

options/locale/locale_pt-PT.ini

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3599,7 +3599,7 @@ no_subscriptions=Sem subscrições
35993599
default_key=Assinado com a chave padrão
36003600
error.extract_sign=Falhou ao extrair a assinatura
36013601
error.generate_hash=Falhou ao gerar o <i>hash</i> do cometimento
3602-
error.no_committer_account=Não existe qualquer conta ligada ao endereço de email de quem cometeu
3602+
error.no_committer_account=Não existe qualquer conta vinculada ao endereço de email de quem cometeu
36033603
error.no_gpg_keys_found=Não foi encontrada uma chave conhecida para esta assinatura, na base de dados
36043604
error.not_signed_commit=Não é um cometimento assinado
36053605
error.failed_retrieval_gpg_keys=Falhou ao obter uma chave ligada à conta de quem cometeu
@@ -3617,7 +3617,7 @@ desc=Gerir pacotes do repositório.
36173617
empty=Ainda não há pacotes.
36183618
no_metadata=Sem metadados.
36193619
empty.documentation=Para obter mais informação sobre o registo de pacotes, veja <a target="_blank" rel="noopener noreferrer" href="%s">a documentação</a>.
3620-
empty.repo=Carregou um pacote mas este não é apresentado aqui? Vá às <a href="%[1]s">configurações do pacote</a> e ligue-o a este repositório.
3620+
empty.repo=Carregou um pacote mas este não é apresentado aqui? Vá às <a href="%[1]s">configurações do pacote</a> e vincule-o a este repositório.
36213621
registry.documentation=Para mais informação sobre o registo %s, veja <a target="_blank" rel="noopener noreferrer" href="%s">a documentação</a>.
36223622
filter.type=Tipo
36233623
filter.type.all=Todos
@@ -3729,10 +3729,14 @@ swift.install=Adicione o pacote no seu ficheiro <code>Package.swift</code>:
37293729
swift.install2=e execute o seguinte comando:
37303730
vagrant.install=Para adicionar uma máquina virtual Vagrant, execute o seguinte comando:
37313731
settings.link=Vincular este pacote a um repositório
3732+
settings.link.description=Se você vincular um pacote a um repositório, o pacote será listado na lista de pacotes do repositório. Apenas os repositórios do mesmo dono podem ser vinculados. Deixar o campo em branco irá remover o vínculo.
37323733
settings.link.select=Escolha o repositório
37333734
settings.link.button=Modificar vínculo ao repositório
3734-
settings.link.success=A ligação ao repositório foi modificada com sucesso.
3735+
settings.link.success=O vínculo ao repositório foi modificado com sucesso.
37353736
settings.link.error=Falhou a modificação do vínculo ao repositório.
3737+
settings.link.repo_not_found=O repositório %s não foi encontrado.
3738+
settings.unlink.error=Falhou a remoção do vínculo ao repositório.
3739+
settings.unlink.success=O vínculo ao repositório foi removido com sucesso.
37363740
settings.delete=Eliminar pacote
37373741
settings.delete.description=Eliminar o pacote é permanente e não pode ser desfeito.
37383742
settings.delete.notice=Está prestes a eliminar %s (%s). Esta operação é irreversível. Tem a certeza?

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
1717
"@primer/octicons": "19.18.0",
1818
"@resvg/resvg-wasm": "2.6.2",
19+
"@rspack/cli": "1.5.3",
20+
"@rspack/core": "1.5.3",
1921
"@silverwind/vue3-calendar-heatmap": "2.0.6",
2022
"@techknowlogick/license-checker-webpack-plugin": "0.3.0",
21-
"add-asset-webpack-plugin": "3.0.0",
23+
"add-asset-webpack-plugin": "3.1.0",
2224
"ansi_up": "6.0.6",
2325
"asciinema-player": "3.10.0",
2426
"chart.js": "4.5.0",
@@ -30,14 +32,11 @@
3032
"dayjs": "1.11.18",
3133
"dropzone": "6.0.0-beta.2",
3234
"easymde": "2.20.0",
33-
"esbuild-loader": "4.3.0",
3435
"htmx.org": "2.0.7",
3536
"idiomorph": "0.7.3",
3637
"jquery": "3.7.1",
3738
"katex": "0.16.22",
3839
"mermaid": "11.11.0",
39-
"mini-css-extract-plugin": "2.9.4",
40-
"minimatch": "10.0.3",
4140
"monaco-editor": "0.53.0",
4241
"monaco-editor-webpack-plugin": "7.1.0",
4342
"online-3d-viewer": "0.16.0",
@@ -61,8 +60,6 @@
6160
"vue-bar-graph": "2.2.0",
6261
"vue-chartjs": "5.3.2",
6362
"vue-loader": "17.4.2",
64-
"webpack": "5.101.3",
65-
"webpack-cli": "6.0.1",
6663
"wrap-ansi": "9.0.2"
6764
},
6865
"devDependencies": {

0 commit comments

Comments
 (0)