This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 167822

Summary: patch produces "getfilecon: No such file or directory" errors
Product: [Fedora] Fedora Reporter: Nalin Dahyabhai <nalin>
Component: patchAssignee: Tim Waugh <twaugh>
Status: CLOSED DUPLICATE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: tmraz
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: 2005-12-20 09:55:24 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Nalin Dahyabhai 2005-09-08 11:28:12 EDT
Description of problem:
When applying a patch, patch seems to always be printing an "getfilecon: No such
file or directory" error.

Version-Release number of selected component (if applicable):
2.5.4-27

How reproducible:
Always

Steps to Reproduce:
1. Check out a package from Fedora CVS.
2. Run "make prep".
  
Actual results:
The patch is applied, but a "getfilecon: No such file or directory" error is
printed.  Example snippet:
   + echo 'Patch #1 (patch-2.5-stderr.patch):'
   Patch #1 (patch-2.5-stderr.patch):
   + patch -p1 -b --suffix .stderr -s
   getfilecon: No such file or directory
   + echo 'Patch #2 (patch-2.5.4-suffix.patch):'
   Patch #2 (patch-2.5.4-suffix.patch):
   + patch -p1 -b --suffix .suffix -s
   getfilecon: No such file or directory
   + echo 'Patch #3 (patch-2.5.4-sigsegv.patch):'
   Patch #3 (patch-2.5.4-sigsegv.patch):
   + patch -p1 -b --suffix .sigsegv -s
   getfilecon: No such file or directory
   getfilecon: No such file or directory
   getfilecon: No such file or directory
   + echo 'Patch #4 (patch-2.5.4-ifdef.patch):'
   Patch #4 (patch-2.5.4-ifdef.patch):
   + patch -p1 -b --suffix .ifdef -s
   getfilecon: No such file or directory
   + echo 'Patch #5 (patch-2.5.4-program_name.patch):'

Expected results:
Patch is applied, no error message.

Additional info:
I think that this is happening in copy_filecon(), when it attempts to get the
context of the "to" file, before the "from" file has been rename()d, because the
"to" file doesn't exist yet.
Comment 1 Tim Waugh 2005-12-20 09:55:24 EST
Caused by bad fix to bug #165799, since reverted.

*** This bug has been marked as a duplicate of 165799 ***