3 Коммиты dd6efa538e ... e7767930ab

Автор SHA1 Сообщение Дата
  Thomas Fanninger e7767930ab Change build system to Glide 10 лет назад
  Thomas Fanninger 1fb896bec6 Bugfix wrong commit version in .gopmfile 10 лет назад
  Thomas Fanninger 9dcfbbb0df Update to current commit version 10 лет назад
10 измененных файлов с 166 добавлено и 184 удалено
  1. 7 6
      .SRCINFO
  2. 12 20
      PKGBUILD
  3. 0 9
      README.md
  4. 10 6
      app.ini.patch
  5. 63 26
      app_new.ini
  6. 60 25
      app_old.ini
  7. 2 2
      gogs.service.patch
  8. 6 0
      gogs_new.service
  9. 6 0
      gogs_old.service
  10. 0 90
      helper.sh

+ 7 - 6
.SRCINFO

@@ -1,7 +1,9 @@
+# Generated by mksrcinfo v8
+# Thu May 26 18:05:46 UTC 2016
 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 develop.
-	pkgver = 3166.9950f5a
-	pkgrel = 1
+	pkgver = 3879.3c0c7a9
+	pkgrel = 3
 	epoch = 1
 	url = http://gogs.io/
 	install = gogs.install
@@ -14,6 +16,7 @@ pkgbase = gogs-git-dev
 	makedepends = git>=1.7.1
 	makedepends = patch
 	depends = git>=1.7.1
+	depends = glide
 	optdepends = sqlite: SQLite support
 	optdepends = mariadb: MariaDB support
 	optdepends = postgresql: PostgreSQL support
@@ -29,11 +32,9 @@ pkgbase = gogs-git-dev
 	backup = srv/gogs/conf/app.ini
 	source = gogs.service.patch
 	source = app.ini.patch
-	source = helper.sh
 	source = gogs::git+https://github.com/gogits/gogs.git#branch=develop
-	sha512sums = 834e95fe9bcfa291a573ad1fa43f41bbed844658a918ff4fcf53ab8a44a296206ee4003eab1d9a2785c9126be077022f4907846d2eb6c5d64050b5e81ce47f44
-	sha512sums = d4f6518c644b76e4d1688cd5756c9eea7a89d0abad68a14638ccc6f0d1006c164c1ae3b3f89efd903def7398a3dabce7299100303808ad7a1937407a9eb13a39
-	sha512sums = e45775adafeecad5deaf24a98cd85b25a8383cb0e89905b2927c13fe7f0ec9918a42071ce43eabc429d8a826db93bb75ffb1927dce9c431ed88b0b5c619fd60d
+	sha512sums = db36fd44c29de387b066e52a71a61214aa876a27574eb054ec9517a175b5a47db9a7de01be2dd635023a11d5e1224772a66accc4b63b6936f7c58e6314555a66
+	sha512sums = 43c8971b0b4e8ea8d5aa0ed15610e9737605dc46a626d3d578bb1c97c9f90912966f59b452e9f4ea7974e4e3beaa5dd40bc597b03319afed3358432ab6e59c7d
 	sha512sums = SKIP
 
 pkgname = gogs-git-dev

+ 12 - 20
PKGBUILD

@@ -4,14 +4,15 @@
 pkgname=gogs-git-dev
 _pkgname=gogs
 _branch=develop
-pkgver=3166.9950f5a
-pkgrel=1
+pkgver=3879.3c0c7a9
+pkgrel=3
 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}."
 arch=('i686' 'x86_64' 'armv6h' 'armv7h')
 url="http://gogs.io/"
 license=('MIT')
