gitea: update to 1.12.2, fix cross build
The upstream tarball has been changed to gitea's hand-generated ones because of the recent sha256sum debacle, as well as their existence (they should be preferred). In addition, create_wrksrc=yes is now required. gitea also now uses nodejs to generate css and js files. However, in the tarballs, they pre-generate them. We use this. Configuration file changes have been moved to a .patch because the changes were getting very dense and difficult to read in a sed.
This commit is contained in:
parent
3b8aaa6990
commit
0f76bf349b
|
@ -1,23 +0,0 @@
|
|||
From 1830d0ed5f4a67e3360ecbb55933b5540b6affce Mon Sep 17 00:00:00 2001
|
||||
From: zeripath <art27@cantab.net>
|
||||
Date: Tue, 3 Mar 2020 03:37:10 +0000
|
||||
Subject: [PATCH] Remove unnecessary parentheses in template
|
||||
|
||||
Fix #10552
|
||||
---
|
||||
templates/repo/wiki/view.tmpl | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl
|
||||
index f160deedbd5..26ed049e63e 100644
|
||||
--- templates/repo/wiki/view.tmpl
|
||||
+++ templates/repo/wiki/view.tmpl
|
||||
@@ -45,7 +45,7 @@
|
||||
{{else if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
|
||||
<input id="repo-clone-url" value="{{$.WikiCloneLink.SSH}}" readonly>
|
||||
{{end}}
|
||||
- {{if or ((not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)))}}
|
||||
+ {{if or (not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))}}
|
||||
<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
|
||||
{{svg "octicon-clippy" 16}}
|
||||
</button>
|
|
@ -0,0 +1,136 @@
|
|||
--- custom/conf/app.ini.sample.orig 2020-06-22 08:49:03.000000000 +1000
|
||||
+++ custom/conf/app.ini.sample 2020-07-10 10:53:31.047000000 +1000
|
||||
@@ -7,12 +7,12 @@
|
||||
; App name that shows in every page title
|
||||
APP_NAME = Gitea: Git with a cup of tea
|
||||
; Change it if you run locally
|
||||
-RUN_USER = git
|
||||
+RUN_USER = _gitea
|
||||
; Either "dev", "prod" or "test", default is "dev"
|
||||
-RUN_MODE = dev
|
||||
+RUN_MODE = prod
|
||||
|
||||
[repository]
|
||||
-ROOT =
|
||||
+ROOT = /var/lib/gitea/repositories
|
||||
SCRIPT_TYPE = bash
|
||||
; Default ANSI charset
|
||||
ANSI_CHARSET =
|
||||
@@ -62,16 +62,16 @@
|
||||
PREVIEWABLE_FILE_MODES = markdown
|
||||
|
||||
[repository.local]
|
||||
-; Path for local repository copy. Defaults to `tmp/local-repo`
|
||||
-LOCAL_COPY_PATH = tmp/local-repo
|
||||
-; Path for local wiki copy. Defaults to `tmp/local-wiki`
|
||||
-LOCAL_WIKI_PATH = tmp/local-wiki
|
||||
+; Path for local repository copy. Defaults to `/var/lib/gitea/tmp/local-repo`
|
||||
+LOCAL_COPY_PATH = /var/lib/gitea/tmp/local-repo
|
||||
+; Path for local wiki copy. Defaults to `/var/lib/gitea/tmp/local-wiki`
|
||||
+LOCAL_WIKI_PATH = /var/lib/gitea/tmp/local-wiki
|
||||
|
||||
[repository.upload]
|
||||
; Whether repository file uploads are enabled. Defaults to `true`
|
||||
ENABLED = true
|
||||
; Path for uploads. Defaults to `data/tmp/uploads` (tmp gets deleted on gitea restart)
|
||||
-TEMP_PATH = data/tmp/uploads
|
||||
+TEMP_PATH = /var/lib/gitea/tmp/uploads
|
||||
; One or more allowed types, e.g. image/jpeg|image/png. Nothing means any file type
|
||||
ALLOWED_TYPES =
|
||||
; Max size of each file in megabytes. Defaults to 3MB
|
||||
@@ -248,7 +248,7 @@
|
||||
REDIRECT_OTHER_PORT = false
|
||||
PORT_TO_REDIRECT = 80
|
||||
; 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.
|
||||
; Alter it only if your SSH server node is not the same as HTTP node.
|
||||
@@ -269,7 +269,7 @@
|
||||
; The port number the builtin SSH server should listen on
|
||||
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
|
||||
; 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.
|
||||
SSH_CREATE_AUTHORIZED_KEYS_FILE = true
|
||||
@@ -308,7 +308,7 @@
|
||||
KEY_FILE = https/key.pem
|
||||
; Root directory containing templates and static files.
|
||||
; default is the path where Gitea is executed
|
||||
-STATIC_ROOT_PATH =
|
||||
+STATIC_ROOT_PATH = /var/lib/gitea
|
||||
; Default path for App data
|
||||
APP_DATA_PATH = data
|
||||
; Application level GZIP support
|
||||
@@ -325,7 +325,7 @@
|
||||
; Enables git-lfs support. true or false, default is false.
|
||||
LFS_START_SERVER = false
|
||||
; Where your lfs files reside, default is data/lfs.
|
||||
-LFS_CONTENT_PATH = data/lfs
|
||||
+LFS_CONTENT_PATH = /var/lib/gitea/lfs
|
||||
; LFS authentication secret, change this yourself
|
||||
LFS_JWT_SECRET =
|
||||
; LFS authentication validity period (in time.Duration), pushes taking longer than this may fail.
|
||||
@@ -355,7 +355,7 @@
|
||||
|
||||
[database]
|
||||
; Database to use. Either "mysql", "postgres", "mssql" or "sqlite3".
|
||||
-DB_TYPE = mysql
|
||||
+DB_TYPE = sqlite3
|
||||
HOST = 127.0.0.1:3306
|
||||
NAME = gitea
|
||||
USER = root
|
||||
@@ -372,7 +372,7 @@
|
||||
; NOTICE: for "utf8mb4" you must use MySQL InnoDB > 5.6. Gitea is unable to check this.
|
||||
CHARSET = utf8
|
||||
; For "sqlite3" and "tidb", use an absolute path when you start gitea as service
|
||||
-PATH = data/gitea.db
|
||||
+PATH = /var/lib/gitea/data/gitea.db
|
||||
; For "sqlite3" only. Query timeout
|
||||
SQLITE_TIMEOUT = 500
|
||||
; For iterate buffer, default is 50
|
||||
@@ -398,7 +398,7 @@
|
||||
; Issue indexer name, available when ISSUE_INDEXER_TYPE is elasticsearch
|
||||
ISSUE_INDEXER_NAME = gitea_issues
|
||||
; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve
|
||||
-ISSUE_INDEXER_PATH = indexers/issues.bleve
|
||||
+ISSUE_INDEXER_PATH = /var/lib/gitea/indexers/issues.bleve
|
||||
; Issue indexer queue, currently support: channel, levelqueue or redis, default is levelqueue
|
||||
ISSUE_INDEXER_QUEUE_TYPE = levelqueue
|
||||
; When ISSUE_INDEXER_QUEUE_TYPE is levelqueue, this will be the queue will be saved path,
|
||||
@@ -706,7 +706,7 @@
|
||||
SESSION_LIFE_TIME = 86400
|
||||
|
||||
[picture]
|
||||
-AVATAR_UPLOAD_PATH = data/avatars
|
||||
+AVATAR_UPLOAD_PATH = /var/lib/gitea/data/avatars
|
||||
REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars
|
||||
; How Gitea deals with missing repository avatars
|
||||
; none = no avatar will be displayed; random = random avatar will be displayed; image = default image will be used
|
||||
@@ -751,7 +751,7 @@
|
||||
DEFAULT_UI_LOCATION =
|
||||
|
||||
[log]
|
||||
-ROOT_PATH =
|
||||
+ROOT_PATH = /var/log/gitea
|
||||
; Either "console", "file", "conn", "smtp" or "database", default is "console"
|
||||
; Use comma to separate multiple modes, e.g. "console, file"
|
||||
MODE = console
|
||||
@@ -968,14 +968,6 @@
|
||||
sv-SE = sv
|
||||
ko-KR = ko
|
||||
|
||||
-[U2F]
|
||||
-; NOTE: THE DEFAULT VALUES HERE WILL NEED TO BE CHANGED
|
||||
-; Two Factor authentication with security keys
|
||||
-; https://developers.yubico.com/U2F/App_ID.html
|
||||
-;APP_ID = http://localhost:3000/
|
||||
-; Comma seperated list of trusted facets
|
||||
-;TRUSTED_FACETS = http://localhost:3000/
|
||||
-
|
||||
; Extension mapping to highlight class
|
||||
; e.g. .toml=ini
|
||||
[highlight.mapping]
|
|
@ -1,9 +1,11 @@
|
|||
# Template file for 'gitea'
|
||||
pkgname=gitea
|
||||
version=1.11.6
|
||||
version=1.12.2
|
||||
revision=1
|
||||
create_wrksrc=yes
|
||||
build_style=go
|
||||
go_import_path=code.gitea.io/gitea
|
||||
go_ldflags=" -X main.Version=${version}"
|
||||
# This could be done with build options, but these are built in with the
|
||||
# following justification.
|
||||
# * bindata: running with things not all in the binary is not a
|
||||
|
@ -21,18 +23,16 @@ go_import_path=code.gitea.io/gitea
|
|||
# rather not use SQLite3 for some reason. It is also potentially
|
||||
# more resiliant to corrupted writes.
|
||||
go_build_tags="bindata sqlite pam tidb"
|
||||
go_ldflags=" -X main.Version=${version}"
|
||||
hostmakedepends="go-bindata git"
|
||||
makedepends="sqlite-devel pam-devel"
|
||||
depends="git bash"
|
||||
short_desc="Git with a cup of Tea"
|
||||
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
|
||||
maintainer="fosslinux <fosslinux@aussies.space>"
|
||||
license="MIT"
|
||||
homepage="https://gitea.io"
|
||||
changelog="https://github.com/go-gitea/gitea/blob/master/CHANGELOG.md"
|
||||
distfiles="https://github.com/go-gitea/gitea/archive/v${version}.tar.gz"
|
||||
checksum=ab6dcc47d3ba3441c8b343bfc2db9bae0a6ea3cae53519211adfd7e4e2716db9
|
||||
nocross="https://api.travis-ci.org/v3/job/616733825/log.txt"
|
||||
distfiles="https://github.com/go-gitea/gitea/releases/download/v${version}/gitea-src-${version}.tar.gz"
|
||||
checksum=695dae81327bdfaa4adaa9d3dc9d2bdcb78d54ac73abac3a630750465858ff8b
|
||||
|
||||
system_accounts="_gitea"
|
||||
_gitea_homedir="/var/lib/gitea"
|
||||
|
@ -42,31 +42,11 @@ make_dirs="/var/lib/gitea 0755 _gitea _gitea
|
|||
conf_files="/etc/gitea.conf"
|
||||
|
||||
pre_build() {
|
||||
make generate
|
||||
}
|
||||
|
||||
pre_install() {
|
||||
sed -i \
|
||||
'/RUN_USER/s:git:_gitea:
|
||||
s:666:660:
|
||||
/RUN_MODE/s:dev:prod:
|
||||
/DB_TYPE/s:mysql:sqlite3:
|
||||
s:ROOT =:& /var/lib/gitea/repositories:
|
||||
s:tmp/local-repo:/var/lib/gitea/&:
|
||||
s:tmp/local-wiki:/var/lib/gitea/&:
|
||||
/TEMP_PATH/s:data/tmp/uploads:/var/lib/gitea/tmp/uploads:
|
||||
/LFS_CONTENT/s:data/lfs:/var/lib/gitea/lfs:
|
||||
s:data/gitea.db:/var/lib/gitea/&:
|
||||
s:indexers/issues.bleve:/var/lib/gitea/&:
|
||||
s:data/avatars:/var/lib/gitea/&:
|
||||
s:SSH_ROOT_PATH =:& /var/lib/gitea:
|
||||
s:STATIC_ROOT_PATH =:& /var/lib/gitea:
|
||||
s:^ROOT_PATH =:& /var/log/gitea:' custom/conf/app.ini.sample
|
||||
go mod vendor
|
||||
}
|
||||
|
||||
post_install() {
|
||||
vlicense LICENSE
|
||||
vsv gitea
|
||||
sed -e '/^\[U2F\]$/,/^$/d' -i custom/conf/app.ini.sample
|
||||
vinstall custom/conf/app.ini.sample 0640 /etc gitea.conf
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue