macadmins / macadmins/outset

Feature Request - Generate nopkg files to add Outset scripts

Open
#76 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
251
Forks
18
PR merge metrics
No merged PRs in 30d

Description

### The Issue
Outset itself can be deployed to Macs via various tools as it is provided as a standard installer pkg. This includes deployment (and updating) via Munki aka Managed Software Center. It is also possible to build a standard installer pkg to install one or more scripts to be copied in to the relevant sub-directories in the…

/usr/local/outset/

…directory.

I also see that there is an included tool to 'package up' scripts from these subdirectories to a standard installer pkg so that such an existing setup can be replicated to multiple machines. This tool is outset-pkg

I have however found this tool to have some drawbacks as follows and therefore this feature request details a suggested alternative approach.

### Proposed Solution
My suggestion is that a tool similar to outset-pkg be created but to work by creating one or more nopkg pkginfo files for use with Munki. When run it would ask for the following information - some of which may be considered optional

- Name
- Version
- Installcheck script
- Post install script
- Uninstall script
- Payload script
- Which Outset subdirectory to deploy to

As may have been spotted this is pretty much what the makepkginfo command does. However it would go further and also ask for the Payload script to be installed and which Outset subdirectory it should be deployed to.

This approach would be intended to be to deploy a single file per generated nopkg pkginfo.

This approach would I feel make it easier to build an automated system for deploying Outset scripts with the ability to target multiple scripts for an individual Mac or multiple Macs or a single script for an individual or multiple Macs or any permutation of this. More importantly I feel it makes it much _much_ easier to subsequently deploy updates to individual scripts. Updating the scripts would be independent of updating Outset itself.

This tool would use bash 'Here Doc' aka 'cat << eof' to embed the 'Payload' script, i.e. the script to actually end up being deployed to an Outset subdirectory.

As a very similar existing solution I would refer people to the 'archived' but currently still working [PrinterGenerator](https://github.com/nmcspadden/PrinterGenerator) script for generating nopkg pkginfo files to install Printer Queues via Munki

### Alternative
I have considered the use of the existing outset-pkg but this is designed to do _all_ scripts on an already configured machine and hence does not make it easy to have multiple different setups. It also makes updating a single script more of a hassle. The proposed approach also makes it possible to trigger an automated uninstall of a script via the standard Munki process.

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 by reading the existing outset-pkg tool and the makepkginfo workflow, then compare their behavior with the archived PrinterGenerator example. Define how the proposed command gathers metadata, embeds a payload with a here document, and targets an Outset subdirectory; done means it generates one usable Munki nopkg pkginfo file per script.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, macos
Domain
cli, operating-systems, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.