Skip to content

Commit

Permalink
Merge pull request #2848 from sanssecours/馃彈
Browse files Browse the repository at this point in the history
Build: Do Not Install System Files by Default
  • Loading branch information
markus2330 committed Aug 2, 2019
2 parents 7a7be63 + 3038e0d commit d157e41
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Expand Up @@ -24,6 +24,7 @@ bsd_task:
- > # We use `-std=c11`, since the header `math.h` on FreeBSD requires C11 features
cmake
-DBINDINGS='ALL;-io_glib'
-DINSTALL_SYSTEM_FILES=ON
-DCMAKE_SKIP_INSTALL_RPATH=ON
-DCOMMON_FLAGS=-Werror
-DC_STD=-std=c11
Expand Down Expand Up @@ -152,7 +153,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"
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -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}"
Expand Down
6 changes: 1 addition & 5 deletions cmake/ElektraCache.cmake
Expand Up @@ -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)

Expand Down
9 changes: 4 additions & 5 deletions doc/COMPILE.md
Expand Up @@ -519,11 +519,11 @@ are installed (by default off). Is needed for cross-compilation.
Some of Elektra鈥檚 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:

Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions doc/news/_preparation_next_release.md
Expand Up @@ -723,6 +723,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鈥檚 Linuxbrew formula](https://github.com/Homebrew/linuxbrew-core/blob/master/Formula/elektra.rb). _(Ren茅 Schwaiger)_

### Docker

Expand Down
1 change: 0 additions & 1 deletion doc/tutorials/contributing-clion.md
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion doc/tutorials/run_all_tests_with_docker.md
Expand Up @@ -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" \
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-homepage
Expand Up @@ -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" \
Expand Down
1 change: 0 additions & 1 deletion scripts/docker/homepage/backend/Dockerfile
Expand Up @@ -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" \
Expand Down
1 change: 0 additions & 1 deletion scripts/docker/homepage/frontend/Dockerfile
Expand Up @@ -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" \
Expand Down
1 change: 0 additions & 1 deletion scripts/jenkins/Jenkinsfile
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion scripts/vagrant/ubuntu/artful32/README.md
Expand Up @@ -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
Expand Down

0 comments on commit d157e41

Please sign in to comment.