diff options
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 18 | ||||
-rw-r--r-- | app.ini.patch | 16 | ||||
-rw-r--r-- | app_new.ini | 89 | ||||
-rw-r--r-- | app_old.ini | 85 | ||||
-rw-r--r-- | gogs.service.patch | 4 | ||||
-rw-r--r-- | gogs_new.service | 6 | ||||
-rw-r--r-- | gogs_old.service | 6 |
8 files changed, 161 insertions, 71 deletions
@@ -1,6 +1,8 @@ +# Generated by mksrcinfo v8 +# Thu May 26 08:10:21 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 + pkgver = 3879.3c0c7a9 pkgrel = 1 epoch = 1 url = http://gogs.io/ @@ -31,8 +33,8 @@ pkgbase = gogs-git-dev source = app.ini.patch source = helper.sh source = gogs::git+https://github.com/gogits/gogs.git#branch=develop - sha512sums = 834e95fe9bcfa291a573ad1fa43f41bbed844658a918ff4fcf53ab8a44a296206ee4003eab1d9a2785c9126be077022f4907846d2eb6c5d64050b5e81ce47f44 - sha512sums = d4f6518c644b76e4d1688cd5756c9eea7a89d0abad68a14638ccc6f0d1006c164c1ae3b3f89efd903def7398a3dabce7299100303808ad7a1937407a9eb13a39 + sha512sums = db36fd44c29de387b066e52a71a61214aa876a27574eb054ec9517a175b5a47db9a7de01be2dd635023a11d5e1224772a66accc4b63b6936f7c58e6314555a66 + sha512sums = 43c8971b0b4e8ea8d5aa0ed15610e9737605dc46a626d3d578bb1c97c9f90912966f59b452e9f4ea7974e4e3beaa5dd40bc597b03319afed3358432ab6e59c7d sha512sums = e45775adafeecad5deaf24a98cd85b25a8383cb0e89905b2927c13fe7f0ec9918a42071ce43eabc429d8a826db93bb75ffb1927dce9c431ed88b0b5c619fd60d sha512sums = SKIP @@ -4,7 +4,7 @@ pkgname=gogs-git-dev _pkgname=gogs _branch=develop -pkgver=3166.9950f5a +pkgver=3879.3c0c7a9 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}." @@ -32,15 +32,15 @@ source=('gogs.service.patch' 'helper.sh' "$_pkgname::git+https://${_gourl}.git#branch=${_branch}") -sha512sums=(834e95fe9bcfa291a573ad1fa43f41bbed844658a918ff4fcf53ab8a44a296206ee4003eab1d9a2785c9126be077022f4907846d2eb6c5d64050b5e81ce47f44 - d4f6518c644b76e4d1688cd5756c9eea7a89d0abad68a14638ccc6f0d1006c164c1ae3b3f89efd903def7398a3dabce7299100303808ad7a1937407a9eb13a39 +sha512sums=(db36fd44c29de387b066e52a71a61214aa876a27574eb054ec9517a175b5a47db9a7de01be2dd635023a11d5e1224772a66accc4b63b6936f7c58e6314555a66 + 43c8971b0b4e8ea8d5aa0ed15610e9737605dc46a626d3d578bb1c97c9f90912966f59b452e9f4ea7974e4e3beaa5dd40bc597b03319afed3358432ab6e59c7d e45775adafeecad5deaf24a98cd85b25a8383cb0e89905b2927c13fe7f0ec9918a42071ce43eabc429d8a826db93bb75ffb1927dce9c431ed88b0b5c619fd60d 'SKIP') _goroot="/usr/lib/go" pkgver(){ - cd "$srcdir/$_pkgname" + cd "$srcdir/../$_pkgname" echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD) } @@ -76,12 +76,12 @@ prepare() { msg2 "Check and download dependencies from .gopmfile" get_gopm "$GOPATH/src/${_gourl}/.gopmfile" "$GOPATH/src" - msg2 "Download missing dependencies" +# 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 +# msg2 "Workaround dependencies" +# cd "$GOPATH/src/github.com/gogits/go-gogs-client/" +# git checkout -q master # Execute patch msg2 "Execute patches" @@ -94,7 +94,7 @@ build() { msg2 "Build program" go fix - go build -x -tags='sqlite' + go build -x -tags='sqlite pam cert' } package() { diff --git a/app.ini.patch b/app.ini.patch index 876a7691b225..f695409d1b18 100644 --- a/app.ini.patch +++ b/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 diff --git a/app_new.ini b/app_new.ini index 4d7cb553180a..6e3a8d3d1de4 100644 --- a/app_new.ini +++ b/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
\ No newline at end of file +SHOW_FOOTER_BRANDING = false +; Show version information about gogs and go in the footer +SHOW_FOOTER_VERSION = true
\ No newline at end of file diff --git a/app_old.ini b/app_old.ini index c1326dedc60f..325c1caba2ba 100644 --- a/app_old.ini +++ b/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 diff --git a/gogs.service.patch b/gogs.service.patch index 519d02c19a48..862e0e888503 100644 --- a/gogs.service.patch +++ b/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 diff --git a/gogs_new.service b/gogs_new.service index 574d74973a45..ec68c13e46d3 100644 --- a/gogs_new.service +++ b/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 diff --git a/gogs_old.service b/gogs_old.service index 3d375b945b9f..9ae9209c24fd 100644 --- a/gogs_old.service +++ b/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 |