Replies: 1 comment 2 replies
-
Fedora already has However, there is also need for more then one build dir. AFAIK Python does two builds, one optimized and second with debug information. Vim does 3 different builds (and it would be probably better to use separate build dirs for them). |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
rpmbuild traditionally builds in the same directory where it unpacks the sources. Probably at least in part because in the nineties anything else was considered fancy pants that few projects supported. Apart from hand-rolled makefiles, these days the situation is almost the opposite: any sane build system wants the build artifacts anywhere else but mixed in the source tree. Rpm should (better) support that natively somehow.
Whatever we do has to remain compatible with the existing mass of specs out there, so for traditional use it needs to be an opt-in thing, which kinda defeats the purpose. But with declarative builds we have a sort of fresh start where it may well be possible to set default the other way around, and have buildsystems support it from the start. Combine that with #1087 will allow builds completely outside the source directory, which has nice qualities like allow building from a read-only source-tree. There would need to be an opt-in to build in the source directory though, because that's the only thing some projects still support.
Maybe this would be something like a new %setup switch that after source preparation, creates and cd's to the build directory and sets that as the %{buildsubdir}. There would need to be a separate %{sourcesubdir} then for the unpackaged source, which in the traditional setup would be the same as %{buildsubdir} as a kind of special case that can be easily detected. Any new buildsystem macro sets would be encouraged to default to separate directories. This doesn't actually require #1087 either - until that is in place the new setup directive could just use a subdirectory inside (rather than outside) buildsubdir.
Thoughts, comments?
Beta Was this translation helpful? Give feedback.
All reactions