зеркало из https://github.com/microsoft/docker.git
Try to handle changing names for journal packages
When checking if we have the development files for libsystemd's journal APIs, check for either 'libsystemd >= 209' and 'libsystemd-journal'. If we find 'libsystemd', define the 'journald' tag, which defaults to using the 'libsystemd.pc' file. If we find the older 'libsystemd-journal', define both the 'journald' and 'journald_compat' tags, which causes the 'libsystemd-journal.pc' file to be consulted instead. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> (github: nalind)
This commit is contained in:
Родитель
0f18fa939c
Коммит
6cdc4ba6cd
|
@ -2,7 +2,6 @@
|
|||
|
||||
package journald
|
||||
|
||||
// #cgo pkg-config: libsystemd-journal
|
||||
// #include <sys/types.h>
|
||||
// #include <sys/poll.h>
|
||||
// #include <systemd/sd-journal.h>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
// +build linux,cgo,!static_build,journald,!journald_compat
|
||||
|
||||
package journald
|
||||
|
||||
// #cgo pkg-config: libsystemd
|
||||
import "C"
|
|
@ -0,0 +1,6 @@
|
|||
// +build linux,cgo,!static_build,journald,journald_compat
|
||||
|
||||
package journald
|
||||
|
||||
// #cgo pkg-config: libsystemd-journal
|
||||
import "C"
|
|
@ -118,8 +118,10 @@ fi
|
|||
|
||||
if [ -z "$DOCKER_CLIENTONLY" ]; then
|
||||
DOCKER_BUILDTAGS+=" daemon"
|
||||
if pkg-config libsystemd-journal 2> /dev/null ; then
|
||||
if pkg-config 'libsystemd >= 209' 2> /dev/null ; then
|
||||
DOCKER_BUILDTAGS+=" journald"
|
||||
elif pkg-config 'libsystemd-journal' 2> /dev/null ; then
|
||||
DOCKER_BUILDTAGS+=" journald journald_compat"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче