Closed stonevil closed 1 year ago
Looks like chezmoi trying to interpret yaml file inside tar.gz like golang template.
No, the problem is in the error message:
chezmoi: .local/lima: https://github.com/lima-vm/lima/releases/download/v0.15.0/lima-0.15.0-Linux-x86_64.tar.gz: ./share/lima/examples/oraclelinux.yaml: unsupported typeflag '1'
According to Go's documentation, typeflag 1
in tar archives are hard links. You can verify this with tar
:
$ tar tzvf lima-0.15.0-Linux-x86_64.tar.gz | grep ^h
hrw-r--r-- runner/docker 0 2023-02-28 13:25 ./share/lima/examples/oraclelinux.yaml link to ./share/lima/examples/oraclelinux-9.yaml
hrw-r--r-- runner/docker 0 2023-02-28 13:25 ./share/lima/examples/rocky.yaml link to ./share/lima/examples/rocky-9.yaml
hrw-r--r-- runner/docker 0 2023-02-28 13:25 ./share/lima/examples/centos-stream-9.yaml link to ./share/lima/examples/centos-stream.yaml
hrw-r--r-- runner/docker 0 2023-02-28 13:25 ./share/lima/examples/almalinux-9.yaml link to ./share/lima/examples/almalinux.yaml
~/src/github.com/twpayne/chezmoi master *5 ?1
chezmoi does not support hardlinks.
Possible workarounds:
tar
, rather than using a chezmoi external,Looks like chezmoi trying to interpret yaml file inside tar.gz like golang template.
No, the problem is in the error message:
chezmoi: .local/lima: https://github.com/lima-vm/lima/releases/download/v0.15.0/lima-0.15.0-Linux-x86_64.tar.gz: ./share/lima/examples/oraclelinux.yaml: unsupported typeflag '1'
According to Go's documentation, typeflag
1
in tar archives are hard links. You can verify this withtar
:$ tar tzvf lima-0.15.0-Linux-x86_64.tar.gz | grep ^h hrw-r--r-- runner/docker 0 2023-02-28 13:25 ./share/lima/examples/oraclelinux.yaml link to ./share/lima/examples/oraclelinux-9.yaml hrw-r--r-- runner/docker 0 2023-02-28 13:25 ./share/lima/examples/rocky.yaml link to ./share/lima/examples/rocky-9.yaml hrw-r--r-- runner/docker 0 2023-02-28 13:25 ./share/lima/examples/centos-stream-9.yaml link to ./share/lima/examples/centos-stream.yaml hrw-r--r-- runner/docker 0 2023-02-28 13:25 ./share/lima/examples/almalinux-9.yaml link to ./share/lima/examples/almalinux.yaml ~/src/github.com/twpayne/chezmoi master *5 ?1
chezmoi does not support hardlinks.
Possible workarounds:
- Either, unpack the tarball with
tar
, rather than using a chezmoi external,- Or, contact the developers of lima-vm/lima and ask them to release tarballs with symbolic links or copies of the files instead of hardlinks.
Oh, ok. Thanks.
Describe the bug
externals fail unpack tar archive with .yaml files inside
To reproduce
Example of the .chezmoiexternal.toml
[".local/lima"] type = "archive" exact = true refreshPeriod = "168h" url = "https://github.com/lima-vm/lima/releases/download/v{{ .tools.limactl.version }}/lima-{{ .tools.limactl.version }}-{{ .chezmoi.os | title }}-{{ .arch.opt2 }}.tar.gz"
Expected behavior
tar file should be unpacked at configured directory.
Output of command with the
--verbose
flagSame issue on macOS Ventura, Fedora 37, Alpine Edge.
Output of
chezmoi doctor
Additional context
Looks like chezmoi trying to interpret yaml file inside tar.gz like golang template.
tar archive structure:
oraclelinux.yaml contant