Page 1 of 1

Installation on UNIX

PostPosted: Sat Sep 13, 2014 10:37 pm
by ismael
Hi. I'm packaging Cobra 0.9.6 for SourceMage GNU/Linux (and other systems in the near future), but the way it's installed by default is very broken, and I would like to avoid manually building and installing it.

First, form the perspective of most package managers, build and installation should be separate steps.

Second, the installation paths should probably be:
binaries -> /usr/lib/Cobra-0.9.6
documentation -> /usr/share/doc/cobra-0.9.6

Third, the wrapper script should be installed to /usr/bin, either as "cobra" or "cobra-0.9.6" if multiple versions should be able to coexist.

Would a patch with such changes be accepted?

Re: Installation on UNIX

PostPosted: Sun Sep 14, 2014 2:07 pm
by Charles
First, thanks for your interest in Cobra. You have my support regarding your packaging needs. I poked around and found the following:

I checked my Mac and Linux boxes with 'which python' and 'which mysql'. It looks like packaged installations go in /usr/bin/ as you mentioned while source-based installations go in /usr/local/... whether that's /usr/local/bin/ or /usr/local/<package>/bin/

I presume you'll favor the package installation directories since you are creating one.

On an Ubuntu box I have these lib dirs for Python:

And this for mysql:

I'm not sure why Python has both /usr/lib/ and /usr/local/lib/ directories going, but I don't really care either. :-)

Also, on my Mac box there are plenty of packages in /usr/local/ including git/ which then have their own subdirs for bin/ lib/ etc.

In your post, did you mean to cap "Cobra" for /usr/lib/ and not cap it for /usr/share/doc/? I think both should be lowercase.

Btw the docs that come with Cobra are just minimal notes. The real docs are here on the site, mostly in the wiki.

So then:

First, I don't want to lose the current ability to install everything under one directory and update the 'cobra' script. This makes it extra easy manage Cobra source-based installs. You can do things like kill off an old version with one rm command and switch versions by relinking the current 'cobra' link. You can take the path output from "cobra -about" and find everything you want in one place.

But I have no problem supporting whatever package makers such as yourself need to get things into the correct place. So in general, yes I would accept patches to do things like:
- separate build and install
- dictate a different path like /usr/lib/cobra-<version>
- put the docs in /usr/share/doc/...
- etc.

If you need help, have questions or have suggestions for revamping our current installer, feel free.