-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Make CustomPath, CustomConf and AppWorkPath configurable at build #6631
Make CustomPath, CustomConf and AppWorkPath configurable at build #6631
Conversation
Signed-off-by: Andrew Thornton <art27@cantab.net>
I've set backport 1.8 as I think this is a relatively minor change that could help users.
|
Codecov Report
@@ Coverage Diff @@
## master #6631 +/- ##
=========================================
Coverage ? 41.22%
=========================================
Files ? 421
Lines ? 58064
Branches ? 0
=========================================
Hits ? 23934
Misses ? 30961
Partials ? 3169
Continue to review full report at Codecov.
|
from now on it would be a good idea for each change, also document that change in the docs directory ... why is this change not documented in the docs directory installation files? @zeripath ? i mean, each coder could also write on each pul request respective documentation about their respective feature/change/bugfix if change some behaviour! that was posted several times in forums that gitea lacks of proper documentation! |
@mckaygerhard are you aware of how rude that comment reads? This PR, although it could be merged, isn't really complete as I'd like - personally I'd prefer to get the docker build to move to it - which would be a good way to test and try to come up with documentation for this. Do you have any suggestions for how this could be documented? |
umm ok @zeripath what I wanted to say is that "it would be good", not that you should do it right now, I mean, as I mentioned :
|
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
OK, I've added the Running Documentation is complete. |
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-Authored-By: zeripath <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @zeripath. The parts that I reviewed looks good now (they are removed now so perfect 😄)
The PR looks good but I haven't tested it so this comment is just to validate my previous requests.
I do think it would be easier if the |
@zeripath the current main problem with the current docker installation is that it use the same path for edit: We are also using the same path for APP_DATA_PATH |
Should we really backport this to 1.8? |
When it was simply a two liner I thought so. Now it's a bit more involved I'm less definite. In terms of why backport: I think downstream packers might like this functionality - it does finally actually allow Gitea to be built in a way that complies with the filesystem hierarchy standard and should remove some gotchas with running the Gitea subcommands in those environments. It's also helpful for those on the default build as you can now see where several paths are set through gitea help I'm not stuck either way and whilst I understand the frustration of our Debian users that the Gitea binary uses nonstandard paths - I don't understand why they can't just shadow the binary with a compliant script, albeit this script would be complicated without this PR due to the difficulty of setting -c. This does however remove the necessity of even having a script. |
I will remove backporting label as it is more of a feature than bugfix, anyway creating correct app.ini and using -c this already can be achieved so it is not so important if it will be only from 1.9 |
No problems |
The requirement to set environment variables can make it difficult to run gitea in non-development environments.
Using an LDFLAGS with our Makefile or by directly passing in
-X
variables togo build
it should be possible to change the default locations thus making the environment variables unnecessary.An example of this would be to say set
-X "code.gitea.io/gitea/modules/setting.CustomPath=/data/gitea"
for the docker, along with appropriate settings for CustomConf and AppWorkPath to remove the necessity to wrap the gitea binary in a shell script.This would help our downstream packagers as they could make Gitea comply with the FHS and the equivalent debian hierarchy.
Signed-off-by: Andrew Thornton art27@cantab.net
Edit: It requires the full "code.gitea.io/gitea/modules/setting" import path.