Bug 632444 - 'install' gives bad state when 'strip' fails
'install' gives bad state when 'strip' fails
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
19
All Linux
low Severity medium
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-09 19:12 EDT by John Reiser
Modified: 2013-08-15 10:40 EDT (History)
4 users (show)

See Also:
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:


Attachments (Terms of Use)

  None (edit)
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):
coreutils-8.5-4.fc14.i686


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:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
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.

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