internal: define package variables for paths#20060
Open
tacerus wants to merge 1 commit intogoauthentik:mainfrom
Open
internal: define package variables for paths#20060tacerus wants to merge 1 commit intogoauthentik:mainfrom
tacerus wants to merge 1 commit intogoauthentik:mainfrom
Conversation
During distribution packaging, files are typically installed in standardized paths (for example, adhering to the FHS). Avoid the need for patching the source code to facilitate this by allowing the paths needed by the server to be overwritten at build time. The defaults are kept as they are to not affect existing behavior. Example usage (simplified): $ go build \ -ldflags '-X "goauthentik.io/internal/gounicorn.manageCmd=/usr/bin/ak-manage" -X "goauthentik.io/internal/gounicorn.gunicornCmd=/usr/bin/gunicorn" -X "goauthentik.io/internal/gounicorn.gunicornConf=/etc/authentik/gunicorn.conf.py" -X "goauthentik.io/internal/gounicorn.pidDir=/run/authentik" -X "goauthentik.io/web.staticDir=/usr/share/authentik/web/dist"' ./cmd/server Ideally, similar functionality would also exist for the various path references in the Python code. However, those require further consideration as there is no equivalent concept of build time options like there is in Go. Signed-off-by: Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #20060 +/- ##
==========================================
- Coverage 93.25% 93.19% -0.07%
==========================================
Files 968 968
Lines 53438 53438
==========================================
- Hits 49836 49802 -34
- Misses 3602 3636 +34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
During distribution packaging, files are typically installed in standardized paths (for example, adhering to the FHS). Avoid the need for patching the source code to facilitate this by allowing the paths needed by the server to be overwritten at build time.
The defaults are kept as they are to not affect existing behavior.
Example usage (simplified):
Ideally, similar functionality would also exist for the various path references in the Python code. However, those require further consideration as there is no equivalent concept of build time options like there is in Go.
Checklist
ak test authentik/)make lint-fix)If an API change has been made
make gen-build)If changes to the frontend have been made
make web)If applicable
make docs)