mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Sekretenko <asekrete...@mesosphere.io>
Subject Re: Review Request 72492: Introduced install target into cmake build.
Date Wed, 20 May 2020 10:17:14 GMT


> On May 19, 2020, 8:57 p.m., Greg Mann wrote:
> > cmake/CompilationConfigure.cmake
> > Line 387 (original), 387 (patched)
> > <https://reviews.apache.org/r/72492/diff/1/?file=2231372#file2231372line387>
> >
> >     Why do we need to add another mechanism to set the install dir with MESOS_POSTINSTALL_PREFIX?

This is not exactly "another mechanism to set the install dir". This is a thing complimentary
to `CMAKE_INSTALL_PREFIX`.

---
`MESOS_POSTINSTALL_PREFIX` targets package managers that have the following architecture.

On the build system, it builds the package via cmake install into a prefix:
```
cmake -DCMAKE_INSTALL_PREFIX=/home/package_manager/build/prefix
cmake --build . --target install
```
then packages the contents of `/home/package_manager/build/prefix` into some king of archive
and store it into their package repository.

On the target system, the package manager unpacks this archive into, say, `/opt/packages/mesos`
and expects everything to just work after that.

---
Without `MESOS_POSTINSTALL_PREFIX`, package managers are limited to two options:

1) during the build step, use the same `CMAKE_INSTALL_PREFIX` as the one that will be used
on the target system (in this example, `-DCMAKE_INSTALL_PREFIX=/opt/packages/mesos`). In some
package managers this is not possible.

2) during the build step, specify `CMAKE_INSTALL_RPATH` to make the dynamic linking work correctly
after install (in this example, `-DCMAKE_INSTALL_RPATH=/opt/packages/mesos/lib`). Note that
all the default filesystem locations in Mesos flags (like `launcher_dir`) will be incorrect;
users of such package will always have to specify `launcher_dir` and other locations in mesos
package explicitly.

Also note that if option (2) is chosen, then it will not be possible to verify that the final
layout works by just running installed `mesos-tests` binary. 
Given that the final layout contains a nontrivial amount of binaries some of which are used
only in very specific cases, ability to run `mesos-tests` on the final installation simplifies
package development.

---
If the added complexity is worth the value, then I'll really need to document this flag (and
the ability to run `mesos-tests` against the final installation).
Also, just realized that `MESOS_FINAL_PREFIX` might be better than `MESOS_POSTINSTALL_PREFIX`;
will try to see how that reads.


- Andrei


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


On May 11, 2020, 7:36 p.m., Andrei Sekretenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72492/
> -----------------------------------------------------------
> 
> (Updated May 11, 2020, 7:36 p.m.)
> 
> 
> Review request for mesos and Greg Mann.
> 
> 
> Bugs: MESOS-6771
>     https://issues.apache.org/jira/browse/MESOS-6771
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Introduced install target into cmake build.
> 
> 
> Diffs
> -----
> 
>   3rdparty/CMakeLists.txt 119813e290f1f82337d2723922ee3771614bd036 
>   cmake/CompilationConfigure.cmake f9511fc46e87d0bd27fb01fabc674d0ee0799c07 
>   src/CMakeLists.txt 96cd8674d6433092a942bddf32b20bda99f3f49a 
>   src/checks/CMakeLists.txt a3a6aed18429979cd43b9d8a7be9753f4bd3feba 
>   src/cli/CMakeLists.txt e99b055ebb0fc0a97955bcb71c74bd9a8c6923ed 
>   src/java/CMakeLists.txt 29422e90b10647dc1bf78237725e89b15c69e6aa 
>   src/launcher/CMakeLists.txt 73587f4d1d0897fc0ca7e46955b67bca094696bc 
>   src/local/CMakeLists.txt 7be3ede92392320c88d9d6ffde893a876e6dc2c6 
>   src/log/CMakeLists.txt 1c944706792c49fdd6f0304e08e8171a26949b11 
>   src/master/CMakeLists.txt f4b15b590f8065ac6ce374da09bd650250a5281f 
>   src/resource_provider/storage/CMakeLists.txt 90fdd61f063e32c4d412fb610fa9a0d69264f3e0

>   src/slave/CMakeLists.txt f42a4a6bda7ebb0af05df051bd5f07fbef33bf6d 
>   src/slave/container_loggers/CMakeLists.txt b4f79a4da156808e81b44bc109d760ccb6091b12

>   src/slave/containerizer/mesos/CMakeLists.txt 92f4a49fdab43bb6767021e0332e2eaa205b0fec

>   src/slave/qos_controllers/CMakeLists.txt ff9cc154c2f28235ab4fa46af761501de48a43c0 
>   src/slave/resource_estimators/CMakeLists.txt 6f32421ab33ee8a25b30614594177f795da391ae

>   src/usage/CMakeLists.txt e51fe1e497d0f0565f9318514492ffce86e908a0 
> 
> 
> Diff: https://reviews.apache.org/r/72492/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Sekretenko
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message