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

Tar.gz and Zip downloads are different: the tarball should have the same content as the zip #2793

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
6 participants
@pombredanne
Copy link

pombredanne commented Mar 18, 2013

@kimchy There is no reason IMHO for these to be different, which is quite surprising.

The .zip has extra files for Windows-only:

bin/plugin.bat
lib/sigar/sigar-amd64-winnt.dll
lib/sigar/sigar-x86-winnt.dll

This means that the tar.gz distro CANNOT be used on Windows in practice.

The pull request fixes the file sets, though there is may be a simpler way to do this

@kimchy

This comment has been minimized.

Copy link
Member

kimchy commented Mar 18, 2013

its intentional..., the assumption is that tar.gz will be used on unix, or cygwin if pushing it... . Is this an actual problem?

@pombredanne

This comment has been minimized.

Copy link
Author

pombredanne commented Mar 18, 2013

Yes, I think this is a problem at least this is a problem to me.
I cannot use one distro on multiple OS:

  • if I take the zip, I will have to fix the perms of shell scripts on posix
  • if I take the tarball, I cannot run on Windows

My initial assumption was that the two distros would have at least the same content (baring differences between zip and tar, such as permissions).
I cannot see a good reason why the tarball would not be working on windows too.

@kimchy

This comment has been minimized.

Copy link
Member

kimchy commented Mar 18, 2013

I just explained the reasons for that above, typically, you don't use tar.gz on windows platform, and I don't want to "pollute" the tar.gz with bat files.

@pombredanne

This comment has been minimized.

Copy link
Author

pombredanne commented Mar 18, 2013

I get your point, but this make it harder and surprising on users for no good reason imho. There is nothing that says that zip are windows only and not Linux or posix OSes and tar.gz is not for windows.
If anything this is a rather uncommon way to distribute things as in general when there is both a zip and a tarball, both have the same content, just a different archive format (which is the general case for instance at Apache).

About "polluting", note that you still bundle: lib/sigar/sigar-x86-winnt.lib which is for Windows only as well as JNA DLLs (which are part of the standard JNA) and end up both distributed in the tarball. And pushing it further, and me just being silly, you would not distribute MacOSX and Sun sigar binaries for Linux then ;) and remove all the various posix binaries and shell scripts from the zip, which would not make sense and MO would be even weirder.

With your current packaging, no distribution works out of the box on all supported OSes.

@kimchy

This comment has been minimized.

Copy link
Member

kimchy commented Mar 18, 2013

The winnt one is a bug, we shouldn't include it in the tar.gz, we exclude the dlls, but by mistake we didn't exclude that one, I will fix it. We don't control jna, it comes with whatever it comes with. And when I said unix, I meant OS that supports bin/sh.

@kimchy

This comment has been minimized.

Copy link
Member

kimchy commented Mar 18, 2013

Don't mind keeping this open, if other people will come across this and think that its valuable, let them vote here, and lets see how it goes. If enough people feel strongly about it, then we can reconsider.

@pombredanne

This comment has been minimized.

Copy link
Author

pombredanne commented Mar 18, 2013

If that is the route you want take, be kind enough to not remove the posix scripts from the zip, so there still is at least one pre-built download that works across all OSes

@kimchy

This comment has been minimized.

Copy link
Member

kimchy commented Mar 18, 2013

we don't remove the posix scripts from the zip...

@CptnKirk

This comment has been minimized.

Copy link

CptnKirk commented Mar 19, 2013

If you'd like to have separate OS specific distributions of your product, be my guest. However, I don't feel that packaging format is a good indicator of OS support. Having an elasticsearch-version-win.zip and elasticsearch-version-unix.tgz as the only officially available packages for these distributions would also seem reasonable.

But if I just see a downloads page that lists the same package in two different formats, I assume that the same product was simply repackaged for user convenience. And like others, if I'm in mixed OS company, I'll often just download the .zip package because it's the easiest thing to grok for the largest number of my users.

That's my vote. Either explicitly called out OS support, or pile everything into both package formats.

@kimchy

This comment has been minimized.

Copy link
Member

kimchy commented Mar 19, 2013

@CptnKirk "I'll often just download the .zip package because it's the easiest thing to grok for the largest number of my users..." << thats my reasoning as well, thats why the zip package includes everything, both *nix and windows.

@iksnalybok

This comment has been minimized.

Copy link
Contributor

iksnalybok commented May 21, 2013

I share the same idea. I really do not expect a zip and a tar.gz to have different content (and especially when it's java software), except if it is clearly stated, and the differences are explained. You may want to keep several packagings, but the target should made be obvious in the archive name, or at least in the download page. For my part, I often download the tar.gz (or tar.bz2, tar.xz) because it's generally smaller than the zip.

@pombredanne

This comment has been minimized.

Copy link
Author

pombredanne commented Aug 3, 2014

This is still an issue, none can rightfully expect a zip and tar using the same base name to be different in content and I got bitten by this again today. Sad that this was not pulled when still fresh. @kimchy I guess you may still feel strongly about this based on your comments on #3702 ?
FWIW, yours is the only project I know of that has this weird approach. I consider this an aberration personally no offense meant ;) FWIW, the venerable Tomcat, Lucene and all Apache projects package zips and tars identically. When they want to make the package OS-specific they mark it as such clearly in the package name which is the sane way to do things.

@clintongormley clintongormley added adoptme and removed discuss labels Aug 7, 2014

aleph-zero pushed a commit that referenced this pull request Sep 8, 2014

Andrew Selden
Make .zip and .tar.gz release artifacts contain same files.
This commit changes the build to include .exe and sigar/.dll files in
both the zip and tar artifacts.

Closes #2793
@iksnalybok

This comment has been minimized.

Copy link
Contributor

iksnalybok commented Sep 8, 2014

That's good news, thanks.

@pombredanne

This comment has been minimized.

Copy link
Author

pombredanne commented Sep 8, 2014

Thx mucho ! 👍

@jpountz jpountz removed the review label Oct 21, 2014

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