Skip to content

Commit

Permalink
gitea: update to 1.20.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johnnynator committed Jul 19, 2023
1 parent f356039 commit d433185
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 32 deletions.
92 changes: 63 additions & 29 deletions srcpkgs/gitea/patches/config.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
--- a/custom/conf/app.example.ini
+++ b/custom/conf/app.example.ini
@@ -15,7 +15,7 @@
--- gitea-1.20.0/custom/conf/app.example.ini.orig 2023-07-16 21:24:12.000000000 +0200
+++ gitea-1.20.0/custom/conf/app.example.ini 2023-07-19 18:51:01.186945949 +0200
@@ -47,7 +47,7 @@
APP_NAME = ; Gitea: Git with a cup of tea
;;
;; RUN_USER will automatically detect the current user - but you can set it here change it if you run locally
-RUN_USER = ; git
+RUN_USER = _gitea
;;
;; Application run mode, affects performance and debugging. Either "dev", "prod" or "test", default is "prod"
RUN_MODE = ; prod
@@ -68,7 +68,7 @@ RUN_MODE = ; prod
;; Application run mode, affects performance and debugging: "dev" or "prod", default is "prod"
;; Mode "dev" makes Gitea easier to develop and debug, values other than "dev" are treated as "prod" which is for production use.
@@ -117,7 +117,7 @@
;PER_WRITE_PER_KB_TIMEOUT = 30s
;;
;; Permission for unix socket
Expand All @@ -18,25 +18,25 @@
;;
;; Local (DMZ) URL for Gitea workers (such as SSH update) accessing web service.
;; In most cases you do not need to change the default value.
@@ -101,7 +101,7 @@ RUN_MODE = ; prod
@@ -156,7 +156,7 @@
;SSH_LISTEN_PORT = %(SSH_PORT)s
;;
;; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
-;SSH_ROOT_PATH =
+SSH_ROOT_PATH = /var/lib/gitea
+SSH_ROOT_PATH = /var/lib/gitea/.ssh
;;
;; Gitea will create a authorized_keys file by default when it is not using the internal ssh server
;; If you intend to use the AuthorizedKeysCommand functionality then you should turn this off.
@@ -221,7 +221,7 @@ RUN_MODE = ; prod
@@ -275,7 +275,7 @@
;;
;; Root directory containing templates and static files.
;; default is the path where Gitea is executed
-;STATIC_ROOT_PATH =
-;STATIC_ROOT_PATH = ; Will default to the built-in value _`StaticRootPath`_
+STATIC_ROOT_PATH = /var/lib/gitea
;;
;; Default path for App data
;APP_DATA_PATH = data
@@ -284,10 +284,10 @@ LFS_JWT_SECRET =
;APP_DATA_PATH = data ; relative paths will be made absolute with _`AppWorkPath`_
@@ -338,10 +338,10 @@
;;
;; MySQL Configuration
;;
Expand All @@ -51,7 +51,7 @@
;PASSWD = ;Use PASSWD = `your password` for quoting if you use special characters in the password.
;SSL_MODE = false ; either "false" (default), "true", or "skip-verify"
;CHARSET = utf8mb4 ;either "utf8" or "utf8mb4", default is "utf8mb4".
@@ -310,8 +310,8 @@ USER = root
@@ -364,8 +364,8 @@
;;
;; SQLite Configuration
;;
Expand All @@ -60,9 +60,9 @@
+DB_TYPE = sqlite3
+PATH = /var/lib/gitea/data/gitea.db
;SQLITE_TIMEOUT = ; Query timeout defaults to: 500
;SQLITE_JOURNAL_MODE = ; defaults to sqlite database default (often DELETE), can be used to enable WAL mode. https://www.sqlite.org/pragma.html#pragma_journal_mode
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -495,7 +495,7 @@ APP_ID = ; e.g. http://localhost:3000/
@@ -545,7 +545,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Root path for the log files - defaults to %(GITEA_WORK_DIR)/log
Expand All @@ -71,17 +71,27 @@
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Main Logger
@@ -818,7 +818,8 @@ ROUTER = console
@@ -873,11 +873,11 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Root path for storing all repository data. By default, it is set to %(APP_DATA_PATH)/gitea-repositories.
;; A relative path is interpreted as %(GITEA_WORK_DIR)/%(ROOT)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;[repository]
+[repository]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Root path for storing all repository data. By default, it is set to %(APP_DATA_PATH)s/gitea-repositories.
;; A relative path is interpreted as _`AppWorkPath`_/%(ROOT)s
-;ROOT =
+ROOT = /var/lib/gitea/repositories
+
;;
;; The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available.
;SCRIPT_TYPE = bash
@@ -916,7 +917,7 @@ ROUTER = console
@@ -970,16 +970,16 @@

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;[repository.local]
+[repository.local]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Path for local repository copy. Defaults to `tmp/local-repo` (content gets deleted on gitea restart)
Expand All @@ -90,7 +100,12 @@

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -928,7 +929,7 @@ ROUTER = console
-;[repository.upload]
+[repository.upload]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
@@ -987,7 +987,7 @@
;ENABLED = true
;;
;; Path for uploads. Defaults to `data/tmp/uploads` (content gets deleted on gitea restart)
Expand All @@ -99,16 +114,30 @@
;;
;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
;ALLOWED_TYPES =
@@ -1264,7 +1265,7 @@ ROUTER = console
@@ -1324,7 +1324,7 @@

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;[indexer]
+[indexer]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
@@ -1335,7 +1335,7 @@
;ISSUE_INDEXER_TYPE = bleve
;;
;; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve
-;ISSUE_INDEXER_PATH = indexers/issues.bleve
-;ISSUE_INDEXER_PATH = indexers/issues.bleve ; Relative paths will be made absolute against _`AppWorkPath`_.
+ISSUE_INDEXER_PATH = /var/lib/gitea/indexers/issues.bleve
;;
;; Issue indexer connection string, available when ISSUE_INDEXER_TYPE is elasticsearch
;; Issue indexer connection string, available when ISSUE_INDEXER_TYPE is elasticsearch or meilisearch
;ISSUE_INDEXER_CONN_STR = http://elastic:changeme@localhost:9200
@@ -1650,7 +1651,7 @@ ROUTER = console
@@ -1738,11 +1738,11 @@

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;[picture]
+[picture]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
Expand All @@ -117,12 +146,17 @@
;REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars
;;
;; How Gitea deals with missing repository avatars
@@ -2298,7 +2299,7 @@ ROUTER = console
@@ -2483,11 +2483,11 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; lfs storage will override storage
;;
-;[lfs]
+[lfs]
;STORAGE_TYPE = local
;;
;; Where your lfs files reside, default is data/lfs.
-;PATH = data/lfs
+PATH = /var/lib/gitea/lfs

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; override the minio base path if storage type is minio
;MINIO_BASE_PATH = lfs/
6 changes: 3 additions & 3 deletions srcpkgs/gitea/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'gitea'
pkgname=gitea
version=1.18.5
revision=2
version=1.20.0
revision=1
build_style=go
go_import_path=code.gitea.io/gitea
go_ldflags=" -X main.Version=${version}"
Expand Down Expand Up @@ -31,7 +31,7 @@ license="MIT"
homepage="https://gitea.io"
changelog="https://raw.githubusercontent.com/go-gitea/gitea/main/CHANGELOG.md"
distfiles="https://dl.gitea.io/gitea/${version}/gitea-src-${version}.tar.gz"
checksum=3863e7e1f92761fce6b808ba08bf26fc8878b9136b6950e6a419b6d2a4f794a9
checksum=304d9961279a1ebbbfef00450665cba5ff5d2a99745abb6b980aa6cf0dfbb6ae

system_accounts="_gitea"
_gitea_homedir="/var/lib/gitea"
Expand Down
2 changes: 2 additions & 0 deletions srcpkgs/gitea/update
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
site=https://dl.gitea.com/gitea/
pattern="gitea/\K[\d.]+"

0 comments on commit d433185

Please sign in to comment.