Forums

Installation on UNIX

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Installation on UNIX

Postby ismael » Sat Sep 13, 2014 10:37 pm

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?
ismael
 
Posts: 1

Re: Installation on UNIX

Postby Charles » Sun Sep 14, 2014 2:07 pm

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:
/usr/lib/python2.6
/usr/lib/python2.7
/usr/local/lib/python2.6
/usr/local/lib/python2.7

And this for mysql:
/usr/lib/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.
Charles
 
Posts: 2510
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron