Giter Club home page Giter Club logo

Comments (16)

hraban avatar hraban commented on July 19, 2024 1

Apparently it's osacompile:

$ /usr/bin/osacompile -o "Fooblub.app" -e "do shell script \"open '/bla/FooBlub.app'\""
.: replacing existing signature
$ echo $?
0

It's not really an error, just some pointless diagnostic message. I'm not sure what to do about it or what it even means, but I'm tempted to just leave it. I also can't find much info about it online..

Your non-0 exit is definitely a bigger problem and it seems unrelated to osacompile or that error. I've uploaded a debug build for you; can you retry your nix-darwin switch with --override-input mac-app-util github:hraban/mac-app-util/debug and paste the results here?

from mac-app-util.

hraban avatar hraban commented on July 19, 2024 1

Did you pin the latest update to the master branch? a387396 ?

from mac-app-util.

hraban avatar hraban commented on July 19, 2024

(this is assuming you-re using flakes--if not, fetch the debug branch and pin that in your config)

from mac-app-util.

joscha avatar joscha commented on July 19, 2024

Thanks @hraban!

Output is:

; /usr/bin/osacompile -o "/Users/joscha/Applications/Home Manager Trampolines/iTerm2.app" -e "do shell script \"open '/nix/store/1mc1y61nwzr27wi8a3dwsxbwq5kp4zlk-iterm2-3.4.23/Applications/iTerm2.app/'\""
.: replacing existing signature
; (find "/Users/joscha/Applications/Home Manager Trampolines/iTerm2.app/Contents/Resources/" -name "*.icns" -delete && rsync --include "*.icns" --exclude "*" --recursive /nix/store/1mc1y61nwzr27wi8a3dwsxbwq5kp4zlk-iterm2-3.4.23/Applications/iTerm2.app//Contents/Resources/ "/Users/joscha/Applications/Home Manager Trampolines/iTerm2.app/Contents/Resources/")
; mktemp -d
; (/usr/bin/plutil -convert json -- orig && /usr/bin/plutil -convert json -- bare-wrapper && jq --argjson keys "[\"CFBundleDevelopmentRegion\",\"CFBundleDocumentTypes\",\"CFBundleGetInfoString\",\"CFBundleIconFile\",\"CFBundleIdentifier\",\"CFBundleInfoDictionaryVersion\",\"CFBundleName\",\"CFBundleShortVersionString\",\"CFBundleURLTypes\",\"NSAppleEventsUsageDescription\",\"NSAppleScriptEnabled\",\"NSDesktopFolderUsageDescription\",\"NSDocumentsFolderUsageDescription\",\"NSDownloadsFolderUsageDescription\",\"NSPrincipalClass\",\"NSRemovableVolumesUsageDescription\",\"NSServices\",\"UTExportedTypeDeclarations\"]" "to_entries |[.[]| select(.key as \$item| \$keys | index(\$item) >= 0) ] | from_entries" < orig > filtered && (cat bare-wrapper filtered | jq -s add > final) && /usr/bin/plutil -convert xml1 -- final)
; /usr/bin/osacompile -o "/Users/joscha/Applications/Home Manager Trampolines/Teams.app" -e "do shell script \"open '/nix/store/1zlkp7jzf9pyizp4fbssi1z07xgsbch2-teams-1.6.00.4464/Applications/Teams.app/'\""
.: replacing existing signature
; (find "/Users/joscha/Applications/Home Manager Trampolines/Teams.app/Contents/Resources/" -name "*.icns" -delete && rsync --include "*.icns" --exclude "*" --recursive /nix/store/1zlkp7jzf9pyizp4fbssi1z07xgsbch2-teams-1.6.00.4464/Applications/Teams.app//Contents/Resources/ "/Users/joscha/Applications/Home Manager Trampolines/Teams.app/Contents/Resources/")
; mktemp -d
; (/usr/bin/plutil -convert json -- orig && /usr/bin/plutil -convert json -- bare-wrapper && jq --argjson keys "[\"CFBundleDevelopmentRegion\",\"CFBundleDocumentTypes\",\"CFBundleGetInfoString\",\"CFBundleIconFile\",\"CFBundleIdentifier\",\"CFBundleInfoDictionaryVersion\",\"CFBundleName\",\"CFBundleShortVersionString\",\"CFBundleURLTypes\",\"NSAppleEventsUsageDescription\",\"NSAppleScriptEnabled\",\"NSDesktopFolderUsageDescription\",\"NSDocumentsFolderUsageDescription\",\"NSDownloadsFolderUsageDescription\",\"NSPrincipalClass\",\"NSRemovableVolumesUsageDescription\",\"NSServices\",\"UTExportedTypeDeclarations\"]" "to_entries |[.[]| select(.key as \$item| \$keys | index(\$item) >= 0) ] | from_entries" < orig > filtered && (cat bare-wrapper filtered | jq -s add > final) && /usr/bin/plutil -convert xml1 -- final)
; /usr/bin/osacompile -o "/Users/joscha/Applications/Home Manager Trampolines/Visual Studio Code.app" -e "do shell script \"open '/nix/store/8anlgfshpf5048fpkbxxljd22f6ixxwk-vscode-1.89.1/Applications/Visual Studio Code.app/'\""
.: replacing existing signature
; (find "/Users/joscha/Applications/Home Manager Trampolines/Visual Studio Code.app/Contents/Resources/" -name "*.icns" -delete && rsync --include "*.icns" --exclude "*" --recursive "/nix/store/8anlgfshpf5048fpkbxxljd22f6ixxwk-vscode-1.89.1/Applications/Visual Studio Code.app//Contents/Resources/" "/Users/joscha/Applications/Home Manager Trampolines/Visual Studio Code.app/Contents/Resources/")
; mktemp -d
; (/usr/bin/plutil -convert json -- orig && /usr/bin/plutil -convert json -- bare-wrapper && jq --argjson keys "[\"CFBundleDevelopmentRegion\",\"CFBundleDocumentTypes\",\"CFBundleGetInfoString\",\"CFBundleIconFile\",\"CFBundleIdentifier\",\"CFBundleInfoDictionaryVersion\",\"CFBundleName\",\"CFBundleShortVersionString\",\"CFBundleURLTypes\",\"NSAppleEventsUsageDescription\",\"NSAppleScriptEnabled\",\"NSDesktopFolderUsageDescription\",\"NSDocumentsFolderUsageDescription\",\"NSDownloadsFolderUsageDescription\",\"NSPrincipalClass\",\"NSRemovableVolumesUsageDescription\",\"NSServices\",\"UTExportedTypeDeclarations\"]" "to_entries |[.[]| select(.key as \$item| \$keys | index(\$item) >= 0) ] | from_entries" < orig > filtered && (cat bare-wrapper filtered | jq -s add > final) && /usr/bin/plutil -convert xml1 -- final)
; /usr/bin/osacompile -o "/Users/joscha/Applications/Home Manager Trampolines/Slack.app" -e "do shell script \"open '/nix/store/vy7c18ar0m2nahgzs27i0giifm5jvfh4-slack-4.38.121/Applications/Slack.app/'\""
.: replacing existing signature
; (find "/Users/joscha/Applications/Home Manager Trampolines/Slack.app/Contents/Resources/" -name "*.icns" -delete && rsync --include "*.icns" --exclude "*" --recursive /nix/store/vy7c18ar0m2nahgzs27i0giifm5jvfh4-slack-4.38.121/Applications/Slack.app//Contents/Resources/ "/Users/joscha/Applications/Home Manager Trampolines/Slack.app/Contents/Resources/")
; mktemp -d
; (/usr/bin/plutil -convert json -- orig && /usr/bin/plutil -convert json -- bare-wrapper && jq --argjson keys "[\"CFBundleDevelopmentRegion\",\"CFBundleDocumentTypes\",\"CFBundleGetInfoString\",\"CFBundleIconFile\",\"CFBundleIdentifier\",\"CFBundleInfoDictionaryVersion\",\"CFBundleName\",\"CFBundleShortVersionString\",\"CFBundleURLTypes\",\"NSAppleEventsUsageDescription\",\"NSAppleScriptEnabled\",\"NSDesktopFolderUsageDescription\",\"NSDocumentsFolderUsageDescription\",\"NSDownloadsFolderUsageDescription\",\"NSPrincipalClass\",\"NSRemovableVolumesUsageDescription\",\"NSServices\",\"UTExportedTypeDeclarations\"]" "to_entries |[.[]| select(.key as \$item| \$keys | index(\$item) >= 0) ] | from_entries" < orig > filtered && (cat bare-wrapper filtered | jq -s add > final) && /usr/bin/plutil -convert xml1 -- final)
; (dockutil -L | grep /nix/store | grep persistentApps | cut -f 1)
; dockutil --add "/nix/store/8anlgfshpf5048fpkbxxljd22f6ixxwk-vscode-1.89.1/Applications/Visual Studio Code.app/" --replacing "Visual Studio Code"
adding /nix/store/8anlgfshpf5048fpkbxxljd22f6ixxwk-vscode-1.89.1/Applications/Visual Studio Code.app

and oddly exits zero?!

Maybe your build brings some updated dependencies in here:

• Updated input 'mac-app-util':
    'github:hraban/mac-app-util/b2d3667f3b8d650310e55b38d3c4a5f35949e1f6' (2024-03-10)
  → 'github:hraban/mac-app-util/38865c213447e7ce05730056791ff31109f1903e' (2024-06-10)
• Updated input 'mac-app-util/nixpkgs':
    'github:NixOS/nixpkgs/db339f1706f555794b71aa4eb26a5a240fb6a599' (2024-03-10)
  → 'github:NixOS/nixpkgs/cd18e2ae9ab8e2a0a8d715b60c91b54c0ac35ff9' (2024-06-08)
building the system configuration...
warning: not writing modified lock file of flake 'git+file:///Users/joscha/.config?ref=refs/heads/master&rev=6e95fb7e310a125a2df86c68ac6c219ecdda8d7c':
• Updated input 'mac-app-util':
    'github:hraban/mac-app-util/b2d3667f3b8d650310e55b38d3c4a5f35949e1f6' (2024-03-10)
  → 'github:hraban/mac-app-util/38865c213447e7ce05730056791ff31109f1903e' (2024-06-10)
• Updated input 'mac-app-util/nixpkgs':
    'github:NixOS/nixpkgs/db339f1706f555794b71aa4eb26a5a240fb6a599' (2024-03-10)
  → 'github:NixOS/nixpkgs/cd18e2ae9ab8e2a0a8d715b60c91b54c0ac35ff9' (2024-06-08)

?

Without the override (rerunning the switch after trying your debug build) it is still:

Activating trampolineApps
.: replacing existing signature
.: replacing existing signature
.: replacing existing signature
.: replacing existing signature
adding /nix/store/8anlgfshpf5048fpkbxxljd22f6ixxwk-vscode-1.89.1/Applications/Visual Studio Code.app
Could not kickstart service "com.apple.Dock.agent": 1: Operation not permitted

exiting non-zero.

adding /nix/store/8anlgfshpf5048fpkbxxljd22f6ixxwk-vscode-1.89.1/Applications/Visual Studio Code.app
Could not kickstart service "com.apple.Dock.agent": 1: Operation not permitted

has never shown up before I tried the debug build.

from mac-app-util.

hraban avatar hraban commented on July 19, 2024

This may be related to the new release of dockutils which I think fixed this bug.

Anyway good stuff!

from mac-app-util.

hraban avatar hraban commented on July 19, 2024

I'm gonna close this issue, lmk if you need to reopen it

from mac-app-util.

joscha avatar joscha commented on July 19, 2024

I'm gonna close this issue, lmk if you need to reopen it

it does still seem to happen after I reverted back away from the debug build. What am I doing wrong?

from mac-app-util.

joscha avatar joscha commented on July 19, 2024

Did you pin the latest update to the master branch? a387396 ?

I did now. Thank you!

from mac-app-util.

joscha avatar joscha commented on July 19, 2024

The issue started reappearing with the latest version:

Activating trampolineApps
.: replacing existing signature
.: replacing existing signature
.: replacing existing signature
.: replacing existing signature
adding /nix/store/aasaj3iwq7mk0jm0d227xvqva5jylyyc-vscode-1.90.2/Applications/Visual Studio Code.app

presumably the VSCode part is causing trouble. Unsure where exactly.

from mac-app-util.

joscha avatar joscha commented on July 19, 2024

just tried again with 63f269f after:

• Updated input 'mac-app-util':
    'github:hraban/mac-app-util/1857b26aceaf64c2b6a357eb83cf34139b6365cc' (2024-06-20)
  → 'github:hraban/mac-app-util/63f269f737cafb2219ba38780c1ecb1dc24bc4a2' (2024-07-02)

same thing

from mac-app-util.

hraban avatar hraban commented on July 19, 2024

"Replacing existing signature" was never a bug to solve in the first place; it's diagnostic output by osacompile which I don't control. The problem was the non-0 exit code, which should now be solved.

See #3 (comment)

from mac-app-util.

joscha avatar joscha commented on July 19, 2024

ah, sorry, I was not precise:

___config

from mac-app-util.

hraban avatar hraban commented on July 19, 2024

Interesting. What command exactly are you running? I can't repro this.

from mac-app-util.

joscha avatar joscha commented on July 19, 2024

Command is:

./result/sw/bin/darwin-rebuild switch --flake . --fallback

from within my config folder. Trying to see whether anything else could cause this. Thanks for double-checking.

from mac-app-util.

joscha avatar joscha commented on July 19, 2024

Trying to see whether anything else could cause this.

Found the culprit. A popd > /dev/null 2>&1 with an empty stack. Doesn't print anything, but exits non-zero 🙄 . Thanks for checking on your side, would have never found this without.

from mac-app-util.

hraban avatar hraban commented on July 19, 2024

🙌

I personally prefer using ( cd somedir ; ... <rest of script here> ) over pushd / popd precisely to avoid this type of syncing problems.

from mac-app-util.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.