diff options
Diffstat (limited to 'meta-oe/recipes-extended/fluentbit/fluentbit/0004-build-Make-systemd-init-systemd-detection-contingent.patch')
-rw-r--r-- | meta-oe/recipes-extended/fluentbit/fluentbit/0004-build-Make-systemd-init-systemd-detection-contingent.patch | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0004-build-Make-systemd-init-systemd-detection-contingent.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0004-build-Make-systemd-init-systemd-detection-contingent.patch deleted file mode 100644 index f6e3dce2f3..0000000000 --- a/meta-oe/recipes-extended/fluentbit/fluentbit/0004-build-Make-systemd-init-systemd-detection-contingent.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From 7a792624925d46690c1f07fe4b194b5f4c510db6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paulo Neves <ptsneves@gmail.com> | ||
3 | Date: Tue, 2 Aug 2022 09:57:05 +0200 | ||
4 | Subject: [PATCH 1/1] build: Make systemd init systemd detection contingent on | ||
5 | pkgconfig | ||
6 | |||
7 | Use pkg-config to get systemd.pc variables and systemdunitdir. Those | ||
8 | variable ensure that .service files are installed in the correct paths | ||
9 | and only when systemd is detected. | ||
10 | |||
11 | Upstream-Status: Pending [https://github.com/fluent/fluent-bit/pull/5818] | ||
12 | |||
13 | --- | ||
14 | cmake/FindJournald.cmake | 4 ++++ | ||
15 | src/CMakeLists.txt | 4 ++-- | ||
16 | 2 files changed, 6 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/cmake/FindJournald.cmake b/cmake/FindJournald.cmake | ||
19 | index f5a3a832b..9e6657a29 100644 | ||
20 | --- a/cmake/FindJournald.cmake | ||
21 | +++ b/cmake/FindJournald.cmake | ||
22 | @@ -5,6 +5,8 @@ | ||
23 | # JOURNALD_INCLUDE_DIR - the Journald include directory | ||
24 | # JOURNALD_LIBRARIES - Link these to use Journald | ||
25 | # JOURNALD_DEFINITIONS - Compiler switches required for using Journald | ||
26 | +# SYSTEMD_UNITDIR - The systemd units' directory | ||
27 | +# | ||
28 | # Redistribution and use is allowed according to the terms of the BSD license. | ||
29 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
30 | # | ||
31 | @@ -16,7 +18,9 @@ | ||
32 | # in the FIND_PATH() and FIND_LIBRARY() calls | ||
33 | find_package(PkgConfig) | ||
34 | pkg_check_modules(PC_JOURNALD QUIET systemd) | ||
35 | +pkg_get_variable(PC_SYSTEMD_UNITDIR systemd "systemdsystemunitdir") | ||
36 | |||
37 | +set(SYSTEMD_UNITDIR ${PC_SYSTEMD_UNITDIR}) | ||
38 | set(JOURNALD_FOUND ${PC_JOURNALD_FOUND}) | ||
39 | set(JOURNALD_DEFINITIONS ${PC_JOURNALD_CFLAGS_OTHER}) | ||
40 | |||
41 | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
42 | index 522bbf9bd..30743d8d6 100644 | ||
43 | --- a/src/CMakeLists.txt | ||
44 | +++ b/src/CMakeLists.txt | ||
45 | @@ -480,13 +480,13 @@ if(FLB_BINARY) | ||
46 | endif() | ||
47 | |||
48 | # Detect init system, install upstart, systemd or init.d script | ||
49 | - if(IS_DIRECTORY /lib/systemd/system) | ||
50 | + if(DEFINED SYSTEMD_UNITDIR) | ||
51 | set(FLB_SYSTEMD_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.service") | ||
52 | configure_file( | ||
53 | "${PROJECT_SOURCE_DIR}/init/systemd.in" | ||
54 | ${FLB_SYSTEMD_SCRIPT} | ||
55 | ) | ||
56 | - install(FILES ${FLB_SYSTEMD_SCRIPT} COMPONENT binary DESTINATION /lib/systemd/system) | ||
57 | + install(FILES ${FLB_SYSTEMD_SCRIPT} COMPONENT binary DESTINATION ${SYSTEMD_UNITDIR}) | ||
58 | install(DIRECTORY DESTINATION ${FLB_INSTALL_CONFDIR} COMPONENT binary) | ||
59 | elseif(IS_DIRECTORY /usr/share/upstart) | ||
60 | set(FLB_UPSTART_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.conf") | ||
61 | -- | ||
62 | 2.25.1 | ||
63 | |||