Forums

Cobra package for OpenSuse

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

Cobra package for OpenSuse

Postby fraya » Tue Apr 21, 2015 3:54 pm

I've been doing a rpm package for Cobra in OpenSuse 13.2. My goal is to learn to use OpenSuse's open build service (OBS). OBS has a tool
called RPMLint that make an analysis of the packages and gives you advices about them, sometimes rejecting the packages based on the analysis
(the construction fails).

I've encounter this problems trying to make the package:

  • Cobra compiles and installs all in one phase, when Unix has two different phases, build and then install.
  • The user must be admin, because it installs files in protected directories /usr/local/cobra or /usr/lib/mono. The creation of the
    package in admin mode is not recommended. We fake the installation in a false root directory (BUILDROOT).
  • Documentation is installed in non standard place
    (with exe's and dlls).
  • The directory Test contains executables and is recommended to
    move it to the doc directory under an examples folder.
  • The files mkJar and mkjarAll under Source/Cobra.Core/Java are scripts
    (with #!) but don't have exe permissions.
  • No man page for cobra.
  • Cobra dlls are installed in GAC and under the installation directory. RPMLint complaints about duplicated files that must be symlinked.

My solutions are:
  • Points 1 and 2 are patched in InstallFromWorkspace.cobra.
  • 3 and 4 can be solved in package spec.
  • Point 5, means that I have to change permissions and tarball the code, but it won't be the same tar found in cobra-language.com.
  • Point 6, easy can be doit.
  • Point 7, what to do? Are dlls needed in install dir?

So is possible to make a package for Cobra, but not easy for me. I still need to polish the package (sign, dependencies, etc).
The package is in https://build.opensuse.org/package/show ... raya/Cobra Someone want to test it? :D

OBS is an interesting tool. It is supposed to help you doing a package for different distros. I need to learn more.

Reading the code of InstallFromWorkspace.cobra made me think in refactor the code. In the next post I'll show you my ideas.

Good night!
fraya
 
Posts: 7

Re: Cobra package for OpenSuse

Postby hopscc » Thu Apr 23, 2015 1:45 am

Point 3 doc - there isnt much that needs install specifically for language end user ( vs a cobra compiler developer)
- as u say needs man page or something else at minimum that points to wiki pages

Point4 - Test directory - probably doesnt need to be installed at all - they're just for testing the compiler correctness
only reqd if working on compiler .... -> /opt/cobra ??

Point 5 - java mkjars
The java support is incomplete - most of this stuff is just tmp helper scripts while developing that..
expectation is currently that that doesnt need installation but if so done then just leave it as is - you need to follow the online recipe to get java support such as it is up and going anyway and its currently directed toward working from a local devt tree ...

Point 7 - GAC
The idea is, that the GAC is the common "global library lib" equiv ( like /usr/local/lib - on/is std lookup path),
conceivably the installation dirs equivs may be replaced for local compiler/stdlibrary changes ( tho its more likely that youd work from a devt build tree and maybe copy libs directly to where needed for testing)
- conceivably you could drop the installation copies if the GAC ones are always available...

The unix install needs a bit ( ;) ) of work for conformance to usual unix install conventions rather than a simplistic copy file install that just (mostly) works.
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand


Return to Discussion

Who is online

Users browsing this forum: No registered users and 26 guests