Bug 211692

Summary: Kadischi may raise an exception when attempting to copy device files.
Product: [Fedora] Fedora Reporter: Toshio Kuratomi <toshio>
Component: kadischiAssignee: Chitlesh GOORAH <chitlesh>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: extras-qa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-07 22:21:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Toshio Kuratomi 2006-10-20 20:48:45 UTC
Description of problem:
Kadischi (in movefiles.py) uses shutil.copytree() to copy files from the livecd
directory into the system directory.  Unfortunately, copytree() doesn't work
with device special files.  This becomes a problem when copying the contents of
the /etc/udev directory as there may be precreated device files in one of the
subdirectories.

Version-Release number of selected component (if applicable):
kadischi cvs checkout 10-20-2006

How reproducible:
Always

Steps to Reproduce:
1. Have kadischi install the xorg-x11-drv-nvidia package from livna into the livecd.
2. This package creates /etc/udev/devices/* files which are device files
3. kadischi invokes movefiles.py which runs shutil.copytree().  When copytree()
tries to copy the device files, it raises an exception.
  
Actual results:
Exception is raised and kadischi terminates

Expected results:
Kadischi handles the exception and continues.

Additional info:
shutil.py copytree() has a note in the code that it doesn't handle sockets nad
device files properly.  It looks like we may need to make our own version that
does  (Maybe upstream would be interested in it as well.)

There's an if-then-else in shutil that checks for symlinks and directories.  It
also needs to check for device special files using stat before it can decide
that it's just a regular file and perform a normal copy.

Note: With the current implementation of copytree(), if the device files
reference a device built into the buildhost's kernel, we'll probably end up
reading from the device and outputting that data to the other directory.

Comment 1 Jasper O. Hartline 2007-02-28 03:30:47 UTC
Can you provide some output from the terminal when the exception happens?

Comment 2 Toshio Kuratomi 2007-02-28 09:44:50 UTC
I'm afraid I'm not creating any livecds anymore.  (I was laid off from my last
job because our livecd work was not generating enough revenue.)  So I don't have
an environment to reproduce this anymore.  I don't even know if recent versions
of the code still have this issue.  If you can't reproduce it, I can close this
bug report.

Comment 3 Chitlesh GOORAH 2007-07-07 22:21:37 UTC
Kadischi's development has stalled for a long time now.
There is no one to lead this project.

I'm therefore closing all open bugs related to kadischi as WONTFIX.

However I recommend you do try "revisor" to create your custom spins.
On Fedora 7, you can install revisor with:

yum install revisor

as root.