forked from void-linux/void-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7b59dd
commit 49f2ace
Showing
4 changed files
with
179 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
case "${ACTION}" in | ||
post) | ||
chown _forgejo:_forgejo etc/forgejo.conf | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
exec 2>&1 | ||
|
||
export USER=_forgejo | ||
export HOME=/var/lib/forgejo | ||
|
||
export GITEA_WORK_DIR="${HOME}" | ||
|
||
cd "${HOME}" | ||
exec chpst -u _forgejo:_forgejo forgejo web --config /etc/forgejo.conf 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini | ||
index 1ae1a3b..a9e16ea 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 | ||
-RUN_USER = ; git | ||
+RUN_USER = _forgejo | ||
;; | ||
;; 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 @@ 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 @@ RUN_USER = ; git | ||
;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/forgejo/.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 @@ RUN_USER = ; git | ||
;; | ||
;; Root directory containing templates and static files. | ||
;; default is the path where Gitea is executed | ||
-;STATIC_ROOT_PATH = ; Will default to the built-in value _`StaticRootPath`_ | ||
+STATIC_ROOT_PATH = /var/lib/forgejo | ||
;; | ||
;; Default path for App data | ||
;APP_DATA_PATH = data ; relative paths will be made absolute with _`AppWorkPath`_ | ||
@@ -338,10 +338,10 @@ LFS_JWT_SECRET = | ||
;; | ||
;; MySQL Configuration | ||
;; | ||
-DB_TYPE = mysql | ||
-HOST = 127.0.0.1:3306 ; can use socket e.g. /var/run/mysqld/mysqld.sock | ||
-NAME = gitea | ||
-USER = root | ||
+;DB_TYPE = mysql | ||
+;HOST = 127.0.0.1:3306 ; can use socket e.g. /var/run/mysqld/mysqld.sock | ||
+;NAME = gitea | ||
+;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 @@ USER = root | ||
;; | ||
;; SQLite Configuration | ||
;; | ||
-;DB_TYPE = sqlite3 | ||
-;PATH= ; defaults to data/forgejo.db | ||
+DB_TYPE = sqlite3 | ||
+PATH= /var/lib/forgejo/data/forgejo.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 | ||
;; | ||
@@ -545,7 +545,7 @@ ENABLE = true | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;; Root path for the log files - defaults to %(GITEA_WORK_DIR)/log | ||
-;ROOT_PATH = | ||
+ROOT_PATH = /var/log/forgejo | ||
;; | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;; Main Logger | ||
@@ -877,7 +877,7 @@ LEVEL = Info | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;; 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/forgejo/repositories | ||
;; | ||
;; The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available. | ||
;SCRIPT_TYPE = bash | ||
@@ -975,7 +975,7 @@ LEVEL = Info | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;; | ||
;; 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/forgejo/tmp/local-repo | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
@@ -987,7 +987,7 @@ LEVEL = Info | ||
;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/forgejo/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 = | ||
@@ -1335,7 +1335,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/forgejo/indexers/issues.bleve ; Relative paths will be made absolute against _`AppWorkPath`_. | ||
;; | ||
;; Issue indexer connection string, available when ISSUE_INDEXER_TYPE is elasticsearch or meilisearch | ||
;ISSUE_INDEXER_CONN_STR = http://elastic:changeme@localhost:9200 | ||
@@ -1742,7 +1742,7 @@ LEVEL = Info | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;; | ||
-;AVATAR_UPLOAD_PATH = data/avatars | ||
+AVATAR_UPLOAD_PATH = /var/lib/forgejo/data/avatars | ||
;REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars | ||
;; | ||
;; How Gitea deals with missing repository avatars | ||
@@ -2488,7 +2488,7 @@ LEVEL = Info | ||
;STORAGE_TYPE = local | ||
;; | ||
;; Where your lfs files reside, default is data/lfs. | ||
-;PATH = data/lfs | ||
+PATH = /var/lib/forgejo/data/lfs | ||
;; | ||
;; override the minio base path if storage type is minio | ||
;MINIO_BASE_PATH = lfs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Template file for 'forgejo' | ||
pkgname=forgejo | ||
version=1.20.4.0 | ||
revision=1 | ||
_forgejo_version="${version%.*}-${version##*.}" | ||
build_style=go | ||
go_import_path="code.gitea.io/gitea" | ||
go_ldflags="-X main.Version=${version%.*}" | ||
go_build_tags="bindata pam sqlite tidb" | ||
hostmakedepends="go-bindata" | ||
makedepends="pam-devel sqlite-devel" | ||
depends="bash git" | ||
short_desc="Self-hosted lightweight software forge" | ||
maintainer="Marcin Puc <[email protected]>" | ||
license="MIT" | ||
homepage="https://forgejo.org/" | ||
changelog="https://codeberg.org/forgejo/forgejo/raw/branch/forgejo/RELEASE-NOTES.md" | ||
distfiles="https://codeberg.org/forgejo/forgejo/releases/download/v${_forgejo_version}/forgejo-src-${_forgejo_version}.tar.gz" | ||
checksum=c0531968d5110213af09970200f45792b130008c58932bf9a5d986b2e8e78b54 | ||
|
||
system_accounts="_forgejo" | ||
_forgejo_homedir="/var/lib/forgejo" | ||
_forgejo_descr="Self-hosted lightweight software forge service" | ||
_forgejo_shell="/bin/bash" | ||
make_dirs="/var/lib/forgejo 0755 _forgejo _forgejo | ||
/var/log/forgejo 0755 _forgejo root" | ||
conf_files="/etc/forgejo.conf" | ||
|
||
post_install() { | ||
vinstall custom/conf/app.example.ini 640 etc forgejo.conf | ||
vlicense LICENSE | ||
vsv forgejo | ||
|
||
mv "${DESTDIR}/usr/bin"/{gitea,forgejo} | ||
} |