macadmins / macadmins/installapplications

Including userscript in IA package will not work

Open
#85 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
307
Forks
59
PR merge metrics
No merged PRs in 30d

Description

Hi,

Not sure if it should be a priority to do anything with this, or just add as a NB to the documentation.

This will not work, scenario 1:

```
{
"file": "/Library/installapplications/userscripts/depnotify_user_launcher.py",
"hash": "sha256_hash_goes_here",
"name": "DEPNotify User Launcher",
"type": "userscript"
}
```

This will work, scenario 2:

```
{
"file": "/Library/installapplications/userscripts/depnotify_user_launcher.py",
"hash": "sha256_hash_goes_here",
"name": "DEPNotify User Launcher",
"type": "userscript",
"url": "https://raw.githubusercontent.com/erikng/installapplicationsdemo/master/installapplications/scripts/user/depnotify_user_launcher.py"
}
```

The difference is that in scenario 1, everything is included in the InstallApplication.pkg, in scenario 2, it is downloaded from the Internet.

In scenario 1, the userscripts folder does exist at the time installapplications.py is checking for existance of needed folders (lines: 474-479), which will bypass the creation of the folder /var/tmp/installapplications (which again is needed for /var/tmp/installapplications/.userscript).

K

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in installapplications.py around lines 474-479 and reproduce both userscript package scenarios described in the issue. Check why the bundled userscripts directory prevents creation of /var/tmp/installapplications and its .userscript marker. Done should be agreed with maintainers as either making the bundled scenario work or documenting the limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.