Skip to content

Commit 242d90f

Browse files
authored
Merge branch 'main' into fix-lang
2 parents 663bf33 + 91c7a3e commit 242d90f

File tree

340 files changed

+4107
-3015
lines changed

Some content is hidden

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

340 files changed

+4107
-3015
lines changed

.drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ steps:
561561

562562
# TODO: We should probably build all dependencies into a test image
563563
- name: test-e2e
564-
image: mcr.microsoft.com/playwright:v1.27.0-focal
564+
image: mcr.microsoft.com/playwright:v1.27.1-focal
565565
commands:
566566
- curl -sLO https://go.dev/dl/go1.19.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz
567567
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea

.eslintrc.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ rules:
254254
no-irregular-whitespace: [2]
255255
no-iterator: [2]
256256
no-label-var: [2]
257-
no-labels: [2]
257+
no-labels: [0]
258258
no-lone-blocks: [2]
259259
no-lonely-if: [0]
260260
no-loop-func: [0]
@@ -333,7 +333,7 @@ rules:
333333
no-void: [2]
334334
no-warning-comments: [0]
335335
no-whitespace-before-property: [2]
336-
no-with: [2]
336+
no-with: [0]
337337
nonblock-statement-body-position: [2]
338338
object-curly-newline: [0]
339339
object-curly-spacing: [2, never]
@@ -378,11 +378,11 @@ rules:
378378
sonarjs/no-duplicated-branches: [0]
379379
sonarjs/no-element-overwrite: [2]
380380
sonarjs/no-empty-collection: [2]
381-
sonarjs/no-extra-arguments: [0]
381+
sonarjs/no-extra-arguments: [2]
382382
sonarjs/no-gratuitous-expressions: [2]
383383
sonarjs/no-identical-conditions: [2]
384-
sonarjs/no-identical-expressions: [0]
385-
sonarjs/no-identical-functions: [0]
384+
sonarjs/no-identical-expressions: [2]
385+
sonarjs/no-identical-functions: [2, 5]
386386
sonarjs/no-ignored-return: [2]
387387
sonarjs/no-inverted-boolean-check: [2]
388388
sonarjs/no-nested-switch: [0]
@@ -394,7 +394,7 @@ rules:
394394
sonarjs/no-small-switch: [0]
395395
sonarjs/no-unused-collection: [2]
396396
sonarjs/no-use-of-empty-return-value: [2]
397-
sonarjs/no-useless-catch: [0]
397+
sonarjs/no-useless-catch: [2]
398398
sonarjs/non-existent-operator: [2]
399399
sonarjs/prefer-immediate-return: [0]
400400
sonarjs/prefer-object-literal: [0]

.stylelintrc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ rules:
1616
declaration-empty-line-before: null
1717
function-no-unknown: null
1818
hue-degree-notation: null
19+
import-notation: string
1920
indentation: 2
2021
max-line-length: null
2122
no-descending-specificity: null

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Janis Estelmann <[email protected]> (@KN4CK3R)
4444
Steven Kriegler <[email protected]> (@justusbunsi)
4545
Jimmy Praet <[email protected]> (@jpraet)
4646
Leon Hofmeister <[email protected]> (@delvh)
47-
Gusted <[email protected]) (@Gusted)
4847
silentcode <[email protected]> (@silentcodeg)
4948
Wim <[email protected]> (@42wim)
5049
xinyu <[email protected]> (@penlinux)

Makefile

Lines changed: 56 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(G
100100

101101
LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64
102102

103-
GO_PACKAGES ?= $(filter-out 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/))
103+
GO_PACKAGES ?= $(filter-out 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/))
104+
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/))
104105

105106
FOMANTIC_WORK_DIR := web_src/fomantic
106107

