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
gitlab-shell: 8.3.3->8.4.1, fix hardcoded paths #49385
Conversation
pkgs/applications/version-management/gitlab-shell/remove-hardcoded-locations.patch
Outdated
Show resolved
Hide resolved
Per GITLAB_SHELL_VERSION in the latest gitlab releases it should be 8.3.3 |
Oops, seems I accidentally looked at the master branch. Should I change this PR to include only the patch? Or just let it sit here until the next release the 22.? GitLab will break for existing users after upgrading and garbage collecting, since |
|
||
def self.command(whatever) | ||
- "#{ROOT_PATH}/bin/gitlab-shell #{whatever}" | ||
+ "/var/run/current-system/sw/bin/gitlab-shell #{whatever}" |
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.
Should also point to /run/
end | ||
func NewFromDir(dir string) (*Config, error) { | ||
- return newFromFile(path.Join(dir, configFile)) | ||
+ return newFromFile("/run/gitlab/shell-config.yml") |
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.
What is dir
usually?
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.
os.Getwd()
, which I assume is the gitlab
homedir, /var/gitlab/state/home
. Note that this part of the patch is already included in nixpkgs.
Please only include the patch, it's easy enough to bump gitlab shell when updating the rest |
1d9fe15
to
d5596ea
Compare
@globin can you verify this works, and we probably can strip
from |
553b3cc
to
7101820
Compare
@flokli Done. I don't think there's anything missing, this is a reasonably simple change. |
7101820
to
62e5de4
Compare
I squashed together the two commits changing |
@krav I stripped the |
@flokli I have to admit I wasn't aware of the |
658c865
to
a93fbdf
Compare
@infinisil good to merge? |
a93fbdf
to
3caeeab
Compare
Motivation for this change
This upgrades
gitlab-shell
to be current withgitlab
.In addition it fixes paths in the generated
authorized_keys
file, which hardcoded paths to the running gitlab-shell and broke upgrades.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)