Bug 491479 - scratch files and directories are not unlinked from /tmp
Summary: scratch files and directories are not unlinked from /tmp
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: lorax
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Martin Gracik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 717089
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-21 15:48 UTC by John Reiser
Modified: 2013-07-04 12:46 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-14 09:45:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John Reiser 2009-03-21 15:48:46 UTC
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 16:25:50 UTC
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 20:16:07 UTC
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 20:23:17 UTC
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 22:36:36 UTC
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 22:28:53 UTC
mgracik,

This is related to the scripts/ rewrite.

Comment 6 Bug Zapper 2009-06-09 12:28:57 UTC
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 13:17:21 UTC
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 10:48:29 UTC
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 20:23:23 UTC
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 23:38:06 UTC
(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-28 03:47:30 UTC
(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 20:26:46 UTC
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 07:24:57 UTC
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.