<div dir="ltr"><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-07-20 10:39 GMT+02:00 Kristian <span dir="ltr"><<a href="mailto:kristianonline28@gmail.com" target="_blank">kristianonline28@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I create a RPM package with CPack. When installing this package on a<br>
target system, it should create an additional user and group.<br>
<br>
My current solution is a postinstall script, wich runs at the end of<br>
the installation. There, I added commands to create a user and a group<br>
(groupadd, useradd). But somehow, they aren't created when installing<br>
this RPM package. </blockquote><div><br></div><div>Did you specify this post install script to CPackRPM?<div><a href="https://cmake.org/cmake/help/v3.7/module/CPackRPM.html#variable:CPACK_RPM_POST_INSTALL_SCRIPT_FILE">https://cmake.org/cmake/help/v3.7/module/CPackRPM.html#variable:CPACK_RPM_POST_INSTALL_SCRIPT_FILE</a><br></div><div><br></div><div>You can check that the generated RPM does include the script with:</div><div><br></div><div> rpm -qp --scripts  <yourpackage>.rpm</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">For testing, I install this RPM package in a docker<br>
container.<br>
<br>
I also tried, if these commands (groupadd, useradd) are working on the<br>
docker container and they are, so this shouldn't be a problem.<br>
<br>
So, how can I create a user and a group with CPack / CMake?<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/cmake</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div>
</div></div>