2009/11/24 W. Dobbe <winfried_...@xmsnet.nl>: > > I installed cmake CVS HEAD of 24-11-2009 because I need the post install > script feature of issue 8988.
In your example you seems to be using CPACK_RPM_PACKAGE_REQUIRES and not CPACK_RPM_SPEC_POSTINSTALL > > When I create the most basic cmake project project: > > cmake_minimum_required(VERSION 2.8) > project(rpmtest) > > add_executable(dummy src/main.cpp) > > install( TARGETS dummy RUNTIME DESTINATION bin ) > > set( CPACK_GENERATOR RPM ) > set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Vidigo build system." ) > set( CPACK_PACKAGE_DESCRIPTION_FILE > ${PROJECT_SOURCE_DIR}/install/dummy_descr.txt ) > set( CPACK_PACKAGE_VENDOR Vidigo ) > set( CPACK_PACKAGE_VERSION_MAJOR 1 ) > set( CPACK_PACKAGE_VERSION_MINOR 0 ) > set( CPACK_PACKAGE_VERSION_PATCH 0 ) > > set( CPACK_RPM_PACKAGE_RELEASE 1 ) > set( CPACK_RPM_PACKAGE_LICENSE Proprietary ) > set( CPACK_RPM_PACKAGE_REQUIRES cmake>=2.6 python>=2.5 ) > > #set( CPACK_SET_DESTDIR ON ) > include(CPack) > > > creating the RPM package fails with the following errors: > > winfr...@kwlaptop:~/generated/testbuild> cpack -D CPACK_RPM_PACKAGE_DEBUG=1 > CPack: Create package using RPM > CPack: Install projects > CPack: - Run preinstall target for: rpmtest > CPack: - Install project: rpmtest > CPack: Compress package > CPackRPM:Debug: rpmbuild version is <4.7.1> > CPackRPM:Debug: User defined Requires: > cmake>=2.6;python>=2.5 > CPackRPM:Debug: CPACK_TOPLEVEL_DIRECTORY = > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM > CPackRPM:Debug: CPACK_TOPLEVEL_TAG = Linux > CPackRPM:Debug: CPACK_TEMPORARY_DIRECTORY = > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux > CPackRPM:Debug: CPACK_OUTPUT_FILE_NAME = rpmtest-1.0.0-Linux.rpm > CPackRPM:Debug: CPACK_OUTPUT_FILE_PATH = > /home/winfried/generated/testbuild/rpmtest-1.0.0-Linux.rpm > CPackRPM:Debug: CPACK_PACKAGE_FILE_NAME = rpmtest-1.0.0-Linux > CPackRPM:Debug: CPACK_RPM_BINARY_SPECFILE = > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/SPECS/rpmtest.spec > CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = rpmtest 1.0.0 > CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux.rpm > CPackRPM: Will use GENERATED spec file: > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/SPECS/rpmtest.spec > CPackRPM:Debug: You may consult rpmbuild logs in: > CPackRPM:Debug: - > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmbuild.err > CPackRPM:Debug: - > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmbuild.out > CPack: Finalize package > CPack Error: Problem copying the package: > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux.rpm > to /home/winfried/generated/testbuild/rpmtest-1.0.0-Linux.rpm > CPack Error: Error when generating package: rpmtest > > > the contents of the mentioned rpmbuild.err is: > + umask 022 > + cd /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/BUILD > + mv > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/tmpBBroot > + exit 0 > + umask 022 > + cd /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/BUILD > + /bin/rm -rf > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux > ++ dirname > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux > + /bin/mkdir -p /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM > + /bin/mkdir > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux > + mv /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/tmpBBroot > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux > + exit 0 > error: File not found: > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux/usr/bin/dummy > File not found: > /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux/usr/bin/dummy Would you be able to send me (may be directly because other may not care about that) the spec file corresponding to the fail case? Moreover would you try to replace the current CPackRPM.cmake with the one I attach to this mail and retry with the very same CMakeLists.txt. > O.S.: opensuse 11.2 (rpmbuild 4.7.1) > > regards, Winfried > > ps: I'm not sure if I am supposed to file bug reports against CVS versions ? In the bug tracker I don't know (may be Bill can tell that), However reporting on the ML is a good practice because it will makes better next release :-) -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org
CPackRPM.cmake
Description: Binary data
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake