Bug 770721

Summary: Review Request: substance - Swing look-and-feel library
Product: [Fedora] Fedora Reporter: Sven Baus <s.baus86>
Component: Package ReviewAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: notting, package-review, pikachu.2014
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://github.com/kirillcool/substance
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-01 11:25:49 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 201449    

Description Sven Baus 2011-12-28 10:52:35 EST
SPEC: http://dl.dropbox.com/u/3351272/Stuff/substance/SPECS/substance.spec
RPM: Coming soon
SRPM: Coming soon

Hello everybody,

since I need the substance package for another review request (https://bugzilla.redhat.com/show_bug.cgi?id=754246), I want to package it. 

I just need some help and also a sponsor. 

substance is a GUI framework for java.

I need some help building it: I can build it with ant, but there is a little problem: Inside the buid.properties is said, where the jdk home is with the value "/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/". I think this is a system variable, that can not be read under fedora and I would like to know, how I can find the jdk home?

Greetings
Sven
Comment 1 Mohamed El Morabity 2011-12-28 12:49:13 EST
Hi,

it seems the Java home is set by a property (you can see it in the build.properties file : jdk.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/). You can tell Ant to override properties using the following syntax:
   ant -Dproperty1=value1 -Dproperty2=value2 ...
In this case:
   ant -Dproperty=%{java_home}
%{java_home} is a macro that points to the current Java home path.
Comment 2 Sven Baus 2011-12-29 10:49:02 EST
Thanks, that helped me really good ;).

I worked a bit at this package, but now I have another strange error I can't explain: During build with the new SPEC at the end of the %install stage, I get the following error:
"Fehler: Erstellen des Archivs fehlgeschlagen bei der Datei /home/makerpm/rpmbuild/SOURCES/kirillcool-substance-58d3873.zip: cpio: Ungültige Magic"

What does invalid magic mean?

I really thank you for helping me ;).

Greetings
Sven
Comment 3 Mohamed El Morabity 2011-12-29 10:52:54 EST
Could you post the current spec file, as well as the src.rpm one, which leads to this error?
Comment 4 Sven Baus 2011-12-29 11:14:44 EST
The SPEC is located over here: http://dl.dropbox.com/u/3351272/Stuff/substance/SPECS/substance.spec (maybe my upload wasn't fast enough) ;).

I don't get an src.rpm or a binary rpm because of this error.
Comment 5 Mohamed El Morabity 2012-01-03 06:49:01 EST
I'm unable to reproduce your bug. I think the source archive you downloaded is corrupted. Delete it and try to retrieve it again using this command:
   $ spectool -g substance.spec -C ../SOURCES/

By the way, be very careful with the formatting of the changelog; be sure to use for each entry  the following pattern:
    * DATE AUTHOR <EMAIL> VERSION-RELEASE
     - COMMENT1
     - COMMENT2
     - ...
Don't use also macros in changelog, unless you escape them using %:
    - added %{_javadir]/* to files section →    - added %%{_javadir}/* to files section

You'd better put the Git commit ID in a macro, in case substance is updated:
   # Git commit ID corresponding to the current version of substance
   %global commit  58d3873

   Name:		substance
   Version:	        6.0
   ...
   Source0:	https://github.com/kirillcool/%{name}/zipball/master/kirillcool-%{name}-%{commit}.zip
   ...
   %prep
   %setup -q -n kirillcool-%{name}-%{commit}
   ...

The most important thing is that substance embeds dependencies libs, as for TV-Browser. You must delete them before building and rely on those provided by the Fedora repos. To help you, here is the list of the embedded jar files and the corresponding Fedora package providing it, if available:
   trident.jar → not available, must be packaged (http://kenai.com/projects/trident/pages/Home)
   forms-1.2.0.jar → jgoodies-forms
   laf-plugin.jar → laf-plugin
   asm-all-2.2.2.jar → objectweb-asm
   laf-widget.jar → not available, must be packaged (http://java.net/projects/laf-widget/s)
Comment 6 Sven Baus 2012-01-03 15:53:34 EST
Thanks for you help, this really helped me a bit forward.

As you already said, substance depends on some other embedded jar files, that I need to rebuild, so I'm currently working on a Review Request for trident and after this for laf.widget.

I also updated the SPEC and look forward for the other jar files to get packaged ;).

Greetings
Sven