On Thu, Feb 22, 2007 at 09:21:38PM +0100, Axel Thimm wrote:
spot asked me to draft something in the wiki about pushing all responsibility to (grown-up) packagers while still presenting a couple of sane buildroots as a guideline.
The outcome is on http://fedoraproject.org/wiki/PackagingDrafts/BuildRoot:
Matthias Saou made some changes cleaning up my e-glish and clarifying the one and other bit. In case you had made up your mind already and don't want to feel like voting for something changing underneath your feet I placed the changed content bits underneath the original proposal, see also
http://fedoraproject.org/wiki/PackagingDrafts/BuildRoot?action=diff&rev2...
[[Anchor(BuildRoot)]] == Build root tag ==
The ''Build``Root'' MUST be below %{_tmppath} and MUST use %{name}, %{version} and %{release}. It also may make use of ''mktemp'' since this is guaranteed to exist on any system. Other than that packagers are free to use any sane ''Build``Root''.
=> The ''!BuildRoot'' value MUST be below `%{_tmppath}/` and MUST contain at least `%{name}`, `%{version}` and `%{release}`. It may invoke `mktemp` since this is guaranteed to exist on every system. From there, packagers are expected to use a sane ''!BuildRoot''.
The ''recommended'' values for the ''Build``Root'' tag are (in descending order of preference) {{{ %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %{_tmppath}/%{name}-%{version}-%{release}-root }}}
At one point, this was a mandatory value, but it is now left to the packager.
=> At one point, the second was a mandatory value, but it is now left to the packager to decide. If unsure, simply pick the first.