On Tuesday 13 February 2007, you wrote:
The following page has been changed by TomCallaway: http://fedoraproject.org/wiki/Packaging/GuidelinesTodo
[...]
- ||ratify ||New Required Buildroot||[wiki:Self:TomCallaway
spot]||2007-02-13||Change required buildroot for new packages to %(mktemp -d %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) (old packages/core merge packages using old buildroot are grandfathered)||
Using mktemp -d in specfiles' BuildRoot means that quite a few stray temp dirs will start to appear in %{_tmppath}. For example "rpm -q --specfile foo.spec" and "rpmbuild -bs foo.spec" create them, and nothing cleans them up (no, tmpwatch doesn't count) - we probably don't want that.
One way to avoid it is mktemp -ud, but it's more racy than plain -d. I think -ud would be a better choice nevertheless.
On Wed, 14 Feb 2007, Ville Skyttä wrote:
Using mktemp -d in specfiles' BuildRoot means that quite a few stray temp dirs will start to appear in %{_tmppath}. For example "rpm -q --specfile foo.spec" and "rpmbuild -bs foo.spec" create them, and nothing cleans them up (no, tmpwatch doesn't count) - we probably don't want that.
umm, if it is to be so done, passing mktemp a subordinate 'template' directory pattern of
-p %{_tmppath}rpm-build/{...whatever nameing per build instance}
may be helpful in confining this to a known search sub-tree in %{_tmppath}; I know I go poking in the RPM-BUILD temp dirs on occasion when builds are being diagnosed, but also like to clean house confidently when space gets tight.
-- Russ Herrold
Ville Skyttä wrote:
Using mktemp -d in specfiles' BuildRoot means that quite a few stray temp dirs will start to appear in %{_tmppath}. For example "rpm -q --specfile foo.spec" and "rpmbuild -bs foo.spec" create them, and nothing cleans them up (no, tmpwatch doesn't count) - we probably don't want that.
Isn't that what %clean is for?
One way to avoid it is mktemp -ud, but it's more racy than plain -d.
I doubt this would work.
-- Rex
Rex Dieter wrote:
Ville Skyttä wrote:
Using mktemp -d in specfiles' BuildRoot means that quite a few stray temp dirs will start to appear in %{_tmppath}. For example "rpm -q --specfile foo.spec" and "rpmbuild -bs foo.spec" create them, and nothing cleans them up (no, tmpwatch doesn't count) - we probably don't want that.
Isn't that what %clean is for?
That's what I use it for...
Jon.
"RD" == Rex Dieter rdieter@math.unl.edu writes:
RD> Isn't that what %clean is for?
Not really; the problem here is that even parsing of the spec will call mktemp and thus create some random directory.
This kind of thing needs to be in deeply coded into rpm, and until then we just need to stick with the single approved buildroot as we have now.
- J<
On Wednesday 14 February 2007, Rex Dieter wrote:
Ville Skyttä wrote:
Using mktemp -d in specfiles' BuildRoot means that quite a few stray temp dirs will start to appear in %{_tmppath}. For example "rpm -q --specfile foo.spec" and "rpmbuild -bs foo.spec" create them, and nothing cleans them up (no, tmpwatch doesn't count) - we probably don't want that.
Isn't that what %clean is for?
%clean is not run with eg. "rpm -q --specfile" nor "rpm -bs". And it's not even possible to pass --clean to the former, and passing it to the latter does not clean up the created temp dir either - it doesn't run the actual %clean scriptlet from the specfile.
One way to avoid it is mktemp -ud, but it's more racy than plain -d.
I doubt this would work.
Why not? Seems to work fine here in the few tests I've done.
On Wed, Feb 14, 2007 at 12:04:39AM +0200, Ville Skyttä wrote:
On Tuesday 13 February 2007, you wrote:
The following page has been changed by TomCallaway: http://fedoraproject.org/wiki/Packaging/GuidelinesTodo
[...]
- ||ratify ||New Required Buildroot||[wiki:Self:TomCallaway
spot]||2007-02-13||Change required buildroot for new packages to %(mktemp -d %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) (old packages/core merge packages using old buildroot are grandfathered)||
Using mktemp -d in specfiles' BuildRoot means that quite a few stray temp dirs will start to appear in %{_tmppath}. For example "rpm -q --specfile foo.spec" and "rpmbuild -bs foo.spec" create them, and nothing cleans them up (no, tmpwatch doesn't count) - we probably don't want that.
One way to avoid it is mktemp -ud, but it's more racy than plain -d. I think -ud would be a better choice nevertheless.
Good catch! +1
packaging@lists.fedoraproject.org