Switch to non-deprecation setting (#18358)

* Switch to non-deprecation setting
  (Avoid by-default: "Deprecated fallback `[server]` `LFS_CONTENT_PATH` present. Use `[lfs]` `PATH` instead. This fallback will be removed in v1.18.0")

* Update all references
tokarchuk/v1.17
Gusted 3 years ago committed by GitHub
parent 8472884cef
commit 5e5740af69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      custom/conf/app.example.ini
  2. 4
      docker/root/etc/templates/app.ini
  3. 4
      docker/rootless/etc/templates/app.ini
  4. 4
      docs/content/doc/usage/git-lfs-support.md
  5. 4
      integrations/mssql.ini.tmpl
  6. 4
      integrations/mysql8.ini.tmpl
  7. 4
      integrations/pgsql.ini.tmpl
  8. 4
      integrations/sqlite.ini.tmpl
  9. 2
      routers/install/install.go

@ -211,8 +211,6 @@ RUN_MODE = ; prod
;; Enables git-lfs support. true or false, default is false. ;; Enables git-lfs support. true or false, default is false.
;LFS_START_SERVER = false ;LFS_START_SERVER = false
;; ;;
;; Where your lfs files reside, default is data/lfs.
;LFS_CONTENT_PATH = data/lfs
;; ;;
;; LFS authentication secret, change this yourself ;; LFS authentication secret, change this yourself
LFS_JWT_SECRET = LFS_JWT_SECRET =
@ -2183,6 +2181,9 @@ PATH =
;; ;;
;[lfs] ;[lfs]
;STORAGE_TYPE = local ;STORAGE_TYPE = local
;;
;; Where your lfs files reside, default is data/lfs.
;PATH = data/lfs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

@ -20,7 +20,6 @@ DISABLE_SSH = $DISABLE_SSH
SSH_PORT = $SSH_PORT SSH_PORT = $SSH_PORT
SSH_LISTEN_PORT = $SSH_LISTEN_PORT SSH_LISTEN_PORT = $SSH_LISTEN_PORT
LFS_START_SERVER = $LFS_START_SERVER LFS_START_SERVER = $LFS_START_SERVER
LFS_CONTENT_PATH = /data/git/lfs
[database] [database]
PATH = /data/gitea/gitea.db PATH = /data/gitea/gitea.db
@ -59,3 +58,6 @@ REVERSE_PROXY_TRUSTED_PROXIES = *
[service] [service]
DISABLE_REGISTRATION = $DISABLE_REGISTRATION DISABLE_REGISTRATION = $DISABLE_REGISTRATION
REQUIRE_SIGNIN_VIEW = $REQUIRE_SIGNIN_VIEW REQUIRE_SIGNIN_VIEW = $REQUIRE_SIGNIN_VIEW
[lfs]
PATH = /data/git/lfs

@ -23,7 +23,6 @@ SSH_PORT = $SSH_PORT
SSH_LISTEN_PORT = $SSH_LISTEN_PORT SSH_LISTEN_PORT = $SSH_LISTEN_PORT
BUILTIN_SSH_SERVER_USER = $RUN_USER BUILTIN_SSH_SERVER_USER = $RUN_USER
LFS_START_SERVER = $LFS_START_SERVER LFS_START_SERVER = $LFS_START_SERVER
LFS_CONTENT_PATH = $GITEA_WORK_DIR/git/lfs
[database] [database]
PATH = $GITEA_WORK_DIR/data/gitea.db PATH = $GITEA_WORK_DIR/data/gitea.db
@ -55,3 +54,6 @@ REVERSE_PROXY_TRUSTED_PROXIES = *
[service] [service]
DISABLE_REGISTRATION = $DISABLE_REGISTRATION DISABLE_REGISTRATION = $DISABLE_REGISTRATION
REQUIRE_SIGNIN_VIEW = $REQUIRE_SIGNIN_VIEW REQUIRE_SIGNIN_VIEW = $REQUIRE_SIGNIN_VIEW
[lfs]
PATH = $GITEA_WORK_DIR/git/lfs

@ -21,8 +21,10 @@ To use Gitea's built-in LFS support, you must update the `app.ini` file:
[server] [server]
; Enables git-lfs support. true or false, default is false. ; Enables git-lfs support. true or false, default is false.
LFS_START_SERVER = true LFS_START_SERVER = true
[lfs]
; Where your lfs files reside, default is data/lfs. ; Where your lfs files reside, default is data/lfs.
LFS_CONTENT_PATH = /home/gitea/data/lfs PATH = /home/gitea/data/lfs
``` ```
**Note**: LFS server support needs at least Git v2.1.2 installed on the server **Note**: LFS server support needs at least Git v2.1.2 installed on the server

@ -45,7 +45,6 @@ SSH_LISTEN_HOST = localhost
SSH_PORT = 2201 SSH_PORT = 2201
START_SSH_SERVER = true START_SSH_SERVER = true
LFS_START_SERVER = true LFS_START_SERVER = true
LFS_CONTENT_PATH = integrations/gitea-integration-mssql/data/lfs
OFFLINE_MODE = false OFFLINE_MODE = false
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
APP_DATA_PATH = integrations/gitea-integration-mssql/data APP_DATA_PATH = integrations/gitea-integration-mssql/data
@ -100,3 +99,6 @@ DISABLE_GIT_HOOKS = false
INSTALL_LOCK = true INSTALL_LOCK = true
SECRET_KEY = 9pCviYTWSb SECRET_KEY = 9pCviYTWSb
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ
[lfs]
PATH = integrations/gitea-integration-mssql/data/lfs

@ -45,7 +45,6 @@ SSH_LISTEN_HOST = localhost
SSH_PORT = 2204 SSH_PORT = 2204
START_SSH_SERVER = true START_SSH_SERVER = true
LFS_START_SERVER = true LFS_START_SERVER = true
LFS_CONTENT_PATH = integrations/gitea-integration-mysql8/data/lfs
OFFLINE_MODE = false OFFLINE_MODE = false
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
APP_DATA_PATH = integrations/gitea-integration-mysql8/data APP_DATA_PATH = integrations/gitea-integration-mysql8/data
@ -97,3 +96,6 @@ DISABLE_GIT_HOOKS = false
INSTALL_LOCK = true INSTALL_LOCK = true
SECRET_KEY = 9pCviYTWSb SECRET_KEY = 9pCviYTWSb
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ
[lfs]
PATH = integrations/gitea-integration-mysql8/data/lfs

@ -46,7 +46,6 @@ SSH_LISTEN_HOST = localhost
SSH_PORT = 2202 SSH_PORT = 2202
START_SSH_SERVER = true START_SSH_SERVER = true
LFS_START_SERVER = true LFS_START_SERVER = true
LFS_CONTENT_PATH = integrations/gitea-integration-pgsql/data/lfs
OFFLINE_MODE = false OFFLINE_MODE = false
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
APP_DATA_PATH = integrations/gitea-integration-pgsql/data APP_DATA_PATH = integrations/gitea-integration-pgsql/data
@ -101,3 +100,6 @@ DISABLE_GIT_HOOKS = false
INSTALL_LOCK = true INSTALL_LOCK = true
SECRET_KEY = 9pCviYTWSb SECRET_KEY = 9pCviYTWSb
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ
[lfs]
PATH = integrations/gitea-integration-pgsql/data/lfs

@ -41,7 +41,6 @@ SSH_LISTEN_HOST = localhost
SSH_PORT = 2203 SSH_PORT = 2203
START_SSH_SERVER = true START_SSH_SERVER = true
LFS_START_SERVER = true LFS_START_SERVER = true
LFS_CONTENT_PATH = integrations/gitea-integration-sqlite/data/lfs
OFFLINE_MODE = false OFFLINE_MODE = false
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
APP_DATA_PATH = integrations/gitea-integration-sqlite/data APP_DATA_PATH = integrations/gitea-integration-sqlite/data
@ -99,3 +98,6 @@ INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTI3OTU5ODN9.O
[oauth2] [oauth2]
JWT_SECRET = KZb_QLUd4fYVyxetjxC4eZkrBgWM2SndOOWDNtgUUko JWT_SECRET = KZb_QLUd4fYVyxetjxC4eZkrBgWM2SndOOWDNtgUUko
[lfs]
PATH = integrations/gitea-integration-sqlite/data/lfs

@ -418,7 +418,7 @@ func SubmitInstall(ctx *context.Context) {
if form.LFSRootPath != "" { if form.LFSRootPath != "" {
cfg.Section("server").Key("LFS_START_SERVER").SetValue("true") cfg.Section("server").Key("LFS_START_SERVER").SetValue("true")
cfg.Section("server").Key("LFS_CONTENT_PATH").SetValue(form.LFSRootPath) cfg.Section("lfs").Key("PATH").SetValue(form.LFSRootPath)
var lfsJwtSecret string var lfsJwtSecret string
if lfsJwtSecret, err = generate.NewJwtSecretBase64(); err != nil { if lfsJwtSecret, err = generate.NewJwtSecretBase64(); err != nil {
ctx.RenderWithErr(ctx.Tr("install.lfs_jwt_secret_failed", err), tplInstall, &form) ctx.RenderWithErr(ctx.Tr("install.lfs_jwt_secret_failed", err), tplInstall, &form)

Loading…
Cancel
Save