Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Nudge.munki.recipe #15

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

paul-cossey
Copy link

Hi, @erikng

The current Munki recipe has the minimum_os_version key hard coded to macOS 11.

This PR adds support for derive_minimum_os_version which now sets the minimum_os_version to macOS 12

I've also added in PathDeleter to clean up the unpacking steps.

Output from a successful -v run

autopkg run -v Nudge.munki.recipe 
Looking for com.github.erikng.download.Nudge...
Did not find com.github.erikng.download.Nudge in recipe map
Rebuilding recipe map with current working directories...
Looking for com.github.erikng.download.Nudge...
Found com.github.erikng.download.Nudge in recipe map
**load_recipe time: 0.005228249996434897
Processing Nudge.munki.recipe...
WARNING: Nudge.munki.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
GitHubReleasesInfoProvider
WARNING: This is an unathenticated Github session, some API features may not work
GitHubReleasesInfoProvider: Matched regex 'Nudge-\S.*?.pkg' among asset(s): Nudge-2.0.5.81760.pkg
GitHubReleasesInfoProvider: Selected asset 'Nudge-2.0.5.81760.pkg' from tag 'v2.0.5.81760' at url https://github.com/macadmins/nudge/releases/download/v2.0.5.81760/Nudge-2.0.5.81760.pkg
URLDownloader
URLDownloader: Storing new Last-Modified header: Thu, 25 Jul 2024 21:37:56 GMT
URLDownloader: Storing new ETag header: "0x8DCACF20C446501"
URLDownloader: Downloaded /Users/paul.cossey/Library/AutoPkg/Cache/com.github.erikng.munki.Nudge/downloads/Nudge.pkg
EndOfCheckPhase
CodeSignatureVerifier
CodeSignatureVerifier: Verifying installer package signature...
CodeSignatureVerifier: Package "Nudge.pkg":
CodeSignatureVerifier:    Status: signed by a developer certificate issued by Apple for distribution
CodeSignatureVerifier:    Notarization: trusted by the Apple notary service
CodeSignatureVerifier:    Signed with a trusted timestamp on: 2024-07-25 21:35:19 +0000
CodeSignatureVerifier:    Certificate Chain:
CodeSignatureVerifier:     1. Developer ID Installer: Mac Admins Open Source (T4SK8ZXCXG)
CodeSignatureVerifier:        Expires: 2028-02-09 02:34:05 +0000
CodeSignatureVerifier:        SHA256 Fingerprint:
CodeSignatureVerifier:            B1 06 B6 26 DA 3B A8 48 34 F3 DF D2 CC 5E AC 03 91 31 05 3F A9 A2 
CodeSignatureVerifier:            B7 BA 2A 5E 33 3C 3B 05 53 7A
CodeSignatureVerifier:        ------------------------------------------------------------------------
CodeSignatureVerifier:     2. Developer ID Certification Authority
CodeSignatureVerifier:        Expires: 2031-09-17 00:00:00 +0000
CodeSignatureVerifier:        SHA256 Fingerprint:
CodeSignatureVerifier:            F1 6C D3 C5 4C 7F 83 CE A4 BF 1A 3E 6A 08 19 C8 AA A8 E4 A1 52 8F 
CodeSignatureVerifier:            D1 44 71 5F 35 06 43 D2 DF 3A
CodeSignatureVerifier:        ------------------------------------------------------------------------
CodeSignatureVerifier:     3. Apple Root CA
CodeSignatureVerifier:        Expires: 2035-02-09 21:40:36 +0000
CodeSignatureVerifier:        SHA256 Fingerprint:
CodeSignatureVerifier:            B0 B1 73 0E CB C7 FF 45 05 14 2C 49 F1 29 5E 6E DA 6B CA ED 7E 2C 
CodeSignatureVerifier:            68 C5 BE 91 B5 A1 10 01 F0 24
CodeSignatureVerifier: 
CodeSignatureVerifier: Signature is valid
CodeSignatureVerifier: Authority name chain is valid
FlatPkgUnpacker
FlatPkgUnpacker: Unpacked /Users/paul.cossey/Library/AutoPkg/Cache/com.github.erikng.munki.Nudge/downloads/Nudge.pkg to /Users/paul.cossey/Library/AutoPkg/Cache/com.github.erikng.munki.Nudge/unpack
FileFinder
FileFinder: Found file match: '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.erikng.munki.Nudge/unpack/Nudge-2.0.5.81760.pkg' from globbed '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.erikng.munki.Nudge/unpack/Nudge*.pkg'
FileFinder: Basename match: 'Nudge-2.0.5.81760.pkg'
PkgPayloadUnpacker
PkgPayloadUnpacker: Unpacked /Users/paul.cossey/Library/AutoPkg/Cache/com.github.erikng.munki.Nudge/unpack/Nudge-2.0.5.81760.pkg/Payload to /Users/paul.cossey/Library/AutoPkg/Cache/com.github.erikng.munki.Nudge/payload/Applications/Utilities
FileFinder
FileFinder: Found file match: '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.erikng.munki.Nudge/payload/Applications/Utilities/Nudge.app/Contents/Info.plist' from globbed '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.erikng.munki.Nudge/payload/**/Nudge.app/Contents/Info.plist'
FileFinder: Basename match: 'Info.plist'
Versioner
Versioner: Found version 2.0.5.81760 in file /Users/paul.cossey/Library/AutoPkg/Cache/com.github.erikng.munki.Nudge/payload/Applications/Utilities/Nudge.app/Contents/Info.plist
MunkiPkginfoMerger
MunkiPkginfoMerger: Merged {'version': '2.0.5.81760'} into pkginfo
MunkiInstallsItemsCreator
MunkiInstallsItemsCreator: Created installs item for /Applications/Utilities/Nudge.app
MunkiInstallsItemsCreator: Derived minimum os version as: 12.0
MunkiPkginfoMerger
MunkiPkginfoMerger: Merged {'version': '2.0.5.81760', 'installs': [{'CFBundleIdentifier': 'com.github.macadmins.Nudge', 'CFBundleName': 'Nudge', 'CFBundleShortVersionString': '2.0.5.81760', 'CFBundleVersion': '2.0.5.81760', 'minosversion': '12.0', 'path': '/Applications/Utilities/Nudge.app', 'type': 'application', 'version_comparison_key': 'CFBundleShortVersionString'}], 'minimum_os_version': '12.0'} into pkginfo
MunkiImporter
MunkiImporter: Using repo lib: AutoPkgLib
MunkiImporter:         plugin: FileRepo
MunkiImporter:           repo: /Users/Shared/munki_repo
MunkiImporter: Copied pkginfo to: /Users/Shared/munki_repo/pkgsinfo/apps/Nudge/Nudge-2.0.5.81760.plist
MunkiImporter:            pkg to: /Users/Shared/munki_repo/pkgs/apps/Nudge/Nudge-2.0.5.81760.pkg
PathDeleter
PathDeleter: Deleted /Users/paul.cossey/Library/AutoPkg/Cache/com.github.erikng.munki.Nudge/unpack
PathDeleter: Deleted /Users/paul.cossey/Library/AutoPkg/Cache/com.github.erikng.munki.Nudge/payload
Receipt written to /Users/paul.cossey/Library/AutoPkg/Cache/com.github.erikng.munki.Nudge/receipts/Nudge.munki-receipt-20240801-122350.plist

The following new items were downloaded:
    Download Path                                                                               
    -------------                                                                               
    /Users/paul.cossey/Library/AutoPkg/Cache/com.github.erikng.munki.Nudge/downloads/Nudge.pkg  

The following new items were imported into Munki:
    Name   Version      Catalogs  Pkginfo Path                        Pkg Repo Path                     Icon Repo Path  
    ----   -------      --------  ------------                        -------------                     --------------  
    Nudge  2.0.5.81760  testing   apps/Nudge/Nudge-2.0.5.81760.plist  apps/Nudge/Nudge-2.0.5.81760.pkg

- Adds support for derive_minimum_os_version
- Adds PathDeleter
Adds a variable to aid in the creation of an Installs Array when downloading the Essentials pkg

See autopkg#16 for full explanation
Adds PathDeleter to tidy up unpacked files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant