Skip to content

Commit

Permalink
Always ignore ldconfig failures
Browse files Browse the repository at this point in the history
PR cossacklabs#346 [1] has improved ldconfig handling a bit by failing the build
only when ldconfig is invoked as root. However, this causes issues when
building under fakeroot (which sets EUID but does not give permissions).
Furthemore, GNU Makefile conventions [2] expect ldconfig failures to be
simply ignored.

While we're here, make ldconfig binary configurable by providing
LDCONFIG variable. This may be used by some packaging software.
However, keep invoking ldconfig only on Linux as that's where it's
required to be run after installation.

[1]: cossacklabs#346
[2]: https://www.gnu.org/prep/standards/html_node/Utilities-in-Makefiles.html#Utilities-in-Makefiles
  • Loading branch information
ilammy committed Apr 7, 2019
1 parent 3728950 commit 3880aed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#CC = clang
CLANG_FORMAT ?= clang-format
CLANG_TIDY ?= clang-tidy
LDCONFIG ?= ldconfig
SHELL = /bin/bash
SRC_PATH = src
ifneq ($(BUILD_PATH),)
Expand Down Expand Up @@ -451,7 +452,7 @@ install_pkgconfig: err all make_install_dirs

install: install_soter_headers install_themis_headers install_static_libs install_shared_libs install_pkgconfig
ifdef IS_LINUX
@ldconfig || (status=$$?; if [ $$(id -u) = "0" ]; then exit $$status; else exit 0; fi)
@$(LDCONFIG) || true
endif

get_version:
Expand Down

0 comments on commit 3880aed

Please sign in to comment.