Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update install-sh #78946

Closed
stratakis mannequin opened this issue Sep 21, 2018 · 12 comments
Closed

Update install-sh #78946

stratakis mannequin opened this issue Sep 21, 2018 · 12 comments
Labels
3.8 (EOL) end of life build The build process and cross-build

Comments

@stratakis
Copy link
Mannequin

stratakis mannequin commented Sep 21, 2018

BPO 34765
Nosy @vstinner, @zware, @aixtools, @stratakis
PRs
  • bpo-34765: Update the install-sh file. #9592
  • bpo-34765: install-sh is executable #10225
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2018-10-29.20:43:37.885>
    created_at = <Date 2018-09-21.15:47:07.535>
    labels = ['build', '3.8']
    title = 'Update install-sh'
    updated_at = <Date 2018-10-30.06:00:07.576>
    user = 'https://github.com/stratakis'

    bugs.python.org fields:

    activity = <Date 2018-10-30.06:00:07.576>
    actor = 'Michael.Felt'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-10-29.20:43:37.885>
    closer = 'vstinner'
    components = ['Build']
    creation = <Date 2018-09-21.15:47:07.535>
    creator = 'cstratak'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34765
    keywords = ['patch']
    message_count = 12.0
    messages = ['325996', '325998', '327947', '327948', '328444', '328445', '328447', '328853', '328862', '328867', '328868', '328883']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'zach.ware', 'Michael.Felt', 'cstratak']
    pr_nums = ['9592', '10225']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue34765'
    versions = ['Python 3.8']

    @stratakis
    Copy link
    Mannequin Author

    stratakis mannequin commented Sep 21, 2018

    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

    @stratakis stratakis mannequin added 3.7 (EOL) end of life 3.8 (EOL) end of life build The build process and cross-build labels Sep 21, 2018
    @zware
    Copy link
    Member

    zware commented Sep 21, 2018

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

    @zware zware removed the 3.7 (EOL) end of life label Sep 21, 2018
    @vstinner
    Copy link
    Member

    New changeset b7ad31c by Victor Stinner (stratakis) in branch 'master':
    bpo-34765: Update the install-sh file (GH-9592)
    b7ad31c

    @vstinner
    Copy link
    Member

    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.

    @stratakis
    Copy link
    Mannequin Author

    stratakis mannequin commented Oct 25, 2018

    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.

    @stratakis
    Copy link
    Mannequin Author

    stratakis mannequin commented Oct 25, 2018

    Generic reference on the issue:

    https://github.com/koalaman/shellcheck/wiki/SC2034

    @stratakis
    Copy link
    Mannequin Author

    stratakis mannequin commented Oct 25, 2018

    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.

    @aixtools
    Copy link
    Contributor

    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

    @vstinner vstinner reopened this Oct 29, 2018
    @aixtools
    Copy link
    Contributor

    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!

    @vstinner
    Copy link
    Member

    New changeset ed271b2 by Victor Stinner in branch 'master':
    bpo-34765: install-sh is executable (GH-10225)
    ed271b2

    @vstinner
    Copy link
    Member

    I made install-sh executable again.

    @aixtools
    Copy link
    Contributor

    The AIX build-bots thank you. Back to "failed-test" status.

    1721 ... failed test (failure)

    1720 ... failed compile (failure)

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 (EOL) end of life build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants