Hi,
I submitted a review for java-gnome and working on that made me think the Java guidelines needs work, so here's a suggested update:
https://fedoraproject.org/wiki/User:Abo/JavaPackagingDraftUpdate
=== Changes ===
Removed some occurances of a Unicode control character that didn't seem to belong there.
Fixed formatting of the text under "Jar file naming".
Hopefully clarified the text under "Directory structure".
Changed some occuranced of "<code>%{_xxx</code>}" into "<code>%{_xxx}</code>".
Changed -javadoc Group tag from "Development Documentation" to "Documentation".
Mostly rewrote the section on JNI packaging. (See wiki.)
Removed this text:
The <code>%{_jnidir</code>} rpm macro defines the main JNI jar repository. Like <code>%{_javadir</code>} it is declined in <code>-ext</code> and <code>-x.y.z</code> variants. It follows exactly the same rules as the <code>%{_javadir</code>}-derived tree structure, except that it hosts JAR files that use JNI.
<code>%{_jnidir</code>} usually expands into <code>/usr/lib/java</code>.
It seems to belong to the "The plan is to eventually..." part, but I don't really understand it. Explain and I'll add something back. :)
Partially rewrote the section on prebuilt binaries and the suggested % prep section. (See wiki.)
/abo
Hi,
* Alexander Boström abo@root.snowtree.se [2010-01-02 09:54]:
I submitted a review for java-gnome and working on that made me think the Java guidelines needs work, so here's a suggested update:
Thanks for doing this!
Removed some occurances of a Unicode control character that didn't seem to belong there.
Cool.
Fixed formatting of the text under "Jar file naming".
Okay.
Hopefully clarified the text under "Directory structure".
This is fine. The "JNI" link is still broken but that's not new :)
Changed some occuranced of "<code>%{_xxx</code>}" into "<code>%{_xxx}</code>".
Changed -javadoc Group tag from "Development Documentation" to "Documentation".
Thanks.
Mostly rewrote the section on JNI packaging. (See wiki.)
This looks good.
Removed this text:
The <code>%{_jnidir</code>} rpm macro defines the main JNI jar repository. Like <code>%{_javadir</code>} it is declined in <code>-ext</code> and <code>-x.y.z</code> variants. It follows exactly the same rules as the <code>%{_javadir</code>}-derived tree structure, except that it hosts JAR files that use JNI. <code>%{_jnidir</code>} usually expands into <code>/usr/lib/java</code>.
It seems to belong to the "The plan is to eventually..." part, but I don't really understand it. Explain and I'll add something back. :)
First off, "declined" should be "defined". I think the "-ext" and "-x.y.z" variants are JVM package variabnts. It's unfortunate that we can't have a standard directory structure defined in jpackage-utils. I'm not sure the macro is useful enough to warrant this potentially-confusing text.
Partially rewrote the section on prebuilt binaries and the suggested % prep section. (See wiki.)
This is good, thanks.
I think all of these changes will benefit the guidelines and would like to see them added to the wiki.
Andrew
Le samedi 02 janvier 2010 à 15:47 +0100, Alexander Boström a écrit :
Removed this text:
The <code>%{_jnidir</code>} rpm macro defines the main JNI jar repository. Like <code>%{_javadir</code>} it is declined in <code>-ext</code> and <code>-x.y.z</code> variants. It follows exactly the same rules as the <code>%{_javadir</code>}-derived tree structure, except that it hosts JAR files that use JNI. <code>%{_jnidir</code>} usually expands into <code>/usr/lib/java</code>.
It seems to belong to the "The plan is to eventually..." part, but I don't really understand it. Explain and I'll add something back. :)
When the original JJP guidelines were written people were using lots of different JVMs and app writers were releasing code that only worked on specific java versions, so the original JPP directory structure has always allowed versionned directories where packagers could put jars that only worked on specific versions.
If you look at the shell code macro that resolves filenames in jpackages-utils, you'll see it does something like the following when looking for jar "foo"
1. check the java version the current jvm reports (for example x.y.z) 2. look for "foo.jar" in %{_jnidir}-x.y.z/ 3. look for "foo.jar" in %{_jnidir}-x.y/ 4. look for "foo.jar" in %{_jnidir}-x/ 5. look for "foo.jar" in %{_jnidir}/ 6. look for "foo.jar" in %{_javadir}-x.y.z/ 7. look for "foo.jar" in %{_javadir}-x.y/ 8. look for "foo.jar" in %{_javadir}-x/ 9. look for "foo.jar" in %{_javadir}/
That allowed nifty things like having a single tomcat package (+ deps) that worked both with java-1.3 and java-1.4 jvms, depending on the jvm installed on system (or even with multiple jvms installed and env var changes), at a time when users where split between boths, and creating separate 1.3 and 1.4 packaging stacks would not have been possible for lack of manpower (90% of the components where the same with 1.3 and 1.4, the few exceptions were a PITA to manage)
People tend to put all their jars in %{_javadir}/ nowadays, but the infra is still there to allow multiple versions if needed.
BTW: this part of jpackage-utils was written in a week-end and was intended as a short-term simple brutal implementation while better people created better mechanisms. Better didn't happen years later :(
Hi again,
I updated the text a bit and added it to https://fedoraproject.org/wiki/PackagingDrafts/DraftsTodo
=== Additional changes ===
Some text clarifications.
Declaring Packaging/JPackagePolicy as optional.
Mention/allow use of %{_javadir}-x.x.x dirs.
Mention how %{_jnidir} might be used in the future.
Remove question about sed usage on MANIFEST.MF files.
lör 2010-01-02 klockan 15:47 +0100 skrev Alexander Boström:
Hi,
I submitted a review for java-gnome and working on that made me think the Java guidelines needs work, so here's a suggested update:
https://fedoraproject.org/wiki/User:Abo/JavaPackagingDraftUpdate
=== Changes ===
Removed some occurances of a Unicode control character that didn't seem to belong there.
Fixed formatting of the text under "Jar file naming".
Hopefully clarified the text under "Directory structure".
Changed some occuranced of "<code>%{_xxx</code>}" into "<code>%{_xxx}</code>".
Changed -javadoc Group tag from "Development Documentation" to "Documentation".
Mostly rewrote the section on JNI packaging. (See wiki.)
Removed this text:
The <code>%{_jnidir</code>} rpm macro defines the main JNI jar repository. Like <code>%{_javadir</code>} it is declined in <code>-ext</code> and <code>-x.y.z</code> variants. It follows exactly the same rules as the <code>%{_javadir</code>}-derived tree structure, except that it hosts JAR files that use JNI. <code>%{_jnidir</code>} usually expands into <code>/usr/lib/java</code>.
It seems to belong to the "The plan is to eventually..." part, but I don't really understand it. Explain and I'll add something back. :)
Partially rewrote the section on prebuilt binaries and the suggested % prep section. (See wiki.)
/abo
-- Fedora-packaging mailing list Fedora-packaging@redhat.com https://www.redhat.com/mailman/listinfo/fedora-packaging
packaging@lists.fedoraproject.org