Bug 475058

Summary: Review Request: netbeans-platform - NetBeans 6.5 Platform 9
Product: [Fedora] Fedora Reporter: Victor G. Vasilyev <victor.vasilyev>
Component: Package ReviewAssignee: Adel Gadllah <adel.gadllah>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: adel.gadllah, fedora-package-review, langel, lemenkov, notting, pingou
Target Milestone: ---Flags: adel.gadllah: fedora-review+
kevin: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-14 13:44:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 473075    

Description Victor G. Vasilyev 2008-12-07 05:41:12 UTC
Spec URL: http://victorv.fedorapeople.org/files/netbeans-platform9.spec
SRPM URL:
http://victorv.fedorapeople.org/files/netbeans-platform9-6.5-1.fc11.src.rpm
Description:
The NetBeans Platform is a generic framework for Swing applications. 
It provides the services common to almost all large desktop applications: 
window management, menus, settings and storage, update management, file 
access, etc.

Notes:
------

* The NetBeans Platform 9 is used as a platform for the NetBeans IDE 6.5.
* The netbeans-platform9.spec is the next development step based on the netbeans-platform8.spec, Release 5.fc10
* Only the netbeans-platform8-harness subpackage is marked as obsolete, but not both the netbeans-platform8 package and netbeans-platform8-javadoc subpackage. It gives a chance to have both versions of the NetBeans Platform in a Fedora box at the same time. However, development of the applications based on the platform will be supported for its latest version only.

rpmlint results and disclaimers:
--------------------------------

netbeans-platform9-6.5-1.fc11.src.rpm - 0 errors, 1 warning:
1 x W: unversioned-explicit-obsoletes netbeans-platform8-harness
Any previous versions of the harness MUST BE uninstalled.

netbeans-platform9-6.5-1.fc11.noarch.rpm - 0 errors, 69 warnings:
5 x W: dangling-symlink
All these symlinks refer to the JARs owned by the packages that are specified as required. 
5 x W: symlink-should-be-relative
All these symlinks refer to the JARs located in /usr/share/java/
1 x W: dangerous-command-in-%preun rm
It is removing a .noautoupdate file created by the %post scriptlet.
52 x W: uncompressed-zip
All JARs of the NetBeans Platform aren't compressed to increase performance.
6 x W: class-path-in-manifest
(1) It is nature of Java; (2) All these JARs are used only in the scope of the platform and rely on its rules. (3) All these JARs are located in /usr/share/netbeans/platform9/modules/ (not in  /usr/share/java/)

netbeans-platform9-harness-6.5-1.fc11.noarch.rpm - 0 errors, 11 warnings:
1 x W: dangling-symlink
This symlink refers to the JARs owned by the packages that are specified as required. 
1 x W: symlink-should-be-relative
This symlink refers to the JARs located in /usr/share/java/
1 x W: obsolete-not-provided netbeans-platform8-harness
The obsoleting package is not a compatible replacement for the old one
1 x W: dangerous-command-in-%preun rm
It is removing a .noautoupdate file created by the %post scriptlet.
7 x W: uncompressed-zip
All JARs of the NetBeans Platform aren't compressed to increase performance.

netbeans-platform9-javadoc-6.5-1.fc11.noarch.rpm - 0 errors, 0 warnings.

Successful scratch koji build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=984717

Comment 1 Lillian Angel 2008-12-18 19:06:43 UTC
Is it possible to remove the version number from the name, and then package updates can be smoother? We would not require a new package and a review. It would not make much sense to have 2 versions of one package in Fedora.

Comment 2 Victor G. Vasilyev 2008-12-22 15:14:43 UTC
Lillian,

I agree that the updates will be more smooth if the version number will be removed from the package names.
Hence:
1. This Review Request is renamed (natbeans-platform9 -> netbeans-platform)
2. A new release is prepared:
Spec URL: http://victorv.fedorapeople.org/files/netbeans-platform.spec
SRPM URL: http://victorv.fedorapeople.org/files/netbeans-platform-6.5-2.fc11.src.rpm

Changes:
- The platform version number is removed from the package names
- "Obsoletes" are added for the netbeans-platform8* packages

There are two rpmlint warnings additionally to the mentioned above:
netbeans-platform.noarch: W: obsolete-not-provided netbeans-platform8
netbeans-platform-javadoc.noarch: W: obsolete-not-provided netbeans-platform8-javadoc
due to I've decided that the obsoleting packages are not a compatible replacements for the old ones.