@@ -366,7 +367,7 @@ test: test-frontend test-backend
366367
.PHONY: test-backend
367368
test-backend:
368369
@echo "Running go test with $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..."
369-
@$(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' $(GO_PACKAGES)
370+
@$(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' $(GO_TEST_PACKAGES)
370371

371372
.PHONY: test-frontend
372373
test-frontend: node_modules
@@ -387,7 +388,7 @@ test-check:
387388
.PHONY: test\#%
388389
test\#%:
389390
@echo "Running go test with -tags '$(TEST_TAGS)'..."
390-
@$(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -run $(subst .,/,$*) $(GO_PACKAGES)
391+
@$(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -run $(subst .,/,$*) $(GO_TEST_PACKAGES)
391392

392393
.PHONY: coverage
393394
coverage:
@@ -398,7 +399,7 @@ coverage:
398399
.PHONY: unit-test-coverage
399400
unit-test-coverage:
400401
@echo "Running unit-test-coverage $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..."
401-
@$(GO) test $(GOTESTFLAGS) -timeout=20m -tags='$(TEST_TAGS)' -cover -coverprofile coverage.out $(GO_PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1
402+
@$(GO) test $(GOTESTFLAGS) -timeout=20m -tags='$(TEST_TAGS)' -cover -coverprofile coverage.out $(GO_TEST_PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1
402403

403404
.PHONY: tidy
404405
tidy:
@@ -442,14 +443,7 @@ test-sqlite\#%: integrations.sqlite.test generate-ini-sqlite
442443
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test -test.run $(subst .,/,$*)
443444

444445
.PHONY: test-sqlite-migration
445-
test-sqlite-migration: migrations.sqlite.test migrations.individual.sqlite.test generate-ini-sqlite
446-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./migrations.sqlite.test
447-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./migrations.individual.sqlite.test
448-
449-
.PHONY: test-sqlite-migration\#%
450-
test-sqlite-migration\#%: migrations.sqlite.test migrations.individual.sqlite.test generate-ini-sqlite
451-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./migrations.individual.sqlite.test -test.run $(subst .,/,$*)
452-
446+
test-sqlite-migration: migrations.sqlite.test migrations.individual.sqlite.test
453447

454448
generate-ini-mysql:
455449
sed -e 's|{{TEST_MYSQL_HOST}}|${TEST_MYSQL_HOST}|g' \
@@ -470,9 +464,7 @@ test-mysql\#%: integrations.mysql.test generate-ini-mysql
470464
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.mysql.test -test.run $(subst .,/,$*)
471465

472466
.PHONY: test-mysql-migration
473-
test-mysql-migration: migrations.mysql.test migrations.individual.mysql.test generate-ini-mysql
474-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./migrations.mysql.test
475-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./migrations.individual.mysql.test
467+
test-mysql-migration: migrations.mysql.test migrations.individual.mysql.test
476468

477469
generate-ini-mysql8:
478470
sed -e 's|{{TEST_MYSQL8_HOST}}|${TEST_MYSQL8_HOST}|g' \
@@ -493,9 +485,7 @@ test-mysql8\#%: integrations.mysql8.test generate-ini-mysql8
493485
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./integrations.mysql8.test -test.run $(subst .,/,$*)
494486

495487
.PHONY: test-mysql8-migration
496-
test-mysql8-migration: migrations.mysql8.test migrations.individual.mysql8.test generate-ini-mysql8
497-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./migrations.mysql8.test
498-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./migrations.individual.mysql8.test
488+
test-mysql8-migration: migrations.mysql8.test migrations.individual.mysql8.test
499489

500490
generate-ini-pgsql:
501491
sed -e 's|{{TEST_PGSQL_HOST}}|${TEST_PGSQL_HOST}|g' \
@@ -517,9 +507,7 @@ test-pgsql\#%: integrations.pgsql.test generate-ini-pgsql
517507
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./integrations.pgsql.test -test.run $(subst .,/,$*)
518508

519509
.PHONY: test-pgsql-migration
520-
test-pgsql-migration: migrations.pgsql.test migrations.individual.pgsql.test generate-ini-pgsql
521-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./migrations.pgsql.test
522-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./migrations.individual.pgsql.test
510+
test-pgsql-migration: migrations.pgsql.test migrations.individual.pgsql.test
523511

524512
generate-ini-mssql:
525513
sed -e 's|{{TEST_MSSQL_HOST}}|${TEST_MSSQL_HOST}|g' \
@@ -540,9 +528,7 @@ test-mssql\#%: integrations.mssql.test generate-ini-mssql
540528
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./integrations.mssql.test -test.run $(subst .,/,$*)
541529

542530
.PHONY: test-mssql-migration
543-
test-mssql-migration: migrations.mssql.test migrations.individual.mssql.test generate-ini-mssql
544-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./migrations.mssql.test -test.failfast
545-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./migrations.individual.mssql.test -test.failfast
531+
test-mssql-migration: migrations.mssql.test migrations.individual.mssql.test
546532

547533
.PHONY: playwright
548534
playwright: $(PLAYWRIGHT_DIR)
@@ -637,50 +623,82 @@ integrations.sqlite.test: git-check $(GO_SOURCES)
637623
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.sqlite.test -tags '$(TEST_TAGS)'
638624

639625
integrations.cover.test: git-check $(GO_SOURCES)
640-
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_PACKAGES) | tr ' ' ',') -o integrations.cover.test
626+
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_TEST_PACKAGES) | tr ' ' ',') -o integrations.cover.test
641627

642628
integrations.cover.sqlite.test: git-check $(GO_SOURCES)
643-
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_PACKAGES) | tr ' ' ',') -o integrations.cover.sqlite.test -tags '$(TEST_TAGS)'
629+
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_TEST_PACKAGES) | tr ' ' ',') -o integrations.cover.sqlite.test -tags '$(TEST_TAGS)'
644630

