Commit Graph

4479 Commits

Author SHA1 Message Date
Greg Neagle
d65b1d1b70 Fix processing of LocalOnlyManifest. Addresses #1270 2025-09-25 09:03:50 -07:00
Greg Neagle
f9dcb96be9 swiftformat re-format 2025-09-24 13:41:45 -07:00
Wesley Whetstone
a7cafd0204 add AssociatedBundleIdentifiers to helper launchds (#1269)
Authored-by: Wesley Whetstone <wesw@stripe.com>
2025-09-24 13:38:39 -07:00
Greg Neagle
93b9c8586c Remove MWA2APIRepo code; moving to another repo. Fix for RepoProtocol definition for consistency 2025-09-23 15:05:10 -07:00
Greg Neagle
e498022578 Addresses #1267 where removals might consider/process the same item multiple times 2025-09-19 13:20:54 -07:00
Greg Neagle
9c3d199ff3 Update autorun pkg postinstall script (simpler now that supervisor has been removed) 2025-09-18 16:11:26 -07:00
Greg Neagle
c56cfa5244 Update help text for managedsoftwareupdate --auto 2025-09-18 15:42:42 -07:00
Greg Neagle
2744cd6fc5 Update sidebar and Dock icon badge with update count at launch when displaying the initial view 2025-09-16 17:17:03 -07:00
Greg Neagle
8b6833edd9 Request authorization from UNUserNotificationCenter to display app icon badges. Addresses #1255 2025-09-16 17:04:02 -07:00
Greg Neagle
67bf008bd9 Restore pre-testing version of make_swift_munki_pkg.sh script 2025-09-15 08:20:56 -07:00
Greg Neagle
cd662dde34 Removing GitHub Actions test script 2025-09-15 08:18:49 -07:00
Greg Neagle
f2eecbf133 Minor update to the app icon 2025-09-13 19:45:55 -07:00
Greg Neagle
dd176b147c Add icons to Navigate menu items in macOS 26 2025-09-12 13:23:26 -07:00
Greg Neagle
fd017d1824 Move Swift runtime library needed on macOS < 12 to /usr/local/munki/lib (previously installed at /usr/local/lib) 2025-09-11 14:38:51 -07:00
Greg Neagle
b19e9e748e Move 'internal' tools to /usr/local/munki/libexec 2025-09-11 14:21:13 -07:00
Greg Neagle
3fe773fe60 Update build scripts to not attempt to build supervisor 2025-09-10 15:55:52 -07:00
Greg Neagle
2a4f2ffbec Changes to get rid of supervisor 2025-09-10 15:51:19 -07:00
Greg Neagle
5737016794 Temporary test script for testing a GitHub Actions issue 2025-09-06 09:58:27 -07:00
Greg Neagle
640f535ca1 Skip App Store-specific processing when compiling the AssetCatalog 2025-09-06 08:23:58 -07:00
Greg Neagle
11b40025af Temporary change to make_swift_munki_pkg.sh for GitHub actions testing 2025-09-06 07:47:28 -07:00
Greg Neagle
5748e687b3 Fix for 'manifestutil version' to print full version number 2025-09-05 14:46:32 -07:00
Greg Neagle
0d3d2ee4ed Another attempt to address #1264 (unexpected alert that managedsoftwareupdate has ended unexpectedly) 2025-09-05 13:41:52 -07:00
Greg Neagle
e714582b2f When (re-)signing the command line tools, preserve entitlements on core tools as well as admin tools 2025-09-05 08:16:22 -07:00
Greg Neagle
46b487fe61 Another attempt to preserve the com.apple.security.cs.disable-library-validation entitlement when (re-)signing 2025-09-04 17:37:00 -07:00
Greg Neagle
cfd481f278 Explictly set RPATHs for command line tools so libswift_Concurrency.dylib is found on pre-macOS 12 2025-09-04 16:45:45 -07:00
Greg Neagle
09a46efd55 Attempt to address #1264 2025-09-04 14:51:04 -07:00
Greg Neagle
bad5e1ed75 Don't inject com.apple.security.get-task-allow entitlement when building for release, so code can be notarized 2025-09-04 13:47:07 -07:00
Greg Neagle
e6220a779b Attempt to preserve entitlements when signing the command-line tools 2025-09-04 12:00:22 -07:00
Greg Neagle
bf892e2035 Attempt to sign app Content/Frameworks only if that dir exists 2025-09-04 10:26:53 -07:00
Elliot Jordan
41e6d38cc5 Spelling fixes for Munki 7 branch (#1263)
* Fix SidebarViewController.swift file name

* Fix spelling in comments

* Fix spelling in strings and output

* Fix spelling in variables and key names

* One more pass at spelling fixes
2025-08-27 12:27:12 -07:00
Greg Neagle
d92e30f7ef make_swift_munki_pkg.sh: Fix version calculation for python libs package 2025-08-26 09:38:39 -07:00
Greg Neagle
d100d682e4 Bump python libraries version to match 6.7.0 release 2025-08-25 16:39:11 -07:00
Greg Neagle
0a1c9946ec Don't accidentally try to trigger a logout when replacing an existing forced logout warning with a new one when there are 5 minutes or less until forced logout time 2025-08-25 16:22:30 -07:00
Greg Neagle
395ab2a08d Fix forceLogoutNow logic 2025-08-25 14:02:29 -07:00
Greg Neagle
1c109d384d Add sucatalog URL for macOS 26 2025-08-25 10:51:18 -07:00
Greg Neagle
42bc8327ab Address an issue where MSC.app doesn't gracefully quit when a user choose to logout and update in response to a forced logout warning 2025-08-25 10:36:10 -07:00
Greg Neagle
b66ef898cb Fix for forced logout warning alerts not appearing 2025-08-25 10:03:00 -07:00
Greg Neagle
a49189d39a Address unhandled objc error when runCLIAsync can't launch a script due to a missing script interpreter 2025-08-25 09:29:45 -07:00
Greg Neagle
bb120ec234 Fix for MSC.app crash on macOS 10.15 (and maybe macOS 11) 2025-08-24 16:10:47 -07:00
Greg Neagle
c23962614e Address crashing issues for command-line tools on macOS 10.15 (and hopefully macOS 11) with a package that installs the Swift concurrency dylib on those OSes 2025-08-23 19:56:25 -07:00
Greg Neagle
711c899b1f Merge branch 'Munki7dev' into custom-sidebar 2025-08-15 10:50:59 -07:00
Greg Neagle
475b436775 Update Swift code to match chnage in Python code in commit a04b455 and commit 522ee66 2025-08-15 10:50:32 -07:00
Greg Neagle
7d260ed4ca Merge branch 'Munki7dev' into custom-sidebar 2025-08-15 10:35:11 -07:00
Greg Neagle
6ce2321a4a Reduce code duplication in pkginfolib.getiteminfo 2025-08-15 10:34:29 -07:00
Paul Cossey
547e297c53 Update pkginfolib.py (#1258)
# Pull Request: Fix incomplete metadata extraction for audio plugins and other bundles

## Problem Summary

The `getiteminfo()` function in `pkginfolib.py` currently provides inconsistent metadata extraction between applications (.app files) and other bundle types (audio plugins like .vst, .component, .aaxplugin, .vst3).

**Current behavior:**
-  **Applications (.app)**: Extract comprehensive metadata including `CFBundleName`, `CFBundleIdentifier`, `CFBundleShortVersionString`, `CFBundleVersion`, and `LSMinimumSystemVersion`
-  **Other bundles**: Only extract `CFBundleShortVersionString` and `CFBundleVersion`

This results in incomplete installs arrays for audio plugins and other bundle types, missing critical metadata for proper tracking and identification.

## Impact

Audio plugin packages (and other non-application bundles) generate installs array entries like this:

**Before (incomplete):**
```xml
<dict>
    <key>CFBundleVersion</key>
    <string>4.5</string>
    <key>path</key>
    <string>/Library/Audio/Plug-Ins/VST/BC Chorus 4 VST(Mono).vst</string>
    <key>type</key>
    <string>bundle</string>
    <key>version_comparison_key</key>
    <string>CFBundleVersion</string>
</dict>
```

**After (complete):**
```xml
<dict>
    <key>CFBundleIdentifier</key>
    <string>com.bluecataudio.bc-chorus-4-vst-mono-</string>
    <key>CFBundleVersion</key>
    <string>4.5</string>
    <key>minosversion</key>
    <string>10.9</string>
    <key>path</key>
    <string>/Library/Audio/Plug-Ins/VST/BC Chorus 4 VST(Mono).vst</string>
    <key>type</key>
    <string>bundle</string>
    <key>version_comparison_key</key>
    <string>CFBundleVersion</string>
</dict>
```

## Root Cause

In the `getiteminfo()` function, the bundle handling section only extracts version-related keys:

```python
# Current problematic code
for key in ['CFBundleShortVersionString', 'CFBundleVersion']:
    if key in plist:
        infodict[key] = plist[key]
```

While the application handling section extracts comprehensive metadata:

```python
# Application code (working correctly)
for key in ['CFBundleName', 'CFBundleIdentifier',
            'CFBundleShortVersionString', 'CFBundleVersion']:
    if key in plist:
        infodict[key] = plist[key]
# Plus LSMinimumSystemVersion handling
```

## Solution

Align bundle metadata extraction with application metadata extraction by expanding the bundle handling section to extract the same keys and minimum OS version information.

## Files Changed

- `code/client/munkilib/pkginfolib.py` - Modified `getiteminfo()` function

## Changes Made

**Modified bundle handling section in `getiteminfo()` function:**

```python
elif (os.path.exists(os.path.join(itempath, 'Contents', 'Info.plist')) or
      os.path.exists(os.path.join(itempath, 'Resources', 'Info.plist'))):
    infodict['type'] = 'bundle'
    infodict['path'] = itempath
    plist = pkgutils.getBundleInfo(itempath)
    # Extract the same keys as applications
    for key in ['CFBundleName', 'CFBundleIdentifier',
                'CFBundleShortVersionString', 'CFBundleVersion']:
        if key in plist:
            infodict[key] = plist[key]
    # Also extract minimum OS version info like applications
    if 'LSMinimumSystemVersion' in plist:
        infodict['minosversion'] = plist['LSMinimumSystemVersion']
    elif 'LSMinimumSystemVersionByArchitecture' in plist:
        # just grab the highest version if more than one is listed
        versions = [item[1] for item in
                    plist['LSMinimumSystemVersionByArchitecture'].items()]
        highest_version = str(max([pkgutils.MunkiLooseVersion(version)
                                   for version in versions]))
        infodict['minosversion'] = highest_version
    elif 'SystemVersionCheck:MinimumSystemVersion' in plist:
        infodict['minosversion'] = \
            plist['SystemVersionCheck:MinimumSystemVersion']
```

## Benefits

1. **Consistent metadata extraction**: All bundle types now get the same comprehensive metadata as applications
2. **Better plugin tracking**: Audio plugins (.vst, .component, .aaxplugin, .vst3) now have unique identifiers
3. **Improved OS compatibility**: Minimum OS version detection for all bundle types
4. **Enhanced debugging**: More metadata available for troubleshooting installs array issues
5. **Future-proof**: Any bundle type with standard Info.plist structure will benefit

## Affected Bundle Types

This fix applies to all bundle types that aren't applications, including:
- Audio Unit Components (`.component`)
- VST Plugins (`.vst`)
- VST3 Plugins (`.vst3`)
- AAX Plugins (`.aaxplugin`)
- Other macOS bundles with Info.plist files

## Testing

Verified with Blue Cat Audio plugins that all plugin formats now extract:
- `CFBundleIdentifier` (when present)
- `CFBundleName` (when present, particularly in AAX plugins)
- `LSMinimumSystemVersion` converted to `minosversion`
- Existing version extraction continues to work
- Some AutoPkg Recipe's that can be used for testing
-- https://github.com/autopkg/dataJAR-recipes/tree/master/Blue%20Cat%20Chorus
-- https://github.com/autopkg/dataJAR-recipes/tree/master/Blue%20Cat%20Flanger
-- https://github.com/autopkg/dataJAR-recipes/tree/master/Blue%20Cat%20Free%20Amp
-- https://github.com/autopkg/dataJAR-recipes/tree/master/Blue%20Cat%20Freeceiver
-- https://github.com/autopkg/dataJAR-recipes/tree/master/Blue%20Cat%20FreqAnalyst
-- https://github.com/autopkg/dataJAR-recipes/tree/master/Blue%20Cat%20Gain%20Suite
-- https://github.com/autopkg/dataJAR-recipes/tree/master/Blue%20Cat%20Phaser
-- https://github.com/autopkg/dataJAR-recipes/tree/master/Blue%20Cat%20Triple%20EQ
2025-08-15 10:34:29 -07:00
Greg Neagle
fea10ce591 Fix an AutoLayout constraint issue 2025-08-14 15:24:05 -07:00
Greg Neagle
76e7329ec0 remove some old debugging print statements 2025-08-14 15:19:41 -07:00
Greg Neagle
7f15474c92 Remove (again) the background extension view for macOS 26 2025-08-14 10:47:40 -07:00
Greg Neagle
76d5824f73 Xcode project updates for Xcode 26 2025-08-14 09:47:21 -07:00
Greg Neagle
02d43cce85 Remove background extension view that provided illusion of content under the sidebar on macOS 26 2025-08-14 09:38:19 -07:00