Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

unset XDG_HOME_CONFIG as gitea manages configuration locations#33067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
wxiaoguang merged 6 commits intogo-gitea:mainfromeeyrjmr:drop_XDG_CONFIG_HOME
Jan 1, 2025

Conversation

@eeyrjmr
Copy link
Contributor

@eeyrjmreeyrjmr commentedJan 1, 2025
edited
Loading

unset XDG_CONFIG_HOME early to enable gitea to manage git configuration. simple error checking to satisfy the linting.Closes#33039

@GiteaBotGiteaBot added the lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelJan 1, 2025
@github-actionsgithub-actionsbot added modifies/goPull requests that update Go code modifies/cliPR changes something on the CLI, i.e. gitea doctor or gitea admin labelsJan 1, 2025
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@GiteaBotGiteaBot added lgtm/need 1This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelsJan 1, 2025
@lunny
Copy link
Member

Is it better to move it closer tocommonBaseEnvs?

@wxiaoguang
Copy link
Contributor

commonBaseEnvs

commonBaseEnvs doesn't "unset"

@GiteaBotGiteaBot added lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1This PR needs approval from one additional maintainer to be merged. labelsJan 1, 2025
@wxiaoguang
Copy link
Contributor

Hmm, find another case:NewMainApp is the entry for the program, while the unset should also apply to the "testing" code. So maybe there could be a common function likesetting.InitGiteaEnvVars() then call it inNewMainApp andunittest.InitSettings.

@eeyrjmr
Copy link
ContributorAuthor

Hmm, find another case:NewMainApp is the entry for the program, while the unset should also apply to the "testing" code. So maybe there could be a common function likesetting.InitGiteaEnvVars() then call it inNewMainApp andunittest.InitSettings.

good point,
so if I understand this correctly.

  1. add a function to ... modules/settings/config_env.go ( seems the most logical)
  2. call said function in NewMainApp and unittest.InitSettings
wxiaoguang and lunny reacted with thumbs up emoji

@wxiaoguangwxiaoguang marked this pull request as draftJanuary 1, 2025 10:18
@eeyrjmreeyrjmr marked this pull request as ready for reviewJanuary 1, 2025 14:53
@techknowlogick
Copy link
Member

This may impact let's encrypt as I believe certmagic uses xdg to store the certs. I think this is overridden, but I can't fully remember. Just putting this note here so I remember to check once I'm at a computer

@wxiaoguang
Copy link
Contributor

This may impact let's encrypt as I believe certmagic uses xdg to store the certs. I think this is overridden, but I can't fully remember. Just putting this note here so I remember to check once I'm at a computer

I do not think any user could start Gitea with XDG_HOME_CONFIG to provide services to other users. Have they manually writtenXDG_HOME_CONFIG in their systemdgitea.service or docker-compose?

@lunny
Copy link
Member

This may impact let's encrypt as I believe certmagic uses xdg to store the certs. I think this is overridden, but I can't fully remember. Just putting this note here so I remember to check once I'm at a computer

It seems these paths are provided by Gitea.
图片

techknowlogick reacted with heart emoji

@techknowlogick
Copy link
Member

@lunny thanks for confirming:)

@wxiaoguangwxiaoguang merged commit233b795 intogo-gitea:mainJan 1, 2025
26 checks passed
@GiteaBotGiteaBot added this to the1.24.0 milestoneJan 1, 2025
@wxiaoguang
Copy link
Contributor

@lunny thanks for confirming:)

But the ACME path doesn't seem right. -> Try to fix ACME directory problem#33072

@eeyrjmreeyrjmr deleted the drop_XDG_CONFIG_HOME branchJanuary 1, 2025 23:55
zjjhot added a commit to zjjhot/gitea that referenced this pull requestJan 2, 2025
* giteaofficial/main:  [skip ci] Updated translations via Crowdin  unset XDG_HOME_CONFIG as gitea manages configuration locations (go-gitea#33067)  Refactor repo-new.ts (go-gitea#33070)  Refactor pull-request compare&create page (go-gitea#33071)  feat: link to nuget dependencies (go-gitea#26554)  Remove some unnecessary template helpers (go-gitea#33069)  Inherit submodules from template repository content (go-gitea#16237)  [skip ci] Updated translations via Crowdin  feat(action): issue change title notifications (go-gitea#33050)  Use project's redirect url instead of composing url (go-gitea#33058)  Fix unittest and repo create bug (go-gitea#33061)  Fix locale type (go-gitea#33059)  Refactor maven package registry (go-gitea#33049)  Optimize the installation page (go-gitea#32994)  [Feature] Private README.md for organization (go-gitea#32872)  Make issue suggestion work for new PR page (go-gitea#33035)  Add IntelliJ Gateway's .uuid to gitignore (go-gitea#33052)
@go-giteago-gitea locked asresolvedand limited conversation to collaboratorsApr 2, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@lunnylunnylunny approved these changes

@wxiaoguangwxiaoguangwxiaoguang approved these changes

@delvhdelvhdelvh approved these changes

Assignees

No one assigned

Labels

lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore.modifies/cliPR changes something on the CLI, i.e. gitea doctor or gitea adminmodifies/goPull requests that update Go code

Projects

None yet

Milestone

1.24.0

Development

Successfully merging this pull request may close these issues.

Gitea can overwrite users gitconfig when using XDG spec

6 participants

@eeyrjmr@lunny@wxiaoguang@techknowlogick@delvh@GiteaBot

[8]ページ先頭

©2009-2025 Movatter.jp