Successful scratch koji build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1016108

Comment 3 Adel Gadllah 2008-12-29 14:54:24 UTC
REVIEW:

[+] = OK
[-] = NOT OK
[1] = SEE COMMENTS
[?] = WTF?

===========================
[+]	source files match upstream:
		sha1: 90bad27d62e4ab5813a200feec2c5ae34e615813
[+]	package meets naming and versioning guidelines.
[1]	specfile is properly named, is cleanly written and uses macros consistently.
[+]	dist tag is present.
[+]	build root is correct.
[+]	license field matches the actual license.
[+]	license is open source-compatible.
		GPLv2 with exceptions or CDDL
[+]	license text included in package.
[+]	latest version is being packaged.
		6.5-200811100001-ml
[+]	BuildRequires are proper.
[+]	%clean is present.
[+]	package builds in koji.
		http://koji.fedoraproject.org/koji/taskinfo?taskID=1024679
[+]	package installs properly.
[2]	rpmlint is silent.
[3]	final provides and requires are sane.
[+]	owns the directories it creates.
[+]	doesn't own any directories it shouldn't.
[+]	no duplicates in %files.
[+]	file permissions are appropriate.
[3]	scriptlets are sane
[+]	code, not content.
[+]	%docs are not necessary for the proper functioning of the package.
[+]	no headers.
[+]	no pkgconfig files.
[+]	no libtool .la droppings.

==================

COMMENTS:

[1]
Do we really need the "Distrubution" tag? AFAIK nothing in Fedora makes use of it.
Package groups are handled via comps.

Changelog:
Please remove the "6.1" references because they are not really related to this package.
(changelog entries from the former "platform8" package)

[2]
Its not see comments above. The only thing that can/should be fixed are the 
"W: dangerous-command-in-%preun rm" warnings, see [4]

[3]
rpm -qp netbeans-platform-6.5-2.fc11.noarch.rpm --provides
libnb-platform9 = 6.5
netbeans-platform = 6.5-2.fc11
rpm -qp netbeans-platform-harness-6.5-2.fc11.noarch.rpm --provides
libnb-platform9-devel = 6.5
netbeans-platform-harness = 6.5-2.fc11

Any reason why they are called "libnb-platform9" and "libnb-platform9-devel" ?
Those should be renamed to libnb-plaform/-devel (other packages can use the version to require it).

[4]
Whats the purpose of the noautoupdate scriptlets?
Wouldn't it be better to just package those files (generate them in %install section and add entries in %files).
This way rpm will handle the deletion/creation of this files and there would be no need for the scriptlets.

Besides those the package/spec looks fine.

Comment 4 Victor G. Vasilyev 2008-12-30 18:21:59 UTC
(In reply to comment #3)
Adel, thanks for review. The next release is prepared.

Spec URL: http://victorv.fedorapeople.org/files/netbeans-platform.spec
SRPM URL: http://victorv.fedorapeople.org/files/netbeans-platform-6.5-3.fc11.src.rpm
Koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=1026772

Changes and comments:
---------------------

> [1] specfile is properly named, is cleanly written and uses macros consistently.
> Do we really need the "Distrubution" tag? AFAIK nothing in Fedora makes use of
> it. Package groups are handled via comps.
I absolutely agree. It is my fault.
- The "Distrubution" tag is deleted

> Changelog:
> Please remove the "6.1" references because they are not really related to this
> package.(changelog entries from the former "platform8" package)
- The "6.1" references are removed from the changelog

> [3] final provides and requires are sane.
OK. No any changes.

> [3] scriptlets are sane
> rpm -qp netbeans-platform-6.5-2.fc11.noarch.rpm --provides
> libnb-platform9 = 6.5
> netbeans-platform = 6.5-2.fc11
> rpm -qp netbeans-platform-harness-6.5-2.fc11.noarch.rpm --provides
> libnb-platform9-devel = 6.5
> netbeans-platform-harness = 6.5-2.fc11
>
> Any reason why they are called "libnb-platform9" and "libnb-platform9-devel" ?
> Those should be renamed to libnb-plaform/-devel (other packages can use the
> version to require it).
An idea was to support a relation between packages across various Linux distributions. I agree it has not much sense for the Fedora packages.
So, to make the package spec more clear for Fedora I've removed it at all.
- Specifications of providing non-Fedora packages are removed

> [2] rpmlint is silent.
> Its not see comments above. The only thing that can/should be fixed are the
> "W: dangerous-command-in-%preun rm" warnings, see [4]
> ...
> [4]
> Whats the purpose of the noautoupdate scriptlets?
> Wouldn't it be better to just package those files (generate them in %install
> section and add entries in %files). This way rpm will handle the
> deletion/creation of this files and there would be no need for the scriptlets.
By default all the NetBeans packages rely on the RPM facilities to complete updating. Nevertheless, the NetBeans has own update subsystem called as "update center". A .noautoupdate file disables auto update of a NetBeans cluster via update center.
An idea to create/delete the .noautoupdate files in %post/%preun scriptlets is giving a chance for a user with the root rights to choose an alternative way for updating of the NetBeans clusters. It may be reached if the user will use the RPM option --noscripts for installation of a package (i.e. cluster). Note, this feature won't be used by default.
If you agree to save this feature of the netbeans-platform package then I won't change it.

