diff --git a/py3-breezy.yaml b/py3-breezy.yaml index 5a36c288249..f43986e6c72 100644 --- a/py3-breezy.yaml +++ b/py3-breezy.yaml @@ -1,7 +1,7 @@ package: name: py3-breezy - version: 3.3.8 - epoch: 1 + version: 3.3.9 + epoch: 0 description: Friendly distributed version control system copyright: - license: GPL-2.0-or-later @@ -18,6 +18,7 @@ data: 3.10: '310' 3.11: '311' 3.12: '312' + 3.13: '300' environment: contents: @@ -31,7 +32,7 @@ environment: pipeline: - uses: fetch with: - expected-sha256: 14d59bbdf86b66c17327eb79a5883b4c70cc7794ed34f3e8a0adfce64edc58bf + expected-sha256: c2588bf217c8a4056987ecf6599f0ad9fb8484285953b2e61905141f43c3d5d8 uri: https://files.pythonhosted.org/packages/source/b/breezy/breezy-${{package.version}}.tar.gz subpackages: @@ -80,22 +81,28 @@ subpackages: - runs: | mkdir -p ${{targets.contextdir}}/usr/ mv ./cleanup/${{range.key}}/bin ${{targets.contextdir}}/usr/ + - name: remove-unused-bins + runs: | + # these are internal to breezy, not shipped by other distros + rm ${{targets.contextdir}}/usr/bin/bzr-receive-pack + rm ${{targets.contextdir}}/usr/bin/bzr-upload-pack test: - environment: - contents: - packages: - - apk-tools pipeline: - - runs: | - apk info -L py${{range.key}}-${{vars.pypi-package}}-bin > "pkg.list" - echo "Please write a test for these:" - grep usr/bin/ pkg.list > bins.list - sed 's,^,> ,' bins.list + - name: "run shipped binaries with --help" + runs: | + brz --help + git-remote-bzr --help + - name: "check version output" + runs: | + set +x + set -- brz version --short + + fail() { echo "FAIL:" "$@"; exit 1; } + exp="${{package.version}}" - while read line; do - echo == /$line == - /$line --help && echo exited 0 || echo "exited $?" - done < bins.list + out=$("$@") || fail "'$*' exited $?" + [ "$out" = "$exp" ] || fail "'$*' output expected '$exp' found '$out'" + echo "PASS: '$*' output '$exp'" - name: py3-supported-${{vars.pypi-package}} description: meta package providing ${{vars.pypi-package}} for supported python versions. @@ -111,7 +118,21 @@ test: with: imports: | import ${{vars.import}} - - runs: | + - name: "run shipped binaries with --help" + runs: | + git-remote-bzr --help + brz --help + - name: "create repo test" + runs: | + # add entry for this user to /etc/passwd if not present. + # breezy/lockdir.py calls 'pwd.getuid()' which will stacktrace without. + uid=$(id -u) || { echo "ERROR: id -u failed"; exit 1; } + if ! out=$(id -un 2>/dev/null); then + echo "test-user:x:$uid:$(id -g):test user:${HOME:-$PWD}:/bin/sh" >>/etc/passwd + [ "$(id -un)" = "test-user" ] || + { echo "ERROR: adding user to /etc/passwd didn't work"; exit 1; } + fi + mkdir test cd test brz init-repo . @@ -123,9 +144,6 @@ test: brz whoami 'Test test@chainguard.dev' brz commit -m 'Test commit' brz log - brz --version - brz --help - git-remote-bzr --help update: enabled: true