Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 198362 - emerge-delta-webrsync-3.5.1-r3 should not hardcode /tmp with mktemp
Summary: emerge-delta-webrsync-3.5.1-r3 should not hardcode /tmp with mktemp
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High trivial with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 454046
Blocks:
  Show dependency tree
 
Reported: 2007-11-07 14:37 UTC by Matthew Rinehart
Modified: 2013-01-25 17:24 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to use PORTAGE_TMPDIR instead (3.5.1-tmpdir.diff,502 bytes, patch)
2008-10-05 18:46 UTC, Michał Górny
Details | Diff
Use only one TMPDIR, based on PORTAGE_TMPDIR (3.5.1-tmpdir.patch,4.05 KB, patch)
2009-04-30 12:27 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Rinehart 2007-11-07 14:37:44 UTC
I keep my /tmp mounted in tmpfs as a very small (50M) volume.  Obviously emerge-delta-webrsync requires more space than that to reconstruct the latest tarball.  I would like to be able to set TMPDIR to a larger volume (e.g., /var/tmp) so that it is used instead.

To accomplish this, I have changed line 433 to the following:

TEMPDIR=$(mktemp -t -d delta-webrsync-XXXXXX)

I believe this would make the program more flexible and would behave as expected for people familier with mktemp and TMPDIR.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2008-10-05 18:45:41 UTC
I personally think we should use PORTAGE_TMPDIR instead, like in other parts of the script.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2008-10-05 18:46:22 UTC
Created attachment 167358 [details, diff]
Patch to use PORTAGE_TMPDIR instead
Comment 3 Louis Frayser 2008-12-19 01:18:21 UTC
I noticed that kjournald was running a 45% and stayed there (keeping the whole system running slowly). Eventually after researching reports of kjournald hight-cpu issues, I did a df, looking for disk problems. /tmp was full.  At /tmp/delta-webrsync-WrZd3P, was a file called portage-20081217.tar which was over 100MB. emerge-delta-webrsync was running on cron and had a proccess called patcher that wouldn't quit until I killed it. I examined  emerge-delta-webrsync and too saw that it would allways use /tmp instead of $TMPDIR for big files. 

I think this incident should be classified critical rather than trivial, because someone with less experience wouldn't easily determine that emerge-delta-webrsync was at the root of a problem such as the scenario outlined above.  I agree the fix is trivial, thought.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-04-30 12:27:51 UTC
Created attachment 189963 [details, diff]
Use only one TMPDIR, based on PORTAGE_TMPDIR

And another patch. This time I totally removed TEMPDIR var in favor of using TMPDIR everywhere - and also made TMPDIR use random directory name (I'm not sure about that).

Please note that I haven't really tested this yet, 'cause I've already done webrsync this morning. I'd probably have to take a look at TMPDIR removal, too, so the patch is mainly FYI.
Comment 5 Louis Frayser 2010-01-09 14:13:29 UTC
(In reply to comment #4)
> Created an attachment (id=189963) [details]
> Use only one TMPDIR, based on PORTAGE_TMPDIR
> 
> And another patch. This time I totally removed TEMPDIR var in favor of using
> TMPDIR everywhere - and also made TMPDIR use random directory name (I'm not
> sure about that).
> 
> Please note that I haven't really tested this yet, 'cause I've already done
> webrsync this morning. I'd probably have to take a look at TMPDIR removal, too,
> so the patch is mainly FYI.
> 

The 2010 version 3.5.1-r3 still has this problem. After updating, the /tmp directory filled up and patcher was stuck. 

  
Comment 6 Zac Medico gentoo-dev 2012-08-18 22:52:27 UTC
(In reply to comment #4)
> Created attachment 189963 [details, diff] [details, diff]
> Use only one TMPDIR, based on PORTAGE_TMPDIR

There's a similar fix in git now:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9bf5900fb2fff77a89b91dd5f38478aaa635ef66
Comment 7 Zac Medico gentoo-dev 2012-08-19 06:18:01 UTC
This is fixed in version 3.6.