RPM: should not put system directories into spec

Using lines like this:
%dir "/usr/share/icons"
in spec file causes conflict during installation (since this directory is already part of a system package), I think only files and dirs belonging to doomsday should be explicitly specified.

Tested in Fedora 31, RPM created from source using 'make package'

Comments

  • The RPM creation is fully controlled by CMake's CPack system, so not sure what can be done about that. If you figure out some improvements, patches/PRs are welcome. :smile:
  • I modified doomsday/cmake/PackagingUnix.cmake:

    # CPack: Generator-specific configuration for Unix
    if (CPACK_GENERATOR STREQUAL DEB)
    string (REPLACE x86_64 amd64 CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME})

    elseif (CPACK_GENERATOR STREQUAL RPM)
    string (REPLACE _x86_64 -1.x86_64 CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME})
    string (REPLACE _i386 -1.i686 CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME})
    string (REPLACE y_ y- CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME})
    list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
    "/usr/share/icons"
    "/usr/share/icons/hicolor"
    "/usr/share/icons/hicolor/256x256"
    "/usr/share/icons/hicolor/256x256/apps"
    "/usr/lib64/cmake"
    "/usr/share/metainfo"
    "/usr/share/applications"
    )

    endif ()

    I added CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION which defines which files or dirs to exclude from spec. Tested on Fedora 31, works fine.
  • Nice, let me take that into use.

    Is issue 2376 resolved by using the newer compiler in Fedora 31?
  • Yes, RPM built from source on Fedora 31 machine loads levels just fine.
Sign In or Register to comment.