> On Jan. 30, 2016, 5:11 p.m., Jie Yu wrote:
> > src/common/command_utils.cpp, line 172
> > <https://reviews.apache.org/r/43014/diff/1/?file=1227122#file1227122line172>
> >
> >     On ubuntu, we don't have sha512sum but shasum (and sha512).
> >     
> >     Here is what I am thinking:
> >     1) we need to introduce another command util 'which' that searches PATH 
> > and returns the full path to the command (just shelling out to 'which' 
> > command).
> >     2) Then, we use 'which' to check for shasum, sha512sum, etc., and then 
> > use the one that's available.
> 
> haosdent huang wrote:
>     which ubuntu version you use, I use ubuntu 14.04. Alos could found 
> `sha512sum` in `/usr/bin/sha512sum`.
> 
> Jojy Varghese wrote:
>     I thought `which` will work only if the command is in the path.

The command "which" is not avaiable in the `centos:7` image

```sh
$ docker run -it --rm centos:7 which ls
exec: "which": executable file not found in $PATH
Error response from daemon: Cannot start container 
f13beade3abf9139ddad4ec9303a191a7e5a7cc28d011d378c31e59ecf360549: [8] System 
error: exec: "which": executable file not found in $PATH
```

To get it one need to run "yum install which".


- Shuai


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43014/#review117112
-----------------------------------------------------------


On Jan. 30, 2016, 5:03 p.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43014/
> -----------------------------------------------------------
> 
> (Updated Jan. 30, 2016, 5:03 p.m.)
> 
> 
> Review request for mesos, Jie Yu, Jojy Varghese, and Vinod Kone.
> 
> 
> Bugs: MESOS-4556
>     https://issues.apache.org/jira/browse/MESOS-4556
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Fix ShasumTest.SHA512SimpleFile failed on centos7.
> 
> 
> Diffs
> -----
> 
>   src/common/command_utils.cpp 722d0b42a995a6a5a6cfd08f3c356dabd1080cd1 
>   src/tests/common/command_utils_tests.cpp 
> e81c724fc28717f5cb1849d75a066b6da713cd44 
> 
> Diff: https://reviews.apache.org/r/43014/diff/
> 
> 
> Testing
> -------
> 
> # check in CentOS 7.
> sudo ./bin/mesos-tests.sh --gtest_filter="ShasumTest.SHA512SimpleFile"
> 
> 
> Thanks,
> 
> haosdent huang
> 
>

Reply via email to