Browse Source

utils/collectd: Add option to enable encrypted network output

The network plugin has the option of encrypting traffic; add a
config option to allow enabling encrypting network plugin traffic.

Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>

Conflicts:
	utils/collectd/Makefile
Daniel Dickinson 9 years ago
parent
commit
ad7147839c
1 changed files with 18 additions and 3 deletions
  1. 18
    3
      utils/collectd/Makefile

+ 18
- 3
utils/collectd/Makefile View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=collectd
11 11
 PKG_VERSION:=5.5.1
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13 13
 
14 14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 15
 PKG_SOURCE_URL:=http://collectd.org/files/
@@ -176,6 +176,14 @@ define Package/collectd/description
176 176
  and provides mechanismns to store the values in a variety of ways.
177 177
 endef
178 178
 
179
+define Package/collectd/config
180
+	config PACKAGE_COLLECTD_ENCRYPTED_NETWORK
181
+	bool "Enable ability to use encrypted networking"
182
+	default n
183
+	depends on PACKAGE_collectd
184
+	select PACKAGE_collectd-mod-network
185
+endef
186
+
179 187
 ifneq ($(CONFIG_avr32),)
180 188
   TARGET_CFLAGS += -fsigned-char
181 189
 endif
@@ -185,8 +193,15 @@ CONFIGURE_ARGS+= \
185 193
 	--disable-debug \
186 194
 	--enable-daemon \
187 195
 	--with-nan-emulation \
188
-	--without-perl-bindings \
196
+	--without-perl-bindings
197
+
198
+ifneq ($(CONFIG_PACKAGE_COLLECTD_ENCRYPTED_NETWORK),)
199
+CONFIGURE_ARGS+= \
200
+	--with-libgcrypt=$(STAGING_DIR)/include
201
+else
202
+CONFIGURE_ARGS+= \
189 203
 	--without-libgcrypt
204
+endif
190 205
 
191 206
 CONFIGURE_VARS+= \
192 207
 	CFLAGS="$$$$CFLAGS $(FPIC)" \
@@ -317,7 +332,7 @@ $(eval $(call BuildPlugin,madwifi,MadWifi status input,madwifi,))
317 332
 $(eval $(call BuildPlugin,memory,physical memory usage input,memory,))
318 333
 $(eval $(call BuildPlugin,modbus,read variables through libmodbus,modbus,+PACKAGE_collectd-mod-modbus:libmodbus))
319 334
 $(eval $(call BuildPlugin,netlink,netlink input,netlink,+PACKAGE_collectd-mod-netlink:libmnl))
320
-$(eval $(call BuildPlugin,network,network input/output,network))
335
+$(eval $(call BuildPlugin,network,network input/output,network,+PACKAGE_COLLECTD_ENCRYPTED_NETWORK:libgcrypt))
321 336
 $(eval $(call BuildPlugin,nginx,nginx status input,nginx,+PACKAGE_collectd-mod-nginx:libcurl))
322 337
 $(eval $(call BuildPlugin,ntpd,NTP daemon status input,ntpd,))
323 338
 $(eval $(call BuildPlugin,nut,UPS monitoring input,nut,+PACKAGE_collectd-mod-nut:nut))