Bug 504489 - Review Request: proguard - Java class file shrinker, optimizer, obfuscator and preverifier
Review Request: proguard - Java class file shrinker, optimizer, obfuscator an...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Orcan Ogetbil
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-07 09:28 EDT by François Kooman
Modified: 2009-06-15 21:57 EDT (History)
3 users (show)

See Also:
Fixed In Version: 4.3-4.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-15 21:57:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
oget.fedora: fedora‑review+
tibbs: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description François Kooman 2009-06-07 09:28:00 EDT
Spec URL: http://fkooman.fedorapeople.org/proguard/proguard.spec
SRPM URL: http://fkooman.fedorapeople.org/proguard/proguard-4.3-1.fc11.src.rpm
Description:

ProGuard is a free Java class file shrinker, optimizer, obfuscator and 
preverifier. It detects and removes unused classes, fields, methods, and 
attributes. It optimizes bytecode and removes unused instructions. It 
renames the remaining classes, fields, and methods using short meaningless 
names. Finally, it preverifies the processed code for Java 6 or for Java 
Micro Edition.
Comment 1 Orcan Ogetbil 2009-06-07 18:08:26 EDT
Here are my notes for this package:

- rpmlint is silent.

- koji rawhide build seems fine
   http://koji.fedoraproject.org/koji/taskinfo?taskID=1397983

! Please explain in the specfile as comments what Sources 1-3 are for.

! Not a blocker, but in the docs/ and examples/ directories, there are html, xml and pro files that refer to /usr/local/. You might want to fix them.

? Any reason why you don't put the jar files directly in /usr/share/java/ ? If you definitely need to put the jar files in /usr/share/java/proguard/ , can you replace 
   %{_javadir}/%{name}*
with
   %{_javadir}/%{name}/
in %files to indicate that this is a directory?

* If a package contains a GUI application, then it needs to also include a properly installed .desktop file. Please follow
   http://fedoraproject.org/wiki/Packaging/Guidelines#Desktop_files
and
   http://fedoraproject.org/wiki/Packaging/ScriptletSnippets

! You need to specify a specific java version in BR and R. See:
  http://fedoraproject.org/wiki/Packaging/Java#BuildRequires_and_Requires
In your case this ought to be 1.5

* GCJ AOT bits SHOULD be built and included in packages. Since this package builds with java 1.5, this will bring great performance improvements on ppc* architectures. Please follow:
   http://fedoraproject.org/wiki/Packaging/GCJGuidelines

