Cayenne
  1. Cayenne
  2. CAY-390

Create a SPEC file to build RPM distributions of cayenne

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.2 branch
    • Fix Version/s: Undefined future
    • Component/s: Core Library
    • Labels:
      None
    • Environment:
      all

      Description

      Create a SPEC file to produce an RPM distribution of cayenne. future compatibility with the JPackage repository would be nice

        Activity

        Hide
        Adrian A. added a comment -

        Isn't Maven able to simply generate RPMs too? e.g.
        http://mojo.codehaus.org/rpm-maven-plugin/

        Show
        Adrian A. added a comment - Isn't Maven able to simply generate RPMs too? e.g. http://mojo.codehaus.org/rpm-maven-plugin/
        Hide
        Andrus Adamchik added a comment -

        too overloaded to handle it now, but will get to it at some point

        Show
        Andrus Adamchik added a comment - too overloaded to handle it now, but will get to it at some point
        Hide
        Andrus Adamchik added a comment -

        Jason, thanks for the spec. I'll play with it.

        Re: dependencies. "otherlib" has lots of jars not used by Cayenne runtime (they may be used internally in tests or tutorials). Cayenne lib itself only has Jakarta commons dependencies (and Ashwood that we should probably install as part of Cayenne).

        As for the Modeler, all its dependencies are open source, besides I think they should stay bundled with the tool to keep it self-sufficient, instead of relying on other JPackage's. After all Modeler doesn't contribute its libs to others, so it can use jar versions it needs... IMO Modeler RPM is even more important than the lib RPM, as we can provide KDE/Gnome menu integration, greatly improving usability.

        Show
        Andrus Adamchik added a comment - Jason, thanks for the spec. I'll play with it. Re: dependencies. "otherlib" has lots of jars not used by Cayenne runtime (they may be used internally in tests or tutorials). Cayenne lib itself only has Jakarta commons dependencies (and Ashwood that we should probably install as part of Cayenne). As for the Modeler, all its dependencies are open source, besides I think they should stay bundled with the tool to keep it self-sufficient, instead of relying on other JPackage's. After all Modeler doesn't contribute its libs to others, so it can use jar versions it needs... IMO Modeler RPM is even more important than the lib RPM, as we can provide KDE/Gnome menu integration, greatly improving usability.
        Hide
        Jason Dwyer added a comment -

        while working out a few parts of this, i also looked into what jpackage integration would be possible, and i can see a dependency hell emerging.

        the last day or so i've noticed another JIRA issue come up around jdom and commons-logging, and i guess the rpm/jpackage integration might add some weight to one side of the argument there, i'm just not sure which side

        as for the possibility of getting cayenne into the jpackage repo for distribution, there would be a number of licensing issues to be resolved for getting the whole distribution in place, notably some of the jars that are present in the 'otherlib' directory are definately not available directly from the jpackage repo.

        there is the potential to get cayenne into the 'nonfree' section, but i'll leave these issues up to andrus to dig through.

        should have mentioned the rpms created by the build install the contents of $cayenne_build/dist/ into /usr/share/java/cayenne-1.2-dev, and not to $JAVA_HOME/jre/lib/ext or anything so rude.

        regards,

        jd

        Show
        Jason Dwyer added a comment - while working out a few parts of this, i also looked into what jpackage integration would be possible, and i can see a dependency hell emerging. the last day or so i've noticed another JIRA issue come up around jdom and commons-logging, and i guess the rpm/jpackage integration might add some weight to one side of the argument there, i'm just not sure which side as for the possibility of getting cayenne into the jpackage repo for distribution, there would be a number of licensing issues to be resolved for getting the whole distribution in place, notably some of the jars that are present in the 'otherlib' directory are definately not available directly from the jpackage repo. there is the potential to get cayenne into the 'nonfree' section, but i'll leave these issues up to andrus to dig through. should have mentioned the rpms created by the build install the contents of $cayenne_build/dist/ into /usr/share/java/cayenne-1.2-dev, and not to $JAVA_HOME/jre/lib/ext or anything so rude. regards, jd
        Hide
        Jason Dwyer added a comment -

        I finally got round to setting up this spec, after putting my hand up a while back. where does the time go i wonder?

        in order to build a distribution from the attached file, you'll need to set up your rpmbuild environment as described on the JPackage site:
        http://www.jpackage.org/rebuilding.php

        the basics of this is: you set up a build root, and create a .rpmmacros file defining where that build root is.

        there is a dependency in there for the jpackage-utils, and ant, so you'll need to install them from the jpackage repo.

        once these are set up, you need to get the current sources. the spec file is a little hard coded to be particular about -1.2-dev as the version, this being tightly coupled with what the ant build scripts are going to produce during the actual build.

        the best bet is to just get the sources from cvs:

        cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/cayenne export -d cayenne-1.2-dev cayenne

        this will dump the current sources into ./cayenne-1.2-dev

        tar and gzip this directory:
        $> tar -czf cayenne-1.2-dev.tar.gz ./cayenne-1.2-dev

        now move it to the ~/rpm/SOURCES directory you created when you set up the build root.

        next, save the attached cayenne-1.2-dev.spec file to ~/rpm/SPEC.

        building is a matter of invoking:

        $> rpmbuild -ba ~/rpm/SPECS/cayenne-1.2-dev.spec

        all going to plan, you should end up with several rpm packages in ~/rpm/RPMS/noarch/ directory.

        note you'll probably need rpm-devel package installed as well here in ourder to use the rpmbuild tool.

        Show
        Jason Dwyer added a comment - I finally got round to setting up this spec, after putting my hand up a while back. where does the time go i wonder? in order to build a distribution from the attached file, you'll need to set up your rpmbuild environment as described on the JPackage site: http://www.jpackage.org/rebuilding.php the basics of this is: you set up a build root, and create a .rpmmacros file defining where that build root is. there is a dependency in there for the jpackage-utils, and ant, so you'll need to install them from the jpackage repo. once these are set up, you need to get the current sources. the spec file is a little hard coded to be particular about -1.2-dev as the version, this being tightly coupled with what the ant build scripts are going to produce during the actual build. the best bet is to just get the sources from cvs: cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/cayenne export -d cayenne-1.2-dev cayenne this will dump the current sources into ./cayenne-1.2-dev tar and gzip this directory: $> tar -czf cayenne-1.2-dev.tar.gz ./cayenne-1.2-dev now move it to the ~/rpm/SOURCES directory you created when you set up the build root. next, save the attached cayenne-1.2-dev.spec file to ~/rpm/SPEC. building is a matter of invoking: $> rpmbuild -ba ~/rpm/SPECS/cayenne-1.2-dev.spec all going to plan, you should end up with several rpm packages in ~/rpm/RPMS/noarch/ directory. note you'll probably need rpm-devel package installed as well here in ourder to use the rpmbuild tool.

          People

          • Assignee:
            Andrus Adamchik
            Reporter:
            Jason Dwyer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development