bazelbuild / rules_pkg

Bazel rules for creating packages of many types (zip, tar, deb, rpm, ...)
Apache License 2.0
212 stars 166 forks source link

//tests/rpm:test_golden_debuginfo_rpm_contents fails to build on some machines #870

Open aiuto opened 1 month ago

aiuto commented 1 month ago

bazelisk test --sandbox_debug //tests/rpm:test_golden_debuginfo_rpm_contents

fails with

...
# pkg_rpm emits two outputs
    RPMS=(bazel-out/k8-fastbuild/bin/tests/rpm/test_debuginfo_rpm-1-0..rpm)
    echo "===== main RPM =====" > bazel-out/k8-fastbuild/bin/tests/rpm/test_debuginfo_rpm_contents.txt
    rpm -qpi --list ${RPMS[0]} |         grep -v '\''Build Date'\'' | grep -v '\''Build Host'\'' | grep -v '\''Relocations'\'' | grep -v '\''Architecture'\'' | grep -v '\''Size'\'' | grep -v '\''.build-id'\'' >> bazel-out/k8-fastbuild/bin/tests/rpm/test_debuginfo_rpm_contents.txt
    echo "===== sub RPM ======" >> bazel-out/k8-fastbuild/bin/tests/rpm/test_debuginfo_rpm_contents.txt
    rpm -qpi --list ${RPMS[1]} |         grep -v '\''Build Date'\'' | grep -v '\''Build Host'\'' | grep -v '\''Relocations'\'' | grep -v '\''Architecture'\'' | grep -v '\''Size'\'' | grep -v '\''.build-id'\'' >> bazel-out/k8-fastbuild/bin/tests/rpm/test_debuginfo_rpm_contents.txt
    ')
/bin/bash: line 7: RPMS[1]: unbound variable

We are only getting 1 declared output of the rpm, and not the debug one. Perhaps this is an RPM version difference?

cc:@kellyma2

kellyma2 commented 2 weeks ago

Apologies - this fell off my radar. Will add it to my TODO list for the next week or so

Also, @aiuto can you give me a bit more detail in terms of where you're seeing this failure?

aiuto commented 2 weeks ago

No worries. I am weeks behind on all my Bazel projects.

kellyma2 commented 1 week ago

My guess is that it's on a system variant that we've not poked at thusfar. I just opened a PR to add AlmaLinux 9.3, for example.

Can you tell me what the contents of /etc/os-release are on the system where this is failing?

aiuto commented 4 days ago

I get this. It is debian rodete, so rolling release near head.

PRETTY_NAME="Debian GNU/Linux rodete"
NAME="Debian GNU/Linux rodete"
VERSION_CODENAME=rodete
ID=debian