Jpackage on FC3
The Jpackage project has RPMs for lots of Free Java packages and also SRPMs that you can build against various non-Free packages like Java from Sun.
This page is to documents installing the required depandancies for MKSearch on Fedora Core 3.
Lines in the examples that start with a $
prompt are things you you can do as a normal user, lines that start with a #
are things that have to be done by root, of course when copying and pasting these instrcutions you don't need to copy the $
or the #
!
Configuring Yum
The first thing to do is to either configure Yum (which comes with FC3) to get the Free Jpackage packages or configure Apt (which comes from other repos such as Freshrpms) - you don't need to configure both, if you are not sure which to use then Yum is probably best. The Jpackage site has Apt and Yum configuration instructions, or you can follow the short Yum instructions that have been taken from there.
GPG
To ensure that the packages you install are not corrupted you first need to install the Jpackage GPG key. You can download the key as a normal user but you need to install it as root:
$ cd /tmp/ $ wget http://jpackage.org/jpackage.asc $ su # rpm --import jpackage.asc
Yum
It is simply a matter of downloading the jpackage.repo list and installing it as root:
$ cd /tmp/ $ wget http://jpackage.org/jpackage.repo $ su # mv jpackage.repo /etc/yum.repos.d/
You can then run yum update
to update the list of available packages.
Installing Packages
3 key packages that are required are tomcat5, ant and junit, so start by trying to install these.
# yum install tomcat5 Error: missing dep: jta >= 0:1.0.1-0.a.1 for pkg tomcat5 Error: missing dep: j2sdk = 2000:1.4.2_06-fcs for pkg java-1.4.2-sun-compat
Since tomcat5 depends on non-Free packages, jta and j2sdk the install has failed to complete, so the next thing to do is to install these non-Free packages.
Build environment
First you need to create some directories for building RPMs in and also set up your build environment, all this should be done as a normal user and not root.
$ cd $ mkdir rpms $ cd rpms $ mkdir {build,rpms,sources,specs,srpms,tmp}
Next you need to create a ~/.rpmmacros
file in your home directory, change chris
in the following example to suit.
%_builddir /home/chris/rpms/build %_rpmdir /home/chris/rpms/rpms %_sourcedir /home/chris/rpms/sources %_specdir /home/chris/rpms/specs %_srcrpmdir /home/chris/rpms/srpms %_tmppath /home/chris/rpms/tmp
Now you should be ready to start building the non-Free packages.
jta
First download, verify and install the jta source RPM, you can ignore the messages about user jpp not existing.
$ cd /tmp/ $ wget http://mirrors.sunsite.dk/jpackage/1.6/generic/non-free/SRPMS/jta-1.0.1-0.b.4jpp.nosrc.rpm $ rpm -K jta-1.0.1-0.b.4jpp.nosrc.rpm jta-1.0.1-0.b.4jpp.nosrc.rpm: (sha1) dsa sha1 md5 gpg OK $ rpm -Uvh jta-1.0.1-0.b.4jpp.nosrc.rpm 1:jta warning: user jpp does not exist - using root warning: group jpp does not exist - using root ########################################### [100%]
Next we can try building it.
$ cd ~/rpms/specs $ rpmbuild -ba jta.spec error: File ~/rpms/sources/jta-1_0_1B-classes.zip: No such file or directory
This error tells us what non-Free things we need to find on the Sun web site, in this case, jta-1_0_1B-classes.zip
.
So go to the jta page and follow the download link for the Class Files 1.0.1B, click through the online agreement and save it to /tmp/
then do the same for the JavaDocs 1.0.1B.
Now you can try rebuilding the SRPM again.
$ cp /tmp/ $ cp jta-1_0_1B-classes.zip ~/rpms/sources/ $ cp jta-1_0_1B-doc.zip ~/rpms/sources/ $ cd ~/rpms/specs $ rpmbuild -ba jta.spec error: Failed build dependencies: java-devel is needed by jta-1.0.1-0.b.4jpp.noarch
So we have discovered that jta
depends on java-devel
, another non-Free package.
java
Download, verify and install the java-1.5.0-sun package from Jpackage, again ignore the warnings about users not existing.
$ cd /tmp/ $ wget http://mirrors.sunsite.dk/jpackage/1.6/generic/non-free/SRPMS/java-1.5.0-sun-1.5.0.01-1jpp.nosrc.rpm $ rpm -K java-1.5.0-sun-1.5.0.01-1jpp.nosrc.rpm java-1.5.0-sun-1.5.0.01-1jpp.nosrc.rpm: (sha1) dsa sha1 md5 gpg OK $ rpm -Uvh java-1.5.0-sun-1.5.0.01-1jpp.nosrc.rpm
Next try building the package to see what is needed from the Sun site.
$ cd ~/rpms/specs/ $ rpmbuild -ba java-1.5.0-sun.spec sh: /usr/local/src/rpms/sources/jdk-1_5_0_01-linux-i586.bin: No such file or directory error: Bad exit status from /usr/local/src/rpms/tmp/rpm-tmp.28816 (%prep)
So now we know we need to find jdk-1_5_0_01-linux-i586.bin
from Sun.
This can be found via the J2SE 5.0 page, click though the agreement following the Download JDK link and select the Linux self-extracting file - jdk-1_5_0_01-linux-i586.bin
and save it to /tmp/
.
Next copy the file are try building the RPM.
$ cp /tmp/jdk-1_5_0_01-linux-i586.bin ~/rpms/sources/ $ cd ~/rpms/specs/ $ rpmbuild -ba java-1.5.0-sun.spec
Copyright MKDoc Ltd. and others.
The Free Documentation License http://www.gnu.org/copyleft/fdl.html