> 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?
> 
> Andrei Sekretenko wrote:
>     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.

Thanks for the thorough reply and for adding the docs, looks good.


- Greg


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


On May 20, 2020, 9:31 p.m., Andrei Sekretenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72492/
> -----------------------------------------------------------
> 
> (Updated May 20, 2020, 9:31 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 7b84f12b678319df3847cffbf025324dfa09f171 
>   cmake/CompilationConfigure.cmake af1a8b57079ceb00b0fcfc218f8989117b69aef2 
>   src/CMakeLists.txt 810acbf0d92df7bc095d8fd5c40c2c4dce8cff34 
>   src/checks/CMakeLists.txt a3a6aed18429979cd43b9d8a7be9753f4bd3feba 
>   src/cli/CMakeLists.txt e99b055ebb0fc0a97955bcb71c74bd9a8c6923ed 
>   src/java/CMakeLists.txt 81eb9b56ac91b1e84f5f47f40c5a271bf6842ec0 
>   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/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Sekretenko
> 
>

Reply via email to