fix(ops/forgejo): update forgejo to 12.0.1, re-vendor gerrit patches, and fix emoji links

- Update Forgejo from 11.0.1 to 12.0.1, match upstream (see #80, cl 30121).
- Re-vendor and refresh Gerrit integration patches from lix to restore compatibility (patches broke @ cl 30628).
- Update dead emoji asset links to new locations, borrowed from lix infra (old URLs 404'd).
- Fixes build failure for ops.nixos.public01System (#169).

Context:
- Forgejo build broke after nixpkgs channel bump (cl 30628) due to outdated patches (#169).
- Emoji assets previously fetched from volpeon.ink are now archived or moved; new URLs and hashes are from lix infra.
- Gerrit patches are yoinked from lix again to restore code review tab and Gerrit CL linking (thanks emilylange).

Closes: #169
Refs: #80

Change-Id: I6a6a696423a6360b4056892e171df2baf6fa7206
Reviewed-on: https://cl.snix.dev/c/snix/+/30645
Tested-by: besadii
Autosubmit: Oleksandr Knyshuk <olk@disr.it>
Reviewed-by: Florian Klink <flokli@flokli.de>
This commit is contained in:
Oleksandr Knyshuk 2025-08-04 16:40:38 +02:00 committed by clbot
parent 4aa1137d8e
commit 2b03762a05
3 changed files with 32 additions and 43 deletions

View file

@ -1,4 +1,4 @@
From 0edb45d9dc9a2688c8b66a21df2a555f864fb81c Mon Sep 17 00:00:00 2001
From 849657beb310dc099945f695b9d236ce0e649b27 Mon Sep 17 00:00:00 2001
From: Jade Lovelace <software@lfcode.ca>
Date: Thu, 16 May 2024 18:15:54 -0700
Subject: [PATCH 1/2] lix: Make a Code Review (Gerrit) tab
@ -8,21 +8,21 @@ Subject: [PATCH 1/2] lix: Make a Code Review (Gerrit) tab
1 file changed, 11 insertions(+)
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 21017415c1..c5a36b2203 100644
index b6cbfc7283510a26f1fa039aca4a5f4ed4b92a47..bbce2bfbcb5aa83b7ae90b87e6dc22d10469adb7 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -99,6 +99,11 @@
@@ -107,6 +107,12 @@
</a>
{{end}}
+ {{if and (eq .Repository.Name "snix") (eq .Repository.OwnerName "snix")}}
+ <a class="item" href="https://cl.snix.dev/q/project:snix">
+ {{svg "octicon-code-review"}} Code Review (Gerrit)
+ </a>
+ {{end}}
+
{{if .Permission.CanRead $.UnitTypeExternalTracker}}
<a class="{{if .PageIsIssueList}}active {{end}}item" href="{{.RepoExternalIssuesLink}}" target="_blank" rel="noopener noreferrer">
{{svg "octicon-link-external"}} {{ctx.Locale.Tr "repo.issues"}}
--
2.45.1
--
2.49.0

View file

@ -1,22 +1,20 @@
From c560d6e110377fb6f42e841a0bd35f80c0f2eb29 Mon Sep 17 00:00:00 2001
From 33e71419f21f76e8a242b88dcb6eff7af2bc1b4d Mon Sep 17 00:00:00 2001
From: Jade Lovelace <software@lfcode.ca>
Date: Thu, 16 May 2024 19:56:25 -0700
Subject: [PATCH 2/2] lix: link gerrit cl/ and change-ids
This code is a bit dubious but you know, golang
Co-authored-by: Ryan Lahfa <raito@lix.systems>
---
modules/markup/html.go | 59 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/modules/markup/html.go b/modules/markup/html.go
index 2e65827bf7..2d474077a5 100644
index 7961c5c9301f03b89e88d289d032abca921adfff..518ad01b16466fe43f1fc44e9bcac63794d76bbe 100644
--- a/modules/markup/html.go
+++ b/modules/markup/html.go
@@ -50,6 +50,20 @@ var (
@@ -51,6 +51,20 @@ var (
// so that abbreviated hash links can be used as well. This matches git and GitHub usability.
hashCurrentPattern = regexp.MustCompile(`(?:\s|^|\(|\[)([0-9a-f]{7,64})(?:\s|$|\)|\]|[.,:](\s|$))`)
hashCurrentPattern = regexp.MustCompile(`(?:^|\s)[^\w\d]{0,2}([0-9a-f]{7,64})[^\w\d]{0,2}(?:\s|$)`)
+ // Gerrit change ID pattern
+ changeIdPattern = GerritPattern{
@ -35,7 +33,7 @@ index 2e65827bf7..2d474077a5 100644
// shortLinkPattern matches short but difficult to parse [[name|link|arg=test]] syntax
shortLinkPattern = regexp.MustCompile(`\[\[(.*?)\]\](\w*)`)
@@ -77,6 +91,14 @@ var (
@@ -82,6 +96,14 @@ var (
InlineCodeBlockRegex = regexp.MustCompile("`[^`]+`")
)
@ -50,7 +48,15 @@ index 2e65827bf7..2d474077a5 100644
// CSS class for action keywords (e.g. "closes: #1")
const keywordClass = "issue-keyword"
@@ -152,6 +174,7 @@ var defaultProcessors = []processor{
@@ -158,6 +180,7 @@ var defaultProcessors = []processor{
commitCrossReferencePatternProcessor,
hashCurrentPatternProcessor,
fediAddressProcessor,
+ gerritCLPatternProcessor,
emailAddressProcessor,
emojiProcessor,
emojiShortCodeProcessor,
@@ -185,6 +208,7 @@ var commitMessageProcessors = []processor{
issueIndexPatternProcessor,
commitCrossReferencePatternProcessor,
hashCurrentPatternProcessor,
@ -58,15 +64,7 @@ index 2e65827bf7..2d474077a5 100644
emailAddressProcessor,
emojiProcessor,
emojiShortCodeProcessor,
@@ -179,6 +202,7 @@ var commitMessageProcessors = []processor{
issueIndexPatternProcessor,
commitCrossReferencePatternProcessor,
hashCurrentPatternProcessor,
+ gerritCLPatternProcessor,
emailAddressProcessor,
emojiProcessor,
emojiShortCodeProcessor,
@@ -788,6 +812,41 @@ func shortLinkProcessor(ctx *RenderContext, node *html.Node) {
@@ -792,6 +816,41 @@ func shortLinkProcessor(ctx *RenderContext, node *html.Node) {
}
}
@ -109,5 +107,4 @@ index 2e65827bf7..2d474077a5 100644
if ctx.Metas == nil {
return
--
2.47.0
2.49.0