Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change PIDFile default from /var/run/gitea.pid to /run/gitea.pid #12500

Merged
merged 4 commits into from
Aug 18, 2020

Conversation

flokli
Copy link
Contributor

@flokli flokli commented Aug 16, 2020

On most modern distributions, /var/run is deprecated and only kept for backwards compat according to
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s13.html, and is a symlink to /run/ on modern distributions.

Old Distros that still don't have /run can update the gitea default as described in from-source.en-us.md to point to the old location.

Follow-up on #12391 (comment) and #12485.

This section covers more paths than the 3 listed in the heading.
….pid

On most modern distributions, /var/run is deprecated and only kept for
backwards compat according to
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s13.html, and is a
symlink to `/run/` on modern distributions.

Old Distros that still don't have `/run` can update the gitea default as
described in from-source.en-us.md to point to the old location.
@6543
Copy link
Member

6543 commented Aug 16, 2020

lable: kind/breaking

do we realy have to change this default?

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 16, 2020
@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2020

Codecov Report

Merging #12500 into master will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12500      +/-   ##
==========================================
+ Coverage   43.49%   43.53%   +0.03%     
==========================================
  Files         642      642              
  Lines       71003    71003              
==========================================
+ Hits        30886    30910      +24     
+ Misses      35108    35092      -16     
+ Partials     5009     5001       -8     
Impacted Files Coverage Δ
modules/setting/setting.go 45.80% <ø> (ø)
modules/queue/workerpool.go 58.77% <0.00%> (-1.23%) ⬇️
services/pull/pull.go 42.03% <0.00%> (+0.46%) ⬆️
models/error.go 35.66% <0.00%> (+0.85%) ⬆️
models/notification.go 67.04% <0.00%> (+0.91%) ⬆️
modules/log/event.go 57.54% <0.00%> (+0.94%) ⬆️
modules/queue/unique_queue_disk_channel.go 55.38% <0.00%> (+1.53%) ⬆️
modules/notification/ui/ui.go 83.33% <0.00%> (+2.77%) ⬆️
services/pull/check.go 50.76% <0.00%> (+3.07%) ⬆️
modules/notification/mail/mail.go 36.25% <0.00%> (+3.75%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 87fbb54...489c6ac. Read the comment docs.

@flokli
Copy link
Contributor Author

flokli commented Aug 16, 2020

do we realy have to change this default?

I'm not sure why gitea would need to still point to a long-deprecated location (and if so, for how long?)
The burden of using outdated paths should really be on those outdated distros, not applications.

Most userspace tools have defaulted to use /run these days (so packagers of such distros are used to having to change this).

Gitea provides a documented way to change the default, and it would be part of the release notes, too.

@lafriks lafriks added pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! type/miscellaneous labels Aug 16, 2020
@lafriks lafriks added this to the 1.13.0 milestone Aug 16, 2020
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Aug 16, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Aug 16, 2020
@silverwind
Copy link
Member

silverwind commented Aug 17, 2020

Kind of unrelated, but I question if we even need to have a PID file in the default configuration. Service managers like systemd can do without one and by not having one, we can eliminate a whole class of potential errors related to stale pid files.

@zeripath
Copy link
Contributor

@silverwind We don't create a pid file by default - it is only if the user requests one.

@silverwind
Copy link
Member

Is that an undocumented option? I can't find anything related to pid files in app.example.ini or the cheat sheet docs.

@zeripath
Copy link
Contributor

That's because it's not an app.ini option. It's a command line option:

https://docs.gitea.io/en-us/command-line/#web

@lafriks lafriks merged commit 95d478c into go-gitea:master Aug 18, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! type/miscellaneous
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants