bazelbuild / rules_pkg

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

Explicitly set `%{_builddir}` macro #792

Closed kellyma2 closed 7 months ago

kellyma2 commented 7 months ago

rules_pkg has baked in the assumption that the value of %{_builddir} is going to be %{_topdir}/BUILD which is where rpmbuild will cd to when being run. When using the built in system rpmbuild in a situation where the value of %{_builddir} has been overriden with a custom local macro, this assumption may be broken which will result in internal rpmbuild failures.

Because we make this assumption about the value of the macro, we can instead be explicit about what we want the value of %{_builddir} to be so as to avoid this problem altogether.

aiuto commented 7 months ago

The failures are all stardoc. I"m going to force merge this and then disable the doc building in CI. I'll do that manually.

aiuto commented 7 months ago

Sigh... It/s not just stardoc. bzlmod at bazel 7.0.0. seems to mess with some things about local_repository. No time to explain more on that.