Gentoo Archives: gentoo-commits

From: Craig Andrews <candrews@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/netdata/, net-analyzer/netdata/files/
Date: Sat, 01 Feb 2020 03:09:22
Message-Id: 1580526548.630a09cecd1cf4294b5cd3bbb1713dd67a3314c7.candrews@gentoo
1 commit: 630a09cecd1cf4294b5cd3bbb1713dd67a3314c7
2 Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 1 03:07:14 2020 +0000
4 Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 1 03:09:08 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=630a09ce
7
8 net-analyzer/netdata: fix building with -fno-common
9
10 Closes: https://bugs.gentoo.org/707682
11 Package-Manager: Portage-2.3.86, Repoman-2.3.20
12 Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
13
14 .../netdata/files/netdata-1.19.0-fno-common.patch | 126 +++++++++++++++++++++
15 net-analyzer/netdata/netdata-1.19.0-r2.ebuild | 1 +
16 2 files changed, 127 insertions(+)
17
18 diff --git a/net-analyzer/netdata/files/netdata-1.19.0-fno-common.patch b/net-analyzer/netdata/files/netdata-1.19.0-fno-common.patch
19 new file mode 100644
20 index 00000000000..1b6d5b75020
21 --- /dev/null
22 +++ b/net-analyzer/netdata/files/netdata-1.19.0-fno-common.patch
23 @@ -0,0 +1,126 @@
24 +https://github.com/netdata/netdata/pull/7877
25 +
26 +From c65f57af0714558294c1ad1b9568077720fb282b Mon Sep 17 00:00:00 2001
27 +From: Thiago Marques <thiagoftsm@×××××.com>
28 +Date: Tue, 28 Jan 2020 13:59:20 +0000
29 +Subject: [PATCH 1/2] missing_extern: Fix missing
30 +
31 +Fix few externs that were missing in global variables
32 +---
33 + daemon/common.h | 2 +-
34 + health/health.h | 2 +-
35 + libnetdata/health/health.h | 2 +-
36 + web/api/web_api_v1.h | 2 +-
37 + 4 files changed, 4 insertions(+), 4 deletions(-)
38 +
39 +diff --git a/daemon/common.h b/daemon/common.h
40 +index 6ac3cb3c87..59dbc41a8d 100644
41 +--- a/daemon/common.h
42 ++++ b/daemon/common.h
43 +@@ -84,6 +84,6 @@ extern char *netdata_configured_timezone;
44 + extern int netdata_zero_metrics_enabled;
45 + extern int netdata_anonymous_statistics_enabled;
46 +
47 +-int netdata_ready;
48 ++extern int netdata_ready;
49 +
50 + #endif /* NETDATA_COMMON_H */
51 +diff --git a/health/health.h b/health/health.h
52 +index 9da90d70c9..d77318fd78 100644
53 +--- a/health/health.h
54 ++++ b/health/health.h
55 +@@ -52,7 +52,7 @@ extern unsigned int default_health_enabled;
56 +
57 + #define HEALTH_SILENCERS_MAX_FILE_LEN 10000
58 +
59 +-char *silencers_filename;
60 ++extern char *silencers_filename;
61 +
62 + extern void health_init(void);
63 + extern void *health_main(void *ptr);
64 +diff --git a/libnetdata/health/health.h b/libnetdata/health/health.h
65 +index a3dc0775fc..f7580edab2 100644
66 +--- a/libnetdata/health/health.h
67 ++++ b/libnetdata/health/health.h
68 +@@ -44,7 +44,7 @@ typedef struct silencers {
69 + SILENCER *silencers;
70 + } SILENCERS;
71 +
72 +-SILENCERS *silencers;
73 ++extern SILENCERS *silencers;
74 +
75 + extern SILENCER *create_silencer(void);
76 + extern int health_silencers_json_read_callback(JSON_ENTRY *e);
77 +diff --git a/web/api/web_api_v1.h b/web/api/web_api_v1.h
78 +index 4fe3c8f6be..edeea98bed 100644
79 +--- a/web/api/web_api_v1.h
80 ++++ b/web/api/web_api_v1.h
81 +@@ -29,6 +29,6 @@ extern void host_labels2json(RRDHOST *host, BUFFER *wb, size_t indentation);
82 + extern void web_client_api_v1_init(void);
83 + extern void web_client_api_v1_management_init(void);
84 +
85 +-char *api_secret;
86 ++extern char *api_secret;
87 +
88 + #endif //NETDATA_WEB_API_V1_H
89 +
90 +From c0275ddaad62459a6da1eee0a0c76282a1391590 Mon Sep 17 00:00:00 2001
91 +From: Thiago Marques <thiagoftsm@×××××.com>
92 +Date: Tue, 28 Jan 2020 14:06:56 +0000
93 +Subject: [PATCH 2/2] missing_extern: Variables
94 +
95 +This commit declares the variables inside .c files
96 +---
97 + daemon/common.c | 2 +-
98 + health/health.c | 1 +
99 + libnetdata/health/health.c | 2 ++
100 + web/api/web_api_v1.c | 2 ++
101 + 4 files changed, 6 insertions(+), 1 deletion(-)
102 +
103 +diff --git a/daemon/common.c b/daemon/common.c
104 +index e28f6cf000..67497a4e93 100644
105 +--- a/daemon/common.c
106 ++++ b/daemon/common.c
107 +@@ -13,4 +13,4 @@ char *netdata_configured_varlib_dir = VARLIB_DIR;
108 + char *netdata_configured_home_dir = CACHE_DIR;
109 + char *netdata_configured_host_prefix = NULL;
110 + char *netdata_configured_timezone = NULL;
111 +-
112 ++int netdata_ready;
113 +diff --git a/health/health.c b/health/health.c
114 +index 1124cf9107..4a84ef7fca 100644
115 +--- a/health/health.c
116 ++++ b/health/health.c
117 +@@ -9,6 +9,7 @@ struct health_cmdapi_thread_status {
118 + };
119 +
120 + unsigned int default_health_enabled = 1;
121 ++char *silencers_filename;
122 +
123 + // ----------------------------------------------------------------------------
124 + // health initialization
125 +diff --git a/libnetdata/health/health.c b/libnetdata/health/health.c
126 +index e03538db3f..98d26d295f 100644
127 +--- a/libnetdata/health/health.c
128 ++++ b/libnetdata/health/health.c
129 +@@ -1,5 +1,7 @@
130 + #include "health.h"
131 +
132 ++SILENCERS *silencers;
133 ++
134 + /**
135 + * Create Silencer
136 + *
137 +diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c
138 +index aafcbc70be..4ac50524ad 100644
139 +--- a/web/api/web_api_v1.c
140 ++++ b/web/api/web_api_v1.c
141 +@@ -2,6 +2,8 @@
142 +
143 + #include "web_api_v1.h"
144 +
145 ++char *api_secret;
146 ++
147 + static struct {
148 + const char *name;
149 + uint32_t hash;
150
151 diff --git a/net-analyzer/netdata/netdata-1.19.0-r2.ebuild b/net-analyzer/netdata/netdata-1.19.0-r2.ebuild
152 index 2c99a7a4fe8..322bebf5a28 100644
153 --- a/net-analyzer/netdata/netdata-1.19.0-r2.ebuild
154 +++ b/net-analyzer/netdata/netdata-1.19.0-r2.ebuild
155 @@ -86,6 +86,7 @@ FILECAPS=(
156
157 PATCHES=(
158 "${FILESDIR}/${P}-prometheus-spelling.patch"
159 + "${FILESDIR}/${P}-fno-common.patch"
160 )
161
162 pkg_setup() {