GNU bug report logs -
#36966
install-sh -s on 555 executable fails
Previous Next
Reported by: Karl Berry <karl <at> freefriends.org>
Date: Wed, 7 Aug 2019 21:52:01 UTC
Severity: normal
Done: Karl Berry <karl <at> freefriends.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36966 in the body.
You can then email your comments to 36966 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-automake <at> gnu.org
:
bug#36966
; Package
automake
.
(Wed, 07 Aug 2019 21:52:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Karl Berry <karl <at> freefriends.org>
:
New bug report received and forwarded. Copy sent to
bug-automake <at> gnu.org
.
(Wed, 07 Aug 2019 21:52:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
(I'm not on this list, so please keep me in cc if need be.)
It seems that install-sh -s (what automake's install-strip target can
end up doing) fails if the original file doesn't have the owner-write
bit set:
cp /bin/cp /tmp/rx # any binary will do
chmod 555 /tmp/rx # make unwritable to owner
install-sh -s /tmp/rx /tmp/sx # try to install, with strip
-> strip: unable to copy file '/tmp/_inst.31092_'; reason: Permission denied
echo $?
-> 1
Although install-sh (version 2018-03-11.20, lines 224ff.) does some
stuff to ensure that umask will not clear an owner-writable bit in the
destination, that's not enough to make it owner-writable if it's not
already.
The only less-than-wonderful fix I could come up with is to explicitly
do chmod u+w if strip is being executed. I thought maybe it would be
worth trying the strip even if the chmod failed, hence the ; instead of
&&, but it's not something I feel strongly about. And maybe there is
some nicer way to do it altogether.
--- a/build-aux/install-sh
+++ b/build-aux/install-sh
@@ -461,7 +461,7 @@ do
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
- { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || ($doit $chmodcmd u+w "$dsttmp"; $doit $stripcmd "$dsttmp") } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
Wdyt? --thanks, karl.
Information forwarded
to
bug-automake <at> gnu.org
:
bug#36966
; Package
automake
.
(Sun, 22 Nov 2020 02:10:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 36966 <at> debbugs.gnu.org (full text, mbox):
chmod 555 /tmp/rx # make unwritable to owner
install-sh -s /tmp/rx /tmp/sx # try to install, with strip
-> strip: unable to copy file '/tmp/_inst.31092_'; reason: Permission denied
Paul fixed this install-sh bug that I reported last August (commit of
2019-08-26). Closing.
Reply sent
to
Karl Berry <karl <at> freefriends.org>
:
You have taken responsibility.
(Sun, 22 Nov 2020 02:10:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Karl Berry <karl <at> freefriends.org>
:
bug acknowledged by developer.
(Sun, 22 Nov 2020 02:10:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 20 Dec 2020 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 120 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.