Skip to content
Permalink
Browse files

Build: Do not install system files by default

This commit resolves issue #2835.
  • Loading branch information...
sanssecours committed Jul 31, 2019
1 parent c3ccde8 commit 1639e98b9acd68d97af4e714488463028fa28328
@@ -152,7 +152,6 @@ mac_task:
-DCOMMON_FLAGS="${COMMON_FLAGS:--Werror}"
-DENABLE_ASAN="${ENABLE_ASAN:-OFF}"
-DENABLE_DEBUG=ON
-DINSTALL_SYSTEM_FILES=OFF
-DKDB_DB_FILE="${KDB_DB_FILE:-default.ecf}"
-DKDB_DB_INIT="${KDB_DB_INIT:-elektra.ecf}"
-DKDB_DB_SYSTEM="$SYSTEM_DIR"
@@ -274,7 +274,6 @@ before_script:
-DENABLE_ASAN="${ENABLE_ASAN:-OFF}"
-DCOMMON_FLAGS="${COMMON_FLAGS--Werror}"
-DENABLE_DEBUG=ON
-DINSTALL_SYSTEM_FILES=OFF
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DKDB_DB_SYSTEM="$SYSTEM_DIR"
-DKDB_DEFAULT_STORAGE="${KDB_DEFAULT_STORAGE:-dump}"
@@ -163,11 +163,7 @@ else (BUILD_TESTING)
set (INSTALL_TESTING OFF CACHE BOOL "Install test cases" FORCE)
endif (BUILD_TESTING)

if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
option (INSTALL_SYSTEM_FILES "Install files to system directories" OFF)
else ()
option (INSTALL_SYSTEM_FILES "Install files to system directories" ON)
endif ()
option (INSTALL_SYSTEM_FILES "Install files to system directories" OFF)

option (INSTALL_BUILD_TOOLS "Install build tools for cross-compilation" OFF)

@@ -519,11 +519,11 @@ are installed (by default off). Is needed for cross-compilation.
Some of Elektra’s targets require to be installed into specific folders in the
file system hierarchy to work properly.

This variable is enabled by default but requires the install target to have the
rights to write into the corresponding folders. Set `-DINSTALL_SYSTEM_FILES=OFF`
if you do not need any of them.
This variable is disabled by default, since it requires the install target to have the
rights to write into the corresponding folders. Set `-DINSTALL_SYSTEM_FILES=ON`,
if you also want to install the files listed below.

If you do not have root rights you can copy them manually to your user folder.
If you do not have root rights you can also copy the files manually to your user folder.

Currently the installed system files are as following:

@@ -692,7 +692,6 @@ and install the build tools:

```sh
cmake -DINSTALL_BUILD_TOOLS=ON \
-DINSTALL_SYSTEM_FILES=OFF \
-DCMAKE_PREFIX_PATH=$(STAGING_DIR_HOST) \
..
make -j 5
@@ -721,6 +721,7 @@ mounted, use `kdb gen -F <plugin>:<file> elektra <parentKey> <outputName>` to lo
- Plugin tests are now only added, if `BUILD_TESTING=ON`. _(Klemens Böswirth)_
- The symbol list for the static version is now exported directly from a CMake function. _(Klemens Böswirth)_
- Building Elektra with enabled [`io_glib`](../../src/bindings/io/glib) binding does not require libuv anymore. _(René Schwaiger)_
- We now disable the option `INSTALL_SYSTEM_FILES` by default. This change makes it possible to install Elektra using [Homebrew](https://brew.sh) on Linux without any changes to [Elektra’s Linuxbrew formula](https://github.com/Homebrew/linuxbrew-core/blob/master/Formula/elektra.rb). _(René Schwaiger)_

### Docker

@@ -84,7 +84,6 @@ add the following CMake options to our "Debug" profile:
-DKDB_DB_SPEC="~/.config/kdb/[xyz]/spec"
-DKDB_DB_USER=".config/kdb/[xyz]/user"
-DCMAKE_INSTALL_PREFIX=install
-DINSTALL_SYSTEM_FILES=OFF
```

