You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Kevin Klues <kl...@gmail.com> on 2015/12/15 02:09:18 UTC

Re: Review Request 41243: Updated how we find the .git directory in bootstrap.

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

(Updated Dec. 15, 2015, 1:09 a.m.)


Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joseph Wu, and Vinod Kone.


Summary (updated)
-----------------

Updated how we find the .git directory in bootstrap.


Bugs: MESOS-4125
    https://issues.apache.org/jira/browse/MESOS-4125


Repository: mesos


Description
-------

When building from git, bootstrap will (among other things) install
pre-commit and post-rewrite hooks into the .git/hooks directory of the
mesos tree. However the current implementation always assumes that .git
exists in the same directory as the bootstrap file. This may not always
be true.

Most notably, it is not true if the mesos tree is included as a
submodule inside another project. When included as a submodule, .git is
no longer a directory, but rather a file whose text contains a pointer
back to the actual location of the .git folder inside the containing
project. To get at this directory, we need to run 'git rev-parse
--git-dir' instead of simply assuming that the local .git is the proper
directory.


Diffs
-----

  bootstrap 89d986fd95dc16bbb79623ef92e3b14a2e7009f9 

Diff: https://reviews.apache.org/r/41243/diff/


Testing
-------


Thanks,

Kevin Klues


Re: Review Request 41243: Updated how we find the .git directory in bootstrap.

Posted by Till Toenshoff <to...@me.com>.

> On Dec. 17, 2015, 3:42 a.m., Till Toenshoff wrote:
> > Ship It!

Sorry for the delay -- this patch now needs a rebase.


- Till


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


