Message Boards

Creating binary patches for Liferay 7.0.6 GA7 - Problems with portal-kernel

thumbnail
Dominik Marks, modified 4 Years ago.

Creating binary patches for Liferay 7.0.6 GA7 - Problems with portal-kernel

Regular Member Posts: 149 Join Date: 8/29/12 Recent Posts
As discussed in this blog post (https://liferay.dev/blogs/-/blogs/security-patches-for-liferay-portal-6-2-7-0-and-7-1) I am trying to generate binary patches for Liferay 7.0.6 GA7.

I was able to build Liferay from source, but now I have a strange problem.

I put the generated portal-kernel.jar into tomcat/lib/ext. The MANIFEST.MF in that jar states that this bundle exports  com.liferay.portal.kernel.util version 7.42.0. That is the same as in the packageinfo in the source in that package. However when I ask what packages that bundle exports in the gogo shell (command "b 0") it says that it exports com.liferay.portal.kernel.util version 7.41.0 (that would be the one that was exported before the patches).

What does that mean? Are the changes from portal-kernel.jar not applied? Why does the gogo shell say that it exports 7.41.0 ? I can't find that information anywhere. I already cleared the osgi/state folder.
thumbnail
Olaf Kock, modified 4 Years ago.

RE: Creating binary patches for Liferay 7.0.6 GA7 - Problems with portal-ke

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts
thumbnail
Dominik Marks, modified 4 Years ago.

RE: Creating binary patches for Liferay 7.0.6 GA7 - Problems with portal-ke

Regular Member Posts: 149 Join Date: 8/29/12 Recent Posts
Thanks Olaf for your answer. However I built everything from source and did not use any binary patches (as there are none available for the CE-Versions).
The strange thing is that in the above example the packageinfo in the source is version 7.42.0 and the MANIFEST.MF inside the portal-kernel.jar is 7.42.0, but the Gogo Shell reports 7.41.0.
thumbnail
Olaf Kock, modified 4 Years ago.

RE: Creating binary patches for Liferay 7.0.6 GA7 - Problems with portal-ke

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts
Dominik Marks:

The strange thing is that in the above example the packageinfo in the source is version 7.42.0 and the MANIFEST.MF inside the portal-kernel.jar is 7.42.0, but the Gogo Shell reports 7.41.0.
Still seems like the same issue: The source-bundle versions are one version higher than what's actually delivered in binary code? e.g. the increment was done after build but before packaging the source files. Maybe only partially as you mention 1) packageinfo, 2) Manifest, 3) Gogo Shell.
thumbnail
Dominik Marks, modified 4 Years ago.

RE: Creating binary patches for Liferay 7.0.6 GA7 - Problems with portal-ke

Regular Member Posts: 149 Join Date: 8/29/12 Recent Posts
So if I understand you correctly when I deploy a JAR with a MANIFEST.MF which exports 7.42.0 the Gogo shell will report one version less?? Why?
thumbnail
Dominik Marks, modified 3 Years ago.

RE: Creating binary patches for Liferay 7.0.6 GA7 - Problems with portal-ke

Regular Member Posts: 149 Join Date: 8/29/12 Recent Posts
To answer my own question:

The exported packages of portal-kernel.jar are not defined in the portal-kernel.jar but in the portal-bootstrap.jar. That file defines the exported packages of the bundle 0 (system bundle). That file contains the correct package versions and if I deploy that file too everything works fine.