Suggestions to improve the JAVA guidelines
by Orcan Ogetbil
Hi,
As I promised overholt on IRC, I wanted to share my views about the Fedora Java packaging guidelines from a non-Java-coder point of view.
JAVA GUIDELINES:
- "JNI-using JAR files"
This link is broken. It can be fixed easily.
- BuildRequires: jpackage-utils
Why do we need this? I understand Requires: jpackage-utils for directory ownership etc, but the BR is not necessary for most packages (at least all the ones I saw so far). I think this should *not* be required.
- In certain cases, we can build applications GCJ-natively (producing .so files). But these won't work with any JVM. What should be the packager's primary preference? GCJ-native or OpenJDK? The first one runs faster, but the second one has larger coverage.
For instance, tuxguitar (that I packaged) provides GNU Makefiles (that use GCJ) for this. Are the resulting .so files going to be the same as the ones built by aot-compile-rpm? (More about AOT later)
This case has confused me a lot in the past.
- Some explanation in the beginning about what GCJ can do and what openjdk can do; and some information about byte-code vs. machine-code will be very useful.
- BuildRequires: java-devel [>= specific_version]
How will the packager get to know the "specific_version"? For openjdk this is 1:1.6.0 , but for GCJ this is 1.5.0 . Are there other numbers that we need to know? Can't we put the numbers for all the cases in the guidelines?
- The Specfile Templates for ant and maven contradict with what was written in the BuildRequires and Requires section.
- the abbreviation "SNPG" should be defined in the first possible place, not in the third iteration (both for ant and maven).
- "Will this preserve the line ending as the this page says it must?"
This would be an artistic ending if we were writing a novel. But I think a guideline shouldn't end with open questions :)
GCJ GUIDELINES:
- It would be nice if there was a definition of GCJ-AOT bits. What do they do? Why do we like them? What does gij do? etc
- "Note: For Fedora versions < 8, no JDK was available other than GCJ so java packages with executable code MUST have the GCJ AOT bits."
This notice can be removed safely.
- The occurences of
%attr(-,root,root)
should be removed.
- GCJ AOT bits SHOULD be built and included in packages.
This needs to be more explicit. ie. 's@in packages@in all Java packages@'. I also think that this sentence should go to JAVA GUIDELINES so people click on the link for "GCJ Guidelines". The way that "GCJ Guidelines" link is put there, doesn't give an impression that it should be visited for any possible Java package.
These are all issues I encountered. If I remember more I will post them here. I thought a review on the guidelines from a Java-ignorant person would help other Java-ignorant people in the future. Thanks for reading :)
-oget
14 years, 4 months
orienting question
by Mike Carifio
I'm trying to understand what I actually get when I install openjdk and
openjdk-devel on fc10. Is there a document that describes what's where
and why?
http://fedoraproject.org/wiki/Packaging/Java#Directory_structure gives
some hints, but it's more mechanical. For example:
1) What's JAVA_HOME, if I wanted to set it?
2) What's the default classpath when I run java?
3) Is jpackage the preferred way to install third party jars? What if
jpackage doesn't have what I want? Do I do it by hand? Where do I put it?
4) Maven (and ivy too) do a good job of chasing dependencies among jars.
How does that work, if at all, with openjdk on fc10.
Thanks.
14 years, 9 months
Retiring old Fedora Eclipse site http://sourceware.org/eclipse
by Andrew Overholt
Hi,
I'd like to retire the old Fedora Eclipse website. The tools whose
development was hosted there have moved either on to greener pastures at
eclipse.org/linuxtools or have had their functionality be subsumed by
other projects (Bugzilla plugin -> Mylyn).
If there's anything anyone wants from there, please grab a copy. I'll
archive a copy of everything.
>From now on, for Fedora Eclipse-related information, please see the wiki
page which I'm going to try to keep updated:
http://fedoraproject.org/wiki/Eclipse
Thanks,
Andrew
14 years, 9 months
Odd LinkageException with gcj on Rawhide
by Mary Ellen Foster
I was trying to figure out why one of my packages -- ice (object
middleware) -- failed to build from source in Rawhide. Here are the
logs:
http://linux.dell.com/files/fedora/FixBuildRequires/mock-results/i386/ice...
The actual error occurs while building the Java bindings and looks like this:
BUILD FAILED
java.lang.LinkageError: loading constraint violated
at SliceTask.getDefaultTranslator(SliceTask.java:323)
at Slice2FreezeJTask.execute(Slice2FreezeJTask.java:358)
at org.apache.tools.ant.UnknownElement.execute(ant-1.7.1.jar.so)
at java.lang.reflect.Method.invoke(libgcj.so.10)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(ant-1.7.1.jar.so)
at org.apache.tools.ant.Task.perform(ant-1.7.1.jar.so)
at org.apache.tools.ant.Target.execute(ant-1.7.1.jar.so)
at org.apache.tools.ant.Target.performTasks(ant-1.7.1.jar.so)
at org.apache.tools.ant.Project.executeSortedTargets(ant-1.7.1.jar.so)
at org.apache.tools.ant.Project.executeTarget(ant-1.7.1.jar.so)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(ant-1.7.1.jar.so)
at org.apache.tools.ant.Project.executeTargets(ant-1.7.1.jar.so)
at org.apache.tools.ant.Main.runBuild(ant-1.7.1.jar.so)
at org.apache.tools.ant.Main.startAnt(ant-1.7.1.jar.so)
at org.apache.tools.ant.launch.Launcher.run(ant-launcher-1.7.1.jar.so)
at org.apache.tools.ant.launch.Launcher.main(ant-launcher-1.7.1.jar.so)
(NB: earlier in the build process, a "Slice2Java" Ant task gets build,
and then used at this point in the build.)
This failure didn't happen in Rawhide as recently as 6 February (the
last time I rebuild this package in Rawhide), still doesn't happen on
F9 or F10, and goes away (at least in mock) if I BuildRequire OpenJDK
specifically (previously it was defaulting to GCJ).
Is this a known issue? What changed since 6 February that could
trigger this? I'll just switch to OpenJDK for now in ice, but I'm
still curious what's going on here.
MEF
--
Mary Ellen Foster -- http://homepages.inf.ed.ac.uk/mef/
Informatik 6: Robotics and Embedded Systems, Technische Universität München
and ICCS, School of Informatics, University of Edinburgh
14 years, 9 months
New build failure
by Orion Poplawski
gridengine 6.2-5 built fine on F-10 back in November
(http://koji.fedoraproject.org/koji/buildinfo?buildID=70140) but now
fails (http://koji.fedoraproject.org/koji/taskinfo?taskID=1140261)
Error is:
[java] compile.test:
[java] [mkdir] Created dir:
/builddir/build/BUILD/gridengine/source/CLASSES/test
[java] [javac] Compiling 18 source files to
/builddir/build/BUILD/gridengine/source/CLASSES/test
[java] [javac]
/builddir/build/BUILD/gridengine/source/libs/jdrmaa/test/DrmaaSuite.java:25:
incompatible types
[java] [javac] found : junit.framework.TestSuite
[java] [javac] required: Test
[java] [javac] return suite;
[java] [javac] ^
[java] [javac] 1 error
The junit versions seems to be the same (3.8.2-4.4.fc10), but java is
newer (1.6.0.0-2b12 -> 1.6.0.0-9.b14).
Source is:
import junit.framework.*;
/**
*
* @author dan.templeton(a)sun.com
*/
public class DrmaaSuite extends TestCase {
public DrmaaSuite (java.lang.String testName) {
super (testName);
}
/** suite method automatically generated by JUnit module */
public static Test suite () {
TestSuite suite = new TestSuite ("DrmaaSuite");
suite.addTest (org.ggf.drmaa.DrmaaSuite.suite ());
suite.addTest (com.sun.grid.drmaa.DrmaaSuite.suite ());
return suite;
}
}
Help?
--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA Division FAX: 303-415-9702
3380 Mitchell Lane orion(a)cora.nwra.com
Boulder, CO 80301 http://www.cora.nwra.com
14 years, 9 months
Eclipse/Comps
by Mat Booth
I notice the Eclipse wiki page [1] has been updated. We have more
plugins in Fedora now than I've had chance to use, which is very cool.
I use this fact to try and persuade my Ubuntu-using developer friends
to cross over to the red-hatted side. ;-)
Seeing the page made me think that the Fedora Eclipse comps group [2]
is terribly outdated. Should we be adding our plugins to this group?
Here's how it currently looks:
<group>
<id>eclipse</id>
<_name>Fedora Eclipse</_name>
<_description>Integrated Development Environments based on
Eclipse.</_description>
<default>false</default>
<uservisible>true</uservisible>
<packagelist>
<packagereq type="default">eclipse-cdt</packagereq>
<packagereq type="default">eclipse-changelog</packagereq>
<packagereq type="default">eclipse-jdt</packagereq>
<packagereq type="default">eclipse-mylyn</packagereq>
<packagereq type="default">eclipse-mylyn-bugzilla</packagereq>
<packagereq type="default">eclipse-mylyn-ide</packagereq>
<packagereq type="default">eclipse-mylyn-java</packagereq>
<packagereq type="default">eclipse-pde</packagereq>
<packagereq type="default">eclipse-pydev</packagereq>
<packagereq type="default">eclipse-rpm-editor</packagereq>
<packagereq type="default">eclipse-subclipse</packagereq>
<packagereq type="optional">eclipse-mylyn-trac</packagereq>
</packagelist>
</group>
[1] https://fedoraproject.org/wiki/Eclipse
[2] http://cvs.fedoraproject.org/viewvc/comps/comps-f11.xml.in
--
Mat Booth
www.matbooth.co.uk
14 years, 9 months
generating eclipse dropin content.xml
by Robert Marcano
SVNKit provides an eclipse plugin, but the build process is not based on
PDE, it is done using ant to generate the eclipse standard site for updates
and installations, I am using the ant script because it is what upstreams
do. I install the plugins and features on the dropin directory
.../dropins/svnkit/eclipse/{plugins,features}. but I do not know how to
generate the content.xml (with only plugins and features directories,
eclipse do not see them on the about window). Is there a way to generate it
outside the pdebuild script?
--
Robert Marcano
14 years, 9 months
Very slow Eclipse on F10
by Mary Ellen Foster
Before I file this in bugzilla, I wanted to check if it's just my
problem ... Lately, in Eclipse (3.4.1 on Fedora 10), I've been
noticing that it takes several seconds to open a new editor. So if I
click on a Java source file (in Java perspective), the new tab appears
immediately, but it takes several seconds for the actual editor to
finish rendering. In the meantime, the tab just says "Java editor".
Similar things happen with the Ant buildfile editor.
I have several third-party plugins installed that I don't want to
remove unless I have to, which is why I wanted to check first -- is
anyone else seeing similar symptoms?
Thanks,
MEF
--
Mary Ellen Foster -- http://homepages.inf.ed.ac.uk/mef/
Informatik 6: Robotics and Embedded Systems, Technische Universität München
and ICCS, School of Informatics, University of Edinburgh
14 years, 9 months
why does openjdk need to depend on netbeans?
by Harshad
Hi,
I just tried installing java-1.6.0-openjdk-devel, and this causes a 38M download because of a dependency on netbeans. Is this really intended or is there a bug/oversight? (I am on a limited download internet connection)
Here's my complete yum trace:
yum install java-1.6.0-openjdk-devel.i386
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* fedora: ftp.iitm.ac.in
* rpmfusion-free-updates: lordmorgul.net
* rpmfusion-nonfree-updates: lordmorgul.net
* rpmfusion-free: lordmorgul.net
* rpmfusion-nonfree: lordmorgul.net
* updates: ftp.iitm.ac.in
fedora | 2.8 kB 00:00
rpmfusion-free-updates | 2.7 kB 00:00
rpmfusion-nonfree-updates | 2.7 kB 00:00
rpmfusion-free | 2.7 kB 00:00
rpmfusion-nonfree | 2.7 kB 00:00
updates | 2.3 kB 00:00
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package java-1.6.0-openjdk-devel.i386 1:1.6.0.0-7.b12.fc10 set to be updated
--> Processing Dependency: netbeans-platform8 for package: java-1.6.0-openjdk-devel
--> Running transaction check
---> Package netbeans-platform8.noarch 0:6.1-5.fc10 set to be updated
--> Processing Dependency: swing-layout >= 1.0 for package: netbeans-platform8
--> Processing Dependency: jna >= 3.0.2 for package: netbeans-platform8
--> Processing Dependency: javahelp2 >= 2.0.05 for package: netbeans-platform8
--> Running transaction check
---> Package javahelp2.noarch 0:2.0.05-5.fc10 set to be updated
---> Package swing-layout.i386 0:1.0.3-2.fc9 set to be updated
--> Processing Dependency: java-gcj-compat >= 1.0.31 for package: swing-layout
--> Processing Dependency: libgcj_bc.so.1 for package: swing-layout
---> Package jna.i386 0:3.0.4-10.svn729.fc10 set to be updated
--> Processing Dependency: libffi.so.5 for package: jna
--> Running transaction check
---> Package java-1.5.0-gcj.i386 0:1.5.0.0-22.fc10 set to be updated
updates/filelists_db | 2.8 MB 00:14
--> Processing Dependency: sinjdoc for package: java-1.5.0-gcj
---> Package libffi.i386 0:3.0.5-1.fc10 set to be updated
---> Package libgcj.i386 0:4.3.2-7 set to be updated
--> Running transaction check
---> Package sinjdoc.i386 0:0.5-7.fc10 set to be updated
--> Processing Dependency: java_cup >= 0.10 for package: sinjdoc
--> Running transaction check
---> Package java_cup.i386 1:0.10k-1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================
Package Arch Version Repository Size
===========================================================================================================
Installing:
java-1.6.0-openjdk-devel i386 1:1.6.0.0-7.b12.fc10 updates 12 M
Installing for dependencies:
java-1.5.0-gcj i386 1.5.0.0-22.fc10 fedora 132 k
java_cup i386 1:0.10k-1 fedora 175 k
javahelp2 noarch 2.0.05-5.fc10 fedora 551 k
jna i386 3.0.4-10.svn729.fc10 fedora 187 k
libffi i386 3.0.5-1.fc10 fedora 22 k
libgcj i386 4.3.2-7 fedora 19 M
netbeans-platform8 noarch 6.1-5.fc10 fedora 5.2 M
sinjdoc i386 0.5-7.fc10 fedora 786 k
swing-layout i386 1.0.3-2.fc9 fedora 144 k
Transaction Summary
===========================================================================================================
Install 10 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 38 M
Is this ok [y/N]: N
Exiting on user Command
Complete!
thanks,
Harshad
14 years, 9 months
Including classes from Sun's demo code in a Fedora package
by Mary Ellen Foster
I'm currently reviewing simplyhtml, an HTML editor that's written in Java:
https://bugzilla.redhat.com/show_bug.cgi?id=462521
The distributed source includes two files, ElementTreePanel.java and
ExampleFileFilter.java, which seem to have come from the demo
applications distributed with the Sun JDK. ElementTreePanel is still
shipped with JDK 1.6.0_12, while ExampleFileFilter last seems to have
been included in the 1.5 JDKs. Neither file is in the
java-1.6.0-openjdk-demo package, unfortunately, which would have made
things easier ... :(
Is this a showstopper for the package in question? Both of the Sun
demo files are BSD-licensed, while simplyhtml is GPL, if that's
relevant ...
Thanks for any advice,
MEF
--
Mary Ellen Foster -- http://homepages.inf.ed.ac.uk/mef/
Informatik 6: Robotics and Embedded Systems, Technische Universität München
and ICCS, School of Informatics, University of Edinburgh
14 years, 10 months