Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 28 additions & 46 deletions srcpkgs/gitea/patches/config.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
--- 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 @@
diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini
index a7476ad..d8cc405 100644
--- a/custom/conf/app.example.ini
+++ b/custom/conf/app.example.ini
@@ -44,7 +44,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
Expand All @@ -9,25 +11,25 @@
;;
;; 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 @@
@@ -129,7 +129,7 @@ RUN_USER = ; git
;PER_WRITE_PER_KB_TIMEOUT = 30s
;;
;; Permission for unix socket
-;UNIX_SOCKET_PERMISSION = 666
+UNIX_SOCKET_PERMISSION = 660
;;
;; 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.
@@ -156,7 +156,7 @@
;SSH_LISTEN_PORT = %(SSH_PORT)s
;; 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. Alter it only if
@@ -176,7 +176,7 @@ RUN_USER = ; git
;SSH_LISTEN_PORT =
;;
;; 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
;;
;; 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.
@@ -275,7 +275,7 @@
@@ -288,7 +288,7 @@ RUN_USER = ; git
;;
;; Root directory containing templates and static files.
;; default is the path where Gitea is executed
Expand All @@ -36,7 +38,7 @@
;;
;; Default path for App data
;APP_DATA_PATH = data ; relative paths will be made absolute with _`AppWorkPath`_
@@ -338,10 +338,10 @@
@@ -363,10 +363,10 @@ RUN_USER = ; git
;;
;; MySQL Configuration
;;
Expand All @@ -50,8 +52,8 @@
+;USER = root
;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".
@@ -364,8 +364,8 @@
;CHARSET_COLLATION = ; Empty as default, Gitea will try to find a case-sensitive collation. Don't change it unless you clearly know what you need.
@@ -387,8 +387,8 @@ USER = root
;;
;; SQLite Configuration
;;
Expand All @@ -62,41 +64,30 @@
;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
;;
@@ -545,7 +545,7 @@
@@ -595,7 +595,7 @@ ENABLED = true
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Root path for the log files - defaults to %(GITEA_WORK_DIR)/log
;; Root path for the log files - defaults to "{AppWorkPath}/log"
-;ROOT_PATH =
+ROOT_PATH = /var/log/gitea
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Main Logger
@@ -873,11 +873,11 @@
@@ -984,11 +984,11 @@ LEVEL = Info
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;[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 path for storing all repository data. By default, it is set to "{APP_DATA_PATH}/gitea-repositories".
;; A relative path is interpreted as "{AppWorkPath}/{ROOT}" (use AppWorkPath as base path).
-;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
@@ -970,16 +970,16 @@

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;[repository.local]
+[repository.local]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Path for local repository copy. Defaults to `tmp/local-repo` (content gets deleted on gitea restart)
-;LOCAL_COPY_PATH = tmp/local-repo
+LOCAL_COPY_PATH = /var/lib/gitea/tmp/local-repo
@@ -1099,7 +1099,7 @@ LEVEL = Info

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand All @@ -105,16 +96,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
@@ -987,7 +987,7 @@
;ENABLED = true
;;
;; Path for uploads. Defaults to `data/tmp/uploads` (content gets deleted on gitea restart)
-;TEMP_PATH = data/tmp/uploads
+TEMP_PATH = /var/lib/gitea/uploads
;;
;; 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 =
@@ -1324,7 +1324,7 @@
@@ -1474,7 +1474,7 @@ LEVEL = Info

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand All @@ -123,16 +105,16 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
@@ -1335,7 +1335,7 @@
@@ -1485,7 +1485,7 @@ LEVEL = Info
;ISSUE_INDEXER_TYPE = bleve
;;
;; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is 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 or meilisearch
;ISSUE_INDEXER_CONN_STR = http://elastic:changeme@localhost:9200
@@ -1738,11 +1738,11 @@
;; Issue indexer connection string, available when ISSUE_INDEXER_TYPE is elasticsearch (e.g. http://elastic:password@localhost:9200) or meilisearch (e.g. http://:apikey@localhost:7700)
;ISSUE_INDEXER_CONN_STR =
@@ -1924,11 +1924,11 @@ LEVEL = Info

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand All @@ -146,7 +128,7 @@
;REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars
;;
;; How Gitea deals with missing repository avatars
@@ -2483,11 +2483,11 @@
@@ -2702,11 +2702,11 @@ LEVEL = Info
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; lfs storage will override storage
;;
Expand All @@ -158,5 +140,5 @@
-;PATH = data/lfs
+PATH = /var/lib/gitea/lfs
;;
;; override the minio base path if storage type is minio
;MINIO_BASE_PATH = lfs/
;; Allows the storage driver to redirect to authenticated URLs to serve files directly
;; Currently, only `minio` and `azureblob` is supported.
22 changes: 12 additions & 10 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.22.1
revision=2
version=1.25.3
revision=1
build_style=go
go_import_path=code.gitea.io/gitea
go_ldflags=" -X main.Version=${version}"
Expand All @@ -11,27 +11,25 @@ go_ldflags=" -X main.Version=${version}"
# supported distribution format by the gitea upstream developers.
# That mode is only supported for development of gitea within the
# source tree
# * sqlite: this is likely the database that everyone will use. Only
# particularly large installations will want to go through the
# effort of setting up a real database server.
# * sqlite sqlite_unlock_notify: this is likely the database that everyone
# will use. Only particularly large installations will want to go through
# the effort of setting up a real database server.
# * pam: PAM allows for authentication to varied external sources.
# Internal authentication supports the local database, OpenID, and
# LDAP, but basic other auth sources such as Kerberos and more
# exotic authenticators require PAM support to be useable.
# * tidb: This is an alternate database engine for users who would
# rather not use SQLite3 for some reason. It is also potentially
# more resiliant to corrupted writes.
go_build_tags="bindata sqlite pam tidb"
go_build_tags="bindata sqlite sqlite_unlock_notify pam"
hostmakedepends="go-bindata"
makedepends="sqlite-devel pam-devel"
depends="git bash"
checkdepends="git nodejs"
short_desc="Git with a cup of Tea"
maintainer="fosslinux <[email protected]>"
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=f17299ad5051190b8e8b4e36e7daf2a7246a779430f5c3810370f1eb978c340c
checksum=594f37000ac09016ed01f6dadb64f745ae3a16887cc0c97873cedd081f10ce34

system_accounts="_gitea"
_gitea_homedir="/var/lib/gitea"
Expand All @@ -40,6 +38,10 @@ make_dirs="/var/lib/gitea 0755 _gitea _gitea
/var/log/gitea 0755 _gitea root"
conf_files="/etc/gitea.conf"

do_check() {
make test-backend
}

post_install() {
vlicense LICENSE
vsv gitea
Expand Down