where "[xyz]" can be replaced by any unique identifier so that different profiles
@@ -105,7 +105,6 @@ Build it with
-DKDB_DB_HOME="/home/jenkins/workspace/elektra-build-docker/.config/kdb/home" \
-DKDB_DB_SYSTEM="/home/jenkins/workspace/elektra-build-docker/.config/kdb/system" \
-DKDB_DB_SPEC="/home/jenkins/workspace/elektra-build-docker/.config/kdb/spec" \
-DINSTALL_SYSTEM_FILES="OFF" \
-DBUILD_DOCUMENTATION="OFF" \
-DCMAKE_RULE_MESSAGES="OFF" \
-DCMAKE_INSTALL_PREFIX="/home/jenkins/workspace/elektra-install" \
@@ -22,7 +22,7 @@ C_FLAGS='-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-protector-
LD_FLAGS='-Wl,-z,now -Wl,-z,relro'

cmake -DENABLE_ASAN=ON -DBUILD_FULL=OFF -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DBUILD_DOCUMENTATION=OFF \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PATH}" -DINSTALL_SYSTEM_FILES=OFF \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PATH}" \
-DPLUGINS='ALL;-EXPERIMENTAL;-fstab;-ruby;-lua;-python;-xerces;-yamlcpp;-python2;file;camel;-dbus' \
-DTOOLS='kdb;rest-backend;rest-frontend' \
-DCMAKE_C_FLAGS="$C_FLAGS" \
@@ -74,7 +74,6 @@ RUN ldconfig \
&& cd build \
&& cmake -DENABLE_ASAN=ON -DBUILD_FULL=OFF -DBUILD_SHARED=ON \
-DBUILD_STATIC=OFF -DBUILD_DOCUMENTATION=OFF \
-DINSTALL_SYSTEM_FILES=OFF \
-DPLUGINS="ALL;-EXPERIMENTAL;-fstab;-ruby;-lua;-python;-xerces;-yamlcpp;-python2;file;camel;yajl" \
-DTOOLS="kdb;rest-backend" \
-DCMAKE_C_FLAGS="$C_FLAGS" \
@@ -30,7 +30,6 @@ RUN mkdir build \
&& cd build \
&& cmake -DENABLE_ASAN=ON -DBUILD_FULL=OFF -DBUILD_SHARED=ON \
-DBUILD_STATIC=OFF -DBUILD_DOCUMENTATION=OFF \
-DINSTALL_SYSTEM_FILES=OFF \
-DPLUGINS="ALL;-EXPERIMENTAL;-fstab;-ruby;-lua;-python;-xerces;-yamlcpp;-python2;file;camel;yajl" \
-DTOOLS="kdb;rest-frontend" \
-DCMAKE_C_FLAGS="$C_FLAGS" \
@@ -54,7 +54,6 @@ CMAKE_FLAGS_BASE = [
'KDB_DB_SPEC': '${WORKSPACE}/config/kdb/spec',
'KDB_DB_HOME': '${WORKSPACE}/config/kdb/home',
'CMAKE_INSTALL_PREFIX': '${WORKSPACE}/system',
'INSTALL_SYSTEM_FILES': 'OFF',
'BUILD_DOCUMENTATION': 'OFF',
'CMAKE_RULE_MESSAGES': 'OFF',
'COMMON_FLAGS': '-Werror'
@@ -34,7 +34,7 @@ $ export GTEST_ROOT="/opt/gtest"
# configure
$ cmake -DENABLE_COVERAGE=OFF -DENABLE_OPTIMIZATIONS=OFF -DENABLE_DEBUG=ON -DENABLE_LOGGER=ON -DBUILD_STATIC=OFF -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DKDB_DB_SYSTEM="$SYSTEM_DIR" -DINSTALL_SYSTEM_FILES=OFF -DPLUGINS="ALL" -DTOOLS="ALL" ..
$ cmake -DENABLE_COVERAGE=OFF -DENABLE_OPTIMIZATIONS=OFF -DENABLE_DEBUG=ON -DENABLE_LOGGER=ON -DBUILD_STATIC=OFF -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DKDB_DB_SYSTEM="$SYSTEM_DIR" -DPLUGINS="ALL" -DTOOLS="ALL" ..
# build
$ make -j4

0 comments on commit 1639e98

Please sign in to comment.
You can’t perform that action at this time.