melange
melange copied to clipboard
feat: support unzip with fetch
We use busybox which uses libarchive by default. Doesn't libarchive already support extracting zip files?
I got this error
2022/11/17 02:39:07 melange (test-pkg/x86_64): Length: 96107 (94K) [application/zip]
2022/11/17 02:39:07 melange (test-pkg/x86_64): Saving to: 'docbook-xml-4.4.zip'
2022/11/17 02:39:07 melange (test-pkg/x86_64):
2022/11/17 02:39:07 melange (test-pkg/x86_64): 0K .......... .......... .......... .......... .......... 53% 346K 0s
2022/11/17 02:39:07 melange (test-pkg/x86_64): 50K .......... .......... .......... .......... ... 100% 787K=0.2s
2022/11/17 02:39:07 melange (test-pkg/x86_64):
2022/11/17 02:39:07 melange (test-pkg/x86_64): 2022-11-17 02:39:07 (469 KB/s) - 'docbook-xml-4.4.zip' saved [96107/96107]
2022/11/17 02:39:07 melange (test-pkg/x86_64):
2022/11/17 02:39:07 melange (test-pkg/x86_64): docbook-xml-4.4.zip: OK
2022/11/17 02:39:07 melange (test-pkg/x86_64): tar: invalid tar magic
2022/11/17 02:39:07 melange (test-pkg/x86_64): warning: read |0: file already closed
the melange build file is here
package:
name: test-pkg
version: 0.1.0
epoch: 0
description: A test pkg
target-architecture:
- all
copyright:
- paths:
- "*"
attestation: TODO
license: MIT
environment:
contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
packages:
- busybox
- ca-certificates-bundle
pipeline:
- uses: fetch
with:
uri: https://www.docbook.org/xml/4.4/docbook-xml-4.4.zip
expected-sha256: 02f159eb88c4254d95e831c51c144b1863b216d909b5ff45743a1ce6f5273090
Looking forward to this PR to bring Gradle
package in the Wofli, which is a .zip
file.
the issue from what I've figured out is busybox doesn't support automatic resolution of archive types unlike gnu tar so we'd need a if check for every type of archive we intend to support :/