gitea/templates
Lunny Xiao 32b97b3ce8
Uniform all temporary directories and allow customizing temp path (#32352)
This PR uniform all temporary directory usage so that it will be easier
to manage.

Relate to #31792 

- [x] Added a new setting to allow users to configure the global
temporary directory.
- [x] Move all temporary files and directories to be placed under
os.Temp()/gitea.
- [x] `setting.Repository.Local.LocalCopyPath` now will be
`setting.TempPath/local-repo` and the customized path is removed.
```diff
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;[repository.local]
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Path for local repository copy. Defaults to  TEMP_PATH + `local-repo`, this is deprecated and cannot be changed
-;LOCAL_COPY_PATH = local-repo
```

- [x] `setting.Repository.Upload.TempPath` now will be
`settting.TempPath/uploads` and the customized path is removed.
```diff
;[repository.upload]
-;;
-;; Path for uploads. Defaults to TEMP_PATH + `uploads`
-;TEMP_PATH = uploads
```

- [x] `setting.Packages.ChunkedUploadPath` now will be
`settting.TempPath/package-upload` and the customized path is removed.
```diff
;[packages]
-;;
-;; Path for chunked uploads. Defaults it's `package-upload` under `TEMP_PATH` unless it's an absolute path.
-;CHUNKED_UPLOAD_PATH = package-upload
```

- [x] `setting.SSH.KeyTestPath` now will be
`settting.TempPath/ssh_key_test` and the customized path is removed.
```diff
[server]
-;;
-;; Directory to create temporary files in when testing public keys using ssh-keygen,
-;; default is the system temporary directory.
-;SSH_KEY_TEST_PATH =
```

TODO:
- [ ] setting.PprofDataPath haven't been changed because it may need to
be kept until somebody read it but temp path may be clean up any time.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-08 16:15:28 +00:00
..
admin Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
api/packages/pypi Fix links in PyPI Simple Repository API page (#30594) 2024-04-20 01:15:14 +00:00
base Prepare common tmpl functions in a middleware (#33957) 2025-03-25 06:17:58 +00:00
custom
devtest Refactor dropdown ellipsis (#34123) 2025-04-05 03:21:11 +00:00
explore Refactor template ctx and render utils (#32422) 2024-11-05 14:04:26 +08:00
mail
org Fix team permission (#34128) 2025-04-08 04:15:15 +00:00
package Remove unused or abused styles (#33918) 2025-03-17 22:11:24 +08:00
projects fix(#34076):replace assgniee translation key (#34077) 2025-03-31 19:11:15 +00:00
repo Check user/org repo limit instead of doer (#34147) 2025-04-07 23:45:31 -07:00
shared Add flat-square action badge style (#34062) 2025-04-01 09:42:10 +00:00
status Use `overflow-wrap: anywhere` to replace `word-break: break-all` (#34126) 2025-04-06 17:13:02 +08:00
swagger Add `last_committer_date` and `last_author_date` for file contents API (#32921) 2025-04-02 21:47:31 -07:00
user Fix markdown render behaviors (#34122) 2025-04-05 11:56:48 +08:00
webhook Fix incorrect tailwind migration (#30007) 2024-03-22 20:51:29 +01:00
home.tmpl Remove urls from translations (#31950) 2024-09-02 18:36:24 +00:00
install.tmpl Replace text-align classes with tailwind (#33905) 2025-03-16 12:08:16 +00:00
post-install.tmpl Optimize the installation page (#32994) 2024-12-31 04:49:26 +00:00