aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-01-23 19:02:29 +0000
committerGitHub <noreply@github.com>2022-01-23 20:02:29 +0100
commit5e5740af69cb0f44ff0c1576a2387388d75bb4c2 (patch)
treefdfcbe4f67d1de3c5c567beb6e03a551954b2047
parent8472884cefc4a52d7e383648b3591392bd9b6e4c (diff)
downloadgitea-5e5740af69cb0f44ff0c1576a2387388d75bb4c2.tar.gz
gitea-5e5740af69cb0f44ff0c1576a2387388d75bb4c2.zip
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
-rw-r--r--custom/conf/app.example.ini5
-rw-r--r--docker/root/etc/templates/app.ini4
-rw-r--r--docker/rootless/etc/templates/app.ini4
-rw-r--r--docs/content/doc/usage/git-lfs-support.md4
-rw-r--r--integrations/mssql.ini.tmpl4
-rw-r--r--integrations/mysql8.ini.tmpl4
-rw-r--r--integrations/pgsql.ini.tmpl4
-rw-r--r--integrations/sqlite.ini.tmpl4
-rw-r--r--routers/install/install.go2
9 files changed, 25 insertions, 10 deletions
diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini
index 3343af95a9..bc98f4ca17 100644
--- a/custom/conf/app.example.ini
+++ b/custom/conf/app.example.ini
@@ -211,8 +211,6 @@ RUN_MODE = ; prod
;; Enables git-lfs support. true or false, default is 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_JWT_SECRET =
@@ -2183,6 +2181,9 @@ PATH =
;;
;[lfs]
;STORAGE_TYPE = local
+;;
+;; Where your lfs files reside, default is data/lfs.
+;PATH = data/lfs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/docker/root/etc/templates/app.ini b/docker/root/etc/templates/app.ini
index c5212a9358..7e8aa0bd0a 100644
--- a/docker/root/etc/templates/app.ini
+++ b/docker/root/etc/templates/app.ini
@@ -20,7 +20,6 @@ DISABLE_SSH = $DISABLE_SSH
SSH_PORT = $SSH_PORT
SSH_LISTEN_PORT = $SSH_LISTEN_PORT
LFS_START_SERVER = $LFS_START_SERVER
-LFS_CONTENT_PATH = /data/git/lfs
[database]
PATH = /data/gitea/gitea.db
@@ -59,3 +58,6 @@ REVERSE_PROXY_TRUSTED_PROXIES = *
[service]
DISABLE_REGISTRATION = $DISABLE_REGISTRATION
REQUIRE_SIGNIN_VIEW = $REQUIRE_SIGNIN_VIEW
+
+[lfs]
+PATH = /data/git/lfs
diff --git a/docker/rootless/etc/templates/app.ini b/docker/rootless/etc/templates/app.ini
index 905b2adb33..f106f01f5e 100644
--- a/docker/rootless/etc/templates/app.ini
+++ b/docker/rootless/etc/templates/app.ini
@@ -23,7 +23,6 @@ SSH_PORT = $SSH_PORT
SSH_LISTEN_PORT = $SSH_LISTEN_PORT
BUILTIN_SSH_SERVER_USER = $RUN_USER
LFS_START_SERVER = $LFS_START_SERVER
-LFS_CONTENT_PATH = $GITEA_WORK_DIR/git/lfs
[database]
PATH = $GITEA_WORK_DIR/data/gitea.db
@@ -55,3 +54,6 @@ REVERSE_PROXY_TRUSTED_PROXIES = *
[service]
DISABLE_REGISTRATION = $DISABLE_REGISTRATION
REQUIRE_SIGNIN_VIEW = $REQUIRE_SIGNIN_VIEW
+
+[lfs]
+PATH = $GITEA_WORK_DIR/git/lfs
diff --git a/docs/content/doc/usage/git-lfs-support.md b/docs/content/doc/usage/git-lfs-support.md
index a8f935de2b..8b2c997bf9 100644
--- a/docs/content/doc/usage/git-lfs-support.md
+++ b/docs/content/doc/usage/git-lfs-support.md
@@ -21,8 +21,10 @@ To use Gitea's built-in LFS support, you must update the `app.ini` file:
[server]
; Enables git-lfs support. true or false, default is false.
LFS_START_SERVER = true
+
+[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
diff --git a/integrations/mssql.ini.tmpl b/integrations/mssql.ini.tmpl
index b9ed26dccd..e97174ee85 100644
--- a/integrations/mssql.ini.tmpl
+++ b/integrations/mssql.ini.tmpl
@@ -45,7 +45,6 @@ SSH_LISTEN_HOST = localhost
SSH_PORT = 2201
START_SSH_SERVER = true
LFS_START_SERVER = true
-LFS_CONTENT_PATH = integrations/gitea-integration-mssql/data/lfs
OFFLINE_MODE = false
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
APP_DATA_PATH = integrations/gitea-integration-mssql/data
@@ -100,3 +99,6 @@ DISABLE_GIT_HOOKS = false
INSTALL_LOCK = true
SECRET_KEY = 9pCviYTWSb
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ
+
+[lfs]
+PATH = integrations/gitea-integration-mssql/data/lfs
diff --git a/integrations/mysql8.ini.tmpl b/integrations/mysql8.ini.tmpl
index 81a1d8836c..606aa41d5c 100644
--- a/integrations/mysql8.ini.tmpl
+++ b/integrations/mysql8.ini.tmpl
@@ -45,7 +45,6 @@ SSH_LISTEN_HOST = localhost
SSH_PORT = 2204
START_SSH_SERVER = true
LFS_START_SERVER = true
-LFS_CONTENT_PATH = integrations/gitea-integration-mysql8/data/lfs
OFFLINE_MODE = false
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
APP_DATA_PATH = integrations/gitea-integration-mysql8/data
@@ -97,3 +96,6 @@ DISABLE_GIT_HOOKS = false
INSTALL_LOCK = true
SECRET_KEY = 9pCviYTWSb
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ
+
+[lfs]
+PATH = integrations/gitea-integration-mysql8/data/lfs
diff --git a/integrations/pgsql.ini.tmpl b/integrations/pgsql.ini.tmpl
index db1914a1bb..a325ea0286 100644
--- a/integrations/pgsql.ini.tmpl
+++ b/integrations/pgsql.ini.tmpl
@@ -46,7 +46,6 @@ SSH_LISTEN_HOST = localhost
SSH_PORT = 2202
START_SSH_SERVER = true
LFS_START_SERVER = true
-LFS_CONTENT_PATH = integrations/gitea-integration-pgsql/data/lfs
OFFLINE_MODE = false
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
APP_DATA_PATH = integrations/gitea-integration-pgsql/data
@@ -101,3 +100,6 @@ DISABLE_GIT_HOOKS = false
INSTALL_LOCK = true
SECRET_KEY = 9pCviYTWSb
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ
+
+[lfs]
+PATH = integrations/gitea-integration-pgsql/data/lfs
diff --git a/integrations/sqlite.ini.tmpl b/integrations/sqlite.ini.tmpl
index 76d9420d81..e82780ad80 100644
--- a/integrations/sqlite.ini.tmpl
+++ b/integrations/sqlite.ini.tmpl
@@ -41,7 +41,6 @@ SSH_LISTEN_HOST = localhost
SSH_PORT = 2203
START_SSH_SERVER = true
LFS_START_SERVER = true
-LFS_CONTENT_PATH = integrations/gitea-integration-sqlite/data/lfs
OFFLINE_MODE = false
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
APP_DATA_PATH = integrations/gitea-integration-sqlite/data
@@ -99,3 +98,6 @@ INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTI3OTU5ODN9.O
[oauth2]
JWT_SECRET = KZb_QLUd4fYVyxetjxC4eZkrBgWM2SndOOWDNtgUUko
+
+[lfs]
+PATH = integrations/gitea-integration-sqlite/data/lfs
diff --git a/routers/install/install.go b/routers/install/install.go
index 043fae26de..eb2cd23463 100644
--- a/routers/install/install.go
+++ b/routers/install/install.go
@@ -418,7 +418,7 @@ func SubmitInstall(ctx *context.Context) {
if form.LFSRootPath != "" {
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
if lfsJwtSecret, err = generate.NewJwtSecretBase64(); err != nil {
ctx.RenderWithErr(ctx.Tr("install.lfs_jwt_secret_failed", err), tplInstall, &form)