search cancel

How to combine Endpoint Security Mac UniversalESD_RI.pkg and fsdmanifest.js into one pkg file

book

Article ID: 228385

calendar_today

Updated On:

Products

Endpoint Security

Issue/Introduction

The Symantec Endpoint Security (SES) for Mac installer is presented as two files: "Symantec Endpoint Protection.UniversalESD_RI.pkg" and "fsdmanifest.js"

How may a customer repackage these as one pkg file for remote deployment?

Resolution

Note that the SES Mac "Online installation package" is not suitable for repackaging as a remotely-deployable pkg file. Download instead the SES Mac "Full installation package creator" from ICDm. Run that on a Mac and it will download the UniversalESD_RI.pkg and fsdmanifest.js files.

Use the following script to convert "Symantec Endpoint Protection.UniversalESD_RI.pkg" and "fsdmanifest.js" into one pkg file and use that file (SEPRIRemote.pkg) for remote deployment using Jamf, et al. Note: the --identifier and --version options to the pkgbuild command in the script can be arbitrary but it is best practice to choose consistent and meaningful values so that the macOS installer command can determine if a pkg is already installed or is an upgrade.

#!/bin/sh
################################################################
# help to generate wrapper PKG for Cloud RI PKG and manifest.js 

# put RI PKG and fsd js file under same folder
#   ls ./ri                                              
#   Symantec Endpoint Protection.UniversalESD_RI.pkg fsdmanifest.js

# execute following command to generate wrapper PKG
#   ./SEPRIRemoteTool.command ./ri
################################################################

RI_FOLDER="$1"
RI_NAME="Symantec Endpoint Protection.UniversalESD_RI.pkg"
JS_NAME="fsdmanifest.js"
RI="${RI_FOLDER}/${RI_NAME}"
JS="${RI_FOLDER}/${JS_NAME}"

echo "check files ..."
if [ ! -d "${RI_FOLDER}" ] ; then
 echo "folder ${RI_FOLDER} doesn't exist"
 exit -1
fi

if [ ! -f "${RI}" ] ; then
 echo "${RI} PKG doesn't exist"
 exit -1
fi

if [ ! -f "${JS}" ]; then
 echo "${JS} doesn't exist"
 exit -1
fi

echo "prepare payload ..."
ROOT="/tmp/RIWrapperRoot"
INSTALL_TMP="${ROOT}/private/tmp/"
if [ -d "${ROOT}" ]; then
  rm -rf "${ROOT}"
fi
mkdir -p "${INSTALL_TMP}"
cp "${RI}" "${INSTALL_TMP}"
cp "${JS}" "${INSTALL_TMP}"

ls "${INSTALL_TMP}"

echo "prepare scripts ..."
SCRIPTS="/tmp/Scripts"
POSTINSTALL="${SCRIPTS}/postinstall"
if [ -d "${SCRIPTS}" ]; then
  rm -rf "${SCRIPTS}"
fi
mkdir -p "${SCRIPTS}"

echo "#!/bin/sh
## postinstall

sudo installer -pkg /private/tmp/Symantec\\ Endpoint\\ Protection.UniversalESD_RI.pkg -target /

rm -rf /private/tmp/Symantec\\ Endpoint\\ Protection.UniversalESD_RI.pkg
rm -rf /private/tmp/fsdmanifest.js

sleep 5
open -a \"Symantec Endpoint Protection\"

exit 0
" > "${POSTINSTALL}"
chmod 755 "${POSTINSTALL}"
ls -l "${POSTINSTALL}"

cat "${POSTINSTALL}"

echo "generate pkg ..."
pkgbuild --identifier "SEP.AV.Cloud.14.3.PKG" --root "${ROOT}" --scripts "${SCRIPTS}" --version "14.3RU2" --install-location "/" SEPRIRemote.pkg

echo "SEPRIRemote.pkg generated in current folder"

Attached also as "SEPRIRemoteTool.command" to bottom of this article

Attachments

1637021931270__SEPRIRemoteTool.command get_app