Bug 632444

Summary: 'install' gives bad state when 'strip' fails
Product: [Fedora] Fedora Reporter: John Reiser <jreiser>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 19CC: kdudka, ooprala, ovasik, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-15 10:40:20 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description John Reiser 2010-09-09 19:12:18 EDT
Description of problem: If the command is "install -s -m 755 SOURCE DEST" and 'strip' cannot be found, then 'install' neither fails nor succeeds.  It gives an error message on stderr about 'strip', then quits without applying the "-m 755".  The result is partially correct (the file is copied to the destination and not stripped), but the  destination file still has the default mode for a new file.  This is truly bad because usually the default mode is 0600, which is not executable.  Instead, the remaining options should be processed [if possible] before terminating.

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

How reproducible: every time

Steps to Reproduce:
1. rm -f /usr/bin/strip
2. cp /bin/date /tmp/foo;  chmod 600 /tmp/foo 
2. install -s -m 755 /tmp/foo /usr/bin
3. ls -l /usr/bin/foo
Actual results:
  install: cannot run strip: No such file or directory
  install: strip process terminated abnormally
  -rw-------. 1 root root 60632 Sep  9 16:08 /usr/bin/foo

Expected results:
-rwxr-xr-x. 1 root root 60632 Sep  9 16:08 /usr/bin/foo

Additional info:
Comment 1 Ondrej Vasik 2010-10-20 09:44:24 EDT
Thanks for report (and sorry for delay) ... 

I see two options: 
1) checking for strip program availability when the option is chosen (if not, then it should either fail or disable strip option with information message )

2) making strip, preserve timestamps and attributes change failures non-terminal (just set exit code to install failure)
Comment 2 Ondrej Vasik 2013-02-23 04:56:33 EST
Resolved upstream by http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=3a20f688 . Thanks Ondrej for working on this old issue.
Comment 3 Fedora End Of Life 2013-04-03 16:11:37 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
Comment 4 Ondrej Vasik 2013-08-15 10:40:20 EDT
This one was already resolved by coreutils-8.21-6.fc19, so closing RAWHIDE.