Bug 456341 - Review Request: netbeans-platform8 - NetBeans 6.1 Platform 8
Review Request: netbeans-platform8 - NetBeans 6.1 Platform 8
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Lillian Angel
Fedora Extras Quality Assurance
:
Depends On: 439263
Blocks: 456337
  Show dependency treegraph
 
Reported: 2008-07-22 19:21 EDT by Victor G. Vasilyev
Modified: 2008-09-09 04:39 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-09 04:39:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
victor.vasilyev: fedora‑review?
kevin: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Victor G. Vasilyev 2008-07-22 19:21:42 EDT
Spec URL: http://nbi.netbeans.org/files/documents/210/2059/netbeans-platform8.spec
SRPM URL: http://nbi.netbeans.org/files/documents/210/2060/netbeans-platform8-6.1-1.fc10.src.rpm
Description: 
NetBeans Platform is a framework for development of 
Rich Client Swing Applications. It contains powerful
module system and a set of modules providing various
functionalities needed for simplification of 
development of modular desktop applications.

This package is a part of the NetBeans IDE 6.1 distribution.
Comment 1 Peter Lemenkov 2008-07-23 04:56:50 EDT
Hello Victor!

We already have opened Review Request for NetBeans Platform 6.0, surprisingly
named as libnb-platform7 - does your Review Request obsolete this one (see
https://bugzilla.redhat.com/show_bug.cgi?id=439265 ) ?

Frankly speaking, I'm a bit of confused - NetBeans Platform 6.0 called as
libnb-platform7 and NetBeans Platform 6.1.1 called as netbeans-platform8.
Comment 2 Peter Lemenkov 2008-07-23 04:59:56 EDT
As for me, I personally prefer your variant (e.g. netbeans-platform rather than
libnb-platform).

Comment 3 Victor G. Vasilyev 2008-07-23 06:41:37 EDT
Hello Peter!

API of the platform7 isn't compatible with API of the platform8. A number inside
name of the component provides ability to have several versions of the
components in the host system. Both distributions of the NetBeans 6.0 and 6.0.1
rely on platform7, but distribution of the NetBeans 6.1 relies on the next
version, i.e. platform8. Therefore, the Review Request
https://bugzilla.redhat.com/show_bug.cgi?id=439265 is not obsolete.

I chose netbeans-platform rather than libnb-platform to have compliance with
Fedora Naming Guidelines.
https://fedoraproject.org/wiki/Packaging/NamingGuidelines#Addon_Packages_.28General.29
Actually, platform can be considered an "addon" or a "child" of the NetBeans.
Nevertheless, the netbeans-platform8.spec defines the clause 
Provides: libnb-platform8
to resolve situation if an RPM with old name from another distribution has been
installed.
Comment 4 Victor G. Vasilyev 2008-07-31 13:13:10 EDT
This is my first contribution so I need a sponsor please.
Comment 5 Peter Lemenkov 2008-07-31 13:43:56 EDT
raising FE-NEEDSPONSOR
Comment 6 Brian Pepple 2008-08-07 14:39:01 EDT
Hey Victor,

I started to review this, but it fails to build in Mock(1).  Here's a link to the build & root logs: 

http://koji.fedoraproject.org/koji/getfile?taskID=765403&name=build.log
http://koji.fedoraproject.org/koji/getfile?taskID=765403&name=root.log

If I get some free time later today, I'll try to look into what is causing it to fail.

(1) http://fedoraproject.org/wiki/Projects/Mock
Comment 7 Victor G. Vasilyev 2008-08-07 18:34:18 EDT
Probably the Eclipse Java Compiler is used instead of the Java compiler provided by OpenJDK?
Comment 8 Victor G. Vasilyev 2008-08-08 07:40:43 EDT
Hi Brian,

Yes, my assumption is right. I can reproduce the error mentioned by you after switching the javac command to the Eclipse Java Compiler on my Fedora 9 platform by means of the commands:
==========================
# alternatives --config javac

There are 2 programs which provide 'javac'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/lib/jvm/java-1.6.0-openjdk/bin/javac
   2           /usr/lib/jvm/java-1.5.0-gcj/bin/javac

Enter to keep the current selection[+], or type selection number: 2

# javac -version
Eclipse Java Compiler 0.793_R33x, 3.3.2, Copyright IBM Corp 2000, 2008. All rights reserved.
==========================

And vice versa, I see the Ant message "BUILD SUCCESSFUL" after switching back to the reference implementation of the Java Compiler.

It seems the Fedora platform uses the Eclipse Java Compiler by default.
I guess, platform should use a reference implementation by default if it is accessible on that platform and all other implementations should be considered as alternatives of it, isn't it?
Comment 9 Victor G. Vasilyev 2008-08-18 14:43:14 EDT
The second release is prepared for review.
Spec URL: http://nbi.netbeans.org/files/documents/210/2059/netbeans-platform8.spec
SRPM URL: http://nbi.netbeans.org/files/documents/210/2127/netbeans-platform8-6.1-2.fc10.src.rpm

Changes:
- Suppress rpmlint warnings about hidden .noautoupdate files
- Appropriate values of Group Tags are chosen from the official list
- Avoid dangling symlinks after %%install

rpmlint shows no errors against both SRPM and RPMs. It also shows no warnings against SRPM, but it shows some warnings against RPMs:
=== netbeans-platform8-6.1-2.fc10.noarch.rpm ========================
netbeans-platform8.noarch: W: dangerous-command-in-%post ln
netbeans-platform8.noarch: W: dangerous-command-in-%preun rm
netbeans-platform8.noarch: W: class-path-in-manifest /usr/share/netbeans/platform8/modules/org-netbeans-libs-jna.jar
netbeans-platform8.noarch: W: class-path-in-manifest /usr/share/netbeans/platform8/modules/org-netbeans-libs-jsr223.jar
netbeans-platform8.noarch: W: class-path-in-manifest /usr/share/netbeans/platform8/modules/org-netbeans-modules-javahelp.jar
netbeans-platform8.noarch: W: class-path-in-manifest /usr/share/netbeans/platform8/modules/org-netbeans-modules-autoupdate-services.jar
netbeans-platform8.noarch: W: class-path-in-manifest /usr/share/netbeans/platform8/modules/org-jdesktop-layout.jar
1 packages and 0 specfiles checked; 0 errors, 7 warnings.

=== netbeans-platform8-harness-6.1-2.fc10.noarch.rpm ================
netbeans-platform8-harness.noarch: W: dangerous-command-in-%post ln
netbeans-platform8-harness.noarch: W: dangerous-command-in-%preun rm
1 packages and 0 specfiles checked; 0 errors, 2 warnings.
=====================================================================

All 9 warnings listed above are not issues, because:

* All dangerous ln and rm commands are used to establish symlinks between the system and external JARs. There are guarantees that the symlinks won't be dangling, because all JARs are provided by the packages listed under the "Requires" tags. All ln and complementary rm commands have relations to files located only inside of /usr/share/netbeans/platform8 and /usr/share/netbeans/harness directories.

* All warnings class-path-in-manifest don't have any sense for the package due to OpenJDK 6, i.e minimal used Java version is 6.0.
Comment 10 Victor G. Vasilyev 2008-09-04 11:47:55 EDT
The third release is prepared for review.

Spec URL: http://nbi.netbeans.org/files/documents/210/2059/netbeans-platform8.spec
SRPM URL: http://nbi.netbeans.org/files/documents/210/2165/netbeans-platform8-6.1-3.fc10.src.rpm

Changes:
- The %%{buildroot} is used everywhere instead of $RPM_BUILD_ROOT
- The java, java-devel and jpackage-utils requirenments are used

The rpmlint shows no errors and no warnings against SRPM.
It also shows no errors against all RPMs.
A list of warnings against all RPMs is the same as for the Release 2. 
All the warnings was explained in the comment #9 .

Succesful koji build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=806654
It is strange for me why if I strongly follow the Fedora guidelines then I don't see any errors :-)
Comment 11 Lillian Angel 2008-09-05 13:58:00 EDT
Rpmlint:

$ rpmlint  /notnfs/langel/rpm/RPMS/noarch/netbeans-platform8-*
netbeans-platform8.noarch: W: dangerous-command-in-%post ln
netbeans-platform8.noarch: W: dangerous-command-in-%preun rm
netbeans-platform8-harness.noarch: W: dangerous-command-in-%post ln
netbeans-platform8-harness.noarch: W: dangerous-command-in-%preun rm

Can the file linking be moved to %build or %install? It is also possibly these create files that end up being unowned by the package.

The rm calls are ok.


These are ok:
netbeans-platform8.noarch: W: class-path-in-manifest /usr/share/netbeans/platform8/modules/org-netbeans-modules-javahelp.jar
netbeans-platform8.noarch: W: class-path-in-manifest /usr/share/netbeans/platform8/modules/org-netbeans-modules-autoupdate-services.jar
netbeans-platform8.noarch: W: class-path-in-manifest /usr/share/netbeans/platform8/modules/org-netbeans-libs-jsr223.jar
netbeans-platform8.noarch: W: class-path-in-manifest /usr/share/netbeans/platform8/modules/org-netbeans-libs-jna.jar
netbeans-platform8.noarch: W: class-path-in-manifest /usr/share/netbeans/platform8/modules/org-jdesktop-layout.jar

3 packages and 0 specfiles checked; 0 errors, 9 warnings.



http://fedoraproject.org/wiki/Packaging/Guidelines

1 Packaging Guidelines

* 1.1 Naming
ok
* 1.2 Legal
ok
* 1.4 Writing a package from scratch
ok
* 1.5 Modifying an existing package
ok
* 1.6 Filesystem Layout
o 1.6.1 Libexecdir
* 1.7 Use rpmlint
o 1.7.1 Rpmlint Errors
* 1.8 Changelogs
* 1.9 Tags
ok
* 1.10 BuildRoot tag
ok
* 1.11 Requires
ok
* 1.13 Summary and description
ok
* 1.14 Encoding
ok
* 1.15 Documentation
ok
* 1.16 Compiler flags
ok
* 1.17 Debuginfo packages
n/a
* 1.18 Exclusion of Static Libraries
n/a
* 1.19 Duplication of system libraries
n/a
* 1.20 Beware of Rpath
n/a
* 1.21 Configuration files
ok
* 1.22 Initscripts
ok
* 1.23 Desktop files
ok
* 1.24 Macros
ok
* 1.25 Handling Locale Files
n/a
* 1.26 Timestamps
n/a
* 1.27 Parallel make
n/a
* 1.28 Scriptlets requirements
n/a
* 1.29 Running scriptlets only in certain situations
n/a
* 1.30 Scriplets are only allowed to write in certain directories
n/a
* 1.31 Conditional dependencies
n/a
* 1.32 Build packages with separate user accounts
n/a
* 1.33 Relocatable packages
n/a
* 1.34 Code Vs Content
ok
* 1.35 File and Directory Ownership
Fix permission. Listed below.
* 1.36 Users and Groups
ok
* 1.37 Web Applications
ok
* 1.38 Conflicts
n/a
* 1.39 No External Kernel Modules
n/a
* 1.40 No Files or Directories under /srv
n/a
* 1.41 Application Specific Guidelines
n/a


http://fedoraproject.org/wiki/Packaging/ReviewGuidelines

MUST Items:

XXXX MUST: rpmlint must be run on every package. The output should be posted in the review.
See comments above

- MUST: The package must be named according to the Package Naming Guidelines .
ok
- MUST: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption on Package Naming Guidelines .
ok
- MUST: The package must meet the Packaging Guidelines .
ok
- MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines .
ok
- MUST: The License field in the package spec file must match the actual license.
ok
- MUST: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package must be included in %doc.
ok
- MUST: The spec file must be written in American English.
ok
- MUST: The spec file for the package MUST be legible. If the reviewer is unable to read the spec file, it will be impossible to perform a review. Fedora is not the place for entries into the Obfuscated Code Contest (http://www.ioccc.org/).
ok
- MUST: The sources used to build the package must match the upstream source, as provided in the spec URL. Reviewers should use md5sum for this task. If no upstream URL can be specified for this package, please see the Source URL Guidelines for how to deal with this.
ok
- MUST: The package must successfully compile and build into binary rpms on at least one supported architecture.
ok
- MUST: If the package does not successfully compile, build or work on an architecture, then those architectures should be listed in the spec in ExcludeArch. 
ok
- MUST: All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines ; inclusion of those as BuildRequires is optional. Apply common sense.
ok
- MUST: The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.
ok
- MUST: Every binary RPM package which stores shared library files (not just symlinks) in any of the dynamic linker's default paths, must call ldconfig in %post and %postun. 
n/a
- MUST: If the package is designed to be relocatable, the packager must state this fact in the request for review, along with the rationalization for relocation of that specific package. Without this, use of Prefix: /usr is considered a blocker.
n/a

XXXX MUST: A package must own all directories that it creates. If it does not create a directory that it uses, then it should require a package which does create that directory. Refer to the Guidelines for examples.
see rpmlint comments

- MUST: A package must not contain any duplicate files in the %files listing.
ok

XXXX MUST: Permissions on files must be set properly. Executables should be set with executable permissions, for example. Every %files section must include a %defattr(...) line.

Fix permissions on line 245: %defattr(-,root,root) to %defattr(-,root,root,-)

- MUST: Each package must have a %clean section, which contains rm -rf %{buildroot} ( or $RPM_BUILD_ROOT ).
ok
- MUST: Each package must consistently use macros, as described in the macros section of Packaging Guidelines .
ok
- MUST: The package must contain code, or permissable content. This is described in detail in the code vs. content section of Packaging Guidelines .
ok
- MUST: Large documentation files should go in a -doc subpackage. (The definition of large is left up to the packager's best judgement, but is not restricted to size. Large can refer to either size or quantity)
- MUST: If a package includes something as %doc, it must not affect the runtime of the application. To summarize: If it is in %doc, the program must run properly if it is not present.
ok
- MUST: Header files must be in a -devel package.
n/a
- MUST: Static libraries must be in a -static package.
n/a
- MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability).
n/a
- MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1), then library files that end in .so (without suffix) must go in a -devel package.
n/a
- MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name} = %{version}-%{release}
n/a
- MUST: Packages must NOT contain any .la libtool archives, these should be removed in the spec.
n/a
- MUST: Packages containing GUI applications must include a %{name}.desktop file, and that file must be properly installed with desktop-file-install in the %install section. This is described in detail in the desktop files section of the Packaging Guidelines . If you feel that your packaged GUI application does not need a .desktop file, you must put a comment in the spec file with your explanation.
n/a
- MUST: Packages must not own files or directories already owned by other packages. The rule of thumb here is that the first package to be installed should own the files or directories that other packages may rely upon. This means, for example, that no package in Fedora should ever share ownership with any of the files or directories owned by the filesystem or man package. If you feel that you have a good reason to own a file or directory that another package owns, then please present that at package review time.
ok
- MUST: At the beginning of %install, each package MUST run rm -rf %{buildroot} ( or $RPM_BUILD_ROOT ). See Prepping BuildRoot For %install for details.
ok
- MUST: All filenames in rpm packages must be valid UTF-8.
ok