645631
.PHONY: migrations.mysql.test
646-
migrations.mysql.test: $(GO_SOURCES)
632+
migrations.mysql.test: $(GO_SOURCES) generate-ini-mysql
647633
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mysql.test
634+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./migrations.mysql.test
648635

649636
.PHONY: migrations.mysql8.test
650-
migrations.mysql8.test: $(GO_SOURCES)
637+
migrations.mysql8.test: $(GO_SOURCES) generate-ini-mysql8
651638
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mysql8.test
639+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./migrations.mysql8.test
652640

653641
.PHONY: migrations.pgsql.test
654-
migrations.pgsql.test: $(GO_SOURCES)
642+
migrations.pgsql.test: $(GO_SOURCES) generate-ini-pgsql
655643
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.pgsql.test
644+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./migrations.pgsql.test
656645

657646
.PHONY: migrations.mssql.test
658-
migrations.mssql.test: $(GO_SOURCES)
647+
migrations.mssql.test: $(GO_SOURCES) generate-ini-mssql
659648
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mssql.test
649+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./migrations.mssql.test
660650

661651
.PHONY: migrations.sqlite.test
662-
migrations.sqlite.test: $(GO_SOURCES)
652+
migrations.sqlite.test: $(GO_SOURCES) generate-ini-sqlite
663653
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.sqlite.test -tags '$(TEST_TAGS)'
654+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./migrations.sqlite.test
664655

665656
.PHONY: migrations.individual.mysql.test
666657
migrations.individual.mysql.test: $(GO_SOURCES)
667-
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.mysql.test
658+
for pkg in $(shell $(GO) list code.gitea.io/gitea/models/migrations/...); do \
659+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg; \
660+
done
668661

669662
.PHONY: migrations.individual.mysql8.test
670663
migrations.individual.mysql8.test: $(GO_SOURCES)
671-
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.mysql8.test
664+
for pkg in $(shell $(GO) list code.gitea.io/gitea/models/migrations/...); do \
665+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg; \
666+
done
667+
668+
.PHONY: migrations.individual.mysql8.test\#%
669+
migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite
670+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
672671

673672
.PHONY: migrations.individual.pgsql.test
674673
migrations.individual.pgsql.test: $(GO_SOURCES)
675-
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.pgsql.test
674+
for pkg in $(shell $(GO) list code.gitea.io/gitea/models/migrations/...); do \
675+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg; \
676+
done
677+
678+
.PHONY: migrations.individual.pgsql.test\#%
679+
migrations.individual.pgsql.test\#%: $(GO_SOURCES) generate-ini-pgsql
680+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
681+
676682

677683
.PHONY: migrations.individual.mssql.test
678-
migrations.individual.mssql.test: $(GO_SOURCES)
679-
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.mssql.test
684+
migrations.individual.mssql.test: $(GO_SOURCES) generate-ini-mssql
685+
for pkg in $(shell $(GO) list code.gitea.io/gitea/models/migrations/...); do \
686+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg -test.failfast; \
687+
done
688+
689+
.PHONY: migrations.individual.mssql.test\#%
690+
migrations.individual.mssql.test\#%: $(GO_SOURCES) generate-ini-mssql
691+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
680692

