homebysix-recipes icon indicating copy to clipboard operation
homebysix-recipes copied to clipboard

Tunnelblick .pkg recipe creates .pkg with problem in postinstall script

Open cumcitjamfadmin opened this issue 1 year ago • 3 comments

Recipe worked fine for me with previous versions (including 3.8.8d) and the recipe DOES still create a .pkg, but with 3.8.8e when I try to install it through Jamf I get vague error messages about problems with the postinstall script:

"Could not create a new temporary directory using a fixed path at /Library/Application Support/tunnelblickd; error was Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “tunnelblickd” in the folder “Application Support”." UserInfo={NSFilePath=/Library/Application Support/tunnelblickd, NSUnderlyingError=0x600003edc390 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}"

tunnelblick-installer-log.txt which contains this:

"Tunnelblick installer started 2023-11-03 11:44:04.553038; getuid() = 0; geteuid() = 0; getgid() = 0; getegid() = 0 currentDirectoryPath = '/private/var/[account]'; 1 arguments: 0x0005 Unable to determine user. Some operations cannot be performed Tunnelblick installer succeeded Tunnelblick installer started 2023-11-03 11:44:24.647381; getuid() = 0; geteuid() = 0; getgid() = 0; getegid() = 0 currentDirectoryPath = '/private/var/[account]'; 1 arguments: 0x0010 Unable to determine user. Some operations cannot be performed Tried to access userUsername, which was not set Tunnelblick installer failed"

When I launch the app I get a message that:

"Tunnelblick could not find the configuration file or the configuration file could not be sanitized. See the Console Log for details."

If I uninstall 3.8.8e and install 3.8.8d, it works fine. I've tested on a Ventura and Sonoma computer and see the same behavior on both, and I've deleted the .pkg and re-run the AutoPkg recipe multiple times and see the same issue.

cumcitjamfadmin avatar Nov 06 '23 19:11 cumcitjamfadmin

Forgot to include link to recipe, it's https://github.com/autopkg/homebysix-recipes/blob/master/Tunnelblick/Tunnelblick.pkg.recipe

cumcitjamfadmin avatar Nov 06 '23 19:11 cumcitjamfadmin

I was able to fix this with removing the second line in the bash script.

ehjmx avatar Nov 07 '23 15:11 ehjmx

The current postinstall script used by the Tunnelblick.pkg recipe is:

#!/bin/bash

# based on forum discussion:
# https://groups.google.com/forum/#!topic/tunnelblick-discuss/UYeR7vv_rXM

if [[ "$3" == "/" ]]; then

    # setup folders and secure Tunnelblick app
    /Applications/Tunnelblick.app/Contents/Resources/installer 5

    # secure configurations
    /Applications/Tunnelblick.app/Contents/Resources/installer 16

fi

I'm open to pull requests that modify that script, if modifications are needed. Some experimentation will be required to figure out what changed.

homebysix avatar Nov 07 '23 15:11 homebysix