rio / features

A collection of devcontainer features
MIT License
21 stars 2 forks source link

Chezmoi installation failing due to changed checksum format #51

Open iaingalloway opened 1 month ago

iaingalloway commented 1 month ago

Similar to previous issues - e.g. #47 - installation of Chezmoi is currently failing when a specific version is used, due to the checksum file not being in the place install.sh expects it:

Installing using latest:

[2024-06-04T09:23:57.327Z] #23 0.361 ===========================================================================
#23 0.361 Feature       : Chezmoi Dotfile Manager
#23 0.361 Description   : Manage your dotfiles across multiple diverse machines, securely.
#23 0.361 Id            : ghcr.io/rio/features/chezmoi
#23 0.361 Version       : 1.1.0
#23 0.361 Documentation : 
#23 0.361 Options       :
#23 0.361     VERSION="latest"
#23 0.361 ===========================================================================

[2024-06-04T09:23:57.479Z] #23 0.362 Installing chezmoi latest for amd64 ...

[2024-06-04T09:23:58.944Z] #23 1.978 Downloading checksums https://github.com/twpayne/chezmoi/releases/download/v2.48.2/chezmoi_2.48.2_checksums.txt ...
...

Installing using a specific version:

[2024-06-04T09:27:16.692Z] #23 0.288 ===========================================================================
#23 0.288 Feature       : Chezmoi Dotfile Manager
#23 0.288 Description   : Manage your dotfiles across multiple diverse machines, securely.
#23 0.288 Id            : ghcr.io/rio/features/chezmoi
#23 0.288 Version       : 1.1.0
#23 0.288 Documentation : 
#23 0.288 Options       :
#23 0.288     VERSION="2.48.2"
#23 0.288 ===========================================================================

[2024-06-04T09:27:16.845Z] #23 0.289 Installing chezmoi 2.48.2 for amd64 ...
#23 0.289 Downloading checksums https://github.com/twpayne/chezmoi/releases/download/v2.48.2/checksums.txt ...

[2024-06-04T09:27:16.900Z] #23 0.495 https://github.com/twpayne/chezmoi/releases/download/v2.48.2/checksums.txt:
#23 0.495 2024-06-04 09:27:16 ERROR 404: Not Found.
...

I think the probelm is here: https://github.com/rio/features/blob/86c162ae604995b821c8ee854fff700f62d0f785/src/chezmoi/install.sh#L49

I could submit a PR to change that filename to match the new format, but I thought I would report the issue instead in case you prefer a more robust solution like the one on line 53.

rio commented 1 month ago

Thanks for the nice and detailed issue! These things really help. And you're right, I don't like quick patches, I like structural solutions. Or at least something of the sort ;)

I'll figure out where the change in naming happened and add a way to compensate for the change for anything new than that.