packages icon indicating copy to clipboard operation
packages copied to clipboard

Install in users home directory (Q&A) – Script error

Open opus-nbonenberger opened this issue 4 years ago • 5 comments

I am using Packager 1.2.9 and macOS Catalina.

I followed instructions here http://s.sudre.free.fr/Software/Packages/Q&A_3.html for creating a package that installs files to the Application Support folder of the user.

I also did the workaround for incorrect detection of the user domain. I created the wrapper package and used the adjusted post-installation script but the final wrapper package installation fails, stating there is a script error. I only found this line in the console log:

May 20 16:07:15 mac-32 com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.installer.17143): Failed to bootstrap path: path = /usr/sbin/installer, error = 2: No such file or directory

I don't know if this is the error, nor do I know how to prevent it. @packagesdev can you assist? Is the error in your script?

opus-nbonenberger avatar May 20 '21 14:05 opus-nbonenberger

First thing to check would be that the error message is actually correct.

in the Terminal application, check the result of:

ls -l /usr/sbin/installer

If installer is not located in /usr/sbin, this is something new. You can find the location of installer on your system with the following command:

which installer

packagesdev avatar May 20 '21 16:05 packagesdev

@packagesdev

-rwxr-xr-x 1 root wheel 95760 22 Sep 2020 /usr/sbin/installer

mac-32:~ user$ which installer
/usr/sbin/installer

opus-nbonenberger avatar May 21 '21 06:05 opus-nbonenberger

Anybody know how to install files under the the user's "Documents" folder?

DavidJameson avatar Mar 05 '22 20:03 DavidJameson

See the Q&A : http://s.sudre.free.fr/Software/Packages/resources.html

Envoyé de mon iPhone

Le 5 mars 2022 à 21:17, David Jameson @.***> a écrit :

 Anybody know how to install files under the the user's "Documents" folder?

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.

packagesdev avatar Mar 05 '22 23:03 packagesdev

Yeah, thanks - I had already figured out I could do it through a post install script but I was surprised that there was no notion of a “shadow” target user under the /Users folder.

I would have envisioned the following: (see image)

  1. There exists a folder called [~] (say) under /Users, representing the user’s home folder of the target computer
  2. Files and folders can be dropped there just like anywhere else
  3. I don’t quite understand why the installer can’t just put files in the user’s home folder directly but given that constraint, the installer could put those files/folders in /tmp and then execute an automatically included shell script to move that stuff from temp to “~"

One less script that developer needs to create

On Mar 5, 2022, at 6:44 PM, packagesdev @.***> wrote:

See the Q&A : http://s.sudre.free.fr/Software/Packages/resources.html

Envoyé de mon iPhone

Le 5 mars 2022 à 21:17, David Jameson @.***> a écrit :

 Anybody know how to install files under the the user's "Documents" folder?

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned. — Reply to this email directly, view it on GitHub https://github.com/packagesdev/packages/issues/92#issuecomment-1059852770, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNSSU2EDB4UMTBBP6AIJLDU6PWW3ANCNFSM45HDOZIA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.

DavidJameson avatar Mar 06 '22 12:03 DavidJameson