Edvinas Valatka 9 gadi atpakaļ
vecāks
revīzija
3fbf3ed336
14 mainītis faili ar 67 papildinājumiem un 1609 dzēšanām
  1. 0 42
      .SRCINFO
  2. 1 9
      .gitignore
  3. 29 73
      PKGBUILD
  4. 0 31
      README.md
  5. 0 36
      app.ini.patch
  6. 0 370
      app_new.ini
  7. 0 370
      app_old.ini
  8. 0 510
      gogs.changelog
  9. 22 24
      gogs.install
  10. 15 0
      gogs.service
  11. 0 14
      gogs.service.patch
  12. 0 20
      gogs_new.service
  13. 0 20
      gogs_old.service
  14. 0 90
      helper.sh

+ 0 - 42
.SRCINFO

@@ -1,42 +0,0 @@
-# Generated by mksrcinfo v8
-# Sat Mar 19 21:05:14 UTC 2016
-pkgbase = gogs
-	pkgdesc = Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language.
-	pkgver = 0.9.13
-	pkgrel = 1
-	epoch = 1
-	url = http://gogs.io/
-	install = gogs.install
-	arch = i686
-	arch = x86_64
-	arch = armv6h
-	arch = armv7h
-	license = MIT
-	makedepends = go>=1.4
-	makedepends = git>=1.7.1
-	makedepends = patch
-	depends = git>=1.7.1
-	optdepends = sqlite: SQLite support
-	optdepends = mariadb: MariaDB support
-	optdepends = postgresql: PostgreSQL support
-	optdepends = redis: Redis support
-	optdepends = memcached: MemCached support
-	optdepends = openssh: GIT over SSH support
-	optdepends = tidb-git: TiDB support
-	conflicts = gogs-bin
-	conflicts = gogs-git
-	conflicts = gogs-git-dev
-	options = !strip
-	options = !emptydirs
-	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#tag=v0.9.13
-	sha512sums = 834e95fe9bcfa291a573ad1fa43f41bbed844658a918ff4fcf53ab8a44a296206ee4003eab1d9a2785c9126be077022f4907846d2eb6c5d64050b5e81ce47f44
-	sha512sums = 77589148ac4afe09bb1b3f70491fa3b1838299f02216b2a24598f0f468356b2cfbaae397cc693e93f406e1c537d5ae24bc51530d9826879d201b72b19bee376c
-	sha512sums = e45775adafeecad5deaf24a98cd85b25a8383cb0e89905b2927c13fe7f0ec9918a42071ce43eabc429d8a826db93bb75ffb1927dce9c431ed88b0b5c619fd60d
-	sha512sums = SKIP
-
-pkgname = gogs
-

+ 1 - 9
.gitignore

@@ -1,13 +1,5 @@
 *
 !.gitignore
-!app_ini.patch
-!app_old.ini
-!gogs.changelog
 !gogs.install
-!gogs.service.patch
-!gogs_new.service
-!gogs_old.service
-!helper.sh
+!gogs.service
 !PKGBUILD
-!README.md
-!.SRCINFO

+ 29 - 73
PKGBUILD

@@ -1,16 +1,16 @@
 # Contributor: Thomas Laroche <tho.laroche@gmail.com>
 # Maintainer: Thomas Fanninger <thomas@fanninger.at>
 
+_pkgname=gogs
+_gourl=github.com/gogits/$_pkgname
 pkgname=gogs
-_pkgname=${pkgname}
 pkgver=0.9.13
 pkgrel=1
-epoch=1
-pkgdesc="Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language."
+pkgdesc="Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language. This is the latest release version."
 arch=('i686' 'x86_64' 'armv6h' 'armv7h')
 url="http://gogs.io/"
 license=('MIT')
