public:repackaging_isabel_security_components_for_macos
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| public:repackaging_isabel_security_components_for_macos [2024/04/03 15:08] – thomas | public:repackaging_isabel_security_components_for_macos [2024/04/05 08:43] (current) – thomas | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | The macOS installer of Isabel | + | ====== Repackaging |
| - | * It runs an AppleScript during installation, | + | |
| - | * It assumes that the DMG image is mounted while installing the PKG installer package. | + | |
| - | These make it impossible to perform a silent install, e.g. through Munki or installer. In order to overcome this limitation, we must make some adjustments to the postinstall script responsible for these actions. | + | ===== Why repackage? ===== |
| - | Open the DMG. | + | The macOS installer of Isabel has some major deficiencies. It tries to access resources not in its installer, tries to manipulate |
| + | |||
| + | These make it impossible to perform a silent install, e.g. through Munki or '' | ||
| + | |||
| + | Note that I did this for version 6.33.19, but I suspect other versions to have the same general issues. | ||
| + | |||
| + | ===== Repackaging procedure ===== | ||
| + | |||
| + | Download the Isabel installation disk image from the [[https:// | ||
| Extract the package to a working location. | Extract the package to a working location. | ||
| < | < | ||
| mkdir work | mkdir work | ||
| - | pkgutil --expand / | + | pkgutil --expand / |
| </ | </ | ||
| - | Navigate to the offending subpackage: | + | In '' |
| - | < | + | |
| - | cd work/ | + | |
| - | </code> | + | |
| - | Open the postinstall script in a text editor: | ||
| < | < | ||
| - | vim Scripts/postinstall | + | # ## Delete Link to Production URL into the Taskbar ======= |
| + | # if [ -f /usr/ | ||
| + | # # | ||
| + | # set +e | ||
| + | # | ||
| + | # | ||
| + | # if (( $dloc >= 0 )); then | ||
| + | # sudo -u " | ||
| + | # fi | ||
| + | # | ||
| + | # sleep 5 | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # if (( $dloc >= 0 )); then | ||
| + | # sudo -u " | ||
| + | # fi | ||
| + | # set -e | ||
| + | # sleep 5 | ||
| + | # | ||
| + | # fi | ||
| </ | </ | ||
| - | Comment out this line: | + | These would normally manipulate the logged-in user's dock, but when installing silently in the background, there may not be a logged-in user or a running dock process, causing the script to fail. |
| - | < | + | |
| - | #set -e | + | In '' |
| - | </code> | + | |
| - | And this section: | ||
| < | < | ||
| + | ## | ||
| #cp / | #cp / | ||
| </ | </ | ||
| - | And also this section: | + | This would copy the uninstall program directly from the disk image. Why it is not just included in the package is beyond me. When installing silently, the disk image may not be mounted, causing |
| + | |||
| + | Also comment out the following: | ||
| < | < | ||
| + | #echo "*** Updating Link to ISA_LAYER Production URL" | ||
| + | ## ===================================================================== | ||
| + | ## =================== Link to IsaLayer Production URL ================== | ||
| + | ## ===================================================================== | ||
| + | # | ||
| + | #/ | ||
| + | #chmod 777 " | ||
| #echo 'on run | #echo 'on run | ||
| # set some_file to POSIX file "' | # set some_file to POSIX file "' | ||
| Line 46: | Line 77: | ||
| # end run | # end run | ||
| #' | osascript | #' | osascript | ||
| - | </code> | + | # |
| - | + | # echo "*** Adding Link to Production URL to the Taskbar" | |
| - | And also this section: | + | # # ================================================================== |
| - | <code> | + | # # =========== Add Link to Production URL into the Taskbar ========== |
| + | # # ================================================================== | ||
| + | # if [ -f /usr/ | ||
| + | # # | ||
| + | # set +e | ||
| + | # | ||
| + | # | ||
| + | # if (( $dloc >= 0 )); then | ||
| + | # sudo -u " | ||
| + | # fi | ||
| + | # | ||
| + | # sleep 5 | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # if (( $dloc >= 0 )); then | ||
| + | # sudo -u " | ||
| + | # fi | ||
| + | # | ||
| # sleep 5 | # sleep 5 | ||
| # set -e | # set -e | ||
| # # Add link to Taskbar for the current user | # # Add link to Taskbar for the current user | ||
| # sudo -u " | # sudo -u " | ||
| + | # | ||
| + | # sleep 5 | ||
| + | # sudo killall Dock | ||
| + | # sleep 5 | ||
| + | #else | ||
| + | # echo "File / | ||
| + | #fi | ||
| </ | </ | ||
| - | You will also need to adjust | + | This would ask the Finder to manipulate a shortcut via AppleScript. However, when installing silently the Finder might not be running. It also tries to manipulate |
| - | < | + | |
| - | vim Scripts/ | + | In '' |
| - | </ | + | |
| - | Comment out this line: | ||
| < | < | ||
| - | #set -e | + | ## delete Isabel certificates for MacOSX > 10.5 |
| + | # | ||
| + | #echo " | ||
| + | #if [ " | ||
| + | #echo " | ||
| + | # security -v delete-certificate -Z EE291EF1F343F1BF8F4E6228BD164CCE2824C0F8 | ||
| + | # security -v delete-certificate -Z D0636F70A73BE6E25A99EE987AAA6EF92A824811 | ||
| + | #fi | ||
| </ | </ | ||
| - | And: | + | This code attempts to clean up some old certificates by using the security command. However, that triggers dialogs that require user interaction, |
| + | |||
| + | In '' | ||
| < | < | ||
| - | #set -e | + | #echo " |
| - | #sleep 5 | + | ## ===================================================================== |
| - | #killall Dock | + | ## =================== Certificates installation ======================= |
| + | ## ===================================================================== | ||
| + | #/ | ||
| + | #/ | ||
| + | #/ | ||
| + | #/ | ||
| </ | </ | ||
| - | Navigate back to the top of your working directory: | + | This code once again tries to use the security command to install some new certificates. Testing shows that Isabel still seems to work, even without having these installed. If really needed, they can be deployed through an alternate method such as MDM. |
| - | < | + | |
| - | cd ../../ | + | |
| - | </ | + | |
| - | Repackage | + | Navigate back to the top of your working directory and repackage |
| < | < | ||
| pkgutil --flatten ISABEL Isabel.pkg | pkgutil --flatten ISABEL Isabel.pkg | ||
public/repackaging_isabel_security_components_for_macos.1712156906.txt.gz · Last modified: by thomas
