Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#20137 closed defect (othersoftware)

brew cask produce corrupted josm binary

Reported by: andygol Owned by: andygol
Priority: normal Milestone:
Component: Installer MacOS Version: tested
Keywords: macos homebrew cask Cc:


One more attempt to upgrade JOSM with brew cask produced a corrupted JOSM binary for me again. (see prev ticket #19659)

➜ brew cask upgrade josm
Warning: Calling brew cask upgrade is deprecated! Use brew upgrade --cask instead.
==> Upgrading 1 outdated package:
josm 17013 -> 17329
==> Upgrading josm
==> Caveats
josm requires Java 8+. You can install the latest version with:
  brew cask install adoptopenjdk

==> Downloading
Already downloaded: /Users/andygol/Library/Caches/Homebrew/downloads/
==> Backing App '' up to '/usr/local/Caskroom/josm/17013/'.
==> Removing App '/Applications/'.
unzip -o /Users/andygol/Library/Caches/Homebrew/downloads/ -d /var/folders/r4/wnxtr9qn677csvrqyh6z8fzw0000gn/T/d20201123-34188-6avi9h
cp -pR /var/folders/r4/wnxtr9qn677csvrqyh6z8fzw0000gn/T/d20201123-34188-6avi9h/LICENSE /usr/local/Caskroom/josm/17329/LICENSE
cp -pR /var/folders/r4/wnxtr9qn677csvrqyh6z8fzw0000gn/T/d20201123-34188-6avi9h/README /usr/local/Caskroom/josm/17329/README
cp -pR /var/folders/r4/wnxtr9qn677csvrqyh6z8fzw0000gn/T/d20201123-34188-6avi9h/ /usr/local/Caskroom/josm/17329/
cp -pR /var/folders/r4/wnxtr9qn677csvrqyh6z8fzw0000gn/T/d20201123-34188-6avi9h/CONTRIBUTION /usr/local/Caskroom/josm/17329/CONTRIBUTION
chmod -Rf +w /var/folders/r4/wnxtr9qn677csvrqyh6z8fzw0000gn/T/d20201123-34188-6avi9h
==> Moving App '' to '/Applications/'.
==> Purging files for version 17013 of Cask josm
🍺  josm was successfully upgraded!

The steps mentioned in do not solve the issue.

Possible solution is to provide *.dmg along with *.zip (see #19803) and use *.dmg package to upgrade josm using brew.

Attachments (0)

Change History (9)

comment:1 Changed 3 months ago by Don-vip

Owner: changed from Stereo to andygol
Status: assignedneedinfo

Please report this to the people who maintain brew cask, we don't.

comment:2 Changed 3 months ago by Don-vip

Component: CoreInstaller MacOS

comment:4 Changed 3 months ago by Stereo

The plan, once I reliably get github action to build releases, is to automate the Homebrew pull request:

comment:5 Changed 3 months ago by Stereo

Keywords: macos homebrew cask added
Resolution: othersoftware
Status: needinfoclosed

comment:6 Changed 3 months ago by Stereo

Is the cask you're using ? It doesn't mention 17329.

comment:7 Changed 3 months ago by Stereo fixed homebrew cask.

The next release will hopefully be on openstreetmap/josm instead of grischard/josm, so once more a simple version bump won't work. It should be smooth sailing after that.

comment:8 Changed 3 months ago by andygol

I've checked this new package and it works. But its size 89.2 Mb instead of 14 Mb for just bare app. Is there an option to have less duplicated pieces in the system?

➜ brew cask reinstall josm
Warning: Calling brew cask reinstall is deprecated! Use brew reinstall instead.
==> Downloading
Already downloaded: /Users/andygol/Library/Caches/Homebrew/downloads/
==> Uninstalling Cask josm
==> Backing App '' up to '/usr/local/Caskroom/josm/17329/'.
==> Removing App '/Applications/'.
==> Purging files for version 17329 of Cask josm
==> Installing Cask josm
==> Moving App '' to '/Applications/'.
🍺  josm was successfully installed!

comment:9 Changed 3 months ago by Stereo

Yeah, if you want, you can always grab the .jar and run it manually with java -jar josm.jar. Grab it from my github, it's even smaller.

Jpackage doesn't support other ways of distributing the app, and most people don't have a full java environment on their Mac these days. By including just a subset, it will save space for the majority of people.

If space on your Mac is tight, you can try compressing stuff with It works really well on the junk in my Downloads folder, for example.

Finally, to put things into perspective, Apple currently charges $0.80 per GB for SSD storage on new Macs. The space taken by the bundled JRE in costs a bit more than half a cent. takes less space than just the Electron framework in Javascript apps.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain andygol.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.