You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Ariel Partners LLC <ar...@earthlink.net> on 2001/01/22 20:25:35 UTC

Ant and RPM integration-- Has anyone looked into it?

Hello:

We at Ariel are testing out both the Ant and RPM tools to help implement an
automated build and release environment.  The obvious question ensues: what
about an Ant task to control RPM?

Ant is (roughly) a replacement for Make, using XML build files instead of 
Makefiles and
written in 100% java.    In order to extend its capabilities, you write a 
new subclass
of "Task" in java and add it to a jar file-- rather than writing a make 
rule using a
pseudo shell language.  It is super portable-- as portable as java.

RPM (RPM Package Manager, formerly known as the Redhat Package Manager)
does things like preparing packages, installing them, validating them,
configuring them, building, etc.    The "spec" file is roughly RPM's 
version of the
Ant "build.xml" file.

As for the integration, at the very least the Ant task could call RPM with 
certain options.
But perhaps it could even help automate the creation of new RPM spec files?

Challenges: RPM is written in C.  I don't believe that it is open source.
It requires a UNIX like environment in order to
run including shells, certain GNU shared libraries, and the berkeley database.
The RPM spec file looks alot like a Makefile, with all of its 
"wrinkles."    On the whole,
RPM is crying out to be rewritten using Java and XML IMHO ;-)

Anyway, has anyone else had this crazy idea?

Have any of the other Ant tasks had to call native code libraries?  Is it 
folly to even
think about it?  Should it instead be done by punting and calling out to a 
shell task?

Thanks for any and all advice,

--Craeg Strong
Ariel Partners LLC


Re: Ant and RPM integration-- Has anyone looked into it?

Posted by Jag <ag...@linuxpower.org>.
On Thu, 25 Jan 2001, Scott Stirling wrote:

> BTW, Linux used to have a feature in its kernel where *.class programs would
> be invoked through a JVM automatically like native programs.  It's since
> been removed, but you can see it in the Linux Kernel Blackbook, or older
> versions of the 2.2 kernel itself.

*scratches head* It's still there, just not specific to Java anymore..
is support for MISC binaries for CONFIG_BINFMT_MISC.  Its designed to
let you dynamically have the kernel properlly load the interpreters for
formats like Java, Python, Emacs-Lisp, or even have it load dosemu for
dos .exe's.

Btw, a large part of the reason why Java isn't more popular in open
source is the open source jvm's aren't that great, and Sun has weird
licenses on their stuff so that anyone can download it, but no-one (like
say a Linux distribution) can redistribute it, thus all jvm's in linux
distros are bound to suck.


Jag

Re: Ant and RPM integration-- Has anyone looked into it?

Posted by Tim Mooney <mo...@dogbert.cc.ndsu.NoDak.edu>.
In regard to: Re: Ant and RPM integration-- Has anyone looked into it?,...:

>>RPM is crying out to be rewritten using Java and XML IMHO ;-)
>
>Agreed.

I would love to see the arguments that might convince me why it's "crying
out" to be rewritten in Java.  Frankly, I think you're either trolling or
you don't have a clue what you're talking about, but I'm willing to let you
prove it, either way.  ;-)

I don't have anything against either Java or XML (I like both a lot, and
I think XML is really cool, Java less-so these days), but if all you have is
the Java hammer, it may look like the appropriate tool for any job.  It's
not.  Requiring a working JVM at system install time (or really *any* time)
to be able to install and remove packages is a pretty serious prerequisite.

Perhaps what you're really implying is that Linux and everyone else should
include a JVM in the kernel, so it's capable of running Java programs
just like any other native executable format.  Is that what you're thinking?
;-)

Tim
-- 
Tim Mooney                              mooney@dogbert.cc.ndsu.NoDak.edu
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J1, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164


Re: Ant and RPM integration-- Has anyone looked into it?

Posted by Peter Donald <do...@apache.org>.
At 02:25  22/1/01 -0500, Ariel Partners LLC wrote:
>We at Ariel are testing out both the Ant and RPM tools to help implement an
>automated build and release environment.  The obvious question ensues: what
>about an Ant task to control RPM?

no ones submitted one yet but if you want to then that would be kewl ;)

>Challenges: RPM is written in C.  I don't believe that it is open source.

I don't know if the original was free software but there is definetly free
software replacements.

>RPM is crying out to be rewritten using Java and XML IMHO ;-)

Agreed. Ages ago on ant lists this was talked and recently there has been
discussion about CJAN + JNLP which could do that for java. Thou if
you/someone else wanted to step up it could easily be generalized to
generic packages.

>Have any of the other Ant tasks had to call native code libraries?  Is it 
>folly to even
>think about it?  Should it instead be done by punting and calling out to a 
>shell task?

shell tasks /executables are easier - Java is kewler ;)

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Re: Ant and RPM integration-- Has anyone looked into it?

Posted by Bill Brooks <wb...@lug.ee.calpoly.edu>.
On Mon, 22 Jan 2001, Ariel Partners LLC wrote:

> Challenges: RPM is written in C.  I don't believe that it is open source.
> [...rest of post elided...]

RPM is indeed open source. The license is the GPL. 

Bill


Re: Ant and RPM integration-- Has anyone looked into it?

Posted by Josh Lucas <lu...@collab.net>.
On Mon, 22 Jan 2001, Ariel Partners LLC wrote:

> Hello:
> 
> We at Ariel are testing out both the Ant and RPM tools to help implement an
> automated build and release environment.  The obvious question ensues: what
> about an Ant task to control RPM?
> 
> Ant is (roughly) a replacement for Make, using XML build files instead of 
> Makefiles and
> written in 100% java.    In order to extend its capabilities, you write a 
> new subclass
> of "Task" in java and add it to a jar file-- rather than writing a make 
> rule using a
> pseudo shell language.  It is super portable-- as portable as java.
> 
> RPM (RPM Package Manager, formerly known as the Redhat Package Manager)
> does things like preparing packages, installing them, validating them,
> configuring them, building, etc.    The "spec" file is roughly RPM's 
> version of the
> Ant "build.xml" file.
> 
> As for the integration, at the very least the Ant task could call RPM with 
> certain options.
> But perhaps it could even help automate the creation of new RPM spec files?
> 
> Challenges: RPM is written in C.  I don't believe that it is open source.
> It requires a UNIX like environment in order to
> run including shells, certain GNU shared libraries, and the berkeley database.
> The RPM spec file looks alot like a Makefile, with all of its 
> "wrinkles."    On the whole,
> RPM is crying out to be rewritten using Java and XML IMHO ;-)
> 
> Anyway, has anyone else had this crazy idea?
> 
> Have any of the other Ant tasks had to call native code libraries?  Is it 
> folly to even
> think about it?  Should it instead be done by punting and calling out to a 
> shell task?
> 

I successfully build rpm's with Ant all the time.  I've currently just
called the <exec> task which makes a system call but I've been thinking of
working on an <rpm> task.



josh