Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-305

Do not build packages into / with make package

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.1
    • Component/s: Core
    • Labels:
      None

      Description

      Note: when building and trying to make a package I get this error:

      [smudd@localhost build]$ make package
      ...
      [ 98%] Built target hintfilter
      [100%] Built target maxadmin
      Run CPack packaging tool...
      CPack: Create package using TGZ
      CPack: Install projects
      CPack: - Run preinstall target for: MaxScale
      CPack: - Install project: MaxScale
      CMake Error at /home/smudd/github.com/mariadb-corporation/MaxScale/build/cmake_install.cmake:60 (FILE):
      file INSTALL cannot copy file
      "/home/smudd/github.com/mariadb-corporation/MaxScale/server/maxscale_template.cnf"
      to "/etc/maxscale.cnf".

      CMake Error at /home/smudd/github.com/mariadb-corporation/MaxScale/build/cmake_install.cmake:76 (FILE):
      file INSTALL cannot copy file "/usr/share/mysql/english/errmsg.sys" to
      "/var/lib/maxscale/errmsg.sys".

      CPack Error: Error when generating package: maxscale
      make: *** [package] Error 1
      [smudd@localhost build]$

      Note: how this is trying to build into root. I'm running as a non-root user and therefore this fails. When building packages you should be able to build into a "buildroot" and then install files relative to that directory. I've not looked at the package build process but this is obviously not being done. It pushes people to change to the root user which then populates/overwrites data in real directories which should not be done.

      Having build other rpm packages most other software allows for stuff to be built into a "buildroot" for package building and then the files are collected from there. The same process should happen here as otherwise doing make package is going to possibly destroy your running system. Given you've said you want to build this as a package the only way the files should be installed is with the package manager not via the cmake installer.

        Attachments

          Activity

            People

            Assignee:
            markus makela markus makela
            Reporter:
            simon.mudd Simon J Mudd
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.