[122496] branches/gsoc14-pip2port

Lawrence Velázquez larryv at macports.org
Wed Jul 23 07:35:52 PDT 2014


On Jul 23, 2014, at 6:12 AM, gaurav at macports.org wrote:
> Revision
> 122496
> Author
> gaurav at macports.org
> Date
> 2014-07-23 03:12:35 -0700 (Wed, 23 Jul 2014)
> Log Message
> 
> Used openssl for checksum generation

> --- branches/gsoc14-pip2port/pypi2port.py	2014-07-23 10:11:24 UTC (rev 122495)
> +++ branches/gsoc14-pip2port/pypi2port.py	2014-07-23 10:12:35 UTC (rev 122496)

> +            command = "openssl rmd160 "+file_name
> +            checksums.insert(0,subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT).split('=')[1].strip())
> +
> +            command = "openssl sha256 "+file_name
> +            checksums.insert(1,subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT).split('=')[1].strip())

Not all versions of OpenSSL support these commands.

    % FOO=~/Downloads/MBTA-system_map-front.pdf
    % /opt/local/bin/openssl rmd160 $FOO > /dev/null
    % /opt/local/bin/openssl sha256 $FOO > /dev/null
    % /usr/bin/openssl rmd160 $FOO > /dev/null
    % /usr/bin/openssl sha256 $FOO > /dev/null
    openssl:Error: 'sha256' is an invalid command.

You should use the "dgst" command instead.

    % /opt/local/bin/openssl dgst -rmd160 $FOO > /dev/null
    % /opt/local/bin/openssl dgst -sha256 $FOO > /dev/null
    % /usr/bin/openssl dgst -rmd160 $FOO > /dev/null
    % /usr/bin/openssl dgst -sha256 $FOO > /dev/null
    %

vq


More information about the macports-dev mailing list