gitea/modules/packages
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
..
alpine Integrate alpine noarch packages into other architectures index (#29137) 2024-02-25 15:10:55 +00:00
arch Relax the version checking for Arch packages (#32908) 2024-12-19 09:41:23 +00:00
cargo cargo registry - respect renamed dependencies (#32430) 2024-11-12 02:57:30 +00:00
chef Add Chef package registry (#22554) 2023-02-06 09:49:21 +08:00
composer Add bin to Composer Metadata (#32099) 2024-09-21 22:42:17 +00:00
conan Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
conda Refactor error system (#33771) 2025-03-03 05:36:10 +00:00
container Use docs.gitea.com instead of docs.gitea.io (#26739) 2023-08-27 11:59:12 +00:00
cran Enable unparam linter (#31277) 2024-06-11 18:47:45 +00:00
debian Refactor markup package (#32399) 2024-11-04 10:59:50 +00:00
goproxy Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
helm Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
maven Fix maven pom inheritance (#32943) 2024-12-25 04:28:37 +00:00
npm Refactor package (routes and error handling, npm peer dependency) (#33111) 2025-01-06 22:45:20 +08:00
nuget Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
pub Use docs.gitea.com instead of docs.gitea.io (#26739) 2023-08-27 11:59:12 +00:00
pypi Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
rpm Use new RPM constants (#28931) 2024-01-25 21:40:24 +00:00
rubygems Enable more revive linter rules (#30608) 2024-04-22 11:48:42 +00:00
swift Add Swift package registry (#22404) 2023-03-13 15:28:39 -05:00
vagrant Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
content_store.go Fix missing signature key error when pulling Docker images with SERVE_DIRECT enabled (#32365) 2024-10-31 15:28:25 +00:00
hashed_buffer_test.go Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
hashed_buffer.go Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
multi_hasher_test.go Replace fmt.Sprintf with hex.EncodeToString (#21960) 2022-11-28 11:19:18 +00:00
multi_hasher.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00