This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Update install-sh
Type: Stage: resolved
Components: Build Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Michael.Felt, cstratak, vstinner, zach.ware
Priority: normal Keywords: patch

Created on 2018-09-21 15:47 by cstratak, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 9592 merged cstratak, 2018-09-26 15:25
PR 10225 merged vstinner, 2018-10-29 19:37
Messages (12)
msg325996 - (view) Author: Charalampos Stratakis (cstratak) * Date: 2018-09-21 15:47
The install-sh file that python uses for autotools is horribly outdated. Last update was 16 years ago and it's being copied from automake's source code.

Updating it to modern standards could potentially fix issues for systems that use autotools, but it has the downside of having some backwards incompatible changes e.g. [0][1] (or you can search at their NEWS file [2]) which could break some previous applied workarounds.

As things stand, there is no bug at the moment and autotools just work so would a PR for updating install-sh to a newer version be considered? 

[0] http://git.savannah.gnu.org/cgit/automake.git/commit/lib/install-sh?id=84a98180dd37a32891800fb9aafdf685bab74252
[1] http://git.savannah.gnu.org/cgit/automake.git/commit/lib/install-sh?id=bd44db1abdeea3643ba0387de24af7539da644e4
[2] http://git.savannah.gnu.org/cgit/automake.git/tree/NEWS
msg325998 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2018-09-21 16:06
If there's no actual bug, it certainly does not need to be done on maintenance branches.
msg327947 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-10-18 08:52
New changeset b7ad31c8926aad2fdd0d4661373c25cc9d753a40 by Victor Stinner (stratakis) in branch 'master':
bpo-34765: Update the install-sh file (GH-9592)
https://github.com/python/cpython/commit/b7ad31c8926aad2fdd0d4661373c25cc9d753a40
msg327948 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-10-18 09:32
Thanks Charalampos Stratakis for the change!

> If there's no actual bug, it certainly does not need to be done on maintenance branches.

I concur. Since install-sh has been updated in the master branch, I close the issue.
msg328444 - (view) Author: Charalampos Stratakis (cstratak) * Date: 2018-10-25 14:47
Adding to this, the reason I initially caught up with that, was due to a coverity scan.

More explicitly:

Error: SHELLCHECK_WARNING: [#def1]
/usr/lib64/python3.6/config-3.6dm-x86_64-linux-gnu/install-sh:63:1: warning: transform_arg appears unused. Verify it or export it. [SC2034]
#   61|   
#   62|   transformbasename=""
#   63|-> transform_arg=""
#   64|   instcmd="$mvprog"
#   65|   chmodcmd="$chmodprog 0755"

Error: SHELLCHECK_WARNING: [#def2]
/usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu/install-sh:63:1: warning: transform_arg appears unused. Verify it or export it. [SC2034]
#   61|   
#   62|   transformbasename=""
#   63|-> transform_arg=""
#   64|   instcmd="$mvprog"
#   65|   chmodcmd="$chmodprog 0755"

So the transform_arg is unused, but I'm not well versed with autotools so I don't know the implications of that.
msg328445 - (view) Author: Charalampos Stratakis (cstratak) * Date: 2018-10-25 14:48
Generic reference on the issue:

https://github.com/koalaman/shellcheck/wiki/SC2034
msg328447 - (view) Author: Charalampos Stratakis (cstratak) * Date: 2018-10-25 15:05
Alright the static scanner warns in the case of a typo being made where the variable is actually used, but since the variable is indeed not used, that doesn't not make it a bug.
msg328853 - (view) Author: Michael Felt (Michael.Felt) * Date: 2018-10-29 19:13
This is closed, however, since this was merged the AIX buildbots have failed. This is because the file mode bits lack the -x

root@x066:[/data/prj/python/git/cpython-master]find . -name install-sh -ls
148833829   16 -rw-r--r--  1 root      felt         15368 Oct 29 17:34 ./install-sh

Can this be fixed as part of this issue, or do I need to open a new one?

Currently both AIX build-bots fail in the build phase with:

renaming build/scripts-3.8/pydoc3 to build/scripts-3.8/pydoc3.8
renaming build/scripts-3.8/idle3 to build/scripts-3.8/idle3.8
renaming build/scripts-3.8/2to3 to build/scripts-3.8/2to3-3.8
	./install-sh -c -m 644 ./Tools/gdb/libpython.py python-gdb.py
./install-sh: not found
msg328862 - (view) Author: Michael Felt (Michael.Felt) * Date: 2018-10-29 20:04
FYI: On my manual build server I have coreutils "install" installed, and it seems install-sh is not called in that case (which is why I never saw with manual builds)

FYI: There is also an issue (I hope side-effect) that pyexpat is not building while install-sh is not executing.

I see the new PR - thx for the quick response!
msg328867 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-10-29 20:43
New changeset ed271b2350486b1fa031fa70e1e99d0d9b2b2133 by Victor Stinner in branch 'master':
bpo-34765: install-sh is executable (GH-10225)
https://github.com/python/cpython/commit/ed271b2350486b1fa031fa70e1e99d0d9b2b2133
msg328868 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-10-29 20:43
I made install-sh executable again.
msg328883 - (view) Author: Michael Felt (Michael.Felt) * Date: 2018-10-30 06:00
The AIX build-bots thank you. Back to "failed-test" status.

1721	...    failed test (failure)

1720	...    failed compile (failure)
History
Date User Action Args
2022-04-11 14:59:06adminsetgithub: 78946
2018-10-30 06:00:07Michael.Feltsetmessages: + msg328883
2018-10-29 20:43:37vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg328868

stage: patch review -> resolved
2018-10-29 20:43:12vstinnersetmessages: + msg328867
2018-10-29 20:04:28Michael.Feltsetmessages: + msg328862
2018-10-29 19:37:01vstinnersetstage: resolved -> patch review
pull_requests: + pull_request9539
2018-10-29 19:36:19vstinnersetstatus: closed -> open
resolution: fixed -> (no value)
2018-10-29 19:13:59Michael.Feltsetnosy: + Michael.Felt
messages: + msg328853
2018-10-25 15:05:15cstrataksetmessages: + msg328447
2018-10-25 14:48:41cstrataksetmessages: + msg328445
2018-10-25 14:47:45cstrataksetmessages: + msg328444
2018-10-18 09:32:26vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg327948

stage: patch review -> resolved
2018-10-18 08:52:07vstinnersetnosy: + vstinner
messages: + msg327947
2018-09-26 15:25:35cstrataksetkeywords: + patch
stage: patch review
pull_requests: + pull_request8990
2018-09-21 16:06:25zach.waresetnosy: + zach.ware

messages: + msg325998
versions: - Python 2.7, Python 3.6, Python 3.7
2018-09-21 15:47:07cstratakcreate