Bug 491479 - scratch files and directories are not unlinked from /tmp
scratch files and directories are not unlinked from /tmp
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: lorax (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Martin Gracik
Fedora Extras Quality Assurance
: FutureFeature
Depends On: 717089
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-21 11:48 EDT by John Reiser
Modified: 2013-07-04 08:46 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-14 05:45:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description John Reiser 2009-03-21 11:48:46 EDT
Description of problem:  Pungi leaves behind scratch files and directories in /tmp.  They should be unlinked unless there is an explicit request to save them.


Version-Release number of selected component (if applicable):
pungi-2.0.12-1.fc11.noarch


How reproducible: always


Steps to Reproduce:
1.Compose a DVD according to the EXAMPLE on the manual page: pungi -c /usr/share/pungi/rawhide-fedora.ks --destdir=$DESTDIR --name Fedora --ver $VERSION
2.Inspect /tmp
3.
  
Actual results: Scratch files and directories are left behind in /tmp:
buildinstall.tree.<mkstemp>
instimage.mnt.$PID
instimagemods.$PID
keepfile.$PID
keepfilerescue.$PID
makebootdisk.dir.$PID
makebootdisk.tree.${PID}_tmp
modinfo-$ARCH.$PID
treedir.<mkstemp>
yumcache.<mkstemp>
yumdir.$PID


Expected results: No scratch files or directories should be left behind in /tmp unless requested.  At a minimum, put them in $DESTDIR/work/$ARCH instead.


Additional info:
Comment 1 Jesse Keating 2009-03-21 12:25:50 EDT
That's all anaconda there.  There is a bug somewhere when I last tried to put anaconda work somewhere else, and I haven't revisited it in a while.  One more reason why composing should be done in chroots that get blown away between composes.
Comment 2 David Cantrell 2009-03-23 16:16:07 EDT
The easiest fix for this would be in pungi, actually.  The anaconda scripts honor the $TMPDIR environment variable, defaulting to /tmp if it's not set.

Pungi could set TMPDIR to /tmp/work/ARCH or something else before it runs the anaconda scripts.
Comment 3 Jesse Keating 2009-03-23 16:23:17 EDT
Playing pass the bug again.  Every single time I try to redefine TMPDIR I wind up with broken images, due to something in buildinstall.
Comment 4 David Cantrell 2009-03-23 18:36:36 EDT
I see that mk-images.efi uses /tmp rather than $TMPDIR.  I'm guessing $TMPDIR is generic enough that it's used by another tool that gets used during the image creation.  Could change that something else and see what happens.

I'll have to try that later.
Comment 5 David Cantrell 2009-04-16 18:28:53 EDT
mgracik,

This is related to the scripts/ rewrite.
Comment 6 Bug Zapper 2009-06-09 08:28:57 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Bug Zapper 2010-04-27 09:17:21 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Martin Gracik 2011-06-27 06:48:29 EDT
Reassigning to pungi once again.

This is for rawhide, where we don't use buildinstall anymore, but lorax instead. Lorax honors the workdir given by pungi and puts everything in the directory set up by pungi.

So I think it would be better for pungi to remove the temp directory, as it may need it once lorax is finished.
Comment 9 Jesse Keating 2011-06-27 16:23:23 EDT
I'm going to needinfo this, because now that lorax is used, I don't believe anything winds up in temp, as the only stuff that would wind up there before was buildinstall spew.

So, is there anything left over?
Comment 10 John Reiser 2011-06-27 19:38:06 EDT
(In reply to comment #9)
> So, is there anything left over?

pungi does not terminate using today's rawhide, due to bug 717089 in pylorax.
Comment 11 John Reiser 2011-06-27 23:47:30 EDT
(In reply to comment #9)
> So, is there anything left over?

On Fedora 15, there was one directory left in /tmp:
   drwx------. 3 root    root     4096 Jun 27 20:19 tmppwxlWI
which was an empty directory.

pungi-2.5-2.fc15.noarch
lorax-0.4.6-1.fc15.x86_64
yum-3.2.29-6.fc15.noarch
Comment 12 Jesse Keating 2011-06-30 16:26:46 EDT
Ok.  Pungi passes the workdir option on to lorax, so if Lorax isn't making use of it, not our problem.
Comment 13 Martin Gracik 2011-07-19 03:24:57 EDT
All temporary directories created by lorax have some lorax/pylorax prefix. I think this one may be created by yum.

Note You need to log in before you can comment on or make changes to this bug.