Adjusted source-code to enable the use of bundled "pkg" tool of Glassfish 4 in 64 bit OS. The main guidelines are taken from [this blog post] (https://blog.kumina.nl/2010/07/glassfish-3-0-1s-pkg-tool-using-debians-python-packages/) and updates from [this forum thread] (https://www.java.net/forum/topic/glassfish/glassfish/how-make-pkg-work-glassfish-4-kubuntu-1404-x64). Steps to run the "pkg" under 64 bit OS-es:
apt-get install python-dev gcc python-cherrypy python-mako python-openssl python-ply python-pycurl python-simplejson
- Download
_actions.c
from this project (you can clone the project if you have git installed on the server) gcc -I/usr/include/python2.7 -shared -fpic -O2 _actions.c -o _actions.so
- Hit the "pkg" tool:
/opt/glassfish/bin/pkg
mv /opt/glassfish/pkg/bin/pkg /opt/glassfish/pkg/bin/pkg.orig
- Download
pkg
from this project and copy to /opt/glassfish/pkg/bin/pkg mkdir /opt/glassfish/pkg/custom-lib
cp -r /opt/glassfish/pkg/vendor-packages/pkg /opt/glassfish/pkg/custom-lib
cp _actions.so /opt/glassfish/pkg/custom-lib/pkg/actions/_actions.so
- download init.py from this folder
cp __init__.py /opt/glassfish/pkg/custom-lib/pkg/actions/__init__.py
- enjoy