diff options
author | Thomas Fanninger | 2015-08-23 15:33:50 +0200 |
---|---|---|
committer | Thomas Fanninger | 2015-08-23 15:33:50 +0200 |
commit | d6705d775c818cbf285ef0576a22cef3c50ef4ee (patch) | |
tree | 174b76899be0b5ef97a6c11500cd65325612ec07 | |
parent | 6a81e0df0343274fb44fef028c3469a94a5a37a3 (diff) | |
download | aur-d6705d775c818cbf285ef0576a22cef3c50ef4ee.tar.gz |
Update build script + add some workarounds
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 25 | ||||
-rw-r--r-- | app.ini.patch | 16 | ||||
-rw-r--r-- | app_new.ini | 87 | ||||
-rw-r--r-- | app_old.ini | 87 | ||||
-rw-r--r-- | gogs.service | 2 | ||||
-rw-r--r-- | helper.sh | 24 | ||||
-rw-r--r-- | start.sh | 4 |
8 files changed, 200 insertions, 62 deletions
@@ -1,6 +1,6 @@ pkgbase = gogs-git-dev - pkgdesc = Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language. This is the current git version from branch dev. - pkgver = 20150116 + pkgdesc = Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language. This is the current git version from branch develop. + pkgver = 20150823 pkgrel = 1 epoch = 1 url = http://gogs.io/ @@ -11,8 +11,7 @@ pkgbase = gogs-git-dev arch = armv7h license = MIT makedepends = go>=1.2 - makedepends = git - makedepends = mercurial + makedepends = git>=1.7.1 makedepends = patch depends = git>=1.7.1 optdepends = sqlite: SQLite support @@ -29,13 +28,11 @@ pkgbase = gogs-git-dev backup = srv/gogs/conf/app.ini source = gogs.service source = app.ini.patch - source = start.sh source = helper.sh - source = gogs::git+https://github.com/gogits/gogs.git#branch=dev - sha512sums = 65bd06d530809917134b4fa2668136ada3e0cdc5a9c684ac422a973ad1c40c341d62cebf2ef14ee6275a134979d67cb314ec801a5a35ff1fb4e823aab671a151 - sha512sums = a09134a50b7369715f65553003db954ca3193ee2556fc3d8aa98c717aa2f2b275d691f1c7c62464ec8f32e800d8ddf814c75546317ab623d2bd9331c5702380d - sha512sums = d759778b73d78fb705dad7b3cb486a2e366fdf3222bd170823579407a9aba9d281423b1026a22d142fc9abf620a40a14880254105129071956870e3048dd8bc3 - sha512sums = 1e83441ebb24efe00e80f35eea6ed6d64a48194df3a3c90b02cd52a65099e8dfe046e0f914ac3dac7e4a30c854d967e2d5c928ee801f44053208dde2728fa17f + source = gogs::git+https://github.com/gogits/gogs.git#branch=develop + sha512sums = 2b4303f850e3b13b2fc3c9f0bc5820dae431d228002b35f01be0d4bfbcf05de8dcec2a559a85e318b609e4a4d492d44306eadf5f6508fd72333b198661bb0bb7 + sha512sums = 939be9ad851ae6e20b786e2e189b0b67c0198edfc8c83442934ec48c7be073e03c75172e79f23a6ee1e0eb467c6fa18096a66d69d1142ebba28fdc8bb2a3964c + sha512sums = e746dbdafc4c8d0b15a224dba95ae3151611ba9ff468ee6f0b1789e489955e4d7eaac0dbdf28a22e5b8211559af5950726f4a37d699a2490fd349f034401028c sha512sums = SKIP pkgname = gogs-git-dev @@ -3,8 +3,8 @@ pkgname=gogs-git-dev _pkgname=gogs -_branch=dev -pkgver=20150116 +_branch=develop +pkgver=20150823 pkgrel=1 epoch=1 pkgdesc="Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language. This is the current git version from branch ${_branch}." @@ -18,7 +18,7 @@ optdepends=('sqlite: SQLite support' 'redis: Redis support' 'memcached: MemCached support' 'openssh: GIT over SSH support') -makedepends=('go>=1.2' 'git' 'mercurial' 'patch') +makedepends=('go>=1.2' 'git>=1.7.1' 'patch') conflicts=('gogs-bin' 'gogs' 'gogs-git') options=('!strip' '!emptydirs') backup=('srv/gogs/conf/app.ini') @@ -28,14 +28,12 @@ install=gogs.install _gourl=github.com/gogits/$_pkgname source=('gogs.service' 'app.ini.patch' - 'start.sh' 'helper.sh' "$_pkgname::git+https://${_gourl}.git#branch=${_branch}") -sha512sums=('65bd06d530809917134b4fa2668136ada3e0cdc5a9c684ac422a973ad1c40c341d62cebf2ef14ee6275a134979d67cb314ec801a5a35ff1fb4e823aab671a151' - 'a09134a50b7369715f65553003db954ca3193ee2556fc3d8aa98c717aa2f2b275d691f1c7c62464ec8f32e800d8ddf814c75546317ab623d2bd9331c5702380d' - 'd759778b73d78fb705dad7b3cb486a2e366fdf3222bd170823579407a9aba9d281423b1026a22d142fc9abf620a40a14880254105129071956870e3048dd8bc3' - '1e83441ebb24efe00e80f35eea6ed6d64a48194df3a3c90b02cd52a65099e8dfe046e0f914ac3dac7e4a30c854d967e2d5c928ee801f44053208dde2728fa17f' +sha512sums=(2b4303f850e3b13b2fc3c9f0bc5820dae431d228002b35f01be0d4bfbcf05de8dcec2a559a85e318b609e4a4d492d44306eadf5f6508fd72333b198661bb0bb7 + 939be9ad851ae6e20b786e2e189b0b67c0198edfc8c83442934ec48c7be073e03c75172e79f23a6ee1e0eb467c6fa18096a66d69d1142ebba28fdc8bb2a3964c + e746dbdafc4c8d0b15a224dba95ae3151611ba9ff468ee6f0b1789e489955e4d7eaac0dbdf28a22e5b8211559af5950726f4a37d699a2490fd349f034401028c 'SKIP') _goroot="/usr/lib/go" @@ -71,12 +69,20 @@ prepare() { export GOPATH="$srcdir/build" mkdir -p "$GOPATH/src/github.com/gogits" + mv "$srcdir/$_pkgname" $GOPATH/src/${_gourl} msg2 "Check and download dependencies from .gopmfile" get_gopm "$GOPATH/src/${_gourl}/.gopmfile" "$GOPATH/src" -# go_get code.google.com/p/go.crypto "$GOPATH/src/go.crypto" + msg2 "Download missing dependencies" + go_get github.com/shurcooL/sanitized_anchor_name "$GOPATH/src/github.com/shurcooL/sanitized_anchor_name" +# go_get golang.org/x/net "$GOPATH/src/golang.org/x/net" +# go_get golang.org/x/text "$GOPATH/src/golang.org/x/text" + + msg2 "Workaround dependencies" + cd "$GOPATH/src/github.com/gogits/go-gogs-client/" + git checkout -q master # Execute patch msg2 "Execute patches" @@ -92,7 +98,6 @@ build() { } package() { - install -Dm0755 "$srcdir/start.sh" "$pkgdir/usr/share/$_pkgname/start.sh" install -Dm0755 "$srcdir/build/src/${_gourl}/$_pkgname" "$pkgdir/usr/share/$_pkgname/$_pkgname" cp -r "$srcdir/build/src/${_gourl}/conf" "$pkgdir/usr/share/$_pkgname" diff --git a/app.ini.patch b/app.ini.patch index 7799f60f97a4..dd912fd9e8e1 100644 --- a/app.ini.patch +++ b/app.ini.patch @@ -1,32 +1,32 @@ -4c4 +7c7 < RUN_USER = git --- > RUN_USER = gogs -9c9 +12c12 < ROOT = --- > ROOT = /srv/gogs/repo -34c34 +43c43 < STATIC_ROOT_PATH = --- > STATIC_ROOT_PATH = /usr/share/themes/gogs/default -50c50 +59c59 < PATH = data/gogs.db --- > PATH = /srv/gogs/sqlite/gogs.db -163c163 +184c184 < PROVIDER_CONFIG = data/sessions --- > PROVIDER_CONFIG = /srv/gogs/sessions -178c178 +199c199 < AVATAR_UPLOAD_PATH = data/avatars --- > AVATAR_UPLOAD_PATH = /srv/gogs/data/avatars -187c187 +209c209 < PATH = data/attachments --- > PATH = /srv/gogs/data/attachments -202c202 +224c224 < ROOT_PATH = --- > ROOT_PATH = /var/log/gogs diff --git a/app_new.ini b/app_new.ini index 81bea278d008..1a61538add51 100644 --- a/app_new.ini +++ b/app_new.ini @@ -1,3 +1,6 @@ +# NEVER EVER MODIFY THIS FILE +# PLEASE MAKE CHANGES ON CORRESPONDING CUSTOM CONFIG FILE + ; App name that shows on every page title APP_NAME = Gogs: Go Git Service ; Change it if you run locally @@ -9,12 +12,18 @@ RUN_MODE = dev ROOT = /srv/gogs/repo SCRIPT_TYPE = bash +[ui] +; Number of issues that are showed in one page +ISSUE_PAGING_NUM = 10 + [server] PROTOCOL = http DOMAIN = localhost ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/ HTTP_ADDR = HTTP_PORT = 3000 +; Disable SSH feature when not available +DISABLE_SSH = false SSH_PORT = 22 ; Disable CDN even in "prod" mode OFFLINE_MODE = false @@ -77,13 +86,17 @@ ENABLE_CACHE_AVATAR = false ENABLE_NOTIFY_MAIL = false ; More detail: https://github.com/gogits/gogs/issues/165 ENABLE_REVERSE_PROXY_AUTHENTICATION = false -ENABLE_REVERSE_PROXY_AUTO_REGISTERATION = false +ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false +; Do not check minimum key size with corresponding type +DISABLE_MINIMUM_KEY_SIZE_CHECK = false [webhook] -; Cron task interval in minutes -TASK_INTERVAL = 1 +; Hook task queue length +QUEUE_LENGTH = 1000 ; Deliver timeout in seconds DELIVER_TIMEOUT = 5 +; Allow insecure certification +SKIP_TLS_VERIFY = false [mailer] ENABLED = false @@ -95,10 +108,18 @@ SUBJECT = %(APP_NAME)s ; Gmail: smtp.gmail.com:587 ; QQ: smtp.qq.com:25 ; Note, if the port ends with "465", SMTPS will be used. Using STARTTLS on port 587 is recommended per RFC 6409. If the server supports STARTTLS it will always be used. -HOST = +HOST = +; Disable HELO operation when hostname are different. +DISABLE_HELO = +; Custom hostname for HELO operation, default is from system. +HELO_HOSTNAME = ; Do not verify the certificate of the server. Only use this for self-signed certificates SKIP_VERIFY = -; Mail from address, RFC 5322. This can be just an email address, or the "Name" <email@example.com> format +; Use client certificate +USE_CERTIFICATE = false +CERT_FILE = custom/mailer/cert.pem +KEY_FILE = custom/mailer/key.pem +; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format FROM = ; Mailer user name and password USER = @@ -148,7 +169,7 @@ ADAPTER = memory ; For "memory" only, GC interval in seconds, default is 60 INTERVAL = 60 ; For "redis" and "memcache", connection host address -; redis: `:6039` +; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180 ; memcache: `127.0.0.1:11211` HOST = @@ -158,7 +179,7 @@ PROVIDER = memory ; Provider config options ; memory: not have any config yet ; file: session file path, e.g. `data/sessions` -; redis: config like redis server addr, poolSize, password, e.g. `127.0.0.1:6379,100,gogs` +; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180 ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table` PROVIDER_CONFIG = /srv/gogs/sessions ; Session cookie name @@ -177,6 +198,7 @@ SESSION_LIFE_TIME = 86400 SERVICE = server AVATAR_UPLOAD_PATH = /srv/gogs/data/avatars ; Chinese users can choose "duoshuo" +; or a custom avatar source, like: http://cn.gravatar.com/avatar/ GRAVATAR_SOURCE = gravatar DISABLE_GRAVATAR = false @@ -190,7 +212,7 @@ ALLOWED_TYPES = image/jpeg|image/png ; Max size of each file. Defaults to 32MB MAX_SIZE = 32 ; Max number of files per upload. Defaults to 10 -MAX_FILES = 10 +MAX_FILES = 5 [time] ; Specifies the format for fully outputed dates. Defaults to RFC1123 @@ -259,15 +281,54 @@ DRIVER = ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8 CONN = -[git] -MAX_GITDIFF_LINES = 10000 +[cron] +; Enable running cron tasks periodically. +ENABLED = true +; Run cron tasks when Gogs starts. +RUN_AT_START = false + +; Update mirrors +[cron.update_mirrors] +SCHEDULE = @every 1h + +; Repository health check +[cron.repo_health_check] +SCHEDULE = @every 24h ; Arguments for command 'git fsck', e.g.: "--unreachable --tags" ; see more on http://git-scm.com/docs/git-fsck/1.7.5 -FSCK_ARGS = +ARGS = + +; Check repository statistics +[cron.check_repo_stats] +RUN_AT_START = true +SCHEDULE = @every 24h + +[git] +MAX_GIT_DIFF_LINES = 10000 ; Arguments for command 'git gc', e.g.: "--aggressive --auto" ; see more on http://git-scm.com/docs/git-gc/1.7.5 GC_ARGS = [i18n] -LANGS = en-US,zh-CN,zh-HK,de-DE,fr-CA,nl-NL,lv-LV -NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu
\ No newline at end of file +LANGS = en-US,zh-CN,zh-HK,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT +NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano + +; Used for datetimepicker +[i18n.datelang] +en-US = en +zh-CN = zh +zh-HK = zh-TW +de-DE = de +fr-FR = fr +nl-NL = nl +lv-LV = lv +ru-RU = ru +ja-JP = ja +es-ES = es +pt-BR = pt-BR +pl-PL = pl +bg-BG = bg +it-IT = it + +[other] +SHOW_FOOTER_BRANDING = false
\ No newline at end of file diff --git a/app_old.ini b/app_old.ini index 5a74ea2dc857..9b8e4145dc0b 100644 --- a/app_old.ini +++ b/app_old.ini @@ -1,3 +1,6 @@ +# NEVER EVER MODIFY THIS FILE +# PLEASE MAKE CHANGES ON CORRESPONDING CUSTOM CONFIG FILE + ; App name that shows on every page title APP_NAME = Gogs: Go Git Service ; Change it if you run locally @@ -9,12 +12,18 @@ RUN_MODE = dev ROOT = SCRIPT_TYPE = bash +[ui] +; Number of issues that are showed in one page +ISSUE_PAGING_NUM = 10 + [server] PROTOCOL = http DOMAIN = localhost ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/ HTTP_ADDR = HTTP_PORT = 3000 +; Disable SSH feature when not available +DISABLE_SSH = false SSH_PORT = 22 ; Disable CDN even in "prod" mode OFFLINE_MODE = false @@ -77,13 +86,17 @@ ENABLE_CACHE_AVATAR = false ENABLE_NOTIFY_MAIL = false ; More detail: https://github.com/gogits/gogs/issues/165 ENABLE_REVERSE_PROXY_AUTHENTICATION = false -ENABLE_REVERSE_PROXY_AUTO_REGISTERATION = false +ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false +; Do not check minimum key size with corresponding type +DISABLE_MINIMUM_KEY_SIZE_CHECK = false [webhook] -; Cron task interval in minutes -TASK_INTERVAL = 1 +; Hook task queue length +QUEUE_LENGTH = 1000 ; Deliver timeout in seconds DELIVER_TIMEOUT = 5 +; Allow insecure certification +SKIP_TLS_VERIFY = false [mailer] ENABLED = false @@ -95,10 +108,18 @@ SUBJECT = %(APP_NAME)s ; Gmail: smtp.gmail.com:587 ; QQ: smtp.qq.com:25 ; Note, if the port ends with "465", SMTPS will be used. Using STARTTLS on port 587 is recommended per RFC 6409. If the server supports STARTTLS it will always be used. -HOST = +HOST = +; Disable HELO operation when hostname are different. +DISABLE_HELO = +; Custom hostname for HELO operation, default is from system. +HELO_HOSTNAME = ; Do not verify the certificate of the server. Only use this for self-signed certificates SKIP_VERIFY = -; Mail from address, RFC 5322. This can be just an email address, or the "Name" <email@example.com> format +; Use client certificate +USE_CERTIFICATE = false +CERT_FILE = custom/mailer/cert.pem +KEY_FILE = custom/mailer/key.pem +; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format FROM = ; Mailer user name and password USER = @@ -148,7 +169,7 @@ ADAPTER = memory ; For "memory" only, GC interval in seconds, default is 60 INTERVAL = 60 ; For "redis" and "memcache", connection host address -; redis: `:6039` +; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180 ; memcache: `127.0.0.1:11211` HOST = @@ -158,7 +179,7 @@ PROVIDER = memory ; Provider config options ; memory: not have any config yet ; file: session file path, e.g. `data/sessions` -; redis: config like redis server addr, poolSize, password, e.g. `127.0.0.1:6379,100,gogs` +; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180 ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table` PROVIDER_CONFIG = data/sessions ; Session cookie name @@ -177,6 +198,7 @@ SESSION_LIFE_TIME = 86400 SERVICE = server AVATAR_UPLOAD_PATH = data/avatars ; Chinese users can choose "duoshuo" +; or a custom avatar source, like: http://cn.gravatar.com/avatar/ GRAVATAR_SOURCE = gravatar DISABLE_GRAVATAR = false @@ -190,7 +212,7 @@ ALLOWED_TYPES = image/jpeg|image/png ; Max size of each file. Defaults to 32MB MAX_SIZE = 32 ; Max number of files per upload. Defaults to 10 -MAX_FILES = 10 +MAX_FILES = 5 [time] ; Specifies the format for fully outputed dates. Defaults to RFC1123 @@ -259,15 +281,54 @@ DRIVER = ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8 CONN = -[git] -MAX_GITDIFF_LINES = 10000 +[cron] +; Enable running cron tasks periodically. +ENABLED = true +; Run cron tasks when Gogs starts. +RUN_AT_START = false + +; Update mirrors +[cron.update_mirrors] +SCHEDULE = @every 1h + +; Repository health check +[cron.repo_health_check] +SCHEDULE = @every 24h ; Arguments for command 'git fsck', e.g.: "--unreachable --tags" ; see more on http://git-scm.com/docs/git-fsck/1.7.5 -FSCK_ARGS = +ARGS = + +; Check repository statistics +[cron.check_repo_stats] +RUN_AT_START = true +SCHEDULE = @every 24h + +[git] +MAX_GIT_DIFF_LINES = 10000 ; Arguments for command 'git gc', e.g.: "--aggressive --auto" ; see more on http://git-scm.com/docs/git-gc/1.7.5 GC_ARGS = [i18n] -LANGS = en-US,zh-CN,zh-HK,de-DE,fr-CA,nl-NL,lv-LV -NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu
\ No newline at end of file +LANGS = en-US,zh-CN,zh-HK,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT +NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano + +; Used for datetimepicker +[i18n.datelang] +en-US = en +zh-CN = zh +zh-HK = zh-TW +de-DE = de +fr-FR = fr +nl-NL = nl +lv-LV = lv +ru-RU = ru +ja-JP = ja +es-ES = es +pt-BR = pt-BR +pl-PL = pl +bg-BG = bg +it-IT = it + +[other] +SHOW_FOOTER_BRANDING = false
\ No newline at end of file diff --git a/gogs.service b/gogs.service index 2b4aaec4b17c..f6cac7d2ac70 100644 --- a/gogs.service +++ b/gogs.service @@ -7,7 +7,7 @@ After=network.target Type=simple User=gogs Group=gogs -ExecStart=/usr/share/gogs/start.sh +ExecStart=/usr/share/gogs/gogs web --config /srv/gogs/conf/app.ini WorkingDirectory=/usr/share/gogs/ [Install] diff --git a/helper.sh b/helper.sh index 330e225f0b4a..b32164d31d6b 100644 --- a/helper.sh +++ b/helper.sh @@ -10,6 +10,9 @@ function go_get { elif [[ $1 == code.google.com* ]] then get_hg $1 $2 $3 + elif [[ $1 == golang.org* ]] + then + get_golang $1 $2 $3 else go get $1 fi @@ -23,14 +26,14 @@ function get_git { if [[ $3 != "master" ]] && [[ ${3:0} == commit* ]] then cd $2 - git checkout ${3:7} + git checkout -q ${3:7} elif [[ $3 != "master" ]] && [[ ${3:0} == tag* ]] then cd $2 - git checkout tags/${3:4} + git checkout -q tags/${3:4} else cd $2 - git checkout ${3:7} + git checkout -q ${3:7} fi } @@ -46,6 +49,21 @@ function get_hg { fi } +function get_golang { + if [[ $1 == "golang.org/x/net" ]] + then + echo $1 $2 $3 + get_git "github.com/golang/net" $2 + elif [[ $1 == "golang.org/x/text" ]] + then + echo $1 $2 $3 + get_git "github.com/golang/text" $2 + else + echo $1 $2 $3 + fi + +} + # Read the .gopmfile file and clone the branch/commits of the depends # $1 = .gopmfile file path # $2 = target directory path diff --git a/start.sh b/start.sh deleted file mode 100644 index 7688f3d0b983..000000000000 --- a/start.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -export GOGS_CUSTOM="/srv/gogs" -/usr/share/gogs/gogs web
\ No newline at end of file |