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