How to patch Liferay Portal 6.1 EE source

Overview

The follow document outlines high level steps for patching Liferay Portal 6.1 source.

NOTE: This approach also works with Liferay Portal 6.2

Patching Steps

Show installed and available patch details

% cd LIFERAY_HOME/patching-tool 

% ./patching-tool info

Currently installed patches: announcements-1-6120, core-5-6120, 
documents-and-media-2-6120, dynamic-data-lists-1-6120, hotfix-1319-6120, 
hotfix-1324-6120, hotfix-55-6120, hotfix-56-6120, message-boards-1-6120, 
plugin-deployment-1-6120, security-hotfix-3-6120, service-builder-1-6120, 
tags-and-categories-1-6120, upgrade-2-6120

Available patches: 
  [ D] security-hotfix-1-6120 :: Currently not installed; 
       Won't be installed: the same issues were fixed in the following patches(s): core-5-6120
  [*I] plugin-deployment-1-6120 :: Installed; Will be installed.
  [*I] service-builder-1-6120 :: Installed; Will be installed.
  [*I] hotfix-55-6120 :: Installed; Will be installed.
  [*I] hotfix-56-6120 :: Installed; Will be installed.
  [*I] documents-and-media-2-6120 :: Installed; Will be installed.
  [ D] security-hotfix-2-6120 :: Currently not installed; 
       Won't be installed: the same issues were fixed in the following patches(s): core-5-6120
  [*I] security-hotfix-3-6120 :: Installed; Will be installed.
  [*I] upgrade-2-6120 :: Installed; Will be installed.
  [*I] message-boards-1-6120 :: Installed; Will be installed.
  [*I] dynamic-data-lists-1-6120 :: Installed; Will be installed.
  [*I] tags-and-categories-1-6120 :: Installed; Will be installed.
  [*I] announcements-1-6120 :: Installed; Will be installed.
  [ -] core-4-6120 :: Currently not installed; 
       Won't be installed: core-5 contains the fixes included in this one
  [*I] core-5-6120 :: Installed; Will be installed.
  [*I] hotfix-1319-6120 :: Installed; Will be installed.
  [*I] hotfix-1324-6120 :: Installed; Will be installed.

Show installed patches

$ ./patching-tool.sh info | grep Installed

  [*I] plugin-deployment-1-6120 :: Installed; Will be installed.
  [*I] service-builder-1-6120 :: Installed; Will be installed.
  [*I] hotfix-55-6120 :: Installed; Will be installed.
  [*I] hotfix-56-6120 :: Installed; Will be installed.
  [*I] documents-and-media-2-6120 :: Installed; Will be installed.
  [*I] security-hotfix-3-6120 :: Installed; Will be installed.
  [*I] upgrade-2-6120 :: Installed; Will be installed.
  [*I] message-boards-1-6120 :: Installed; Will be installed.
  [*I] dynamic-data-lists-1-6120 :: Installed; Will be installed.
  [*I] tags-and-categories-1-6120 :: Installed; Will be installed.
  [*I] announcements-1-6120 :: Installed; Will be installed.
  [*I] core-5-6120 :: Installed; Will be installed.
  [*I] hotfix-1319-6120 :: Installed; Will be installed.
  [*I] hotfix-1324-6120 :: Installed; Will be installed.

Clone Liferay Portal source folder (Optional/Recommended)

% cd LIFERAY_HOME
% cp  -r  liferay-portal-src-6.1.10-ee-ga1  liferay-portal-src-6.1.10-ee-ga1-patched

Configure patching tool source profile

Create/update patch-source profile properties file "LIFERAY_HOME/patching-tools/patch-source.properties".

patching.mode=source
jdk.version=jdk6
source.path=../portal-src/liferay-portal-src-6.1.10-ee-ga1-patched

 

NOTE: The default patchin tool binary profile is named "default.properties".

Install patched source files

% cd LIFERAY_HOME/patching-tool
% ./patching-tool patch-source  install

Update Eclipse Project file (Optional/Recommended)

If you are using the Eclipse IDE, revise the Eclipse project name for the patched source folder to distinguish it from the baseline source.

One approach is to suffix the project name with "-patched".

Hence, project "portal-master" becomes "portal-trunk-patched".

<?xml version="1.0" encoding="UTF-8"?>

<projectDescription>       
<name>portal-master-patched</name>       
</projectDescription>

Appendix

Liferay Patch Kit Package Structure

Liferay Portal patches are packaged as ZIP files.

eg. liferay-fix-pack-announcements-1-6120.zip

Root ZIP Folder List

  • backup
  • diffs
  • fixpack_documentation.xml
  • jdk5
  • jdk6
  • src

Full ZIP Folder List

$ unzip -l patches/liferay-fix-pack-announcements-1-6120.zip 

Archive:  patches/liferay-fix-pack-announcements-1-6120.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  12-15-12 01:58   backup/
        0  12-15-12 01:58   backup/WAR_PATH/
        0  12-15-12 01:58   backup/WAR_PATH/WEB-INF/
        0  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/
        0  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/portal-impl.jar/
        0  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/
        0  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/
        0  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/
        0  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/
        0  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/
        0  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/impl/
     4245  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/impl/AnnouncementsEntryServiceImpl.class
        0  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/http/
     5087  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/http/AnnouncementsEntryServiceHttp.class
     3201  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/http/AnnouncementsEntryServiceSoap.class
        0  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/action/
     1471  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/action/ActionUtil.class
        0  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/portal-impl.jar/META-INF/
    46779  12-15-12 01:58   backup/WAR_PATH/WEB-INF/lib/portal-impl.jar/META-INF/MANIFEST.MF
        0  12-15-12 01:58   backup/GLOBAL_LIB_PATH/
        0  12-15-12 01:58   backup/GLOBAL_LIB_PATH/portal-service.jar/
        0  12-15-12 01:58   backup/GLOBAL_LIB_PATH/portal-service.jar/com/
        0  12-15-12 01:58   backup/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/
        0  12-15-12 01:58   backup/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/
        0  12-15-12 01:58   backup/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/announcements/
        0  12-15-12 01:58   backup/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/announcements/service/
     1233  12-15-12 01:58   backup/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/announcements/service/AnnouncementsEntryService.class
     2998  12-15-12 01:58   backup/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/announcements/service/AnnouncementsEntryServiceUtil.class
     3463  12-15-12 01:58   backup/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/announcements/service/AnnouncementsEntryServiceWrapper.class
        0  12-15-12 01:56   diffs/
        0  12-15-12 01:56   diffs/portal-impl/
        0  12-15-12 01:56   diffs/portal-impl/src/
        0  12-15-12 01:56   diffs/portal-impl/src/com/
        0  12-15-12 01:56   diffs/portal-impl/src/com/liferay/
        0  12-15-12 01:56   diffs/portal-impl/src/com/liferay/portlet/
        0  12-15-12 01:56   diffs/portal-impl/src/com/liferay/portlet/announcements/
        0  12-15-12 01:56   diffs/portal-impl/src/com/liferay/portlet/announcements/service/
        0  12-15-12 01:56   diffs/portal-impl/src/com/liferay/portlet/announcements/service/impl/
     1058  12-15-12 01:56   diffs/portal-impl/src/com/liferay/portlet/announcements/service/impl/AnnouncementsEntryServiceImpl.java.diff
        0  12-15-12 01:56   diffs/portal-impl/src/com/liferay/portlet/announcements/service/http/
     1240  12-15-12 01:56   diffs/portal-impl/src/com/liferay/portlet/announcements/service/http/AnnouncementsEntryServiceSoap.java.diff
     3031  12-15-12 01:56   diffs/portal-impl/src/com/liferay/portlet/announcements/service/http/AnnouncementsEntryServiceHttp.java.diff
        0  12-15-12 01:56   diffs/portal-impl/src/com/liferay/portlet/announcements/action/
     1077  12-15-12 01:56   diffs/portal-impl/src/com/liferay/portlet/announcements/action/ActionUtil.java.diff
        0  12-15-12 01:56   diffs/portal-service/
        0  12-15-12 01:56   diffs/portal-service/src/
        0  12-15-12 01:56   diffs/portal-service/src/com/
        0  12-15-12 01:56   diffs/portal-service/src/com/liferay/
        0  12-15-12 01:56   diffs/portal-service/src/com/liferay/portlet/
        0  12-15-12 01:56   diffs/portal-service/src/com/liferay/portlet/announcements/
        0  12-15-12 01:56   diffs/portal-service/src/com/liferay/portlet/announcements/service/
     1567  12-15-12 01:56   diffs/portal-service/src/com/liferay/portlet/announcements/service/AnnouncementsEntryService.java.diff
     1045  12-15-12 01:56   diffs/portal-service/src/com/liferay/portlet/announcements/service/AnnouncementsEntryServiceUtil.java.diff
     1072  12-15-12 01:56   diffs/portal-service/src/com/liferay/portlet/announcements/service/AnnouncementsEntryServiceWrapper.java.diff
      607  12-15-12 01:58   fixpack_documentation.xml
        0  12-15-12 01:58   jdk5/
        0  12-15-12 01:58   jdk5/WAR_PATH/
        0  12-15-12 01:58   jdk5/WAR_PATH/WEB-INF/
        0  12-15-12 01:58   jdk5/WAR_PATH/WEB-INF/lib/
        0  12-15-12 01:58   jdk5/WAR_PATH/WEB-INF/lib/portal-impl.jar/
        0  12-15-12 01:58   jdk5/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/
        0  12-15-12 01:58   jdk5/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/
        0  12-15-12 01:58   jdk5/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/
        0  12-15-12 01:58   jdk5/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/
        0  12-15-12 01:58   jdk5/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/
        0  12-15-12 01:58   jdk5/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/impl/
     4696  12-15-12 01:58   jdk5/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/impl/AnnouncementsEntryServiceImpl.class
        0  12-15-12 01:58   jdk5/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/http/
     5609  12-15-12 01:58   jdk5/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/http/AnnouncementsEntryServiceHttp.class
     3505  12-15-12 01:58   jdk5/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/http/AnnouncementsEntryServiceSoap.class
        0  12-15-12 01:58   jdk5/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/action/
     1466  12-15-12 01:58   jdk5/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/action/ActionUtil.class
        0  12-15-12 01:58   jdk5/GLOBAL_LIB_PATH/
        0  12-15-12 01:58   jdk5/GLOBAL_LIB_PATH/portal-service.jar/
        0  12-15-12 01:58   jdk5/GLOBAL_LIB_PATH/portal-service.jar/com/
        0  12-15-12 01:58   jdk5/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/
        0  12-15-12 01:58   jdk5/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/
        0  12-15-12 01:58   jdk5/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/announcements/
        0  12-15-12 01:58   jdk5/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/announcements/service/
     1449  12-15-12 01:58   jdk5/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/announcements/service/AnnouncementsEntryService.class
     3163  12-15-12 01:58   jdk5/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/announcements/service/AnnouncementsEntryServiceUtil.class
     3639  12-15-12 01:58   jdk5/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/announcements/service/AnnouncementsEntryServiceWrapper.class
        0  12-15-12 01:56   jdk6/
        0  12-15-12 01:56   jdk6/WAR_PATH/
        0  12-15-12 01:56   jdk6/WAR_PATH/WEB-INF/
        0  12-15-12 01:56   jdk6/WAR_PATH/WEB-INF/lib/
        0  12-15-12 01:56   jdk6/WAR_PATH/WEB-INF/lib/portal-impl.jar/
        0  12-15-12 01:56   jdk6/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/
        0  12-15-12 01:56   jdk6/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/
        0  12-15-12 01:56   jdk6/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/
        0  12-15-12 01:56   jdk6/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/
        0  12-15-12 01:56   jdk6/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/
        0  12-15-12 01:56   jdk6/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/impl/
     4696  12-15-12 01:56   jdk6/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/impl/AnnouncementsEntryServiceImpl.class
        0  12-15-12 01:56   jdk6/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/http/
     5609  12-15-12 01:56   jdk6/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/http/AnnouncementsEntryServiceHttp.class
     3505  12-15-12 01:56   jdk6/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/service/http/AnnouncementsEntryServiceSoap.class
        0  12-15-12 01:56   jdk6/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/action/
     1466  12-15-12 01:56   jdk6/WAR_PATH/WEB-INF/lib/portal-impl.jar/com/liferay/portlet/announcements/action/ActionUtil.class
        0  12-15-12 01:56   jdk6/GLOBAL_LIB_PATH/
        0  12-15-12 01:56   jdk6/GLOBAL_LIB_PATH/portal-service.jar/
        0  12-15-12 01:56   jdk6/GLOBAL_LIB_PATH/portal-service.jar/com/
        0  12-15-12 01:56   jdk6/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/
        0  12-15-12 01:56   jdk6/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/
        0  12-15-12 01:56   jdk6/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/announcements/
        0  12-15-12 01:56   jdk6/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/announcements/service/
     1449  12-15-12 01:56   jdk6/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/announcements/service/AnnouncementsEntryService.class
     3163  12-15-12 01:56   jdk6/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/announcements/service/AnnouncementsEntryServiceUtil.class
     3639  12-15-12 01:56   jdk6/GLOBAL_LIB_PATH/portal-service.jar/com/liferay/portlet/announcements/service/AnnouncementsEntryServiceWrapper.class
        0  12-15-12 01:56   src/
        0  12-15-12 01:56   src/portal-impl/
        0  12-15-12 01:56   src/portal-impl/src/
        0  12-15-12 01:56   src/portal-impl/src/com/
        0  12-15-12 01:56   src/portal-impl/src/com/liferay/
        0  12-15-12 01:56   src/portal-impl/src/com/liferay/portlet/
        0  12-15-12 01:56   src/portal-impl/src/com/liferay/portlet/announcements/
        0  12-15-12 01:56   src/portal-impl/src/com/liferay/portlet/announcements/service/
        0  12-15-12 01:56   src/portal-impl/src/com/liferay/portlet/announcements/service/impl/
     5272  12-15-12 01:56   src/portal-impl/src/com/liferay/portlet/announcements/service/impl/AnnouncementsEntryServiceImpl.java
        0  12-15-12 01:56   src/portal-impl/src/com/liferay/portlet/announcements/service/http/
     5593  12-15-12 01:56   src/portal-impl/src/com/liferay/portlet/announcements/service/http/AnnouncementsEntryServiceSoap.java
     8760  12-15-12 01:56   src/portal-impl/src/com/liferay/portlet/announcements/service/http/AnnouncementsEntryServiceHttp.java
        0  12-15-12 01:56   src/portal-impl/src/com/liferay/portlet/announcements/action/
     1496  12-15-12 01:56   src/portal-impl/src/com/liferay/portlet/announcements/action/ActionUtil.java
        0  12-15-12 01:56   src/portal-service/
        0  12-15-12 01:56   src/portal-service/src/
        0  12-15-12 01:56   src/portal-service/src/com/
        0  12-15-12 01:56   src/portal-service/src/com/liferay/
        0  12-15-12 01:56   src/portal-service/src/com/liferay/portlet/
        0  12-15-12 01:56   src/portal-service/src/com/liferay/portlet/announcements/
        0  12-15-12 01:56   src/portal-service/src/com/liferay/portlet/announcements/service/
     4536  12-15-12 01:56   src/portal-service/src/com/liferay/portlet/announcements/service/AnnouncementsEntryServiceWrapper.java
     4864  12-15-12 01:56   src/portal-service/src/com/liferay/portlet/announcements/service/AnnouncementsEntryServiceUtil.java
     4012  12-15-12 01:56   src/portal-service/src/com/liferay/portlet/announcements/service/AnnouncementsEntryService.java
 --------                   -------
   160761                   134 files

References