1
0
mirror of https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git synced 2025-12-15 11:22:43 +03:00
tiny-cloud/.gitlab-ci.yml
Natanael Copa 7ea8f69a06 Fix user-data decompression on all shells
yash[1] and zsh does not handle 8-bit bytes in strings good. Work around it
by using printf ... | cmp ... to compare the header. This should be 100%
posix compatible.

Also fix some of the compression header magic bytes:

- unxz: Use octal aas the string '\3757zXZ\000' was misinterpreted by some
  shells.
- lzma: the third byte represents compression mode[2], and we want
  support all compression modes not only '8', so we only check the first
  three bytes instead of 4.

[1]: Upstream report: https://osdn.net/projects/yash/ticket/47772
[2]: https://github.com/frizb/FirmwareReverseEngineering/blob/master/IdentifyingCompressionAlgorithms.md#lzma
2023-04-06 17:19:40 +02:00

34 lines
587 B
YAML

test-default:
image: alpine:latest
stage: test
script:
- apk add make kyua yx xz lz4 zstd
- make -j $(nproc) check
tags:
- docker-alpine
- x86_64
test-dash:
extends: test-default
before_script:
- apk add dash
- ln -sf /usr/bin/dash /bin/sh
test-oksh:
extends: test-default
before_script:
- apk add oksh
- ln -sf /bin/oksh /bin/sh
test-yash:
extends: test-default
before_script:
- apk add yash
- ln -sf /usr/bin/yash /bin/sh
test-zsh:
extends: test-default
before_script:
- apk add zsh
- ln -sf /bin/zsh /bin/sh