The Source for Java Technology Collaboration
User: Password:



Kohsuke Kawaguchi

Kohsuke Kawaguchi's Blog

Debian packages of Hudson

Posted by kohsuke on June 11, 2008 at 05:14 PM | Comments (13)

I have started packaging up Hudson as a debian package.

To use it, you have to add the following line to your /etc/apt/sources.list

deb http://hudson.gotdns.com/debian binary/

After that, update your package list once:

$ sudo apt-get update

You can now install and update Hudson by just running

$ sudo apt-get install hudson

This sets up Hudson as a daemon that gets launched at boot. Refer to /etc/default/hudson to tweak some of the parameters. Big thank you goes to Amelia Lewis for sharing the scripts (and it looks like she's a web service person — the world is small!) This is my first Debian packaging effort, so I'm sure I'm doing things incorrectly. If you notice anything I need to do better, please let me know.

But hopefully this would simplify the installation, and more importantly upgrades, because that happens a lot. I think it would be also interesting to do a Ubuntu Live CD that has tools like Hudson, Subversion server, Sventon, Trac, Maven repository manager and so on, which you can either install on a virtual machine or on a real machine, to quickly get to the productive development envirnoment.

With this, Hudson now covers SUSE, FreeBSD, and Ubuntu! And the current plan is to attach OpenSolaris next.

If anyone can volunteer for RPMs or even just send me some pointers, I'd like to do RPMs, too. And oh, does anyone know if Windows have any package system? (And no, I'm not talking about *.msi)


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Kohsuke, that URL for openSUSE packages is outdated, by a large margin :-)

    for openSUSE 11.0
    for openSUSE 10.3
    for openSUSE 10.2
    for SUSE Linux Enterprise 10


    And if there's only room for a single link, then this one
    If you want to package RPMs for many distributions, it can be done in the openSUSE Build Service (openSUSE, SLE, Fedora, CentOS, Mandriva, RHEL). Debian/Ubuntu packages can be built there too. You don't need to have any local resources, there's a build farm behind it, it is free (just need to register an openSUSE account, which is also free), it has web and CLI interfaces, etc...
    More details here: http://en.opensuse.org/Build_Service
    (and an openSUSE RPM of hudson is already available there ;-))

    Posted by: pbleser on June 11, 2008 at 09:59 PM

  • About the openSUSE RPMs (post above): if you're looking for the RPM file itself and not the repository to add, just dive into the "noarch" subdirectory.

    Posted by: pbleser on June 11, 2008 at 10:06 PM

  • And last but not least, as a starting point, here are the files I'm using to build the openSUSE hudson rpm.

    As you publish releases so often, I also hacked a script (mix of Python, curl and lftp) that scrapes the Hudson changelog and download URL (as, unfortunately, dev.java.net cannot provide proper URLs), modifies the .spec file (the recipe for building RPMs) and downloads hudson.war

    One of the best resources to get started with building RPM packages is the official RPM Guide (from chapter 8 on), which is hosted by Fedora.

    Basically, in order to port my RPM to other distros, it is just a matter of proper dependency naming for the java package, writing an init script for each distro that differs in that area (i.e. one for Mandriva, one for CentOS+RHEL+Fedora) and the appropriate RPM "Group" tag for each.

    Posted by: pbleser on June 11, 2008 at 10:24 PM

  • Mate, are you building the packages with hudson? :)

    http://vafer.org/projects/jdeb/howto.html

    Posted by: tcurdt on June 12, 2008 at 12:47 AM

  • Just out of curiosity, are you using the maven debian plugin (from codehaus Mojo ?)

    Posted by: lacostej on June 12, 2008 at 06:39 AM

  • Pascal, thank you for the pointer to the newer stuff. I captured your information here. Now, I have to admit I've never touched SUSE, but how do you install them? There's an equivalent of yum/apt-get in SUSE, right?

    Posted by: kohsuke on June 12, 2008 at 04:03 PM


  • Torsten, good to hear from you! I'll definitely look at your plugin. Hudson package has /etc/init.d/hudson and so on, and I'm not quite sure how those things are handled by debhelper. Does your stuff work for that?


    lacostej — I didn't know about this plugin either, but if it doesn't support init script, it's not usable for me.

    Posted by: kohsuke on June 12, 2008 at 04:07 PM

  • Thanks Kohsuke, this will make it a lot easier to keep hudson up to date. It might be a good idea to by default make a user named hudson and run under that user instead of as root though.

    Posted by: pepijnve on June 13, 2008 at 12:06 AM

  • pepijnve — Yes. Now, the only question is, how do I do that? I looked at a list of dh_* commands but coudln't find anything obvious like "dh_adduser"

    Posted by: kohsuke on June 13, 2008 at 09:11 AM

  • Can't help you there I'm afraid. Maybe some inspiration can be found in for instance the tomcat package source. It creates a tomcat55 user on installation.

    Posted by: pepijnve on June 14, 2008 at 02:07 AM

  • According to the FHS (http://www.pathname.com/fhs/), you must not put the hudson.war into the /usr/local/bin directory. It is reserved for local administrators. According to the FHS you should place it into the /usr/share/hudsor/hudson.war (because it is architecture-independent file).

    Posted by: wfrag on August 11, 2008 at 10:56 PM

  • Thanks, I fixed to put hudson.war in /usr/share/hudson/hudson.war.

    Posted by: kohsuke on August 12, 2008 at 11:26 AM

  • Creating a hudson user with the home directory /var/hudson would be very cool. Debian control file you might add something like:

    preinst
    adduser --home /var/hudson hudson

    Great product Kohsuke!

    Posted by: kdocki on August 21, 2008 at 03:19 PM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds