rules_pkg icon indicating copy to clipboard operation
rules_pkg copied to clipboard

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

Open aiuto opened this issue 1 year ago • 4 comments

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

aiuto avatar Jun 03 '24 17:06 aiuto

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?

kellyma2 avatar Jun 18 '24 19:06 kellyma2

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

aiuto avatar Jun 18 '24 23:06 aiuto

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?

kellyma2 avatar Jun 28 '24 02:06 kellyma2

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

aiuto avatar Jul 01 '24 02:07 aiuto