gitea/models/asymkey
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
..
error.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
gpg_key_add.go Move commits signature and verify functions to service layers (#33605) 2025-02-16 12:24:07 +00:00
gpg_key_commit_verification.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
gpg_key_common.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
gpg_key_import.go Final round of db.DefaultContext refactor (#27587) 2023-10-14 08:37:24 +00:00
gpg_key_list.go Move more functions to db.Find (#28419) 2024-01-15 02:19:25 +00:00
gpg_key_test.go Move commits signature and verify functions to service layers (#33605) 2025-02-16 12:24:07 +00:00
gpg_key_verify.go Move commits signature and verify functions to service layers (#33605) 2025-02-16 12:24:07 +00:00
gpg_key.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
ssh_key_authorized_keys.go Fix some pending problems (#29985) 2024-03-22 19:17:30 +08:00
ssh_key_deploy.go Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods (#28220) 2023-12-07 15:27:36 +08:00
ssh_key_fingerprint.go Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
ssh_key_parse.go Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
ssh_key_principals.go Move some asymkey functions to service layer (#28894) 2024-03-04 08:57:39 +00:00
ssh_key_test.go Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
ssh_key_verify.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
ssh_key.go Fix panic of ssh public key page after deletion of auth source (#31829) 2024-08-15 23:59:01 +08:00