On Dec. 17, 2015, 3:45 a.m., Kevin Klues wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41243/
> -----------------------------------------------------------
> 
> (Updated Dec. 17, 2015, 3:45 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joseph Wu, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-4125
>     https://issues.apache.org/jira/browse/MESOS-4125
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When building from git, bootstrap will (among other things) install
> pre-commit and post-rewrite hooks into the .git/hooks directory of the
> mesos tree. However the current implementation always assumes that .git
> exists in the same directory as the bootstrap file. This may not always
> be true.
> 
> Most notably, it is not true if the mesos tree is included as a
> submodule inside another project. When included as a submodule, .git is
> no longer a directory, but rather a file whose text contains a pointer
> back to the actual location of the .git folder inside the containing
> project. To get at this directory, we need to run 'git rev-parse
> --git-dir' instead of simply assuming that the local .git is the proper
> directory.
> 
> 
> Diffs
> -----
> 
>   bootstrap 89d986fd95dc16bbb79623ef92e3b14a2e7009f9 
> 
> Diff: https://reviews.apache.org/r/41243/diff/
> 
> 
> Testing
> -------
> 
> Tested on native Mac OS X El Capitan
> Tested on vagrant boxes for bento/centos-7.1, ubuntu/trusty64, and https://github.com/tommy-muehle/puppet-vagrant-boxes/releases/download/1.0.0/centos-6.6-x86_64.box
> Also tested on docker image centos:7
> 
> 
> Thanks,
> 
> Kevin Klues
> 
>


Re: Review Request 41243: Updated how we find the .git directory in bootstrap.

Posted by Till Toenshoff <to...@me.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41243/#review110883
-----------------------------------------------------------

Ship it!


Ship It!

- Till Toenshoff


On Dec. 17, 2015, 3:08 a.m., Kevin Klues wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41243/
> -----------------------------------------------------------
> 
> (Updated Dec. 17, 2015, 3:08 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joseph Wu, and Vinod Kone.
> 
> 
> Bugs: MESOS-4125
>     https://issues.apache.org/jira/browse/MESOS-4125
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When building from git, bootstrap will (among other things) install
> pre-commit and post-rewrite hooks into the .git/hooks directory of the
> mesos tree. However the current implementation always assumes that .git
> exists in the same directory as the bootstrap file. This may not always
> be true.
> 
> Most notably, it is not true if the mesos tree is included as a
> submodule inside another project. When included as a submodule, .git is
> no longer a directory, but rather a file whose text contains a pointer
> back to the actual location of the .git folder inside the containing
> project. To get at this directory, we need to run 'git rev-parse
> --git-dir' instead of simply assuming that the local .git is the proper
> directory.
> 
> 
> Diffs
> -----
> 
>   bootstrap 89d986fd95dc16bbb79623ef92e3b14a2e7009f9 
> 
> Diff: https://reviews.apache.org/r/41243/diff/
> 
> 
> Testing
> -------
> 
> Tested on native Mac OS X El Capitan
> Tested on vagrant boxes for bento/centos-7.1, ubuntu/trusty64, and https://github.com/tommy-muehle/puppet-vagrant-boxes/releases/download/1.0.0/centos-6.6-x86_64.box
> Also tested on docker image centos:7
> 
> 
> Thanks,
> 
> Kevin Klues
> 
>


Re: Review Request 41243: Updated how we find the .git directory in bootstrap.

Posted by Kevin Klues <kl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41243/
-----------------------------------------------------------

(Updated Dec. 17, 2015, 3:08 a.m.)


Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joseph Wu, and Vinod Kone.


Bugs: MESOS-4125
    https://issues.apache.org/jira/browse/MESOS-4125


Repository: mesos


Description
-------

When building from git, bootstrap will (among other things) install
pre-commit and post-rewrite hooks into the .git/hooks directory of the
mesos tree. However the current implementation always assumes that .git
exists in the same directory as the bootstrap file. This may not always
be true.

Most notably, it is not true if the mesos tree is included as a
submodule inside another project. When included as a submodule, .git is
no longer a directory, but rather a file whose text contains a pointer
back to the actual location of the .git folder inside the containing
project. To get at this directory, we need to run 'git rev-parse
--git-dir' instead of simply assuming that the local .git is the proper
directory.


Diffs
-----

  bootstrap 89d986fd95dc16bbb79623ef92e3b14a2e7009f9 

Diff: https://reviews.apache.org/r/41243/diff/


Testing (updated)
-------

Tested on native Mac OS X El Capitan
Tested on vagrant boxes for bento/centos-7.1, ubuntu/trusty64, and https://github.com/tommy-muehle/puppet-vagrant-boxes/releases/download/1.0.0/centos-6.6-x86_64.box
Also tested on docker image centos:7


Thanks,

Kevin Klues


Re: Review Request 41243: Updated how we find the .git directory in bootstrap.

Posted by Benjamin Bannier <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41243/#review110497
-----------------------------------------------------------

Ship it!


- Benjamin Bannier


On Dec. 15, 2015, 3:10 p.m., Kevin Klues wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41243/
> -----------------------------------------------------------
> 
> (Updated Dec. 15, 2015, 3:10 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joseph Wu, and Vinod Kone.
> 
> 
> Bugs: MESOS-4125
>     https://issues.apache.org/jira/browse/MESOS-4125
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When building from git, bootstrap will (among other things) install
> pre-commit and post-rewrite hooks into the .git/hooks directory of the
> mesos tree. However the current implementation always assumes that .git
> exists in the same directory as the bootstrap file. This may not always
> be true.
> 
> Most notably, it is not true if the mesos tree is included as a
> submodule inside another project. When included as a submodule, .git is
> no longer a directory, but rather a file whose text contains a pointer
> back to the actual location of the .git folder inside the containing
> project. To get at this directory, we need to run 'git rev-parse
> --git-dir' instead of simply assuming that the local .git is the proper
> directory.
> 
> 
> Diffs
> -----
> 
>   bootstrap 89d986fd95dc16bbb79623ef92e3b14a2e7009f9 
> 
> Diff: https://reviews.apache.org/r/41243/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Kevin Klues
> 
>


Re: Review Request 41243: Updated how we find the .git directory in bootstrap.

Posted by Kevin Klues <kl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41243/
-----------------------------------------------------------

(Updated Dec. 15, 2015, 3:10 p.m.)


Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joseph Wu, and Vinod Kone.


Bugs: MESOS-4125
    https://issues.apache.org/jira/browse/MESOS-4125


Repository: mesos


Description
-------

When building from git, bootstrap will (among other things) install
pre-commit and post-rewrite hooks into the .git/hooks directory of the
mesos tree. However the current implementation always assumes that .git
exists in the same directory as the bootstrap file. This may not always
be true.

Most notably, it is not true if the mesos tree is included as a
submodule inside another project. When included as a submodule, .git is
no longer a directory, but rather a file whose text contains a pointer
back to the actual location of the .git folder inside the containing
project. To get at this directory, we need to run 'git rev-parse
--git-dir' instead of simply assuming that the local .git is the proper
directory.


Diffs (updated)
-----

  bootstrap 89d986fd95dc16bbb79623ef92e3b14a2e7009f9 

Diff: https://reviews.apache.org/r/41243/diff/


Testing
-------


Thanks,

Kevin Klues


Re: Review Request 41243: Updated how we find the .git directory in bootstrap.

Posted by Kevin Klues <kl...@gmail.com>.

> On Dec. 15, 2015, 10:43 a.m., Benjamin Bannier wrote:
> >

I agree with all of your comments, and the code has been updated appropriately.


- Kevin


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


On Dec. 15, 2015, 3:10 p.m., Kevin Klues wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41243/
> -----------------------------------------------------------
> 
> (Updated Dec. 15, 2015, 3:10 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joseph Wu, and Vinod Kone.
> 
> 
> Bugs: MESOS-4125
>     https://issues.apache.org/jira/browse/MESOS-4125
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When building from git, bootstrap will (among other things) install
> pre-commit and post-rewrite hooks into the .git/hooks directory of the
> mesos tree. However the current implementation always assumes that .git
> exists in the same directory as the bootstrap file. This may not always
> be true.
> 
> Most notably, it is not true if the mesos tree is included as a
> submodule inside another project. When included as a submodule, .git is
> no longer a directory, but rather a file whose text contains a pointer
> back to the actual location of the .git folder inside the containing
> project. To get at this directory, we need to run 'git rev-parse
> --git-dir' instead of simply assuming that the local .git is the proper
> directory.
> 
> 
> Diffs
> -----
> 
>   bootstrap 89d986fd95dc16bbb79623ef92e3b14a2e7009f9 
> 
> Diff: https://reviews.apache.org/r/41243/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Kevin Klues
> 
>


Re: Review Request 41243: Updated how we find the .git directory in bootstrap.

Posted by Benjamin Bannier <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41243/#review110468
-----------------------------------------------------------



bootstrap (lines 16 - 23)
<https://reviews.apache.org/r/41243/#comment170395>

    We do need to provide something here since we cannot assume e.g., GNU coreutils' `readlink`, but I am not convinced that adding condensed advanced sh will be maintainable.
    
    Since we already assume some Python elsewhere, why not just fork out to some tooling there, e.g., `os.path` (note inverted parameter order)?
    
        python -c "import os.path; print os.path.relpath('"$path"', '"$common"')"



bootstrap (lines 28 - 29)
<https://reviews.apache.org/r/41243/#comment170397>

    All these vars should probably be quoted.



bootstrap (lines 32 - 33)
<https://reviews.apache.org/r/41243/#comment170398>

    quoting


- Benjamin Bannier


On Dec. 15, 2015, 1:09 a.m., Kevin Klues wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41243/
> -----------------------------------------------------------
> 
> (Updated Dec. 15, 2015, 1:09 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joseph Wu, and Vinod Kone.
> 
> 
> Bugs: MESOS-4125
>     https://issues.apache.org/jira/browse/MESOS-4125
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When building from git, bootstrap will (among other things) install
> pre-commit and post-rewrite hooks into the .git/hooks directory of the
> mesos tree. However the current implementation always assumes that .git
> exists in the same directory as the bootstrap file. This may not always
> be true.
> 
> Most notably, it is not true if the mesos tree is included as a
> submodule inside another project. When included as a submodule, .git is
> no longer a directory, but rather a file whose text contains a pointer
> back to the actual location of the .git folder inside the containing
> project. To get at this directory, we need to run 'git rev-parse
> --git-dir' instead of simply assuming that the local .git is the proper
> directory.
> 
> 
> Diffs
> -----
> 
>   bootstrap 89d986fd95dc16bbb79623ef92e3b14a2e7009f9 
> 
> Diff: https://reviews.apache.org/r/41243/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Kevin Klues
> 
>