Comment 5 Adel Gadllah 2008-12-31 13:00:23 UTC
(In reply to comment #4)
> (In reply to comment #3)
> Adel, thanks for review. The next release is prepared.
> 
> Spec URL: http://victorv.fedorapeople.org/files/netbeans-platform.spec
> SRPM URL:
> http://victorv.fedorapeople.org/files/netbeans-platform-6.5-3.fc11.src.rpm
> Koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=1026772
> 
> Changes and comments:
> ---------------------
> 
> > [1] specfile is properly named, is cleanly written and uses macros consistently.
> > Do we really need the "Distrubution" tag? AFAIK nothing in Fedora makes use of
> > it. Package groups are handled via comps.
> I absolutely agree. It is my fault.
> - The "Distrubution" tag is deleted

OK

> > Changelog:
> > Please remove the "6.1" references because they are not really related to this
> > package.(changelog entries from the former "platform8" package)
> - The "6.1" references are removed from the changelog

OK

> > [3] final provides and requires are sane.
> OK. No any changes.

> > [3] scriptlets are sane
> > rpm -qp netbeans-platform-6.5-2.fc11.noarch.rpm --provides
> > libnb-platform9 = 6.5
> > netbeans-platform = 6.5-2.fc11
> > rpm -qp netbeans-platform-harness-6.5-2.fc11.noarch.rpm --provides
> > libnb-platform9-devel = 6.5
> > netbeans-platform-harness = 6.5-2.fc11
> >
> > Any reason why they are called "libnb-platform9" and "libnb-platform9-devel" ?
> > Those should be renamed to libnb-plaform/-devel (other packages can use the
> > version to require it).
> An idea was to support a relation between packages across various Linux
> distributions. I agree it has not much sense for the Fedora packages.
> So, to make the package spec more clear for Fedora I've removed it at all.
> - Specifications of providing non-Fedora packages are removed

OK

> > [2] rpmlint is silent.
> > Its not see comments above. The only thing that can/should be fixed are the
> > "W: dangerous-command-in-%preun rm" warnings, see [4]
> > ...
> > [4]
> > Whats the purpose of the noautoupdate scriptlets?
> > Wouldn't it be better to just package those files (generate them in %install
> > section and add entries in %files). This way rpm will handle the
> > deletion/creation of this files and there would be no need for the scriptlets.
> By default all the NetBeans packages rely on the RPM facilities to complete
> updating. Nevertheless, the NetBeans has own update subsystem called as "update
> center". A .noautoupdate file disables auto update of a NetBeans cluster via
> update center.
> An idea to create/delete the .noautoupdate files in %post/%preun scriptlets is
> giving a chance for a user with the root rights to choose an alternative way
> for updating of the NetBeans clusters. It may be reached if the user will use
> the RPM option --noscripts for installation of a package (i.e. cluster). Note,
> this feature won't be used by default.
> If you agree to save this feature of the netbeans-platform package then I won't
> change it.

Well I am not sure why anyone would want to mess with an rpm installed package this way. If someone does not want to use rpms to update, he should just install the upstream tarball. Also updating this way breaks tracking via rpm and rpm -V will no longer be able to verify the installation. Other packages (ex: firefox) disable this option for the same reason.

The update center should only update plugins a user has installed in his home directory, so I think we should just remove the scriptlets and package those files as part of the rpm.

Comment 6 Lillian Angel 2009-01-05 16:07:30 UTC
You are not obsoleting the netbeans-platform8 package? so, we will have 2 netbeans-platform* packages in Fedora? I don't agree with this.

Comment 7 drago01 2009-01-06 16:46:35 UTC
(In reply to comment #6)
> You are not obsoleting the netbeans-platform8 package? so, we will have 2
> netbeans-platform* packages in Fedora? I don't agree with this.

Yeah, you are right. Without this people have to install the new packages to get a new version a simple update won't drag it in. 
Also there is no point to ship the old version once the new one is in.

Victor, please add this to the spec.

Comment 8 drago01 2009-01-07 11:07:35 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > You are not obsoleting the netbeans-platform8 package? so, we will have 2
> > netbeans-platform* packages in Fedora? I don't agree with this.
> 
> Yeah, you are right. Without this people have to install the new packages to
> get a new version a simple update won't drag it in. 
> Also there is no point to ship the old version once the new one is in.
> 
> Victor, please add this to the spec.

Err, he *does* obsolete it but not provide it.
So anyone has the old package installed will get the new one via update.

Comment 9 Adel Gadllah 2009-01-07 12:25:45 UTC
used the wrong account for the previous comment, that as me.

Comment 10 Victor G. Vasilyev 2009-01-13 13:06:10 UTC
Lillian, Adel,

Since release 6.5-2 all netbeans-platform8* packages are obsolete.

According to https://fedoraproject.org/wiki/PackagingDrafts/ProvidesObsoletes
"If a package supersedes/replaces an existing package without being a compatible enough replacement as defined in above, use only the Obsoletes from above."
Of course, the document is draft only, but I think it establishes right point that is applicable for this case.
All the packages, including netbeans-platform, netbeans-platform-harness and netbeans-platform-javadoc, are *not compatible replacements* for corresponding netbeans-platform8* packages. Therefore, I don't use the "Provides" clause for all these packages.

The next release is prepared.
Spec URL: http://victorv.fedorapeople.org/files/netbeans-platform.spec
SRPM URL: http://victorv.fedorapeople.org/files/netbeans-platform-6.5-4.fc11.src.rpm

Changes:
--------

- All %post and %preun scriplets are removed. Creation of the .noautoupdate files is completely provided in the %install section. All .noautoupdate files are listed in the corresponding %files sections, so RPM will take care about deleting the files during erasing of the packages.

rpmlint results:
----------------

Results are the same as mentioned above, but, of course, there are 3 additional warnings:
- netbeans-platform.noarch: W: obsolete-not-provided netbeans-platform8
- netbeans-platform-harness.noarch: W: obsolete-not-provided netbeans-platform8-harness
- netbeans-platform-javadoc.noarch: W: obsolete-not-provided netbeans-platform8-javadoc

Successful koji build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1049128

Comment 11 Adel Gadllah 2009-01-13 19:40:59 UTC
Thanks for fixing the remaining issues, the package looks fine now.

=> APPROVED

Comment 12 Victor G. Vasilyev 2009-01-13 20:50:22 UTC
New Package CVS Request
=======================
Package Name: netbeans-platform
Short Description: NetBeans Platform
Owners: victorv
Branches: F-10 EL-5
InitialCC:

Comment 13 Kevin Fenzi 2009-01-13 21:24:05 UTC
cvs done.

Comment 14 Victor G. Vasilyev 2009-01-14 13:44:07 UTC
The koji build (dist-f11, devel:netbeans-platform-6_5-4_fc11) completed successfully:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1052085

Comment 15 Lillian Angel 2009-01-19 15:05:20 UTC
can you comment on t his?

$ sudo rpm -Uvh netbeans-platform-6.5-4.fc11.noarch.rpm netbeans-platform-6.5-4.fc11.src.rpm netbeans-platform-harness-6.5-4.fc11.noarch.rpm netbeans-platform-javadoc-6.5-4.fc11.noarch.rpm
error: Failed dependencies:
	netbeans-platform8 >= 6.1 is needed by (installed) netbeans-ide9-6.1-9.fc10.noarch
	netbeans-platform8 = 6.1 is needed by (installed) netbeans-apisupport1-6.1-9.fc10.noarch
	netbeans-platform8 >= 6.1 is needed by (installed) netbeans-6.1-9.fc10.noarch
	netbeans-platform8 is needed by (installed) java-1.6.0-openjdk-devel-1:1.6.0.0-8.b14.fc11.i386
	netbeans-platform8-harness = 6.1 is needed by (installed) netbeans-apisupport1-6.1-9.fc10.noarch
	netbeans-platform8-harness >= 6.1 is needed by (installed) netbeans-6.1-9.fc10.noarch

$ sudo rpm -e --nodeps netbeans-platform8-harness netbeans-platform8

$ sudo rpm -Uvh netbeans-platform-6.5-4.fc11.noarch.rpm netbeans-platform-6.5-4.fc11.src.rpm netbeans-platform-harness-6.5-4.fc11.noarch.rpm netbeans-platform-javadoc-6.5-4.fc11.noarch.rpm
Preparing...                ########################################### [100%]
   1:netbeans-platform      ########################################### [ 25%]
   2:netbeans-platform-harne########################################### [ 50%]
   3:netbeans-platform-javad########################################### [ 75%]
   4:netbeans-platform      warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
########################################### [100%]
error: unpacking of archive failed on file /home/langel/rpmbuild/SOURCES/netbeans-6.5-200811100001-ml-platform-src.zip;497495d0: cpio: open failed - Permission denied

Comment 16 Victor G. Vasilyev 2009-01-19 16:37:26 UTC
(In reply to comment #15)
> can you comment on t his?
> 
> $ sudo rpm -Uvh netbeans-platform-6.5-4.fc11.noarch.rpm
> netbeans-platform-6.5-4.fc11.src.rpm
> netbeans-platform-harness-6.5-4.fc11.noarch.rpm
> netbeans-platform-javadoc-6.5-4.fc11.noarch.rpm
> error: Failed dependencies:
>  netbeans-platform8 >= 6.1 is needed by (installed)
> netbeans-ide9-6.1-9.fc10.noarch
>  netbeans-platform8 = 6.1 is needed by (installed)
> netbeans-apisupport1-6.1-9.fc10.noarch
>  netbeans-platform8 >= 6.1 is needed by (installed) netbeans-6.1-9.fc10.noarch
>  netbeans-platform8 is needed by (installed)
> java-1.6.0-openjdk-devel-1:1.6.0.0-8.b14.fc11.i386
This dependency must be changed to netbeans-platform in java-1.6.0-openjdk-devel
>  netbeans-platform8-harness = 6.1 is needed by (installed)
> netbeans-apisupport1-6.1-9.fc10.noarch
>  netbeans-platform8-harness >= 6.1 is needed by (installed)
> netbeans-6.1-9.fc10.noarch

It is because netbeans-platform* packages obsoletes corresponding netbeans-platform8* packages, but not provides it.

> 
> $ sudo rpm -e --nodeps netbeans-platform8-harness netbeans-platform8
> 
> $ sudo rpm -Uvh netbeans-platform-6.5-4.fc11.noarch.rpm
> netbeans-platform-6.5-4.fc11.src.rpm
> netbeans-platform-harness-6.5-4.fc11.noarch.rpm
> netbeans-platform-javadoc-6.5-4.fc11.noarch.rpm
> Preparing...                ########################################### [100%]
>    1:netbeans-platform      ########################################### [ 25%]
>    2:netbeans-platform-harne########################################### [ 50%]
>    3:netbeans-platform-javad########################################### [ 75%]
>    4:netbeans-platform      warning: user mockbuild does not exist - using root
> warning: group mockbuild does not exist - using root
> ########################################### [100%]
> error: unpacking of archive failed on file
> /home/langel/rpmbuild/SOURCES/netbeans-6.5-200811100001-ml-platform-src.zip;497495d0:
> cpio: open failed - Permission denied

It is a strange error. The netbeans-platform-6.5-4.fc11.noarch.rpm is not a source package. It doesn't contain the upstream sources zip file. How the rpm tool can know about the source zip!?

I can't reproduce it on my Fedora box:

# rpm -Uvh netbeans-platform-6.5-4.fc11.noarch.rpm
error: Failed dependencies:
        netbeans-platform8 = 6.1-5.fc10 is needed by (installed) netbeans-platform8-harness-6.1-5.fc10.noarch
        netbeans-platform8 >= 6.1 is needed by (installed) netbeans-ide9-6.1-10.fc10.noarch
        netbeans-platform8 = 6.1 is needed by (installed) netbeans-apisupport1-6.1-10.fc10.noarch
        netbeans-platform8 >= 6.1 is needed by (installed) netbeans-6.1-10.fc10.noarch
# rpm -e --nodeps netbeans-platform8-harness netbeans-platform8
[root@fedora9nbpackager noarch]# rpm -Uvh netbeans-platform-6.5-4.fc11.noarch.rpm
Preparing...                ########################################### [100%]
   1:netbeans-platform      ########################################### [100%]
# i.e. all is OK