Skip to content

#451: mac gatekeeper quarantine removal#1794

Open
shodiBoy1 wants to merge 5 commits intodevonfw:mainfrom
shodiBoy1:feature/451-mac-gatekeeper-quarantine-removal
Open

#451: mac gatekeeper quarantine removal#1794
shodiBoy1 wants to merge 5 commits intodevonfw:mainfrom
shodiBoy1:feature/451-mac-gatekeeper-quarantine-removal

Conversation

@shodiBoy1
Copy link
Copy Markdown
Contributor

This PR fixes #451

Implemented changes:


Checklist for this PR

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal

@shodiBoy1 shodiBoy1 self-assigned this Apr 1, 2026
@coveralls
Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 23855312848

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 116 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 70.651%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/io/FileAccessImpl.java 116 67.22%
Totals Coverage Status
Change from base Build 23822201076: 0.02%
Covered Lines: 10896
Relevant Lines: 14803

💛 - Coveralls

@shodiBoy1 shodiBoy1 marked this pull request as ready for review April 1, 2026 15:05
@shodiBoy1 shodiBoy1 requested a review from hohwille April 1, 2026 15:06
@shodiBoy1 shodiBoy1 moved this from 🆕 New to Team Review in IDEasy board Apr 1, 2026
@hohwille hohwille changed the title Feature/451 mac gatekeeper quarantine removal #451: mac gatekeeper quarantine removal Apr 2, 2026
Copy link
Copy Markdown
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shodiBoy1 thanks for your PR. Great that you are working on this nasty problem that is currently blocking Mac users and renders the UX of IDEasy on Mac void. 👍
Currently, I do not see the difference in the xattr compared to PR #453. Can you explain why this should fix the problem now? Have you tested this approach on MacOS and it worked for unsigned apps like e.g. IntelliJ?

FYI: Did you also see this comment? #451 (comment)
When we remove the quarantine attribute, MacOS protected the app directory and we cannot make any modifications to it after that. This IMHO implies that we cannot keep the current solution with the .ide.software.version file that we simply copy to the linkDir as a workaround. Maybe it could work if we do that before we remove the quarantine attribute?
Further, in PR #453 @jan-vcapgemini made a review comment that this xattr execution should be moved to MacOsHelper what makes sense to me and should be followed.

Comment on lines +12 to +19
* https://github.com/devonfw/IDEasy/issues/1747[#1747]: Fixed macOS x64 native image build using macos-15-intel runner
* https://github.com/devonfw/IDEasy/issues/1738[#1738]: FileAccess.delete no longer follows directory links during recursive delete
* https://github.com/devonfw/IDEasy/issues/1151[#1151]: Use uname -m for runtime architecture detection on Mac/Linux
* https://github.com/devonfw/IDEasy/issues/1770[#1770]: Fix setup hanging due to buffered log output during license prompt
* https://github.com/devonfw/IDEasy/issues/1771[#1771]: Maven version 3.9.1x are now available
* https://github.com/devonfw/IDEasy/issues/1647[#1647]: Fixed CVE detection for rancher desktop
* https://github.com/devonfw/IDEasy/issues/1363[#1363]: Tool uninstallation in force mode now also removes its plugins
* https://github.com/devonfw/IDEasy/issues/1687[#1687]: Fixed JLine warning about restricted method
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems something went wrong on conflict resolution.

Suggested change
* https://github.com/devonfw/IDEasy/issues/1747[#1747]: Fixed macOS x64 native image build using macos-15-intel runner
* https://github.com/devonfw/IDEasy/issues/1738[#1738]: FileAccess.delete no longer follows directory links during recursive delete
* https://github.com/devonfw/IDEasy/issues/1151[#1151]: Use uname -m for runtime architecture detection on Mac/Linux
* https://github.com/devonfw/IDEasy/issues/1770[#1770]: Fix setup hanging due to buffered log output during license prompt
* https://github.com/devonfw/IDEasy/issues/1771[#1771]: Maven version 3.9.1x are now available
* https://github.com/devonfw/IDEasy/issues/1647[#1647]: Fixed CVE detection for rancher desktop
* https://github.com/devonfw/IDEasy/issues/1363[#1363]: Tool uninstallation in force mode now also removes its plugins
* https://github.com/devonfw/IDEasy/issues/1687[#1687]: Fixed JLine warning about restricted method

postExtractHook(postExtractHook, properInstallDir);
move(properInstallDir, targetDir);
delete(tmpDir);
removeQuarantineAttribute(targetDir);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should only happen for an application. The extract function is generic and can also be used to extract a ZIP file with pure data or config that is not an application. Please note that the executed xattr command will typically trigger a popup with password request so this should only appear for applications (ideally only if they are not signed).
Please check PR #453 where this was already done in the right place.

Comment on lines +726 to +727
ProcessResult result = this.context.newProcess().executable("xattr")
.addArgs("-r", "-d", "com.apple.quarantine", path).run(ProcessMode.DEFAULT_SILENT);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks exactly like what I did in PR #453. However, I tested my solution and it did not work.
Am I missing something or why should it work now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Make IDEasy usable on MacOS with active Gatekeeper

3 participants