681693
.PHONY: migrations.individual.sqlite.test
682-
migrations.individual.sqlite.test: $(GO_SOURCES)
683-
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.sqlite.test -tags '$(TEST_TAGS)'
694+
migrations.individual.sqlite.test: $(GO_SOURCES) generate-ini-sqlite
695+
for pkg in $(shell $(GO) list code.gitea.io/gitea/models/migrations/...); do \
696+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg; \
697+
done
698+
699+
.PHONY: migrations.individual.sqlite.test\#%
700+
migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite
701+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
684702

685703
e2e.mysql.test: $(GO_SOURCES)
686704
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql.test

assets/go-licenses.json

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

cmd/doctor.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414

1515
"code.gitea.io/gitea/models/db"
1616
"code.gitea.io/gitea/models/migrations"
17+
migrate_base "code.gitea.io/gitea/models/migrations/base"
1718
"code.gitea.io/gitea/modules/doctor"
1819
"code.gitea.io/gitea/modules/log"
1920
"code.gitea.io/gitea/modules/setting"
@@ -114,7 +115,7 @@ func runRecreateTable(ctx *cli.Context) error {
114115
if err != nil {
115116
return err
116117
}
117-
recreateTables := migrations.RecreateTables(beans...)
118+
recreateTables := migrate_base.RecreateTables(beans...)
118119

119120
return db.InitEngineWithMigration(stdCtx, func(x *xorm.Engine) error {
120121
if err := migrations.EnsureUpToDate(x); err != nil {

cmd/migrate_storage.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,43 +83,43 @@ var CmdMigrateStorage = cli.Command{
8383
}
8484

8585
func migrateAttachments(ctx context.Context, dstStorage storage.ObjectStorage) error {
86-
return db.IterateObjects(ctx, func(attach *repo_model.Attachment) error {
86+
return db.Iterate(ctx, nil, func(ctx context.Context, attach *repo_model.Attachment) error {
8787
_, err := storage.Copy(dstStorage, attach.RelativePath(), storage.Attachments, attach.RelativePath())
8888
return err
8989
})
9090
}
9191

9292
func migrateLFS(ctx context.Context, dstStorage storage.ObjectStorage) error {
93-
return db.IterateObjects(ctx, func(mo *git_model.LFSMetaObject) error {
93+
return db.Iterate(ctx, nil, func(ctx context.Context, mo *git_model.LFSMetaObject) error {
9494
_, err := storage.Copy(dstStorage, mo.RelativePath(), storage.LFS, mo.RelativePath())
9595
return err
9696
})
9797
}
9898

9999
func migrateAvatars(ctx context.Context, dstStorage storage.ObjectStorage) error {
100-
return db.IterateObjects(ctx, func(user *user_model.User) error {
100+
return db.Iterate(ctx, nil, func(ctx context.Context, user *user_model.User) error {
101101
_, err := storage.Copy(dstStorage, user.CustomAvatarRelativePath(), storage.Avatars, user.CustomAvatarRelativePath())
102102
return err
103103
})
104104
}
105105

106106
func migrateRepoAvatars(ctx context.Context, dstStorage storage.ObjectStorage) error {
107-
return db.IterateObjects(ctx, func(repo *repo_model.Repository) error {
107+
return db.Iterate(ctx, nil, func(ctx context.Context, repo *repo_model.Repository) error {
108108
_, err := storage.Copy(dstStorage, repo.CustomAvatarRelativePath(), storage.RepoAvatars, repo.CustomAvatarRelativePath())
109109
return err
110110
})
111111
}
112112

113113
func migrateRepoArchivers(ctx context.Context, dstStorage storage.ObjectStorage) error {
114-
return db.IterateObjects(ctx, func(archiver *repo_model.RepoArchiver) error {
114+
return db.Iterate(ctx, nil, func(ctx context.Context, archiver *repo_model.RepoArchiver) error {
115115
p := archiver.RelativePath()
116116
_, err := storage.Copy(dstStorage, p, storage.RepoArchives, p)
117117
return err
118118
})
119119
}
120120

121121
func migratePackages(ctx context.Context, dstStorage storage.ObjectStorage) error {
122-
return db.IterateObjects(ctx, func(pb *packages_model.PackageBlob) error {
122+
return db.Iterate(ctx, nil, func(ctx context.Context, pb *packages_model.PackageBlob) error {
123123
p := packages_module.KeyToRelativePath(packages_module.BlobHash256Key(pb.HashSHA256))
124124
_, err := storage.Copy(dstStorage, p, storage.Packages, p)
125125
return err

custom/conf/app.example.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2196,7 +2196,8 @@ ROUTER = console
21962196
;SHOW_FOOTER_VERSION = true
21972197
;; Show template execution time in the footer
21982198
;SHOW_FOOTER_TEMPLATE_LOAD_TIME = true
2199-
2199+
;; Generate sitemap. Defaults to `true`.
2200+
; ENABLE_SITEMAP = true
22002201

22012202
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22022203
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

docker/root/etc/s6/openssh/setup

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ if [ ! -f /data/ssh/ssh_host_rsa_key ]; then
1414
ssh-keygen -t rsa -b 2048 -f /data/ssh/ssh_host_rsa_key -N "" > /dev/null
1515
fi
1616

17-
if [ ! -f /data/ssh/ssh_host_dsa_key ]; then
18-
echo "Generating /data/ssh/ssh_host_dsa_key..."
19-
ssh-keygen -t dsa -f /data/ssh/ssh_host_dsa_key -N "" > /dev/null
20-
fi
21-
2217
if [ ! -f /data/ssh/ssh_host_ecdsa_key ]; then
2318
echo "Generating /data/ssh/ssh_host_ecdsa_key..."
2419
ssh-keygen -t ecdsa -b 256 -f /data/ssh/ssh_host_ecdsa_key -N "" > /dev/null
@@ -36,17 +31,12 @@ if [ -e /data/ssh/ssh_host_ecdsa_cert ]; then
3631
SSH_ECDSA_CERT=${SSH_ECDSA_CERT:-"/data/ssh/ssh_host_ecdsa_cert"}
3732
fi
3833

39-
if [ -e /data/ssh/ssh_host_dsa_cert ]; then
40-
SSH_DSA_CERT=${SSH_DSA_CERT:-"/data/ssh/ssh_host_dsa_cert"}
41-
fi
42-
4334
if [ -d /etc/ssh ]; then
4435
SSH_PORT=${SSH_PORT:-"22"} \
4536
SSH_LISTEN_PORT=${SSH_LISTEN_PORT:-"${SSH_PORT}"} \
4637
SSH_ED25519_CERT="${SSH_ED25519_CERT:+"HostCertificate "}${SSH_ED25519_CERT}" \
4738
SSH_RSA_CERT="${SSH_RSA_CERT:+"HostCertificate "}${SSH_RSA_CERT}" \
4839
SSH_ECDSA_CERT="${SSH_ECDSA_CERT:+"HostCertificate "}${SSH_ECDSA_CERT}" \
49-
SSH_DSA_CERT="${SSH_DSA_CERT:+"HostCertificate "}${SSH_DSA_CERT}" \
5040
SSH_MAX_STARTUPS="${SSH_MAX_STARTUPS:+"MaxStartups "}${SSH_MAX_STARTUPS}" \
5141
SSH_MAX_SESSIONS="${SSH_MAX_SESSIONS:+"MaxSessions "}${SSH_MAX_SESSIONS}" \
5242
SSH_INCLUDE_FILE="${SSH_INCLUDE_FILE:+"Include "}${SSH_INCLUDE_FILE}" \

docker/root/etc/templates/sshd_config

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ HostKey /data/ssh/ssh_host_rsa_key
1616
${SSH_RSA_CERT}
1717
HostKey /data/ssh/ssh_host_ecdsa_key
1818
${SSH_ECDSA_CERT}
19-
HostKey /data/ssh/ssh_host_dsa_key
20-
${SSH_DSA_CERT}
2119

2220
AuthorizedKeysFile .ssh/authorized_keys
2321
AuthorizedPrincipalsFile .ssh/authorized_principals

0 commit comments

Comments
 (0)