SHOULD Items:

- SHOULD: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it.
ok
- SHOULD: The description and summary sections in the package spec file should contain translations for supported Non-English languages, if available.
ok
- SHOULD: The reviewer should test that the package builds in mock. See MockTricks for details on how to do this.
ok
- SHOULD: The package should compile and build into binary rpms on all supported architectures.
ok
- SHOULD: The reviewer should test that the package functions as described. A package should not segfault instead of running, for example.
ok
- SHOULD: If scriptlets are used, those scriptlets must be sane. This is vague, and left up to the reviewers judgement to determine sanity.
- SHOULD: Usually, subpackages other than devel should require the base package using a fully versioned dependency.
n/a
- SHOULD: The placement of pkgconfig(.pc) files depends on their usecase, and this is usually for development purposes, so should be placed in a -devel pkg. A reasonable exception is that the main pkg itself is a devel tool not installed in a user runtime, e.g. gcc or gdb.
n/a
- SHOULD: If the package has file dependencies outside of /etc, /bin, /sbin, /usr/bin, or /usr/sbin consider requiring the package which provides the file instead of the file itself. Please see File Dependencies in the Guidelines for further information. 
n/a
Comment 12 Victor G. Vasilyev 2008-09-08 10:10:02 EDT
The next release is prepared for review.