Can you review my package (bug #504521 )? It is java too.
Comment 2 François Kooman 2009-06-08 14:14:03 EDT
Spec URL: http://fkooman.fedorapeople.org/proguard/proguard.spec
SRPM URL: http://fkooman.fedorapeople.org/proguard/proguard-4.3-2.fc11.src.rpm

(In reply to comment #1)
> ! Please explain in the specfile as comments what Sources 1-3 are for.

Done.

> ! Not a blocker, but in the docs/ and examples/ directories, there are html,
> xml and pro files that refer to /usr/local/. You might want to fix them.

I've included a README.dist now.

> ? Any reason why you don't put the jar files directly in /usr/share/java/ ?

Yes, Packaging:Java says something about this:
"""   1.  If the number of provided JAR files exceeds two, you must place them into a sub-directory. """

Maybe I misread/misunderstood?

> * If a package contains a GUI application, then it needs to also include a
> properly installed .desktop file. 

Done. The problem now is that I can't find a suitable icon for ProGuard anywhere. For now I use the "java" icon.

> ! You need to specify a specific java version in BR and R. See:
>   http://fedoraproject.org/wiki/Packaging/Java#BuildRequires_and_Requires
> In your case this ought to be 1.5

This doesn't seem mandatory the way I read this? Also it is not mentioned in the "ant" template I used to create this spec file. Furthermore, I tried to compile it with "-source 1.4" and that also works?

> * GCJ AOT bits SHOULD be built and included in packages. Since this package
> builds with java 1.5, this will bring great performance improvements on ppc*
> architectures. Please follow:
>    http://fedoraproject.org/wiki/Packaging/GCJGuidelines

I did this now. However, rpmbuild gives some warnings now:

+ /usr/bin/aot-compile-rpm
/usr/lib/python2.6/site-packages/aotcompile.py:18: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
aot-compile-rpm: warning: subsetted /home/fkooman/rpmbuild/BUILDROOT/proguard-4.3-2.fc11.x86_64/usr/share/java/proguard/proguardgui.jar
aot-compile-rpm: warning: subsetted /home/fkooman/rpmbuild/BUILDROOT/proguard-4.3-2.fc11.x86_64/usr/share/java/proguard/retrace.jar

WARNING: Error loading security provider org.bouncycastle.jce.provider.BouncyCastleProvider: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
WARNING: Error loading security provider org.bouncycastle.jce.provider.BouncyCastleProvider: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}

rpmlint is also not totally happy:

[fkooman@localhost x86_64]$ rpmlint proguard-4.3-2.fc11.x86_64.rpm 
proguard.x86_64: W: unstripped-binary-or-object /usr/lib64/gcj/proguard/proguard.jar.so
1 packages and 0 specfiles checked; 0 errors, 1 warnings.
[fkooman@localhost x86_64]$ 

and the one that is due to GCJ (which can be ignored):

proguard.spec:118: W: libdir-macro-in-noarch-package (main package) %attr(-,root,root) %{_libdir}/gcj/%{name}

> Can you review my package (bug #504521 )? It is java too.  

It seems someone is already interested in reviewing it. I added myself to the CC of the bug anyway and look through it soon. Thanks for your review!
Comment 3 Orcan Ogetbil 2009-06-08 15:18:51 EDT
(In reply to comment #2)
> Spec URL: http://fkooman.fedorapeople.org/proguard/proguard.spec
> SRPM URL: http://fkooman.fedorapeople.org/proguard/proguard-4.3-2.fc11.src.rpm
> 

Thanks for the update!

> (In reply to comment #1)
> > ! Please explain in the specfile as comments what Sources 1-3 are for.
> 
> Done.
> 

Can you also use "cp -p" with them to preserve timestamps?

> > ! Not a blocker, but in the docs/ and examples/ directories, there are html,
> > xml and pro files that refer to /usr/local/. You might want to fix them.
> 
> I've included a README.dist now.
> 
> > ? Any reason why you don't put the jar files directly in /usr/share/java/ ?
> 
> Yes, Packaging:Java says something about this:
> """   1.  If the number of provided JAR files exceeds two, you must place them
> into a sub-directory. """
> 
> Maybe I misread/misunderstood?

Ah, right. Then can you 

(from comment #1)
> replace 
>    %{_javadir}/%{name}*
> with
>    %{_javadir}/%{name}/
> in %files to indicate that this is a directory?

> 
> > * If a package contains a GUI application, then it needs to also include a
> > properly installed .desktop file. 
> 
> Done. The problem now is that I can't find a suitable icon for ProGuard
> anywhere. For now I use the "java" icon.
> 

That's fine. You could also derive something from the png files in the docs/ directory, or ask the upstream about this.

Btw,
   /usr/share/icons/hicolor/*/apps/java.png
files belong to java-1.6.0-openjdk, so if you use that icon, you need to require this version of java.

> > ! You need to specify a specific java version in BR and R. See:
> >   http://fedoraproject.org/wiki/Packaging/Java#BuildRequires_and_Requires
> > In your case this ought to be 1.5
> 
> This doesn't seem mandatory the way I read this? Also it is not mentioned in
> the "ant" template I used to create this spec file. Furthermore, I tried to
> compile it with "-source 1.4" and that also works?
> 

Well, it's good to have it to indicate what versions of java can be used with this software.

> > * GCJ AOT bits SHOULD be built and included in packages. Since this package
> > builds with java 1.5, this will bring great performance improvements on ppc*
> > architectures. Please follow:
> >    http://fedoraproject.org/wiki/Packaging/GCJGuidelines
> 
> I did this now. However, rpmbuild gives some warnings now:
> 
> + /usr/bin/aot-compile-rpm
> /usr/lib/python2.6/site-packages/aotcompile.py:18: DeprecationWarning: the md5
> module is deprecated; use hashlib instead
>   import md5
> aot-compile-rpm: warning: subsetted
> /home/fkooman/rpmbuild/BUILDROOT/proguard-4.3-2.fc11.x86_64/usr/share/java/proguard/proguardgui.jar
> aot-compile-rpm: warning: subsetted
> /home/fkooman/rpmbuild/BUILDROOT/proguard-4.3-2.fc11.x86_64/usr/share/java/proguard/retrace.jar
> 
> WARNING: Error loading security provider
> org.bouncycastle.jce.provider.BouncyCastleProvider:
> java.lang.ClassNotFoundException:
> org.bouncycastle.jce.provider.BouncyCastleProvider not found in
> gnu.gcj.runtime.SystemClassLoader{urls=[file:./],
> parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
> WARNING: Error loading security provider
> org.bouncycastle.jce.provider.BouncyCastleProvider:
> java.lang.ClassNotFoundException:
> org.bouncycastle.jce.provider.BouncyCastleProvider not found in
> gnu.gcj.runtime.SystemClassLoader{urls=[file:./],
> parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
> 
> rpmlint is also not totally happy:
> 
> [fkooman@localhost x86_64]$ rpmlint proguard-4.3-2.fc11.x86_64.rpm 
> proguard.x86_64: W: unstripped-binary-or-object
> /usr/lib64/gcj/proguard/proguard.jar.so
> 1 packages and 0 specfiles checked; 0 errors, 1 warnings.
> [fkooman@localhost x86_64]$ 
> 

Hmm, I don't get these warnings. Koji rawhide build doesn't show them either
   http://koji.fedoraproject.org/koji/taskinfo?taskID=1399792
Do you use mock? If not, do you have redhat-rpm-config installed?

> and the one that is due to GCJ (which can be ignored):
> 
> proguard.spec:118: W: libdir-macro-in-noarch-package (main package)
> %attr(-,root,root) %{_libdir}/gcj/%{name}
> 

Yes, this warning can be ignored (this is the only warning I got on my build). Btw, you can just remove the %attr(-,root,root) part. I've been pinging java folks about this and a few other things that need to be updated in the java packaging guidelines. Things go "a little" slow.


> > Can you review my package (bug #504521 )? It is java too.  
> 
> It seems someone is already interested in reviewing it. I added myself to the
> CC of the bug anyway and look through it soon. Thanks for your review!  

You're welcome! Yep. Rakesh took it :) It's okay.

* Also, please use macros consistently. E.g.
   ${RPM_BUILD_ROOT} and $RPM_BUILD_ROOT
shouldn't be in the same specfile. Also, please either use %{name} all over the specfile or use proguard. Not a mixture of both!
Comment 4 François Kooman 2009-06-09 14:31:00 EDT
I think all issues are fixed now. 

Spec URL: http://fkooman.fedorapeople.org/proguard/proguard.spec
SRPM URL: http://fkooman.fedorapeople.org/proguard/proguard-4.3-3.fc11.src.rpm

One more thing: I install the JAR files without version in their name, is that a problem? Most of the time Java packages install a versioned JAR file and create an unversioned symlink. Would that be better?
Comment 5 Orcan Ogetbil 2009-06-09 16:38:00 EDT
Thanks, we're almost there. Versioned jar symlinks are for convenience with java libraries. Will anyone use proguard's jar files as a library? If yes, then it is a good idea to make unversioned symlinks.

! Would you consider adding a GenericName key to the .desktop file? That will make KDE users happy. Gnome uses Comment, KDE uses GenericName.

! You can BR ImageMagick and convert those icons in your specfile. That way you don't need to deal with additional sources.
Comment 6 Orcan Ogetbil 2009-06-09 16:41:50 EDT
On a second thought, these are not blockers. You can do these changes before you commit if you want.

-------------------------------------------
This package (proguard) is APPROVED by oget
-------------------------------------------
Comment 7 François Kooman 2009-06-10 14:14:30 EDT
I've updated the package again considering your remarks.

Spec URL: http://fkooman.fedorapeople.org/proguard/proguard.spec
SRPM URL: http://fkooman.fedorapeople.org/proguard/proguard-4.3-4.fc11.src.rpm
Comment 8 François Kooman 2009-06-10 14:17:22 EDT
New Package CVS Request
=======================
Package Name: proguard
Short Description: Java class file shrinker, optimizer, obfuscator and preverifier
Owners: fkooman
Branches: F-10 F-11
InitialCC:
Comment 9 Jason Tibbitts 2009-06-10 17:10:29 EDT
CVS done.
Comment 10 Fedora Update System 2009-06-12 11:23:47 EDT
proguard-4.3-4.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/proguard-4.3-4.fc11
Comment 11 Fedora Update System 2009-06-15 21:57:22 EDT
proguard-4.3-4.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.