-depends=('git>=1.7.1')
+depends=('git>=1.7.1'
+         'glide')
 optdepends=('sqlite: SQLite support'
             'mariadb: MariaDB support'
             'postgresql: PostgreSQL support'
@@ -29,24 +30,20 @@ install=gogs.install
 _gourl=github.com/gogits/$_pkgname
 source=('gogs.service.patch'
         'app.ini.patch'
-        'helper.sh'
         "$_pkgname::git+https://${_gourl}.git#branch=${_branch}")
 
-sha512sums=(834e95fe9bcfa291a573ad1fa43f41bbed844658a918ff4fcf53ab8a44a296206ee4003eab1d9a2785c9126be077022f4907846d2eb6c5d64050b5e81ce47f44
-            d4f6518c644b76e4d1688cd5756c9eea7a89d0abad68a14638ccc6f0d1006c164c1ae3b3f89efd903def7398a3dabce7299100303808ad7a1937407a9eb13a39
-            e45775adafeecad5deaf24a98cd85b25a8383cb0e89905b2927c13fe7f0ec9918a42071ce43eabc429d8a826db93bb75ffb1927dce9c431ed88b0b5c619fd60d
+sha512sums=(db36fd44c29de387b066e52a71a61214aa876a27574eb054ec9517a175b5a47db9a7de01be2dd635023a11d5e1224772a66accc4b63b6936f7c58e6314555a66
+            43c8971b0b4e8ea8d5aa0ed15610e9737605dc46a626d3d578bb1c97c9f90912966f59b452e9f4ea7974e4e3beaa5dd40bc597b03319afed3358432ab6e59c7d
             'SKIP')
 
 _goroot="/usr/lib/go"
 
 pkgver(){
-  cd "$srcdir/$_pkgname"
+  cd "$srcdir/../$_pkgname"
   echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
 }
 
 prepare() {
-  source $srcdir/helper.sh
-
   export GOROOT=/usr/lib/go
   
   msg2 "Prepare GO build enviroment"
@@ -73,15 +70,10 @@ prepare() {
 
   mv "$srcdir/$_pkgname" $GOPATH/src/${_gourl}
 
-  msg2 "Check and download dependencies from .gopmfile"
-  get_gopm "$GOPATH/src/${_gourl}/.gopmfile" "$GOPATH/src"
-
-  msg2 "Download missing dependencies"
-#  go_get github.com/macaron-contrib/oauth2 "$GOPATH/src/github.com/macaron-contrib/oauth2"
-
-  msg2 "Workaround dependencies"
-  cd "$GOPATH/src/github.com/gogits/go-gogs-client/"
-  git checkout -q master
+  # Glide
+  msg2 "Download dependencies via Glide"
+  cd $GOPATH/src/${_gourl}
+  glide install
 
   # Execute patch
   msg2 "Execute patches"
@@ -94,7 +86,7 @@ build() {
 
   msg2 "Build program"
   go fix
-  go build -x -tags='sqlite'
+  go build -x -tags='sqlite pam cert'
 }
 
 package() {

+ 0 - 9
README.md

@@ -2,15 +2,6 @@
 PKGBUILD files for different versions of Gogs (Go Git Service).
 
 ## Open points
-* ~~Systemd service support~~
-* ~~better file structure~~
-* ~~Publishing on https://aur.archlinux.org~~
-* Test
-  * MariaDB support
-  * PostgreSQL support
-* ~~Test on armv6h (Raspberry Pi), armv7h (Cubieboard 2) and on x86_64~~
-* Documentation for usage and configuration - Started with Archlinux Wiki page https://wiki.archlinux.org/index.php/Gogs
-* ~~Read dependencies out of ".gopmfile"~~
 
 ## Install
 ```

+ 10 - 6
app.ini.patch

@@ -6,27 +6,31 @@
 < ROOT =
 ---
 > ROOT = /srv/gogs/repo
-69c69
+95c95
 < STATIC_ROOT_PATH =
 ---
 > STATIC_ROOT_PATH = /usr/share/themes/gogs/default
-85c85
+97c97
+< APP_DATA_PATH = data
+---
+> APP_DATA_PATH = /srv/gogs/data
+120c120
 < PATH = data/gogs.db
 ---
 > PATH = /srv/gogs/sqlite/gogs.db
-186c186
+207c207
 < PROVIDER_CONFIG = data/sessions
 ---
 > PROVIDER_CONFIG = /srv/gogs/sessions
-201c201
+220c220
 < AVATAR_UPLOAD_PATH = data/avatars
 ---
 > AVATAR_UPLOAD_PATH = /srv/gogs/data/avatars
-211c211
+230c230
 < PATH = data/attachments
 ---
 > PATH = /srv/gogs/data/attachments
-226c226
+245c245
 < ROOT_PATH =
 ---
 > ROOT_PATH = /var/log/gogs

+ 63 - 26
app_new.ini

@@ -15,6 +15,8 @@ SCRIPT_TYPE = bash
 ANSI_CHARSET = 
 ; Force every new repository to be private
 FORCE_PRIVATE = false
+; Global maximum creation limit of repository per user, -1 means no limit
+MAX_CREATION_LIMIT = -1
 ; Patch test queue length, make it as large as possible
 PULL_REQUEST_QUEUE_LENGTH = 10000
 
@@ -25,6 +27,10 @@ EXPLORE_PAGING_NUM = 20
 ISSUE_PAGING_NUM = 10
 ; Number of maximum commits showed in one activity feed
 FEED_MAX_COMMIT_NUM = 5
+; Value of `theme-color` meta tag, used by Android >= 5.0
+; An invalid color like "none" or "disable" will have the default style
+; More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
+THEME_COLOR_META_TAG = `#ff5343`
 
 [ui.admin]
 ; Number of users that are showed in one page
@@ -32,13 +38,16 @@ USER_PAGING_NUM = 50
 ; Number of repos that are showed in one page
 REPO_PAGING_NUM = 50
 ; Number of notices that are showed in one page
-NOTICE_PAGING_NUM = 50
+NOTICE_PAGING_NUM = 25
 ; Number of organization that are showed in one page
 ORG_PAGING_NUM = 50
 
 [markdown]
 ; Enable hard line break extension
 ENABLE_HARD_LINE_BREAK = false
+; List of custom URL-Schemes that are allowed as links when rendering Markdown
+; for example git,magnet
+CUSTOM_URL_SCHEMES =
 
 [server]
 PROTOCOL = http
@@ -46,16 +55,33 @@ DOMAIN = localhost
 ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
 HTTP_ADDR =
 HTTP_PORT = 3000
+; Local (DMZ) URL for Gogs 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.
+LOCAL_ROOT_URL = http://localhost:%(HTTP_PORT)s/
 ; Disable SSH feature when not available
 DISABLE_SSH = false
 ; Whether use builtin SSH server or not.
 START_SSH_SERVER = false
+; Domain name to be exposed in clone URL
+SSH_DOMAIN = %(DOMAIN)s
+; Port number to be exposed in clone URL
 SSH_PORT = 22
+; Port number builtin SSH server listens 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 = 
+; Directory to create temporary files when test publick key using ssh-keygen,
+; default is system temporary directory.
+SSH_KEY_TEST_PATH =
+; Path to ssh-keygen, default is 'ssh-keygen' and let shell find out which one to call.
+SSH_KEYGEN_PATH = ssh-keygen
+; Indicate whether to check minimum key size with corresponding type
+MINIMUM_KEY_SIZE_CHECK = false
 ; Disable CDN even in "prod" mode
 OFFLINE_MODE = false
 DISABLE_ROUTER_LOG = false
 ; Generate steps:
-; $ cd path/to/gogs/custom/https
 ; $ ./gogs cert -ca=true -duration=8760h0m0s -host=myhost.example.com
 ;
 ; Or from a .pfx file exported from the Windows certificate store (do
@@ -67,11 +93,20 @@ KEY_FILE = custom/https/key.pem
 ; Upper level of template and static file path
 ; default is the path where Gogs is executed
 STATIC_ROOT_PATH = /usr/share/themes/gogs/default
+; Default path for App data
+APP_DATA_PATH = /srv/gogs/data
 ; Application level GZIP support
 ENABLE_GZIP = false
 ; Landing page for non-logged users, can be "home" or "explore"
 LANDING_PAGE = home
 
+; Define allowed algorithms and their minimum key length (use -1 to disable a type)
+[ssh.minimum_key_sizes]
+ED25519 = 256
+ECDSA   = 256
+RSA     = 2048
+DSA     = 1024
+
 [database]
 ; Either "mysql", "postgres" or "sqlite3", it's your choice
 DB_TYPE = mysql
@@ -81,7 +116,7 @@ USER = root
 PASSWD =
 ; For "postgres" only, either "disable", "require" or "verify-full"
 SSL_MODE = disable
-; For "sqlite3" and "tidb"
+; For "sqlite3" and "tidb", use absolute path when you start as service
 PATH = /srv/gogs/sqlite/gogs.db
 
 [admin]
@@ -106,28 +141,14 @@ REGISTER_EMAIL_CONFIRM = false
 DISABLE_REGISTRATION = false
 ; User must sign in to view anything.
 REQUIRE_SIGNIN_VIEW = false
-; Cache avatar as picture
-ENABLE_CACHE_AVATAR = false
 ; Mail notification
 ENABLE_NOTIFY_MAIL = false
 ; More detail: https://github.com/gogits/gogs/issues/165
 ENABLE_REVERSE_PROXY_AUTHENTICATION = false
 ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
-; Do not check minimum key size with corresponding type
-DISABLE_MINIMUM_KEY_SIZE_CHECK = false
 ; Enable captcha validation for registration
 ENABLE_CAPTCHA = true
 
-; used to filter keys which are too short
-[service.minimum_key_sizes]
-ED25519 = 256
-ECDSA   = 256
-NTRU    = 1087
-MCE     = 1702
-McE     = 1702
-RSA     = 1024
-DSA     = 1024
-
 [webhook]
 ; Hook task queue length
 QUEUE_LENGTH = 1000
@@ -196,8 +217,6 @@ GC_INTERVAL_TIME = 86400
 SESSION_LIFE_TIME = 86400
 
 [picture]
-; The place to picture data, either "server" or "qiniu", default is "server"
-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/
@@ -265,8 +284,8 @@ ADDR =
 ; For "smtp" mode only
 [log.smtp]
 LEVEL =
-; Name displayed in mail title, default is "Diagnostic message from serve"
-SUBJECT = Diagnostic message from serve
+; Name displayed in mail title, default is "Diagnostic message from server"
+SUBJECT = Diagnostic message from server
 ; Mail server
 HOST =
 ; Mailer user name and password
@@ -296,7 +315,8 @@ SCHEDULE = @every 1h
 ; Repository health check
 [cron.repo_health_check]
 SCHEDULE = @every 24h
-; Arguments for command 'git fsck', e.g.: "--unreachable --tags"
+TIMEOUT = 60s
+; Arguments for command 'git fsck', e.g. "--unreachable --tags"
 ; see more on http://git-scm.com/docs/git-fsck/1.7.5
 ARGS = 
 
@@ -307,19 +327,27 @@ SCHEDULE = @every 24h
 
 [git]
 MAX_GIT_DIFF_LINES = 10000
-; Arguments for command 'git gc', e.g.: "--aggressive --auto"
+; Arguments for command 'git gc', e.g. "--aggressive --auto"
 ; see more on http://git-scm.com/docs/git-gc/1.7.5
 GC_ARGS = 
 
+; Operation timeout in seconds
+[git.timeout]
+MIGRATE = 600
+MIRROR = 300
+CLONE = 300
+PULL = 300
+
 [i18n]
-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
+LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ
+NAMES = English,简体中文,繁體中文(香港),繁體中文(台湾),Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano,Suomalainen,Türk,čeština
 
 ; Used for datetimepicker
 [i18n.datelang]
 en-US = en
 zh-CN = zh
 zh-HK = zh-TW
+zh-TW = zh-TW
 de-DE = de
 fr-FR = fr
 nl-NL = nl
@@ -331,6 +359,15 @@ pt-BR = pt-BR
 pl-PL = pl
 bg-BG = bg
 it-IT = it
+fi-FI = fi
+tr-TR = tr
+cs-CZ = cs-CZ
+
+; Extension mapping to highlight class
+; e.g. .toml=ini
+[highlight.mapping]
 
 [other]
-SHOW_FOOTER_BRANDING = false
+SHOW_FOOTER_BRANDING = false
+; Show version information about gogs and go in the footer
+SHOW_FOOTER_VERSION = true

+ 60 - 25
app_old.ini

@@ -15,6 +15,8 @@ SCRIPT_TYPE = bash
 ANSI_CHARSET = 
 ; Force every new repository to be private
 FORCE_PRIVATE = false
+; Global maximum creation limit of repository per user, -1 means no limit
+MAX_CREATION_LIMIT = -1
 ; Patch test queue length, make it as large as possible
 PULL_REQUEST_QUEUE_LENGTH = 10000
 
@@ -25,6 +27,10 @@ EXPLORE_PAGING_NUM = 20
 ISSUE_PAGING_NUM = 10
 ; Number of maximum commits showed in one activity feed
 FEED_MAX_COMMIT_NUM = 5
+; Value of `theme-color` meta tag, used by Android >= 5.0
+; An invalid color like "none" or "disable" will have the default style
+; More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
+THEME_COLOR_META_TAG = `#ff5343`
 
 [ui.admin]
 ; Number of users that are showed in one page
@@ -32,13 +38,16 @@ USER_PAGING_NUM = 50
 ; Number of repos that are showed in one page
 REPO_PAGING_NUM = 50
 ; Number of notices that are showed in one page
-NOTICE_PAGING_NUM = 50
+NOTICE_PAGING_NUM = 25
 ; Number of organization that are showed in one page
 ORG_PAGING_NUM = 50
 
 [markdown]
 ; Enable hard line break extension
 ENABLE_HARD_LINE_BREAK = false
+; List of custom URL-Schemes that are allowed as links when rendering Markdown
+; for example git,magnet
+CUSTOM_URL_SCHEMES =
 
 [server]
 PROTOCOL = http
@@ -46,16 +55,33 @@ DOMAIN = localhost
 ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
 HTTP_ADDR =
 HTTP_PORT = 3000
+; Local (DMZ) URL for Gogs 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.
+LOCAL_ROOT_URL = http://localhost:%(HTTP_PORT)s/
 ; Disable SSH feature when not available
 DISABLE_SSH = false
 ; Whether use builtin SSH server or not.
 START_SSH_SERVER = false
+; Domain name to be exposed in clone URL
+SSH_DOMAIN = %(DOMAIN)s
+; Port number to be exposed in clone URL
 SSH_PORT = 22
+; Port number builtin SSH server listens 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 = 
+; Directory to create temporary files when test publick key using ssh-keygen,
+; default is system temporary directory.
+SSH_KEY_TEST_PATH =
+; Path to ssh-keygen, default is 'ssh-keygen' and let shell find out which one to call.
+SSH_KEYGEN_PATH = ssh-keygen
+; Indicate whether to check minimum key size with corresponding type
+MINIMUM_KEY_SIZE_CHECK = false
 ; Disable CDN even in "prod" mode
 OFFLINE_MODE = false
 DISABLE_ROUTER_LOG = false
 ; Generate steps:
-; $ cd path/to/gogs/custom/https
 ; $ ./gogs cert -ca=true -duration=8760h0m0s -host=myhost.example.com
 ;
 ; Or from a .pfx file exported from the Windows certificate store (do
@@ -67,11 +93,20 @@ KEY_FILE = custom/https/key.pem
 ; Upper level of template and static file path
 ; default is the path where Gogs is executed
 STATIC_ROOT_PATH =
+; Default path for App data
+APP_DATA_PATH = data
 ; Application level GZIP support
 ENABLE_GZIP = false
 ; Landing page for non-logged users, can be "home" or "explore"
 LANDING_PAGE = home
 
+; Define allowed algorithms and their minimum key length (use -1 to disable a type)
+[ssh.minimum_key_sizes]
+ED25519 = 256
+ECDSA   = 256
+RSA     = 2048
+DSA     = 1024
+
 [database]
 ; Either "mysql", "postgres" or "sqlite3", it's your choice
 DB_TYPE = mysql
@@ -81,7 +116,7 @@ USER = root
 PASSWD =
 ; For "postgres" only, either "disable", "require" or "verify-full"
 SSL_MODE = disable
-; For "sqlite3" and "tidb"
+; For "sqlite3" and "tidb", use absolute path when you start as service
 PATH = data/gogs.db
 
 [admin]
@@ -106,28 +141,14 @@ REGISTER_EMAIL_CONFIRM = false
 DISABLE_REGISTRATION = false
 ; User must sign in to view anything.
 REQUIRE_SIGNIN_VIEW = false
-; Cache avatar as picture
-ENABLE_CACHE_AVATAR = false
 ; Mail notification
 ENABLE_NOTIFY_MAIL = false
 ; More detail: https://github.com/gogits/gogs/issues/165
 ENABLE_REVERSE_PROXY_AUTHENTICATION = false
 ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
-; Do not check minimum key size with corresponding type
-DISABLE_MINIMUM_KEY_SIZE_CHECK = false
 ; Enable captcha validation for registration
 ENABLE_CAPTCHA = true
 
-; used to filter keys which are too short
-[service.minimum_key_sizes]
-ED25519 = 256
-ECDSA   = 256
-NTRU    = 1087
-MCE     = 1702
-McE     = 1702
-RSA     = 1024
-DSA     = 1024
-
 [webhook]
 ; Hook task queue length
 QUEUE_LENGTH = 1000
@@ -196,8 +217,6 @@ GC_INTERVAL_TIME = 86400
 SESSION_LIFE_TIME = 86400
 
 [picture]
-; The place to picture data, either "server" or "qiniu", default is "server"
-SERVICE = server
 AVATAR_UPLOAD_PATH = data/avatars
 ; Chinese users can choose "duoshuo"
 ; or a custom avatar source, like: http://cn.gravatar.com/avatar/
@@ -265,8 +284,8 @@ ADDR =
 ; For "smtp" mode only
 [log.smtp]
 LEVEL =
-; Name displayed in mail title, default is "Diagnostic message from serve"
-SUBJECT = Diagnostic message from serve
+; Name displayed in mail title, default is "Diagnostic message from server"
+SUBJECT = Diagnostic message from server
 ; Mail server
 HOST =
 ; Mailer user name and password
@@ -296,7 +315,8 @@ SCHEDULE = @every 1h
 ; Repository health check
 [cron.repo_health_check]
 SCHEDULE = @every 24h
-; Arguments for command 'git fsck', e.g.: "--unreachable --tags"
+TIMEOUT = 60s
+; Arguments for command 'git fsck', e.g. "--unreachable --tags"
 ; see more on http://git-scm.com/docs/git-fsck/1.7.5
 ARGS = 
 
@@ -307,19 +327,27 @@ SCHEDULE = @every 24h
 
 [git]
 MAX_GIT_DIFF_LINES = 10000
-; Arguments for command 'git gc', e.g.: "--aggressive --auto"
+; Arguments for command 'git gc', e.g. "--aggressive --auto"
 ; see more on http://git-scm.com/docs/git-gc/1.7.5
 GC_ARGS = 
 
+; Operation timeout in seconds
+[git.timeout]
+MIGRATE = 600
+MIRROR = 300
+CLONE = 300
+PULL = 300
+
 [i18n]
-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
+LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ
+NAMES = English,简体中文,繁體中文(香港),繁體中文(台湾),Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano,Suomalainen,Türk,čeština
 
 ; Used for datetimepicker
 [i18n.datelang]
 en-US = en
 zh-CN = zh
 zh-HK = zh-TW
+zh-TW = zh-TW
 de-DE = de
 fr-FR = fr
 nl-NL = nl
@@ -331,6 +359,13 @@ pt-BR = pt-BR
 pl-PL = pl
 bg-BG = bg
 it-IT = it
+fi-FI = fi
+tr-TR = tr
+cs-CZ = cs-CZ
+
+; Extension mapping to highlight class
+; e.g. .toml=ini
+[highlight.mapping]
 
 [other]
 SHOW_FOOTER_BRANDING = false

+ 2 - 2
gogs.service.patch

@@ -1,4 +1,4 @@
-12,15c12,15
+18,21c18,21
 < User=git
 < Group=git
 < WorkingDirectory=/home/git/gogs
@@ -8,7 +8,7 @@
 > Group=gogs
 > WorkingDirectory=/srv/gogs/
 > ExecStart=/usr/share/gogs/gogs web --config /srv/gogs/conf/app.ini
-17c17
+23c23
 < Environment=USER=git HOME=/home/git
 ---
 > Environment=USER=gogs HOME=/home/gogs

+ 6 - 0
gogs_new.service

@@ -8,6 +8,12 @@ After=network.target
 #After=redis.service
 
 [Service]
+# Modify these two values and uncomment them if you have
+# repos with lots of files and get an HTTP error 500 because
+# of that
+###
+#LimitMEMLOCK=infinity
+#LimitNOFILE=65535
 Type=simple
 User=gogs
 Group=gogs

+ 6 - 0
gogs_old.service

@@ -8,6 +8,12 @@ After=network.target
 #After=redis.service
 
 [Service]
+# Modify these two values and uncomment them if you have
+# repos with lots of files and get an HTTP error 500 because
+# of that
+###
+#LimitMEMLOCK=infinity
+#LimitNOFILE=65535
 Type=simple
 User=git
 Group=git

+ 0 - 90
helper.sh

@@ -1,90 +0,0 @@
-#!/bin/bash 
-
-# $1 = package name
-# $2 = target directory path
-# $3 = branch/commit/revision string, if empty then maste ist used
-function go_get {
-  if [[ $1 == github.com* ]]
-  then 
-    get_git $1 $2 $3
-  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
-}
-
-# $1 = git package
-# $2 = target directory path
-# $3 = branch/commit/revision string, if empty then maste ist used
-function get_git {
-  git clone https://$1 $2
-  if [[ $3 != "master" ]] && [[ ${3:0} == commit* ]]
-  then
-    cd $2
-    git checkout -q ${3:7}
-  elif [[ $3 != "master" ]] && [[ ${3:0} == tag* ]]
-  then
-    cd $2
-    git checkout -q tags/${3:4}
-  else
-    cd $2
-    git checkout -q ${3:7}
-  fi
-}
-
-# $1 = mercury package name
-# $2 = target directory path
-# $3 = branch/commit/revision string, if empty then maste ist used
-function get_hg {
-  if [[ $3 == "master" ]] || [[ $3 == "" ]]
-  then
-    hg clone https://$1 $2
-  else
-    hg clone https://$1 -r $3 $2
-  fi
-}
-
-function get_golang {
-  local package=$1
-  local match="golang.org/x"
-  local replace="github.com/golang"
-  local result=""
-
-  result=${package/$match/$replace}
-
-  get_git $result $2 $3
-}
-
-# Read the .gopmfile file and clone the branch/commits of the depends
-# $1 = .gopmfile file path
-# $2 = target directory path
-function get_gopm {
-  local startStr=""
-  local revStr=""
-
-  while read line
-  do
-    if [[ $startStr == 'X' ]] && [[ $line == '' ]]
-    then
-      break
-    elif [[ $startStr == 'X' ]]
-    then
-      IFS="=" read -a array <<< "$line"
-      if [[ ${array[1]} != "" ]]
-      then
-        local revStr=${array[1]//\`}
-        go_get ${array[0]} "$2/${array[0]}" $revStr
-      else
-        go_get ${array[0]} "$2/${array[0]}" master
-      fi
-    elif [[ $line == '[deps]' ]]
-    then
-      local startStr="X"
-    fi
-  done <$1
-}