Search |
||
Debian packages of HudsonPosted by kohsuke on June 11, 2008 at 5:14 PM PDT
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) »
Related Topics >>
Java Tools Comments
Comments are listed in date ascending order (oldest first)
Submitted by wfrag on Mon, 2008-08-11 22:56.
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).
Submitted by kohsuke on Tue, 2008-08-12 11:26.
Thanks, I fixed to put hudson.war in /usr/share/hudson/hudson.war.
Submitted by vitalip on Sat, 2009-06-06 01:21.
Some correction in the /etc/init.d/hudson script
I have some problems with the maven svn-plugin.
svn check-in / check-out does not work correctly with https urls if I start build process from hudson.
The problem was in the HOME variable. After start it references to the /root and does not allow to import/read info in/from /.subversion directory.
I add two entries into inid.d script, start part before daemon start
export HOME=$HUDSON_HOME
export USER=$HUDSON_USER
Important: daemon params--env don't work correctly
Of course you need login as hudson and import https certificate manually by
svn checkout https://.... or another svn command (p)ermanently
Submitted by phecht on Fri, 2009-05-29 16:27.
Thanks Kohsuke! I have Ubuntu 9.04 running hudson 1.308 perfectly. Make sure you run the sudo apt-get update as suggested!
Submitted by tisoft_media on Thu, 2009-05-14 23:59.
For me the http://hudson.gotdns.com/debian/binary/Packages.gz is empty again.
Submitted by mariusx on Fri, 2009-05-15 10:56.
http://hudson.gotdns.com/debian/binary/Packages.gz is empty again.
Can you fix this?
Submitted by kohsuke on Sat, 2009-05-16 11:48.
I finally figured out why Packages.gz become empty --- I had a Hudson job that was trying to update this file, which wasn't working. I removed that, so this problem should be fixed once and for all.
Submitted by kohsuke on Fri, 2008-09-12 07:54.
kdocki — any chance you can write it in a patch? I wonder if it matters where I put those two lines in the "rules" file (it's not "control" file, right?
dmacpher — I'm looking for people who'd be interested in working on this. If you know someone or yourself interested in this, let me know!
Submitted by lacostej on Thu, 2008-06-12 06:39.
Just out of curiosity, are you using the maven debian plugin (from codehaus Mojo ?)
Submitted by pepijnve on Sat, 2008-06-14 02:07.
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.
Submitted by pepijnve on Fri, 2008-06-13 00:06.
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.
Submitted by kohsuke on Fri, 2008-06-13 09:11.
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"
Submitted by kohsuke on Thu, 2008-06-12 16:03.
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?
Submitted by kohsuke on Thu, 2008-06-12 16:07.
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.
Submitted by dmacpher on Thu, 2008-09-11 13:48.
You said:
"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. "
This is *exactly* what I'm looking for for a demo I'm giving on these type of tools. Has anyone done this? Ideally, I'd love VMWare image configured with all of these tools up and running...then I'd be off to the races.
Submitted by tcurdt on Thu, 2008-06-12 00:47.
Mate, are you building the packages with hudson? :)
http://vafer.org/projects/jdeb/howto.html
Submitted by pbleser on Wed, 2008-06-11 22:24.
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.
Submitted by pbleser on Wed, 2008-06-11 22:06.
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.
Submitted by pbleser on Wed, 2008-06-11 21:59.
Kohsuke, that URL for openSUSE packages is outdated, by a large margin :-)
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 ;-))
Submitted by nczempin on Thu, 2008-10-02 04:16.
On Debian-derived systems (tested on Ubuntu 8 and Debian 4), this error message occurs on startup:
Caused by: java.lang.ClassNotFoundException: java.util.concurrent.CopyOnWriteArrayList not found in java.net.URLClassLoader{urls=[], parent=java.net.URLClassLoader{urls=[file:/tmp/winstonenr3b4ljar], parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/share/hudson/hudson.war], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}}
Apparently the CopyOnWriteArrayList contains some non-free code that was removed by the Debian maintainers.
Could you either use a different class or figure out the proper Debian dependencies? I'll try and figure them out by myself, but perhaps you could also take a look.
Submitted by nczempin on Thu, 2008-10-02 04:40.
Okay, the above message occurs only on Debian 4, with my particular settings. gij is java 1.4.2, so it won't include the concurrency package.
So the hudson package should have a java version dependency >= 1.5.
The error I'm getting on Ubuntu is actually different:
gnu.xml.datatype.JAXPDatatypeFactory
java.lang.ClassNotFoundException: I'll try to find out what's happening there.
Submitted by nczempin on Thu, 2008-10-02 04:41.
I meant java.lang.ClassNotFoundException: gnu.xml.datatype.JAXPDatatypeFactory, sorry.
Submitted by jesperronn on Thu, 2009-04-16 02:13.
Today it actually works. I see the file Packages.gz (http://hudson.gotdns.com/debian/binary/Packages.gz) is no longer empty :)
Thanks! I hope that this service will prevail and will be working continuously as I'm writing it into an automated script for setting up my servers.
Thanks!
/Jesper
Submitted by kdocki on Thu, 2008-08-21 15:19.
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!
Submitted by chrisspelberg on Tue, 2008-10-14 03:25.
It seems that Packages.gz is empty, this means It is not possible to install using apt-get!
Is it a bug or intended?
Submitted by qiubosu on Wed, 2008-10-22 15:14.
Dear All,
I edited the /etc/apt/sources.list with deb http://hudson.gotdns.com/debian binary/
After that, run $ sudo apt-get update, got the below output:
............
Ign http://hudson.gotdns.com binary/ Release.gpg
Ign http://hudson.gotdns.com binary/ Translation-en_US
Hit http://security.ubuntu.com hardy-security Release.gpg
Ign http://security.ubuntu.com hardy-security/main Translation-en_US
Hit http://us.archive.ubuntu.com hardy Release.gpg
Ign http://us.archive.ubuntu.com hardy/main Translation-en_US
Ign http://hudson.gotdns.com binary/ Release
Ign http://security.ubuntu.com hardy-security/restricted Translation-en_US
Ign http://security.ubuntu.com hardy-security/universe Translation-en_US
Ign http://security.ubuntu.com hardy-security/multiverse Translation-en_US
Ign http://hudson.gotdns.com binary/ Packages
Ign http://us.archive.ubuntu.com hardy/restricted Translation-en_US
Ign http://us.archive.ubuntu.com hardy/universe Translation-en_US
Ign http://us.archive.ubuntu.com hardy/multiverse Translation-en_US
Get:1 http://us.archive.ubuntu.com hardy-updates Release.gpg [189B]
Ign http://us.archive.ubuntu.com hardy-updates/main Translation-en_US
Hit http://security.ubuntu.com hardy-security Release
Get:2 http://hudson.gotdns.com binary/ Packages [20B]
............
But when I run $ sudo apt-get install hudson, got below output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package hudson
Can anyone help with this? What did I do wrong? Which steps did I miss?
Thanks,
Qiubo
Submitted by keithel on Wed, 2008-10-29 16:55.
Kohsuke,
The Packages.gz in your debian repo 'binary' directory is empty.
Could you at some point run:
dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz
from the debian dir to update the Packages.gz file properly?
Thanks!
Once that is done, the problem that Quibo and chrisspelberg have encountered will be resolved.
Submitted by keithel on Wed, 2008-10-29 17:19.
I've received a:
ClassNotFoundException: gnu.xml.datatype.JAXPDatatypeFactory
error when installing and running hudson for the first time on Ubuntu Hardy (8.04)... I'm unclear which java package this may lie in... I would think it would be the gnu JAXP project, but I don't see that class in there...
Anyone have any ideas or possible ways of getting past this?
Here's the full error log:
http://pastebin.com/m5e8b9d65 (valid for a month from today)
Submitted by brianmcgillion on Wed, 2009-03-25 01:07.
Hi I am wondering if a similar problem as Qiubo was having is happening again?
I get the following
Ign http://hudson.gotdns.com binary/ Release.gpg
Ign http://hudson.gotdns.com binary/ Translation-en_US
Ign http://hudson.gotdns.com binary/ Release
Ign http://hudson.gotdns.com binary/ Packages
Get:20 http://hudson.gotdns.com binary/ Packages [20B]
but an apt-cache search does not find hudson package
Thanks
Submitted by shake on Wed, 2009-03-25 14:06.
Could you please set the HUDSON_HOME as HOME, too?
This is really helpful for the git plugin because ".gitconfig" is searched in $HOME.
I think the ".m2" repository is also searched there...
Submitted by shake on Wed, 2009-03-25 14:16.
For me that line seems to work (/etc/init.d/hudson):
DAEMON_ARGS="--name=$NAME --env=HOME=$HUDSON_HOME --env=HUDSON_HOME=$HUDSON_HOME --inherit --output=$HUDSON_LOG --user=$HUDSON_USER --pidfile=$PIDFILE"
Submitted by oberger on Wed, 2009-04-08 08:18.
Have you issued an ITP to move towards official Debian packages ?
Submitted by jesperronn on Wed, 2009-04-15 02:35.
Kohsuke, your packages are STILL not working for the same reasons described by Quibo and chrisspelberg.
Could you please update your package jobs as described by keithel on October 29, 2008 at 04:55 PM?
I really hope you will do this, as the apt-get install method is much more convenient for us!
Thanks a lot!
/Jesper Rønn-Jensen
www.justaddwater.dk
Set hudson's shell to /bin/bash in /etc/passwd
Submitted by aguynamedben on Thu, 2009-09-24 15:04.
Reiterating this guy's comment: http://wiki.hudson-ci.org/display/HUDSON/Installing+Hudson+on+Ubuntu. "After installing the hudson deb on Ubuntu server Jaunty 8.10 [Debian Lenny in my case], when I tried to run the init script /etc/init.d/hudson start, nothing would be printed and the server would not start. No log file was created under /var/log/hudson and no pid file was created under /var/run/hudson. I eventually discovered that if i set the hudson user's shell to /bin/bash instead of /bin/false in /etc/passwd everything works fine. Hope this saves someone else some trouble." I also noticed before fixing the problem that /etc/init.d/hudson restart gave a "Restarting Hudson Continuous Integration Server: hudson failed!" error.
Setting hudson's shell to /bin/bash in /etc/passwd worked for me.
|
||
|
|