Skip to content

#2467: fix Obsidian installation on macOS/Linux and duplicate linux_x64 URL - #2610

Open
Ali-Shariati-Najafabadi wants to merge 10 commits into
devonfw:mainfrom
Ali-Shariati-Najafabadi:feature/2467-fix-obsidian-install-macos-linux
Open

Ali-Shariati-Najafabadi wants to merge 10 commits into
devonfw:mainfrom
Ali-Shariati-Najafabadi:feature/2467-fix-obsidian-install-macos-linux

Conversation

@Ali-Shariati-Najafabadi

@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

This PR fixes #2467

Implemented changes:

  • ObsidianUrlUpdater: only the tar.gz archive is registered for LINUX/X64 (the .deb registration was dropped), so x64 and arm64 use the same artifact type and no package manager is needed.
  • Obsidian on macOS: the Obsidian.app bundle is taken out of the DMG and persisted in ~/Applications/Obsidian.app instead of being executed once from a temp dir and deleted (this also fixes the Permission denied error from the issue comment). The installed version is read from Contents/Info.plist.
  • Obsidian on Linux: the archive is extracted and persisted in ~/.local/share/obsidian, the installed version is recorded in .ide.software.version. uninstall removes that folder.
  • An existing installation is now detected on macOS/Linux (getInstalledVersion()), so a repeated install is skipped, and the tool is launched from the persisted installation.
  • GlobalToolCommandlet.findMacApplicationBundle() is now protected and looks into ~/Applications first, then /Applications. Note: this also affects the macOS uninstall of other global tools (Docker, pgAdmin) if a bundle exists in both folders.
  • Windows behaviour is unchanged.

Testing instructions

  1. Run mvn -Dtest=ObsidianTest test in cli and mvn -Dtest=ObsidianUrlUpdaterTest test in url-updater.
  2. On macOS run ide install obsidian: ~/Applications/Obsidian.app exists afterwards and ide obsidian launches it. Running ide install obsidian again reports that the version is already installed.
  3. On Linux run ide install obsidian: ~/.local/share/obsidian/obsidian exists afterwards and ide obsidian launches it.
  4. Run ide uninstall obsidian on both: the installation is removed.

Note: the real installation on macOS/Linux (steps 2-4) has not been verified manually yet, only via the automated tests with mocked downloads.


Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • 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 and not feature/921 fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summaries 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 labelled
    with internal
  • You have not changed any dependency in pom.xml files or otherwise if runtime dependencies changed, you have updated our LICENSE.asciidoc
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

…sidian-install-macos-linux

# Conflicts:
#	CHANGELOG.adoc
#	cli/src/main/java/com/devonfw/tools/ide/tool/GlobalToolCommandlet.java
@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi added urls ide-urls repo and related processes and features macOS specific for Apple MacOS linux specific for linux OS (debian, ubunutu, suse, etc.) install installation process of IDE + tools and install commandlet obsidian labels Oct 4, 2026
@coveralls

coveralls commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 41042684914

Coverage decreased (-0.01%) to 75.278%

