•  
      request #18379 Shebang error when packing RPM Plugin Webdav
    Infos
    #18379
    Matevz Langus (matevy)
    2020-11-30 20:21
    2020-11-27 12:09
    19925
    Details
    Shebang error when packing RPM Plugin Webdav
    on newer systems where Python2 and Python3 coexist there is an error:

    *** ERROR: ambiguous python shebang in /usr/share/tuleap/plugins/webdav/vendor/sabre/dav/bin/googlecode_upload.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
    *** ERROR: ambiguous python shebang in /usr/share/tuleap/plugins/webdav/vendor/sabre/dav/bin/naturalselection.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.

    The fix is simple, against:

    https://github.com/Enalean/dav.git (master branch)
    Is there a procedure how to commit this if any interest on your side for this?

    diff --git a/bin/googlecode_upload.py b/bin/googlecode_upload.py
    index caafd5de..ee57c949 100755
    --- a/bin/googlecode_upload.py
    +++ b/bin/googlecode_upload.py
    @@ -1,4 +1,4 @@
    -#!/usr/bin/env python
    +#!/usr/bin/python2
    #
    # Copyright 2006, 2007 Google Inc. All Rights Reserved.
    # Author: danderson@google.com (David Anderson)
    diff --git a/bin/naturalselection b/bin/naturalselection
    index 7e20439c..563713d6 100755
    --- a/bin/naturalselection
    +++ b/bin/naturalselection
    @@ -1,4 +1,4 @@
    -#!/usr/bin/env python
    +#!/usr/bin/python2

    #
    # Copyright (c) 2009-2010 Evert Pot
    Other
    12.2
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Acknowledged
    Empty
    Attachments
    Empty
    References
    Referenced by request #18379

    Follow-ups

    User avatar
    Thomas Gerbet (tgerbet)2020-11-27 13:06
    Hi,

    For what OS are you trying to package this plugin? AFAIK we do not encounter the issue (yet) on the officially supported packages.

    The best course of action for this plugin would be to update the library it depends on to the latest version (some preliminary work/quick & dirty tests was done in gerrit #19513). We only maintain a fork of this library to ease the usage of this very old version with Composer.
    An intermediary acceptable step would be to actually do not ship this bin/ folder as it is not needed at runtime. This could be done by a adding a .gitattributes file in the repo Enalean/dav repo and then on the tuleap repo side to tell Composer to use this updated "version" of the repo.

    • Status changed from New to Acknowledged
    User avatar
    Matevz Langus (matevy)2020-11-27 12:57
    sorry, not related to master branch but to hash ec0a5d15214e7f064cd162c9a4299edaa3cc130b