5 Replies Latest reply on Jul 30, 2014 3:52 PM by wdfink

    create a patched eap package

    dave.

      I want create a rpm packge with eap 6.2.4. for that i prepare the whole installation in a directory. first i unzipped jboss-eap-6.2.0.zip and patched it to 6.2.4 with:

      ./jboss-eap-6.2/bin/jboss-cli.sh --command='patch apply jboss-eap-6.2.4-patch.zip'

      Due the patching the jboss-eap-6.2 directory grows from 150MB to 420MB.later i want distribute the rpm to many servers, so it would be nice if i can reduce the size.

      I tried to delete the ".installation" and all ".overlays" directories (results in 151MB) but after that the installation seems to be broken. If I only delete the ".installation" directory (results in 378MB) it seems to work but then it's still very big.

       

      which files can i delete? i don't need the rollback feature.

      or is there somewhere a jboss-eap-6.2.4.zip or a different way to patch?

       

      Any help would be greatly appreciated.

       

      David

        • 1. Re: create a patched eap package
          ctomc

          Why don't you just take EAP RPM distribution that is available on RHN?

           

          in any case, distro increases as it creates backup of all modified files before it applies the patch, so you can do rollback of the patch.

           

          you can remove backup / rollback info in ".installation/patches"

          which should bring distro back to normal size.

          • 2. Re: Re: create a patched eap package
            dave.

            Thanks for your answer.

            The EAP RPM from RHN does not meet our company standards. A solution would may be to install the RPM from RHN on a server and take the files from there. I have to check that.

            As already stated, the size of EAP increases during the patching to 6.2.4, from 150MB to 420MB. The size of the directory ".installation/patches" is only 42MB. The other 228MB are from the directory "modules/system/layers/base/.overlays". If i remove this directory i come back to the range of the original size. The size is then 151MB. The problem is then, if i try to start jboss_cli.sh i get the following error:

             

            ./bin/jboss-cli.sh
            Exception in thread "main" org.jboss.modules.ModuleLoadException: Error loading module from /tmp/jboss-eap-6.2/modules/system/layers/base/org/jboss/as/cli/main/module.xml
                    at org.jboss.modules.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:155)
                    at org.jboss.modules.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:132)
                    at org.jboss.modules.LocalModuleFinder$1.run(LocalModuleFinder.java:154)
                    at org.jboss.modules.LocalModuleFinder$1.run(LocalModuleFinder.java:148)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at org.jboss.modules.LocalModuleFinder.findModule(LocalModuleFinder.java:148)
                    at org.jboss.modules.ModuleLoader.findModule(ModuleLoader.java:455)
                    at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:358)
                    at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:305)
                    at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:238)
                    at org.jboss.modules.Main.main(Main.java:385)
            Caused by: org.jboss.modules.xml.XmlPullParserException: Failed to add resource root 'jboss-as-cli-7.3.0.Final-redhat-14.jar' at path 'jboss-as-cli-7.3.0.Final-redhat-14.jar' (position: END_TAG seen ...    ... @33:71) caused by: java.util.zip.ZipException: error in opening zip file
                    at org.jboss.modules.ModuleXmlParser.parseResourceRoot(ModuleXmlParser.java:723)
                    at org.jboss.modules.ModuleXmlParser.parseResources(ModuleXmlParser.java:572)
                    at org.jboss.modules.ModuleXmlParser.parseModuleContents(ModuleXmlParser.java:394)
                    at org.jboss.modules.ModuleXmlParser.parseDocument(ModuleXmlParser.java:219)
                    at org.jboss.modules.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:153)
                    ... 10 more
            

             

            What is the purpose of the ".overlays" directory?

            A other special thing i recognized, concerning to the error above:

             

            jar -tf jboss-eap-6.2_patched/modules/system/layers/base/org/jboss/as/cli/main/jboss-as-cli-7.3.0.Final-redhat-14.jar
            java.util.zip.ZipException: error in opening zip file
                    at java.util.zip.ZipFile.open(Native Method)
                    at java.util.zip.ZipFile.(ZipFile.java:215)
                    at java.util.zip.ZipFile.(ZipFile.java:145)
                    at java.util.zip.ZipFile.(ZipFile.java:116)
                    at sun.tools.jar.Main.list(Main.java:1004)
                    at sun.tools.jar.Main.run(Main.java:245)
                    at sun.tools.jar.Main.main(Main.java:1177)
            
            jar -tf jboss-eap-6.2_orig/modules/system/layers/base/org/jboss/as/cli/main/jboss-as-cli-7.3.0.Final-redhat-14.jar
            META-INF/
            META-INF/MANIFEST.MF
            help/
            ...
            

             

            In the patched files i'm not able to unzip the jboss-as-cli-7.3.0.Final-redhat-14.jar. Is this intended? And if yes, why?

            • 3. Re: create a patched eap package
              wdfink

              The .overlay directory contains the files which come with a patch.

              As 6.2.4 is cumulative and include .1/.2/.3 it replace a lot of jars and other files.

              Current the 'old' files are destroyed (flip the ZIP flag) so they can not used.

               

              This is subject to change, the files will be not 'destroyed' and also there might be a cleanup feature to remove the old content with the drawback that it is not longer possible to rollback the patch.

              But this might happen in EAP7

              1 of 1 people found this helpful
              • 4. Re: create a patched eap package
                dave.

                Thanks for your answer.

                From where does Jboss know where the current jars (with correct zip flag) are if there are some at the original place and some in the ".overlays" directory?

                Is there a way, instead of patching with the patch utility, to get a pure 6.2.4 installation without ".overlays" directory?

                • 5. Re: create a patched eap package
                  wdfink

                  You can look to the .overlays/.overlays file.

                  ATM there is no possiblity to have the 'overlayed' files in the original directory. So there is no supported option for this.