-depends=('git>=1.7.1')
+depends=('git>=1.7.1' 'bash')
 optdepends=('sqlite: SQLite support'
             'mariadb: MariaDB support'
             'postgresql: PostgreSQL support'
@@ -18,86 +18,42 @@ optdepends=('sqlite: SQLite support'
             'memcached: MemCached support'
             'openssh: GIT over SSH support'
             'tidb-git: TiDB support')
-makedepends=('go>=1.4' 'git>=1.7.1' 'patch')
-conflicts=('gogs-bin' 'gogs-git' 'gogs-git-dev')
+makedepends=('go>=1.4' 'git')
+conflicts=('gogs')
+provides=('gogs')
 options=('!strip' '!emptydirs')
-backup=('srv/gogs/conf/app.ini')
-
+backup=('etc/gogs/app.ini')
 install=gogs.install
 
-_gourl=github.com/gogits/$_pkgname
-source=('gogs.service.patch'
-        'app.ini.patch'
-        'helper.sh'
+source=('gogs.service'
         "$_pkgname::git+https://${_gourl}.git#tag=v${pkgver}")
 
-sha512sums=(834e95fe9bcfa291a573ad1fa43f41bbed844658a918ff4fcf53ab8a44a296206ee4003eab1d9a2785c9126be077022f4907846d2eb6c5d64050b5e81ce47f44
-            77589148ac4afe09bb1b3f70491fa3b1838299f02216b2a24598f0f468356b2cfbaae397cc693e93f406e1c537d5ae24bc51530d9826879d201b72b19bee376c
-            e45775adafeecad5deaf24a98cd85b25a8383cb0e89905b2927c13fe7f0ec9918a42071ce43eabc429d8a826db93bb75ffb1927dce9c431ed88b0b5c619fd60d
-            'SKIP')
-
-_goroot="/usr/lib/go"
-
 prepare() {
-  source $srcdir/helper.sh
-
-  export GOROOT=/usr/lib/go
-  
-  msg2 "Prepare GO build enviroment"
-  rm -rf build
-  mkdir -p build/go
-  cd build/go
-
-  for f in "$GOROOT/"*; do
-    ln -s "$f"
-  done
-
-  rm pkg
-  mkdir pkg
-  cd pkg
-
-  for f in "$GOROOT/pkg/"*; do
-    ln -s "$f"
-  done
-
-  export GOROOT="$srcdir/build/go"
-  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"
-
-#  msg2 "Download missing dependencies"
-#  go_get github.com/go-xorm/tidb "$GOPATH/src/github.com/go-xorm/tidb"
-#  go_get github.com/ngaut/log "$GOPATH/src/github.com/ngaut/log"
-#  go_get github.com/pingcap/tidb "$GOPATH/src/github.com/pingcap/tidb"
-
-  # Execute patch
-  msg2 "Execute patches"
-  patch -Np1 -i "$srcdir/app.ini.patch" "$GOPATH/src/${_gourl}/conf/app.ini"
-  patch -Np1 -i "$srcdir/gogs.service.patch" "$GOPATH/src/${_gourl}/scripts/systemd/gogs.service"
+    GOPATH="$srcdir/build"
+    rm -rf "$GOPATH/src/github.com/gogits"
+    mkdir -p "$GOPATH/src/github.com/gogits"
+    mv  $_pkgname "$GOPATH/src/$_gourl"
 }
 
 build() {
-  cd $GOPATH/src/${_gourl}
-
-  msg2 "Build program"
-  go fix
-  go build -x -tags='sqlite pam cert'
+    GOPATH="$srcdir/build"
+    cd $GOPATH/src/${_gourl}
+    go get -x -tags='sqlite pam cert'
+    go fix
+    go build -x -tags='sqlite pam cert'
 }
 
 package() {
-  install -Dm0755 "$srcdir/build/src/${_gourl}/$_pkgname" "$pkgdir/usr/share/$_pkgname/$_pkgname"
+    GOPATH="$srcdir/build"
+    install -Dm0755 "$GOPATH/src/${_gourl}/$_pkgname" "$pkgdir/usr/share/$_pkgname/$_pkgname"
+    cp -r "$GOPATH/src/${_gourl}/conf" "$pkgdir/usr/share/$_pkgname"
+    install -dm755 "$pkgdir/usr/share/themes/gogs/default"
+    cp -r "$GOPATH/src/${_gourl}/public" "$pkgdir/usr/share/themes/gogs/default"
+    cp -r "$GOPATH/src/${_gourl}/templates" "$pkgdir/usr/share/themes/gogs/default"
+    install -Dm0644 "$GOPATH/src/${_gourl}/conf/app.ini" "$pkgdir/etc/$_pkgname/app.ini"
+    install -Dm0644 "$srcdir/gogs.service" "$pkgdir/usr/lib/systemd/system/gogs.service"
+}
 
-  cp -r "$srcdir/build/src/${_gourl}/conf" "$pkgdir/usr/share/$_pkgname"
-  mkdir -p "$pkgdir/usr/share/themes/gogs/default/"
-  cp -r "$srcdir/build/src/${_gourl}/public" "$pkgdir/usr/share/themes/gogs/default"
-  cp -r "$srcdir/build/src/${_gourl}/templates" "$pkgdir/usr/share/themes/gogs/default"
+sha512sums=('2b468bf8208b53a61d7f3f0676b83de36467809ad703c168dcc275b0a0f0490308d9b451ca3fc35824db050f5323a394b239bafebf99c4bc8bcf61db12fab6e1'
+            'SKIP')
 
-  install -Dm0644 "$pkgdir/usr/share/$_pkgname/conf/app.ini" "$pkgdir/srv/$_pkgname/conf/app.ini"
-  install -Dm0644 "$srcdir/build/src/${_gourl}/scripts/systemd/gogs.service" "$pkgdir/usr/lib/systemd/system/gogs.service"
-  install -Dm0644 "$srcdir/build/src/${_gourl}/LICENSE" "$pkgdir/usr/share/licenses/$_pkgname"
-}

+ 0 - 31
README.md

@@ -1,31 +0,0 @@
-# Gogs
-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 and PostgreSQL installation
-* ~~Test on armv6h (Raspberry Pi), armv7h (Cubieboard 2) and on x86_64~~
-* Documentation for usage and configuration
-
-## Install
-```
-$ tar -xvzf /<path to Tarball>/gogs-*.tar.gz
-$ cd <package-name>
-$ makepkg
-$ pacman -U gogs-*.tgz
-```
-
-## Configuration
-Enable and start systemd servicd
-```
-$ systemctl enable gogs.service
-$ systemctl start gogs.service
-```
-
-## Logging
-After start of the service every log entry is over journalctl displayable.
-```
-$ journalctl -f -u gogs.service
-```

+ 0 - 36
app.ini.patch

@@ -1,36 +0,0 @@
-7c7
-< RUN_USER = git
----
-> RUN_USER = gogs
-12c12
-< ROOT =
----
-> ROOT = /srv/gogs/repo
-95c95
-< STATIC_ROOT_PATH =
----
-> STATIC_ROOT_PATH = /usr/share/themes/gogs/default
-97c97
-< APP_DATA_PATH = data
----
-> APP_DATA_PATH = /srv/gogs/data
-120c120
-< PATH = data/gogs.db
----
-> PATH = /srv/gogs/sqlite/gogs.db
-207c207
-< PROVIDER_CONFIG = data/sessions
----
-> PROVIDER_CONFIG = /srv/gogs/data/sessions
-220c220
-< AVATAR_UPLOAD_PATH = data/avatars
----
-> AVATAR_UPLOAD_PATH = /srv/gogs/data/avatars
-230c230
-< PATH = data/attachments
----
-> PATH = /srv/gogs/data/attachments
-245c245
-< ROOT_PATH =
----
-> ROOT_PATH = /var/log/gogs

+ 0 - 370
app_new.ini

@@ -1,370 +0,0 @@
-# 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
-RUN_USER = gogs
-; Either "dev", "prod" or "test", default is "dev"
-RUN_MODE = dev
-
-[repository]
-ROOT = /srv/gogs/repo
-SCRIPT_TYPE = bash
-; Default ANSI charset
-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
-
-[ui]
-; Number of repositories that are showed in one explore page
-EXPLORE_PAGING_NUM = 20
-; Number of issues that are showed in one page
-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
-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 = 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
-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:
-; $ ./gogs cert -ca=true -duration=8760h0m0s -host=myhost.example.com
-;
-; Or from a .pfx file exported from the Windows certificate store (do
-; not forget to export the private key):
-; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
-; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
-CERT_FILE = custom/https/cert.pem
-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
-HOST = 127.0.0.1:3306
-NAME = gogs
-USER = root
-PASSWD =
-; For "postgres" only, either "disable", "require" or "verify-full"
-SSL_MODE = disable
-; For "sqlite3" and "tidb", use absolute path when you start as service
-PATH = /srv/gogs/sqlite/gogs.db
-
-[admin]
-
-[security]
-INSTALL_LOCK = false
-; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
-SECRET_KEY = !#@FDEWREWR&*(
-; Auto-login remember days
-LOGIN_REMEMBER_DAYS = 7
-COOKIE_USERNAME = gogs_awesome
-COOKIE_REMEMBER_NAME = gogs_incredible
-; Reverse proxy authentication header name of user name
-REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
-
-[service]
-ACTIVE_CODE_LIVE_MINUTES = 180
-RESET_PASSWD_CODE_LIVE_MINUTES = 180
-; User need to confirm e-mail for registration
-REGISTER_EMAIL_CONFIRM = false
-; Does not allow register and admin create account only
-DISABLE_REGISTRATION = false
-; User must sign in to view anything.
-REQUIRE_SIGNIN_VIEW = 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
-; Enable captcha validation for registration
-ENABLE_CAPTCHA = true
-
-[webhook]
-; Hook task queue length
-QUEUE_LENGTH = 1000
-; Deliver timeout in seconds
-DELIVER_TIMEOUT = 5
-; Allow insecure certification
-SKIP_TLS_VERIFY = false
-; Number of history information in each page
-PAGING_NUM = 10
-
-[mailer]
-ENABLED = false
-; Buffer length of channel, keep it as it is if you don't know what it is.
-SEND_BUFFER_LEN = 100
-; Name displayed in mail title
-SUBJECT = %(APP_NAME)s
-; Mail server
-; 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 = 
-; 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 = 
-; 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 =
-PASSWD =
-
-[cache]
-; Either "memory", "redis", or "memcache", default is "memory"
-ADAPTER = memory
-; For "memory" only, GC interval in seconds, default is 60
-INTERVAL = 60
-; For "redis" and "memcache", connection host address
-; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
-; memcache: `127.0.0.1:11211`
-HOST =
-
-[session]
-; Either "memory", "file", "redis" or "mysql", default is "memory"
-PROVIDER = memory
-; Provider config options
-; memory: not have any config yet
-; file: session file path, e.g. `data/sessions`
-; 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/data/sessions
-; Session cookie name
-COOKIE_NAME = i_like_gogits
-; If you use session in https only, default is false
-COOKIE_SECURE = false
-; Enable set cookie, default is true
-ENABLE_SET_COOKIE = true
-; Session GC time interval, default is 86400
-GC_INTERVAL_TIME = 86400
-; Session life time, default is 86400
-SESSION_LIFE_TIME = 86400
-
-[picture]
-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
-
-[attachment]
-; Whether attachments are enabled. Defaults to `true`
-ENABLE = true
-; Path for attachments. Defaults to `data/attachments`
-PATH = /srv/gogs/data/attachments
-; One or more allowed types, e.g. image/jpeg|image/png
-ALLOWED_TYPES = image/jpeg|image/png
-; Max size of each file. Defaults to 32MB
-MAX_SIZE = 4
-; Max number of files per upload. Defaults to 10
-MAX_FILES = 5
-
-[time]
-; Specifies the format for fully outputed dates. Defaults to RFC1123
-; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
-; For more information about the format see http://golang.org/pkg/time/#pkg-constants
-FORMAT =
-
-[log]
-ROOT_PATH = /var/log/gogs
-; Either "console", "file", "conn", "smtp" or "database", default is "console"
-; Use comma to separate multiple modes, e.g. "console, file"
-MODE = console
-; Buffer length of channel, keep it as it is if you don't know what it is.
-BUFFER_LEN = 10000
-; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
-LEVEL = Trace
-
-; For "console" mode only
-[log.console]
-LEVEL =
-
-; For "file" mode only
-[log.file]
-LEVEL =
-; This enables automated log rotate(switch of following options), default is true
-LOG_ROTATE = true
-; Max line number of single file, default is 1000000
-MAX_LINES = 1000000
-; Max size shift of single file, default is 28 means 1 << 28, 256MB
-MAX_SIZE_SHIFT = 28
-; Segment log daily, default is true
-DAILY_ROTATE = true
-; Expired days of log file(delete after max days), default is 7
-MAX_DAYS = 7
-
-; For "conn" mode only
-[log.conn]
-LEVEL =
-; Reconnect host for every single message, default is false
-RECONNECT_ON_MSG = false
-; Try to reconnect when connection is lost, default is false
-RECONNECT = false
-; Either "tcp", "unix" or "udp", default is "tcp"
-PROTOCOL = tcp
-; Host address
-ADDR =
-
-; For "smtp" mode only
-[log.smtp]
-LEVEL =
-; Name displayed in mail title, default is "Diagnostic message from server"
-SUBJECT = Diagnostic message from server
-; Mail server
-HOST =
-; Mailer user name and password
-USER =
-PASSWD =
-; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
-RECEIVERS =
-
-; For "database" mode only
-[log.database]
-LEVEL =
-; Either "mysql" or "postgres"
-DRIVER =
-; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
-CONN =
-
-[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
-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 = 
-
-; 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 = 
-
-; 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,fi-FI
-NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano,Suomalainen
-
-; 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
-fi-FI = fi
-
-; Extension mapping to highlight class
-; e.g. .toml=ini
-[highlight.mapping]
-
-[other]
-SHOW_FOOTER_BRANDING = false
-; Show version information about gogs and go in the footer
-SHOW_FOOTER_VERSION = true

+ 0 - 370
app_old.ini

@@ -1,370 +0,0 @@
-# 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
-RUN_USER = git
-; Either "dev", "prod" or "test", default is "dev"
-RUN_MODE = dev
-
-[repository]
-ROOT =
-SCRIPT_TYPE = bash
-; Default ANSI charset
-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
-
-[ui]
-; Number of repositories that are showed in one explore page
-EXPLORE_PAGING_NUM = 20
-; Number of issues that are showed in one page
-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
-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 = 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
-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:
-; $ ./gogs cert -ca=true -duration=8760h0m0s -host=myhost.example.com
-;
-; Or from a .pfx file exported from the Windows certificate store (do
-; not forget to export the private key):
-; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
-; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
-CERT_FILE = custom/https/cert.pem
-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
-HOST = 127.0.0.1:3306
-NAME = gogs
-USER = root
-PASSWD =
-; For "postgres" only, either "disable", "require" or "verify-full"
-SSL_MODE = disable
-; For "sqlite3" and "tidb", use absolute path when you start as service
-PATH = data/gogs.db
-
-[admin]
-
-[security]
-INSTALL_LOCK = false
-; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
-SECRET_KEY = !#@FDEWREWR&*(
-; Auto-login remember days
-LOGIN_REMEMBER_DAYS = 7
-COOKIE_USERNAME = gogs_awesome
-COOKIE_REMEMBER_NAME = gogs_incredible
-; Reverse proxy authentication header name of user name
-REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
-
-[service]
-ACTIVE_CODE_LIVE_MINUTES = 180
-RESET_PASSWD_CODE_LIVE_MINUTES = 180
-; User need to confirm e-mail for registration
-REGISTER_EMAIL_CONFIRM = false
-; Does not allow register and admin create account only
-DISABLE_REGISTRATION = false
-; User must sign in to view anything.
-REQUIRE_SIGNIN_VIEW = 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
-; Enable captcha validation for registration
-ENABLE_CAPTCHA = true
-
-[webhook]
-; Hook task queue length
-QUEUE_LENGTH = 1000
-; Deliver timeout in seconds
-DELIVER_TIMEOUT = 5
-; Allow insecure certification
-SKIP_TLS_VERIFY = false
-; Number of history information in each page
-PAGING_NUM = 10
-
-[mailer]
-ENABLED = false
-; Buffer length of channel, keep it as it is if you don't know what it is.
-SEND_BUFFER_LEN = 100
-; Name displayed in mail title
-SUBJECT = %(APP_NAME)s
-; Mail server
-; 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 = 
-; 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 = 
-; 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 =
-PASSWD =
-
-[cache]
-; Either "memory", "redis", or "memcache", default is "memory"
-ADAPTER = memory
-; For "memory" only, GC interval in seconds, default is 60
-INTERVAL = 60
-; For "redis" and "memcache", connection host address
-; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
-; memcache: `127.0.0.1:11211`
-HOST =
-
-[session]
-; Either "memory", "file", "redis" or "mysql", default is "memory"
-PROVIDER = memory
-; Provider config options
-; memory: not have any config yet
-; file: session file path, e.g. `data/sessions`
-; 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
-COOKIE_NAME = i_like_gogits
-; If you use session in https only, default is false
-COOKIE_SECURE = false
-; Enable set cookie, default is true
-ENABLE_SET_COOKIE = true
-; Session GC time interval, default is 86400
-GC_INTERVAL_TIME = 86400
-; Session life time, default is 86400
-SESSION_LIFE_TIME = 86400
-
-[picture]
-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
-
-[attachment]
-; Whether attachments are enabled. Defaults to `true`
-ENABLE = true
-; Path for attachments. Defaults to `data/attachments`
-PATH = data/attachments
-; One or more allowed types, e.g. image/jpeg|image/png
-ALLOWED_TYPES = image/jpeg|image/png
-; Max size of each file. Defaults to 32MB
-MAX_SIZE = 4
-; Max number of files per upload. Defaults to 10
-MAX_FILES = 5
-
-[time]
-; Specifies the format for fully outputed dates. Defaults to RFC1123
-; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
-; For more information about the format see http://golang.org/pkg/time/#pkg-constants
-FORMAT =
-
-[log]
-ROOT_PATH =
-; Either "console", "file", "conn", "smtp" or "database", default is "console"
-; Use comma to separate multiple modes, e.g. "console, file"
-MODE = console
-; Buffer length of channel, keep it as it is if you don't know what it is.
-BUFFER_LEN = 10000
-; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
-LEVEL = Trace
-
-; For "console" mode only
-[log.console]
-LEVEL =
-
-; For "file" mode only
-[log.file]
-LEVEL =
-; This enables automated log rotate(switch of following options), default is true
-LOG_ROTATE = true
-; Max line number of single file, default is 1000000
-MAX_LINES = 1000000
-; Max size shift of single file, default is 28 means 1 << 28, 256MB
-MAX_SIZE_SHIFT = 28
-; Segment log daily, default is true
-DAILY_ROTATE = true
-; Expired days of log file(delete after max days), default is 7
-MAX_DAYS = 7
-
-; For "conn" mode only
-[log.conn]
-LEVEL =
-; Reconnect host for every single message, default is false
-RECONNECT_ON_MSG = false
-; Try to reconnect when connection is lost, default is false
-RECONNECT = false
-; Either "tcp", "unix" or "udp", default is "tcp"
-PROTOCOL = tcp
-; Host address
-ADDR =
-
-; For "smtp" mode only
-[log.smtp]
-LEVEL =
-; Name displayed in mail title, default is "Diagnostic message from server"
-SUBJECT = Diagnostic message from server
-; Mail server
-HOST =
-; Mailer user name and password
-USER =
-PASSWD =
-; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
-RECEIVERS =
-
-; For "database" mode only
-[log.database]
-LEVEL =
-; Either "mysql" or "postgres"
-DRIVER =
-; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
-CONN =
-
-[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
-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 = 
-
-; 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 = 
-
-; 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,fi-FI
-NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano,Suomalainen
-
-; 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
-fi-FI = fi
-
-; Extension mapping to highlight class
-; e.g. .toml=ini
-[highlight.mapping]
-
-[other]
-SHOW_FOOTER_BRANDING = false
-; Show version information about gogs and go in the footer
-SHOW_FOOTER_VERSION = true

+ 0 - 510
gogs.changelog

@@ -1,510 +0,0 @@
-2016-03-19
-
-	* V0.9.13
-	Bug fix: Site admin cannot see private repositories on organization home page #2372
-	Bug fix: Non-local users can reset their password #2811
-	Bug fix: 500 when compare branches with name contains '#' #2822
-	Bug fix: Potential concurrency issue with builtin SSH server #2850
-	Improvement: Set HTML meta values for repository #2670
-	Improvement: Able to search user with username and full name #2792
-	Features: Support search user and repository on both explore page and admin panel #13
-
-2016-03-07
-
-	* V0.9.0
-	Bug fix: Panic when close issue through commit message #2697
-	Bug fix: Panic when create issue with two or more labels using SQLite3 #2700
-	Improvement: Able to test mail settings in admin panel #1531
-	Improvement: Improve issue lable readability #2033
-	Improvement: Add config options for Git operation timeout #2653 #2701 #2704
-	Improvement: Able to delete current avatar of user and organization
-	Features: More refined collaboration access rights #1146
-	Features: Able to create pull requests between branches in same repository #1597
-	Features: Able to checkout pull requests locally #1655
-	Features: Able to delete Wiki page and entire data #2183
-	Others: Add Finnish support
-
-2016-02-24
-
-	* V0.8.43
-	Bug fix: Old activities still visible for repositories that lost access #2148
-	Bug fix: Issue references have bad links behind a reverse proxy sub-path #2229
-	Bug fix: Line breaks in email is not in HTML format #2332
-	Bug fix: Long webhook URL is truncated #2465
-	Bug fix: Multiple Webhooks with Slack type send wrong payloads #2485
-	Bug fix: Image path breaks when it contains space #2556
-	Bug fix: 500 when edit wiki after transfer the repository #2558
-	Bug fix: 500 after delete user when view releases #2596
-	Bug fix: Wrong avatar_url field in webhook payload #2630
-	Improvement: Able to config log path on install page #691
-	Improvement: Add default_branch field to repository object in webhooks #1059
-	Improvement: Display activities for close and reopen issues #1821
-	Improvement: Able to fork mirror repository #2505
-	Improvement: Highlight code blocks in issue page #2538
-	Features: Add config option [markdown] CUSTOM_URL_SCHEMES to allows Markdown render custom URL schemes #2406
-	Features: Support syntax highlight on diff view #2528
-	Features: Support convert mirror repository to regular type #2607
-
-2016-01-30
-
-	* V0.8.25
-	Bug fix: Pull request can not change branch when both sides are organizations #2014
-	Bug fix: Duplicate of files' name in directory #2254
-	Bug fix: Rename organization redirects to old name #2268
-	Bug fix: HTML pages are rendered in raw mode #2283
-	Bug fix: Allow access to non-home pages of empty repository #2345
-	Bug fix: 500 when viewing authentication-related pages #2349
-	Bug fix: 500 when filename starts with ':' #2373
-	Improvement: Add config option [server] SSH_ROOT_PATH to indicate directory of authorized_keys file #1436
-	Improvement: Commit IDs use monospace fonts #2264
-	Improvement: Truncate repository name if too long #2287
-	Features: Support GitHub style Markdown checklist #1048
-	Features: Add more APIs: user followers #1692
-	Features: Support side-by-side diff view #1925 #2296
-	Features: Support highlight inline diff #2335
-
-2015-12-18
-
-	* V0.8.10
-	Bug fix: Can't identify git version on Windows #2167
-	Bug fix: Wiki preview does not work on Firefox #2171
-	Bug fix: 500 when view repository watchers and stargazers with PostgreSQL #2176
-	Bug fix: Cannot detect correct file encoding #2185
-	Bug fix: Huge diff hangs
-	Bug fix: Cannot handle non-commit tag
-	Bug fix: Dashboard news feeds for organizations are wrong #2223
-	Features: Add more APIs: user emails, organizations #1692
-
-2015-12-12
-
-	* V0.8.0
-	Bug fix: Cannot push repository with massive commits like Linux kernel #279
-	Bug fix: SMTP authentication makes invalid assumption on protocol #2152
-	Improvement: Send email when a new pull request is submitted #1612
-	Improvement: Auto login after install if admin is configured #1627
-	Improvement: Disable change username and password for non-local users #1374 #1938 #2154
-	Improvement: Able to config git fsck timeout #1943
-	Improvement: Able to show and edit mirror address on repository pages #1984
-	Improvement: Do not show content of issue in activity timeline #2029
-	Improvement: Show author email in commit diff #2035
-	Improvement: Able to change mirror source address
-	Improvement: Add "New Mirror" button on dashboard #2037
-	Improvement: Able to set external URL for wiki #2114
-	Features: Able to limit repository creation per user #1575
-	Features: Able to select branch in commits page #1846
-	Others: Drop 0.5.x support, minimum auto-migration version is 0.6.0.
-
-2015-12-07
-
-	* V0.7.33
-	Bug fix: LDAP search with non-ascii characters does not work #1139
-	Bug fix: Delete repository does not remove its stars #2042
-	Bug fix: Diff is not showing full content when has super long one line #2071
-	Bug fix: Cannot create pull request on Windows #2093
-	Improvement: Able to disable wiki/issues/pull requests of repository #1829
-	Improvement: Able to trigger test webhook in web UI #1857
-	Improvement: Able to batch delete system notices #2052
-	Improvement: Able to delete repository in admin panel #2063
-	Features: Support repository wiki #270
-	Features: Support issue links are rendered for external tracker #890
-	Features: Add more APIs: public keys #976
-
-2015-11-21
-
-	* V0.7.19
-	Bug fix: Bad syntax highlighting #670 #1315 #1549 #1712
-	Bug fix: Broken copy link button #1168 #1396
-	Bug fix: Broken download archive UI #1668
-	Bug fix: Pull request does not support merge BIN diff #1922
-	Bug fix: Test patch does not checkout correct base branch #1931
-	Bug fix: Branch/tag selection has wrong z-index #1942
-	Bug fix: Huge image does not display correctly in file view
-	Bug fix: No links in email for admin created account #1979
-	Bug fix: Repository description is not copied after forked #1981
-	Bug fix: Forked repository's visibility is changed itself when update settings #1987
-	Improvement: Sort collaborative repositories by last updated time in dashboard #1302
-	Improvement: Able to delete a release #1383
-	Improvement: Update default branch in Git repository while change in web view #1742
-	Improvement: Show issue title and content in news feeds #1854
-	Improvement: Show custom avatar for pushed commits list in news feeds
-	Improvement: Able to use config option [other] SHOW_FOOTER_VERSION = true disable version display on non-admin pages' footer #1957
-	Features: Admin can now view and edit settings of private repositories #493 #1401
-	Others: New discussion forum http://forum.gogs.io/
-
-2015-11-12
-
-	* V0.7.6
-	Bug fix: Images in subdirectory does not have correct relative links #1904
-	Bug fix: SSH operations do not handle mixed cases URL
-	Bug fix: Wrong redirection after deleting system notice with sub-path #1930
-	Improvement: Show current branch in commit overview #1572
-	Improvement: Allow tab to button in issue view page and use enter or space bar to trigger click #1824 #1917
-	Features: Able to start builtin SSH server by config option [server] START_SSH_SERVER = true
-
-2015-11-08
-
-	* V0.7.0
-	Bug fix: Admin e-mail does not allow root@localhost when install #470
-	Bug fix: Wrong commits reference order on issue page #1602
-	Bug fix: Inconsistent link of e-mail URL after sign up #1697
-	Bug fix: Migrated repository incompatible with --all flag #1705
-	Bug fix: Members of team has admin access can't close/reopen issues #1748
-	Bug fix: Huge diff causes out of memory #1790
-	Bug fix: Push returns fail message when no actual update needed #1896
-	Bug fix: Wrong image link is rendered for relative links #1904
-	Improvement: Detect file renames/moves in diffs #1078
-	Improvement: Dashboard issues add sorting #1459
-	Improvement: Allow import local repositories only for admin or permitted users #1511
-	Improvement: Able to trigger mailer for admin created accounts #1525
-	Improvement: Show clone URL with original cases #1895
-	Features: Support pull requests #5
-	Features: Auto-render clickable links for images #1433
-	Features: Add config option [repository] FORCE_PRIVATE that allows forcing all new repositories to be private #1657
-	Others: Drop Go 1.2.x support, minimum requirement of Go is 1.3
-	Others: 0.5.x will no longer be supported in 0.8
-
-2015-09-26
-
-	* V0.6.15
-	Bug fix: 404 when Repository name contains "git" #1593
-	Bug fix: Collaborative repositories missing suburl on dashboard #1594
-	Bug fix: Duplicate commit references when push a new branch #1595
-	Bug fix: Upload image does not handle suburl #1603
-	Bug fix: New SSH keys with comments including whitespace are truncated #1622
-	Bug fix: Change label title resets color #1659
-	Improvement: Able to use GOGS_WORK_DIR environment variable to specify work directory
-	Improvement: Enable login type conversion after account creation #748
-	Improvement: Sort owners list by last changed time when create and migrate repositoriy #1585
-	Features: Add TiDB backend database support
-	Features: Add Emoji support #633
-	Features: Able to disable captcha by config option [service] ENABLE_CAPTCHA = false #697
-	Features: Able to restrict SMTP authentication to specific domains #1620
-	Others: Drop social account login support
-
-2015-09-05
-
-	* V0.6.9
-	Bug fix: File name with double quotation mark makes the repository inaccessible #966
-	Bug fix: Time zone trouble #1500
-	Bug fix: Removing deploy key does not remove key #1535
-	Improvement: Add webhook last delivery status, recent deliveries and new events
-	Improvement: Auto-remember visibility of last created repository #965
-	Improvement: Support BindDN and TLS in LDAP #1145
-	Improvement: Significantly enhanced LDAP support #1476
-	Improvement: Support ‘AUTH LOGIN’ in mailer #1517
-	Improvement: Add [markdown] ENABLE_HARD_LINE_BREAK to enable Markdown hard line break extension
-	Features: Add dashboard issues page for organization
-	Features: Allow editing of past comments #1280
-	Features: Support README template #1487
-	Others: Add official Docker images
-	Others: Change minimum password length to 1
-	Others: Change minimum size of RSA to 1024 #1519
-	Others: Change maximum size of e-mail to 254 #1579
-
-2015-08-16
-
-	* V0.6.5
-	Bug fix: Does not allow anonymous SSH clone
-	Bug fix: Private repository cannot trigger webhook by pushing through SSH
-	Bug fix: Owners cannot assign any issue to themselves #747
-	Bug fix: Issue assignee doesn't show organisation members #839
-	Bug fix: Can send multiple requests when create issue #1051
-	Bug fix: Attachments a file said "Could not parse JSON" #1233
-	Bug fix: Did not remove the temporary directory after initialized new repository #1331
-	Bug fix: Rename organization doesn't restrict Chinese #1439
-	Improvement: Allow custom avatar source #1457
-	Feature: Add deploy key support #334
-	Feature: Generate random avatar based on e-mail when disable Gravatar
-	Feature: Able to sort issues
-
-2015-08-02
-
-	* V0.6.3
-	Bug fix: Label disappeared after edited a label #542
-	Bug fix: Filename cut off in DIFF when containing spaces #985
-	Bug fix: Migrate repository requires HTTPS address #1000
-	Bug fix: Private repositories issues included in "Public Activity" #1112
-	Bug fix: All users email are public #1127
-	Bug fix: API calls are not hidden behind sign in #1128
-	Bug fix: 404 on files with url-encoded names #1137
-	Bug fix: It is possible to access user profiles using organization URL #1169
-	Bug fix: Didn't check blank user name on LDAP #1207
-	Bug fix: Generated certificate doesn't have CN with the hostname #1231
-	Bug fix: Removing user from organization collaboration removes repositiory #1279
-	Bug fix: Create repo for other users by hacking uid field #1289
-	Improvement: Clearer error message for illegal characters #1070
-	Improvement: Add full name field to admin's user edit page #1130
-	Improvement: Hide organization email for non logged-in users #1204
-	Improvement: Visit Repository home page with ".git" appended URL #1227
-	Feature: Support realtime webhook #835
-	Others: Add Italian language support.
-	Others: Disable Macaron color log in production mode to improve performance
-	Others: Show repository owner name in explore page #1150
-
-2015-03-26
-
-	* V0.6.1
-	Bug fix: Inline code markdown with leading hash is rendered as issue index #637
-	Bug fix: Non-logged users can view organization page when REQUIRE_SIGNIN_VIEW = true #1101
-	Bug fix: New release button is always available to everyone #1114
-	Bug fix: Cannot update mirror repository after transfer ownership #1120
-	Bug fix: Other member of teams in same organization get access to repository when teams do not have relations to the repository 
-	Bug fix: LDAP add and edit forms are misleading #1124
-	Bug fix: Team member access lost when adding repository collaborator #1143
-	Improvement: Hide Gravatar e-mail setting field when Gravatar is disabled #1098
-	Improvement: Allow to migrate through git:// protocol #1105
-	Improvement: Add config option [service] DISABLE_MINIMUM_KEY_SIZE_CHECK to not check minimum key size with corresponding type #1133
-	Improvement: Do not exposure database password when it's not first time launch installation #1140
-	Others: Use fake@gogs.local as default Git user.email setting rather than private e-mail #1089
-
-2015-03-19
-
-	* V0.6.0
-	Bug fix: Edit Account does not take into consideration password rules #851
-	Bug fix: Person in multiple teams has incorrect access #858
-	Bug fix: Issue label amount not updated on issue removal #933
-	Bug fix: Can push to mirror repository #948
-	Bug fix: Check template version before loading custom configuration #954
-	Bug fix: Didn't check if attachments and avatars path in configuration is a absolutely path
-	Bug fix: Duplicated suburl prefix in feeds #988
-	Bug fix: Cannot delete repository with LDAP account #1006
-	Bug fix: Cannot handle SubModule without a .gitmodules entry #1023
-	Bug fix: HTTP/HTTPS push update function call panic #1037
-	Bug fix: Missing suburl prefix on admin panel #1043
-	Bug fix: Landing page setting does not consider suburl prefix #1055
-	Bug fix: Missing link in bare repository page for Help #1082
-	Improvement: Allow MySQL socket connection instead of TCP #872
-	Improvement: Able to use TLS client certificate for SMTP #943
-	Improvement: Fix: 504 5.5.2 : Helo command rejected #973
-	Feature: Able to import local Git repositories #99
-	Feature: Allow multiple e-mail addresses #755
-
-2015-01-05
-
-	* V0.5.11
-	Bug fix: Git SubModules result 500 error #741
-	Bug fix: Showing activities for private repositories in user profile #751
-	Bug fix: User who made activities no longer exists result 500 error #754
-	Bug fix: Auto-input username in organization invite page includes full name
-	Bug fix: Mirror repository does not work with SQLite3 #805
-	Bug fix: Wrong image address when rendering Markdown files #808
-	Bug fix: Improvements
-	Bug fix: Able to skip verification when send mails and use TLS when port is 465 #761
-	Bug fix: Optmize git-fsck config options #820
-	Feature: Able to send mails with CRAM-MD5 authentication #762
-
-2014-12-13
-
-	* V0.5.9
-	Bug fix: Invalid links to user profile page in admin panel
-	Bug fix: Templating error on settings page of bare repository #643
-	Bug fix: Panic when no SSH authorized_keys file exists for command gogs fix location #659
-	Bug fix: Commits list doesn’t show the oldest page #664
-	Bug fix: User home links in issue page no longer invalid #682
-	Bug fix: Avatar email addresses with uppercase resolve to wrong Gravatar hash #700
-	Bug fix: Markdown table requires padding #703
-	Bug fix: Cannot display GBK content in diff page #711
-	Bug fix: HTTP basic authentication failed when password contains : #723
-	Improvement: Expose full_name in user search API #677
-	Improvement: Added issue link rendering in commit messages #712
-	Feature: Able to upload custom avatar #139
-	Feature: Able to set explore page as non-logged users’ landing page through config option [server] LANDING_PAGE #543
-	Feature: Run git fsck as cron job and git gc as admin operation #580
-	Feature: Able to view public key list of user by /:username.keys #652
-	Feature: Add Latvian languages.
-
-2014-11-19
-
-	* V0.5.8
-	Bug fix: Fix vulnerabilities CVE-2014-8681 CVE-2014-8682 CVE-2014-8683
-	Bug fix: Branch/tag name cannot contain / #101 #255
-	Bug fix: ENABLE_GZIP options does not work #412
-	Bug fix: Line numbers are misaligned on Firefox #457
-	Bug fix: Git hook does’t filter \r character #546
-	Bug fix: File view raw and history buttons don’t show #550
-	Bug fix: Some small problems about the alignment #554
-	Bug fix: Redis as cache adapter does not work
-	Bug fix: Cannot show relative path image in Markdown files
-	Bug fix: UI break when commit message is very long #570
-	Bug fix: HTTP/HTTPS clone does not handle GZIP encoding #572
-	Bug fix: Cannot see private repositories when view own profile page #605
-	Bug fix: Wrong MIT LICENSE content file #608
-	Improvement: Allow collaborators to see private repositories in profile page
-	Feature: Able to fork repository #5
-	Feature: Drone CI integration #12
-	Feature: Able to view comparison page for 2 commits
-	Feature: Able to set [picture] GRAVATAR_SOURCE = duoshuo to use Chinese mirror of Gravatar
-	Feature: Able to delete all repositories archives through admin panel #635
-
-2014-10-10
-
-	* V0.5.5
-	Bug fix: Cannot download repository archive #495
-	Bug fix: Cannot view repository by tag
-	Bug fix: Cannot transfer repository from organization to individual
-	Bug fix: Error occurs when owner transfers repository to its collaborator
-	Bug fix: Does not support annotated tag #515
-	Bug fix: Broken authentication logic
-	Improvement: Improve e-mail security #249
-	Improvement: Fix missing inline code Markdown style #491
-	Improvement: Add directory level commit message in repository list view
-	Improvement: Change issue title length limitation to 255 characters #522
-	Improvement: Allow mail with self-signed certificates
-	Improvement: Allow custom locale files
-	Feature: Add support for Git hooks #264
-	Feature: Allow Gogs to run from a suburl behind a reverse proxy #463
-	Feature: Add gogs cert command to generate files for self-signed HTTPS #487
-	Feature: Add support for custom robots.txt
-	Feature: Add basic support for submodule
-	Feature: Add French, Dutch and Traditional Chinese languages.
-	Feature: Add system notices for admin.
-
-2014-09-18
-
-	* V0.5.2
-	Bug fix: Incorrect permission check of ~/.ssh/ #458
-	Bug fix: Can access some pages without signin with REQUIRE_SIGNIN_VIEW=true #464
-	Bug fix: Templating error html/template: "user/activate" is undefined #465
-	Bug fix: Missing arguments in TimeSince #473
-	Bug fix: Wrong action permission check in organization dashboard #474
-	Bug fix: Cannot add new SSH Key in Windows #475
-	Bug fix: Cannot transfer repository ownership #481
-	Improvement: Downgrade Git requirement to 1.7.1 #476
-	Improvement: Add French translation #479
-	Improvement: Add git -> MAX_GITDIFF_LINES option to set max show line numbers of Git Diff page
-	Other: Demo site use HTTPS with new domain https://try.gogs.io
-
-2014-09-15
-
-	* V0.5.0
-	Bug fix: Panic when view releases that were created by Gogs #197
-	Bug fix: Content lost if user changes milestone or assignee #216
-	Bug fix: Webhook doesn’t deliver for SSH pushes #242
-	Bug fix: Mirror repositories are not updated at all #258
-	Bug fix: Not able to serve static files in Windows #271
-	Bug fix: Dashboard issue link is incomplete #273
-	Bug fix: Collaborators are able to change repository settings
-	Bug fix: Edit issue label does not require repository owner or collaborator #303
-	Bug fix: Milestone issue stats not update when reopening/closing issue #340
-	Bug fix: Incorrect max/min limitation error message #340
-	Bug fix: Missing trailing ‘/’ in ROOT_URL causes problems #367
-	Bug fix: SSH keys that include new lines can’t be deleted from authorized_keys #370
-	Improvement: Add webhook section for configuring web hook task interval and deliver timeout
-	Improvement: Add download TAR.GZ button in repository viewer
-	Improvement: Sort releases by created time if they have same number of commits #199
-	Improvement: Add Git installation and version check in start
-	Improvement: Able to show precise time on commit page #281
-	Improvement: Make possible for administrators to change user’s password #291
-	Improvement: Add more SSH key type verification support #293
-	Improvement: Allow clickable links in the repository description #300
-	Improvement: Allow /:username as user home page route
-	Improvement: Change passoword length limitation to 255 #340
-	Improvement: Add .mkd as Markdown file extension #362
-	Improvement: Allow . in repository name #453
-	Feature: Add command gogs fix location <old path> to handle Gogs app location change
-	Feature: Support edit release and save as draft
-	Feature: Add cron task and running process monitor panel
-	Feature: Add database adapter for logging
-	Feature: Add delete all inactivate accounts operation in admin panel
-	Feature: Add reverse proxy authentication support #165
-	Feature: Add application level GZIP support by server -> ENABLE_GZIP config option.
-	Feature: Closing issues through commits #302
-	Feature: Able to star/unstar a repository
-	Feature: Ability to attach files to issues (attachments) #307
-	Feature: Able to create/manage/delete organization with team management
-	Feature: Add Slack webhook integration #379
-	Feature: Add Organization-level Webhooks #442
-	Other: Official website brand new design(gogs.io)
-	Other: Whole site new UI design
-	Other: Most of pages implement multiple languages
-	Other: Add Ubuntu install package #455
-
-2014-06-02
-
-	* V0.4.1:
-	Bug fix: Cannot clone through SSH with non-default port(22) #94
-	Bug fix: Cannot migrate repository when use PostgreSQL #141
-	Bug fix: Show private repository activities on public activities list #148
-	Bug fix: Does not verify admin user name in install page #149
-	Bug fix: Does not update all accesses when change user name #150
-	Bug fix: Panic when no master branch
-	Bug fix: Panic when delete a branch #155
-	Bug fix: Redirect to 404 page when commenter is not the repository owner #159
-	Bug fix: Show 500 page when poster of issue no longer exists #167
-	Bug fix: Using @ in code block tries to make a mention #178
-	Improvement: Able to unbind social account from database
-	Improvement: Add mail notification for new comment and mentioned in new comment
-	Improvement: Add comment on issue activity
-	Improvement: Add clean unbind OAuthes operation in admin panel
-	Improvement: Underlying system of issue tracker
-	Improvement: Able to log message to different adapters by level at same time
-	Improvement: Show collaborative repositories in dashboard
-	Improvement: Able to preview option for editing of issue #204
-	Improvement: Able to set GOGS_CUSTOM envrionment variable to set global custom path #209
-	Improvement: Add log -> ROOT_PATH option for custom log file path #209
-	Feature: Support SMTP authentication #8
-	Feature: Support user name contains dot . #91
-	Feature: Support add/remove repository collaborators
-	Feature: Add server -> DISABLE_ROUTER_LOG option for disabling router log
-	Feature: Add picture -> DISABLE_GRAVATAR option for disabling Gravatar
-	Feature: Add command gogs dump for dumping files and database
-	Feature: Support webhook services #98
-	Feature: Add read/unread status to issue
-	Feature: Add assignee to issue
-	Feature: Add history page for file #166
-	Feature: Support add custom .gitignore and license files by adding them to custom/conf/gitignore and custom/conf/license #174
-	Feature: Add milestone to issue tracker
-	Feature: Support download tar.gz for releases #186
-	Feature: Add server -> STATIC_ROOT_PATH option for indicating custom template and static file path #209
-	Other: Official website online(gogs.io)
-	Other: Support install with Vagrant(note)
-	Other: Support install from AUR packages #176
-
-2014-04-28
-
-	* V0.3.1 :
-	Bug fix: Panic when try to get author of tag when there isn’t one #92
-	Bug fix: Problems with Docker setup scripts #124 #129
-	Bug fix: Picture overflows when size is extremely large in single file page
-	Improvement: Remember database option status in install page
-	Feature: Basic support for LDAP/Microsoft Active Directory #112
-	Feature: Offline mode to disable fetch static resources from CDN
-	Feature: Support log in by e-mail
-	Other: Batch of typo and grammar fix
-	Other: Solution for MySQL initialization error when use wrong engine(note)
-	Other: Make SQLite3 as default database option when enabled
-
-2014-04-23
-
-	* V0.3.0 :
-	Bug fix: One-click copy button of clone URL in repository viewer doesn’t work(note)
-	Bug fix: Doesn’t delete corresponding accesses, watches when delete user
-	Bug fix: Server log doesn’t log into correct file
-	Improvement: Add corresponding issue link to create issue notify mail
-	Improvement: Add salt for every single user
-	Improvement: Use PBKDF2 and user salt for encoding user password(note)
-	Improvement: Huge time, CPU and memory reduction of getting repository files
-	Improvement: Show commits list by page, not all at once
-	Improvement: Use build tag to enable SQLite3 support(note)
-	Feature: Support rename repository/user
-	Feature: Support transfer repository
-	Feature: Support reset user password
-	Feature: Support detect @someone, #issueNum, SHA1 and issue link in markdown render
-	Feature: Support mail notify for someone is mentioned in creating issue
-	Feature: Support go get in meta block
-	Feature: Support setting default branch
-	Feature: Support HTTP(S) push
-	Feature: Support search commits by keyword in specific branch
-	Feature: Support private repository
-	Feature: Support migrate and mirror public/private repository
-	Feature: Support social account login(GitHub, Google, QQ, Weibo)
-	Feature: Support view and add new release(use existing tag or create a new one)
-	Feature: Support download zip archive from any given commit
-	Feature: Support browse code by tag
-	Other: Support deploy with Docker(note)
-	Other: Git version requirement for both server and client sides become v1.6.6(Smart HTTP support).
-
-2014-04-01
-
-	* V0.2.0 :
-	First public release.

+ 22 - 24
gogs.install

@@ -1,42 +1,40 @@
 pre_install() {
-  if ! getent group gogs >/dev/null; then
-    groupadd --system gogs
-  fi
-  if ! getent passwd gogs >/dev/null; then
-    useradd -m --system -c 'gogs daemon users' -g gogs -s /bin/false gogs
-  fi
-  chsh gogs -s /bin/bash
+    if ! getent group gogs >/dev/null; then
+        groupadd --system gogs
+    fi
+    if ! getent passwd gogs >/dev/null; then
+        useradd -m --system -c 'gogs daemon users' -g gogs -s /bin/bash gogs
+    fi
 }
 
 post_install(){
-	mkdir -p /var/log/gogs
-	chown -R gogs:gogs /var/log/gogs
-	chown -R gogs:gogs /srv/gogs
+    mkdir -p /var/log/gogs
+    chown -R gogs:gogs /var/log/gogs
+    chown -R gogs:gogs /srv/gogs
 
-	systemctl daemon-reload
+    systemctl daemon-reload
 }
 
 pre_upgrade(){
-	systemctl stop gogs.service
-	
-	pre_install $1
+    systemctl -q is-active gogs.service && systemctl stop gogs.service
 }
 
 post_upgrade() {
-	post_install $1
-	systemctl start gogs.service
+    systemctl daemon-reload
+    systemctl -q is-enabled gogs.service && systemctl start gogs.service
 }
 
 pre_remove() {
-	systemctl stop gogs.service
-	systemctl disable gogs.service
+    systemctl -q is-active gogs.service && systemctl stop gogs.service
+    systemctl -q is-enabled gogs.service && systemctl disable gogs.service
 }
 
 post_remove() {
-  if getent passwd gogs >/dev/null; then
-    userdel -r gogs
-  fi
-  if getent group gogs >/dev/null; then
-    groupdel gogs
-  fi
+    if getent passwd gogs >/dev/null; then
+        userdel gogs
+    fi
+    if getent group gogs >/dev/null; then
+        groupdel gogs
+    fi
+    systemctl daemon-reload
 }

+ 15 - 0
gogs.service

@@ -0,0 +1,15 @@
+[Unit]
+Description=Gogs (Go Git Service) server
+After=syslog.target
+After=network.target
+
+[Service]
+Type=simple
+User=gogs
+Group=gogs
+ExecStart=/usr/share/gogs/gogs web --config /etc/gogs/app.ini
+WorkingDirectory=/srv/gogs
+Environment=USER=gogs HOME=/home/gogs
+
+[Install]
+WantedBy=multi-user.target

+ 0 - 14
gogs.service.patch

@@ -1,14 +0,0 @@
-12,15c12,15
-< User=git
-< Group=git
-< WorkingDirectory=/home/git/gogs
-< ExecStart=/home/git/gogs/gogs web
----
-> User=gogs
-> Group=gogs
-> WorkingDirectory=/srv/gogs/
-> ExecStart=/usr/share/gogs/gogs web --config /srv/gogs/conf/app.ini
-17c17
-< Environment=USER=git HOME=/home/git
----
-> Environment=USER=gogs HOME=/home/gogs

+ 0 - 20
gogs_new.service

@@ -1,20 +0,0 @@
-[Unit]
-Description=Gogs (Go Git Service)
-After=syslog.target
-After=network.target
-#After=mysqld.service
-#After=postgresql.service
-#After=memcached.service
-#After=redis.service
-
-[Service]
-Type=simple
-User=gogs
-Group=gogs
-WorkingDirectory=/srv/gogs/
-ExecStart=/usr/share/gogs/gogs web --config /srv/gogs/conf/app.ini
-Restart=always
-Environment=USER=gogs HOME=/home/gogs
-
-[Install]
-WantedBy=multi-user.target

+ 0 - 20
gogs_old.service

@@ -1,20 +0,0 @@
-[Unit]
-Description=Gogs (Go Git Service)
-After=syslog.target
-After=network.target
-#After=mysqld.service
-#After=postgresql.service
-#After=memcached.service
-#After=redis.service
-
-[Service]
-Type=simple
-User=git
-Group=git
-WorkingDirectory=/home/git/gogs
-ExecStart=/home/git/gogs/gogs web
-Restart=always
-Environment=USER=git HOME=/home/git
-
-[Install]
-WantedBy=multi-user.target

+ 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
-}