Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.2.0
-
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.