Opened 3 years ago

Closed 3 years ago

#51988 closed update (fixed)

ansible @2.1.0.0.1 new upstream version 2.1.1.0-1 is available

Reported by: lpancescu (Laurențiu Păncescu) Owned by: adfernandes (Andrew Fernandes)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: blair (Blair Zajac), steenzout (Pedro Salgado)
Port: ansible

Description

Could you please upgrade the Ansible port to 2.1.1.0-1? It fixes a bug preventing the synchronize module from working properly when using it with Vagrant boxes (https://github.com/ansible/ansible/issues/16284).

Thanks!

Change History (5)

comment:1 Changed 3 years ago by mf2k (Frank Schima)

Cc: adfernandes@… removed
Owner: changed from macports-tickets@… to adfernandes@…
Version: 2.3.4

comment:2 Changed 3 years ago by adfernandes (Andrew Fernandes)

Okay - working on it. A bit of testing and patching is needed since there's a non-ASCII test that fails:

DEBUG: euid/egid changed to: 0/0
DEBUG: chowned /opt/local/var/macports/build/_Users_andrew_Local_dports_sysutils_ansible/ansible/work/ansible-2.1.1.0-1/test/integration/roles/test_unarchive/files/foo.txt to macports
DEBUG: euid/egid changed to: 502/20
DEBUG: euid/egid changed to: 0/0
DEBUG: setting attributes on /opt/local/var/macports/build/_Users_andrew_Local_dports_sysutils_ansible/ansible/work/ansible-2.1.1.0-1/test/integration/roles/test_unarchive/files/foo.txt
DEBUG: euid/egid changed to: 502/20
--->  Patching test-unarchive-nonascii-àâæçéèïîôœ.tar.gz: s#/etc/ansible#/opt/local/etc/ansible#g
DEBUG: Executing reinplace: /usr/bin/sed s#/etc/ansible#/opt/local/etc/ansible#g < /opt/local/var/macports/build/_Users_andrew_Local_dports_sysutils_ansible/ansible/work/ansible-2.1.1.0-1/test/integration/roles/test_unarchive/files/test-unarchive-nonascii-àâæçéèïîôœ.tar.gz >@ file10 2>@stderr
sed: RE error: illegal byte sequence
DEBUG: child process exited abnormally
    while executing
"exec /usr/bin/sed s#/etc/ansible#/opt/local/etc/ansible#g < /opt/local/var/macports/build/_Users_andrew_Local_dports_sysutils_ansible/ansible/work/ans..."
    ("eval" body line 1)
    invoked from within
"eval exec $cmdline"
Error: reinplace: child process exited abnormally
Error: org.macports.patch for port ansible returned: reinplace sed(1) failed
DEBUG: Error code: NONE
DEBUG: Backtrace: reinplace sed(1) failed
    while executing
"proc-org.macports.patch-patch-0 org.macports.patch"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
Warning: targets not executed for ansible: org.macports.activate org.macports.patch org.macports.configure org.macports.build org.macports.destroot org.macports.install

It will take a day or so for me to get around to it, though!

comment:3 Changed 3 years ago by lpancescu (Laurențiu Păncescu)

Thanks, I appreciate the effort!

Is that code trying to use /usr/bin/sed to patch a binary archive? Apple's sed defaults to expecting UTF-8 - I assume it tries to read the binary data as an UTF-8 stream, and it fails decoding it. If that's the case, sed should probably be forced to treat the input stream as binary data; I assume invoking it as 'LANG=C LC_ALL=C sed' should be enough, but I haven't tested it.

comment:4 Changed 3 years ago by larryv (Lawrence Velázquez)

That’s an unorthodox file to be patching, to say the least. You can try tweaking the patch phase:

  • dports/sysutils/ansible/Portfile

    diff --git a/dports/sysutils/ansible/Portfile b/dports/sysutils/ansible/Portfile
    index 44c6325..dd5b4a9 100644
    a b post-fetch { 
    5050patch {
    5151    fs-traverse f ${worksrcpath} {
    5252        if {[file isfile ${f}] && ![regexp {\.(ico|png|eot|ttf|woff|reg)$} ${f} match] && ![regexp {\.git} ${f} match] && ![regexp {v2/test/test.yml} ${f} match]} {
    53             reinplace "s#/etc/ansible#${prefix}/etc/ansible#g" ${f}
    54             reinplace "s#/usr/share/ansible#${prefix}/share/ansible#g" ${f}
     53            reinplace -locale C "s#/etc/ansible#${prefix}/etc/ansible#g" ${f}
     54            reinplace -locale C "s#/usr/share/ansible#${prefix}/share/ansible#g" ${f}
    5555        }
    5656    }
    5757}

comment:5 Changed 3 years ago by adfernandes (Andrew Fernandes)

Resolution: fixed
Status: newclosed

Yes, I can't recall why all the reinplace stuff... but I didn't like forcing the locale because upstream is pretty good about keeping up UTF-8 support.

Turns out the solution is just to add .gz to one of the ignored file extensions.

Fixed in r151238

Note: See TracTickets for help on using tickets.