Spec URL:
http://nbi.netbeans.org/files/documents/210/2059/netbeans-platform8.spec
SRPM URL:
http://nbi.netbeans.org/files/documents/210/2173/netbeans-platform8-6.1-4.fc10.src.rpm

Changes (In reply to comment #11):
> Can the file linking be moved to %build or %install? It is also possibly these
> create files that end up being unowned by the package.
>
> XXXX MUST: rpmlint must be run on every package. The output should be posted in
> the review.
> See comments above
>
> XXXX MUST: A package must own all directories that it creates. If it does not
> create a directory that it uses, then it should require a package which does
> create that directory. Refer to the Guidelines for examples.
> see rpmlint comments
OK. The linking to the external JARs is moved to the %%install script from the %%post scripts.
I agree that such solution will decrease risks of creating files which are unowned by the package, but it will also increase number of the rpmlint warnings (dangling-symlink).
Also, regardless of the fact that the rpmlint shows the symlink-should-be-relative warnings I intentionally use absolute links to the external JARs, because I am sure that in this case the links to the external components should not depend on locations of the symlinks in the package directory tree.

So, now the rpmlint shows the following warnings against RPMs:

* 14 warnings against netbeans-platform8-6.1-4.fc10.noarch.rpm, including:
- 4 "dangling-symlink" and 4 "symlink-should-be-relative" for all 4 external JARs
- 1 "dangerous-command-in-%preun rm" for the noautoupdate file
- 5 "class-path-in-manifest" for 5 NetBeans JARs that use such method

* 3 warnings against netbeans-platform8-harness-6.1-4.fc10.noarch.rpm, including:
- 1 "dangling-symlink" and 1 "symlink-should-be-relative" for 1 external JAR
- 1 "dangerous-command-in-%preun rm" for the noautoupdate file

> XXXX MUST: Permissions on files must be set properly. Executables should
> be set with executable permissions, for example. Every %files section must
> include a %defattr(...) line.
>
> Fix permissions on line 245: %defattr(-,root,root) to %defattr(-,root,root,-)
- Fixed for the package and subpackages.
Comment 13 Lillian Angel 2008-09-08 10:39:47 EDT
Approved.
Comment 14 Victor G. Vasilyev 2008-09-08 10:50:22 EDT
New Package CVS Request
=======================
Package Name: netbeans-platform8
Short Description: NetBeans 6.1 Platform 8
Owners: victorv
Branches:
InitialCC:
Comment 15 Kevin Fenzi 2008-09-08 11:14:41 EDT
cvs done.
Comment 16 Victor G. Vasilyev 2008-09-08 14:40:59 EDT
Successful scratch koji build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=813290

An official koji build according to http://fedoraproject.org/wiki/PackageMaintainers/Join#Request_Builds
has been started:
http://koji.fedoraproject.org/koji/taskinfo?taskID=813749
and it is not completed yet...
Comment 17 Victor G. Vasilyev 2008-09-09 04:39:42 EDT
The official koji build is completed successfully.

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