1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-04-29 20:25:17 +00:00
gitea/modules/packages
Lunny Xiao 32b97b3ce8
Uniform all temporary directories and allow customizing temp path ()
This PR uniform all temporary directory usage so that it will be easier
to manage.

Relate to  

- [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
..
alpine Integrate alpine noarch packages into other architectures index () 2024-02-25 15:10:55 +00:00
arch Relax the version checking for Arch packages () 2024-12-19 09:41:23 +00:00
cargo cargo registry - respect renamed dependencies () 2024-11-12 02:57:30 +00:00
chef
composer Add bin to Composer Metadata () 2024-09-21 22:42:17 +00:00
conan Enable tenv and testifylint rules () 2024-12-15 10:41:29 +00:00
conda Refactor error system () 2025-03-03 05:36:10 +00:00
container Use docs.gitea.com instead of docs.gitea.io () 2023-08-27 11:59:12 +00:00
cran Enable unparam linter () 2024-06-11 18:47:45 +00:00
debian Refactor markup package () 2024-11-04 10:59:50 +00:00
goproxy Enable addtional linters () 2025-04-01 10:14:01 +00:00
helm
maven Fix maven pom inheritance () 2024-12-25 04:28:37 +00:00
npm Refactor package (routes and error handling, npm peer dependency) () 2025-01-06 22:45:20 +08:00
nuget Uniform all temporary directories and allow customizing temp path () 2025-04-08 16:15:28 +00:00
pub Use docs.gitea.com instead of docs.gitea.io () 2023-08-27 11:59:12 +00:00
pypi
rpm Use new RPM constants () 2024-01-25 21:40:24 +00:00
rubygems Enable more revive linter rules () 2024-04-22 11:48:42 +00:00
swift
vagrant
content_store.go Fix missing signature key error when pulling Docker images with SERVE_DIRECT enabled () 2024-10-31 15:28:25 +00:00
hashed_buffer_test.go Uniform all temporary directories and allow customizing temp path () 2025-04-08 16:15:28 +00:00
hashed_buffer.go Uniform all temporary directories and allow customizing temp path () 2025-04-08 16:15:28 +00:00
multi_hasher_test.go
multi_hasher.go