Skip to content

Commit

Permalink
fix(krun): dylib is read-only (#7)
Browse files Browse the repository at this point in the history
When updating the app, if the dylib permissions are read-only, it will
cause the app to fail to upgrade properly.

```txt
2024-11-04 14:46:50.214 ShipIt[44770:18196933]
Installation error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"
UserInfo={NSURL=file:///private/var/folders/v0/ny8b4zlj5kvb99qgb61mxyt00000gn/T/com.oomol.studio.ShipIt.8cxGhqSN/OOMOL%20Studio.app/Contents/Resources/app/node_modules/@oomol-lab/ovm/vm-resources/libexec/libkrun-efi.dylib,
NSLocalizedDescription=Permission denied,
NSLocalizedFailureReason=Couldn't remove quarantine attribute from "/private/var/folders/v0/ny8b4zlj5kvb99qgb61mxyt00000gn/T/com.oomol.studio.ShipIt.8cxGhqSN/OOMOL Studio.app/Contents/Resources/app/node_modules/@oomol-lab/ovm/vm-resources/libexec/libkrun-efi.dylib".
This most likely means the file is read-only.}
```

Signed-off-by: Kevin Cui <[email protected]>
  • Loading branch information
BlackHole1 authored Nov 4, 2024
1 parent 04e808d commit e76601d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ codesign --force --sign $CODESIGN_IDENTITY --options=runtime --timestamp $WORK/o
echo "Signing krunkit..."
codesign --force --sign $CODESIGN_IDENTITY --options=runtime --timestamp --entitlements krunkit.entitlements $WORK/out/krunkit

find $WORK/out -name "*.dylib" -type f -exec sh -c "echo 'Set {} permission to 755'; chmod 755 {}" ';'
find $WORK/out -name "*.dylib" -type f -exec sh -c "echo 'Signing {}...'; codesign --force --sign $CODESIGN_IDENTITY --options=runtime --timestamp {}" ';'

# pack
Expand Down

0 comments on commit e76601d

Please sign in to comment.