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

linux tarball is not namespaced #935

Closed
robey opened this Issue Jul 27, 2015 · 10 comments

Comments

Projects
None yet
4 participants
@robey
Copy link
Contributor

robey commented Jul 27, 2015

If you tar xvf the distribution tarball, at least as of 0.15.1, it will dump a bunch of files in the current folder, not a distribution folder. Normally, a distribution tarball should contain all the files inside a folder with the same name (so prometheus-0.15.1.linux-amd64.tar.gz would unpack into a new folder called prometheus-0.15.1.linux-amd64.

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Jul 27, 2015

Yeah, historical reasons for that. Originally, the "bunch of files" was just one, the prometheus binary. Now we have promtool, too, and the console templates... I guess we have to rethink the packaging.

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Jul 27, 2015

Other historical reason: we didn't want any versioning in the contained files because we just want to unpack them into the same place always and use the same run script, etc. That would get more annoying when unpacking to a versioned directory. @matthiasr opinion?

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Jul 27, 2015

@juliusv That's essentially a SoundCloudism... As @robey said, it's very weird to publicly distribute tar balls that don't create a directory for their content when unpacked...

@robey

This comment has been minimized.

Copy link
Contributor Author

robey commented Jul 27, 2015

For other services, we have deploy scripts do something like this:

ETCD_FOLDER=$(echo "$ETCD_TARBALL" | sed -e 's/.tar.gz//')
[ -x "$ETCD_FOLDER" ] || tar xf "$ETCD_TARBALL"
rm -f etcd && ln -s "$ETCD_FOLDER" etcd

Then "etcd" is always a symlink to the currently-installed version, which has the advantage of telling us at a glance which version is running, and lets us keep old versions around for rollback. I think this is really common (we certainly didn't invent it). So far, prometheus is the only service I've deployed that doesn't make unix-style tarball folders like this.

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Jul 28, 2015

Ok, sounds good to me then. But then we should do this for all our projects for consistency, including those that have only one binary file. @robey wanna give it a try?

@matthiasr

This comment has been minimized.

Copy link
Contributor

matthiasr commented Jul 28, 2015

This should go into the next minor release then, it is a breaking change.

@matthiasr

This comment has been minimized.

Copy link
Contributor

matthiasr commented Jul 28, 2015

PS: with proper packages everything will be ok :)

@robey

This comment has been minimized.

Copy link
Contributor Author

robey commented Jul 28, 2015

Unless your build is more complicated than it looks, I think that will do it.

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Jul 28, 2015

Yep, should be super straightforward.

@juliusv juliusv closed this in #938 Jul 28, 2015

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.