Bug 632444 - 'install' gives bad state when 'strip' fails
Summary: 'install' gives bad state when 'strip' fails
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 19
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-09 23:12 UTC by John Reiser
Modified: 2013-08-15 14:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-15 14:40:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John Reiser 2010-09-09 23:12:18 UTC
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 13:44:24 UTC
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 09:56:33 UTC
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 20:11:37 UTC
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 14:40:20 UTC
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.