From 443f97408a33d2e0f774aeb7cc78a81af47c07d1 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 23 Feb 2024 09:38:03 -0500 Subject: [PATCH] Add dash package. Dash provides a nice alternative to bash at a much smaller size and without features like network sockets. --- dash.yaml | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 dash.yaml diff --git a/dash.yaml b/dash.yaml new file mode 100644 index 00000000000..bd9dd737948 --- /dev/null +++ b/dash.yaml @@ -0,0 +1,76 @@ +# Generated from https://git.alpinelinux.org/aports/plain/main/dash/APKBUILD +#nolint:git-checkout-must-use-github-updates +package: + name: dash + version: 0.5.12 + epoch: 0 + description: Small and fast POSIX-compliant shell + copyright: + - license: BSD-3-Clause AND GPL-2.0-or-later + +environment: + contents: + packages: + - autoconf + - automake + - build-base + - busybox + - ca-certificates-bundle + - coreutils + +pipeline: + - uses: git-checkout + with: + repository: https://git.kernel.org/pub/scm/utils/dash/dash.git + tag: v${{package.version}} + expected-commit: 4bbf8721a3ac6401ced6a0454956801f6ba37256 + + - runs: ./autogen.sh + + - uses: autoconf/configure + + - uses: autoconf/make + + - uses: autoconf/make-install + + - uses: strip + +test: + pipeline: + - runs: | + fail() { echo "$@" 1>&2; exit 1; } + p=/usr/bin/dash + [ -f "$p" ] || fail "$p is not a file" + [ -x "$p" ] || fail "$p is not executable" + + # /bin/sh won't actually be dash here, so test dash explicitly. + "$p" -ex <<"EOF" + fail() { echo "$@" 1>&2; exit 1; } + [ -n "$PPID" ] || fail "env var PPID not set" + [ -n "$$" ] || fail "env var \$\$ not set" + EOF + +subpackages: + - name: dash-doc + description: dash manpages + pipeline: + - uses: split/manpages + + - name: dash-binsh + dependencies: + provider-priority: 60 + runtime: + - dash + pipeline: + - runs: | + mkdir -p "${{targets.subpkgdir}}"/bin + ln -s ../usr/bin/dash "${{targets.subpkgdir}}"/bin/sh + test: + pipeline: + - runs: | + [ /bin/sh -ef /usr/bin/dash ] || { echo "/bin/sh is not same as /bin/dash"; exit 1; } + +update: + enabled: true + release-monitor: + identifier: 394