Details

  • Coverage decreased (-0.01%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 25 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

25 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/obsidian/Obsidian.java 21 69.29%
com/devonfw/tools/ide/url/updater/AbstractUrlUpdater.java 4 82.92%

Coverage Stats

Coverage Status
Relevant Lines: 19993
Covered Lines: 15711
Line Coverage: 78.58%
Relevant Branches: 8896
Covered Branches: 6036
Branch Coverage: 67.85%
Branches in Coverage %: Yes
Coverage Strength: 3.38 hits per line

💛 - Coveralls

@laim2003 laim2003 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @Ali-Shariati-Najafabadi, thanks for your PR! However, there are still some issues with the installation on Linux:

lukasfaber@LDE-1H862128LW:~/projects/ideasy/workspaces/main/IDEasy$ ide install obsidian
No CVEs found for version 1.14.4 of tool obsidian.
Trying to download obsidian-1.14.4-linux-x64.deb from https://github.com/obsidianmd/obsidian-releases/releases/download/v1.14.4/obsidian_1.14.4_amd64.deb
Downloading 100% │███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████│ 103/103MiB (0:00:06 / 0:00:00) 17.2MiB/s
SHA-256 checksum 85b10dcba6edfc1c0460a6d18260cf31c30447a444bd858a6440b9c9c8806d25 is correct.
Logfile can be found at /home/lukasfaber/projects/_ide/logs/2026/10/15/ideasy-ide-install-13-14-00.log
An unexpected error occurred!
We are sorry for the inconvenience.
Please check the error below, resolve it and try again.
If the error is not on your end (network connectivity, lack of permissions, etc.) please file a bug:
https://github.com/devonfw/IDEasy/issues/new?template=bug_report.yml&title=IllegalStateException%3A+Unknown+archive+format+deb.+Can+not+extract+%2Fhome%2Flukasfaber%2FDownloads%2Fide%2Fdefault%2Fobsidian-1.14.4-linux-x64.deb
java.lang.IllegalStateException: Unknown archive format deb. Can not extract /home/lukasfaber/Downloads/ide/default/obsidian-1.14.4-linux-x64.deb
        at com.devonfw.tools.ide.io.FileAccessImpl.extract(FileAccessImpl.java:739)
        at com.devonfw.tools.ide.io.FileAccess.extract(FileAccess.java:199)
        at com.devonfw.tools.ide.io.FileAccess.extract(FileAccess.java:189)
        at com.devonfw.tools.ide.tool.obsidian.Obsidian.installLinux(Obsidian.java:117)
        at com.devonfw.tools.ide.tool.obsidian.Obsidian.doInstall(Obsidian.java:82)
        at com.devonfw.tools.ide.tool.AbstractToolCommandlet.install(AbstractToolCommandlet.java:353)
        at com.devonfw.tools.ide.commandlet.InstallCommandlet.doRun(InstallCommandlet.java:89)
        at com.devonfw.tools.ide.commandlet.AbstractCommandlet.run(AbstractCommandlet.java:237)
        at com.devonfw.tools.ide.context.AbstractIdeContext.applyAndRun(AbstractIdeContext.java:1535)
        at com.devonfw.tools.ide.context.AbstractIdeContext.run(AbstractIdeContext.java:1308)
        at com.devonfw.tools.ide.cli.Ideasy.runOrThrow(Ideasy.java:92)
        at com.devonfw.tools.ide.cli.Ideasy.run(Ideasy.java:56)
        at com.devonfw.tools.ide.cli.Ideasy.main(Ideasy.java:138)
        at java.base@25.0.2/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)


Error: IDEasy failed with exit code 255

The issue is that the existing URLs repository still containts the "old" *.deb link. See my inline comments below to understand why we should probably keep the installation via the *.deb files.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion: instead of converting or installing via .tar.gz, download and install the existing .deb package and let the system package manager handle installation.

Concretely:

  • Use the .deb artifact (as the previous URL-updater did) rather than producing or installing a .tar.gz.
  • Install the downloaded .deb with the platform tools (for example apt install ./package.deb or dpkg -i package.deb followed by apt-get -f install) so the package manager resolves dependencies, sets permissions, and registers the package correctly.
  • Fall back to a tarball only if no official .deb is available.

This keeps installation and uninstallation consistent with the Linux platform and other Tools that also have *.deb file installations (e.g. Docker), uses package metadata correctly, and avoids reinventing package-management behavior in the installer. See the related discussion here: #2362 (comment)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'd keep the tarball. There is no arm64 .deb (only amd64), so the tarball path is needed anyway, and with the .deb first we would have two install and uninstall paths plus sudo, which also doesn't work on non-Debian distros.

The error in your log comes from ide-urls: linux_x64 still points to the .deb there for 28 of 29 versions. The updater can't add the tar.gz to that urls file because the checksum differs from the one stored for the .deb, and it only removes URLs that are broken for a long time. So the old linux_x64 files for obsidian in ide-urls have to be cleaned up either way.

If you still prefer .deb first with the tarball as fallback, tell me and I will rework it like Docker.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The error in your log comes from ide-urls: linux_x64 still points to the .deb there for 28 of 29 versions. The updater can't add the tar.gz to that urls file because the checksum differs from the one stored for the .deb, and it only removes URLs that are broken for a long time. So the old linux_x64 files for obsidian in ide-urls have to be cleaned up either way.

You're right, that is probably the better way to do it. However in that case, we should cleanup the URLs in the ide-urls repository before merging this PR, otherwise we will again break this feature for existing users.

If you still prefer .deb first with the tarball as fallback, tell me and I will rework it like Docker.

no, I think we should do it like you said in the comment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed, thanks. The cleanup is needed for the 28 obsidian versions that still have the .deb in linux_x64 (all but 1.6.5). I would replace the content instead of deleting: put the tar.gz URL into linux_x64.urls and its checksum into linux_x64.urls.sha256. Then it works with the old and the new updater and there is no gap for Linux. Just deleting would leave Linux without a URL until the next run, and a run with the old code would add the .deb again. I have no write access to ide-urls, could you or one of the maintainers do it? I can prepare the list with URLs and checksums.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes I can do that, just send me the list via Teams or paste it here

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

Labels

install installation process of IDE + tools and install commandlet linux specific for linux OS (debian, ubunutu, suse, etc.) macOS specific for Apple MacOS obsidian urls ide-urls repo and related processes and features

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Obsidian: fix installation on macOS/Linux and duplicate LINUX/X64 artifact in ObsidianUrlUpdater

3 participants