1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-05-04 22:48:05 +00:00
gitea/services
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
..
actions Enable addtional linters () 2025-04-01 10:14:01 +00:00
agit Move git references checking to gitrepo packages to reduce expose of repository path () 2025-03-15 19:48:59 -07:00
asymkey Move ParseCommitWithSSHSignature to service layer () 2025-04-01 16:30:53 +00:00
attachment Enable testifylint rules () 2025-03-31 01:53:48 -04:00
auth Enable addtional linters () 2025-04-01 10:14:01 +00:00
automerge Enable addtional linters () 2025-04-01 10:14:01 +00:00
context Fix team permission () 2025-04-08 04:15:15 +00:00
contexttest Add file tree to file view page () 2025-03-15 16:26:49 +08:00
convert Refactor Branch struct in package modules/git () 2025-04-02 17:31:32 +00:00
cron Use default Git timeout when checking repo health () 2025-02-14 15:13:56 +00:00
doctor Enable addtional linters () 2025-04-01 10:14:01 +00:00
externalaccount Enable addtional linters () 2025-04-01 10:14:01 +00:00
feed Enable addtional linters () 2025-04-01 10:14:01 +00:00
forms Add anonymous access support for private/unlisted repositories () 2025-03-29 13:26:41 +08:00
git Move commits signature and verify functions to service layers () 2025-02-16 12:24:07 +00:00
gitdiff Enable addtional linters () 2025-04-01 10:14:01 +00:00
indexer Update issue indexer after merging a PR () 2024-05-08 14:45:15 +00:00
issue Enable addtional linters () 2025-04-01 10:14:01 +00:00
lfs Enable addtional linters () 2025-04-01 10:14:01 +00:00
mailer Enable addtional linters () 2025-04-01 10:14:01 +00:00
markup Enable addtional linters () 2025-04-01 10:14:01 +00:00
migrations Enable addtional linters () 2025-04-01 10:14:01 +00:00
mirror Refactor Branch struct in package modules/git () 2025-04-02 17:31:32 +00:00
notify Add workflow_job webhook () 2025-03-11 10:40:38 -07:00
oauth2_provider Enable addtional linters () 2025-04-01 10:14:01 +00:00
org Fix team permission () 2025-04-08 04:15:15 +00:00
packages Fix invalid version in RPM package path () 2025-04-03 19:00:00 +00:00
projects Enable addtional linters () 2025-04-01 10:14:01 +00:00
pull Uniform all temporary directories and allow customizing temp path () 2025-04-08 16:15:28 +00:00
release Enable testifylint rules () 2025-03-31 01:53:48 -04:00
repository Uniform all temporary directories and allow customizing temp path () 2025-04-08 16:15:28 +00:00
secrets Added Description Field for Secrets and Variables () 2025-03-17 19:24:54 +00:00
task Enable addtional linters () 2025-04-01 10:14:01 +00:00
uinotification Penultimate round of db.DefaultContext refactor () 2023-10-11 04:24:07 +00:00
user Enable testifylint rules () 2025-03-31 01:53:48 -04:00
versioned_migration Add global lock for migrations to make upgrade more safe with multiple replications () 2025-03-07 21:08:53 +00:00
webhook Fix discord webhook 400 status code when description limit is exceeded () 2025-04-04 18:09:40 +00:00
webtheme Improve theme display () 2025-03-08 21:38:11 +00:00
wiki Uniform all temporary directories and allow customizing temp path () 2025-04-08 16:15:28 +00:00