package/collectd: don't remove postgresql_default.conf
PATCH 1/1 package/collectd: don't remove postgresql_default.conf
$(TARGET_DIR)/usr/share/collectd/postgresql_default.conf should not be removed when postgresql support is enabled, as that module tries to load that file by default.
--- package/collectd/collectd.mk | 5 +++++ 1 file changed, 5 insertions(+)
package/collectd/collectd.mk +5 -0
@@ -202,6 +202,8 @@ endif ifeq ($(BR2_PACKAGE_POSTGRESQL),y) COLLECTD_CONF_OPTS += --with-libpq=$(STAGING_DIR)/usr/bin/pg_config COLLECTD_CONF_ENV += LIBS="-lpthread -lm" +else +COLLECTD_POST_INSTALL_TARGET_HOOKS += COLLECTD_REMOVE_UNNEEDED_POSTGRESQL_DEFAULT_CONF endif ifeq ($(BR2_PACKAGE_YAJL),y) COLLECTD_CONF_OPTS += --with-libyajl=$(STAGING_DIR)/usr
@@ -218,6 +220,9 @@ endif define COLLECTD_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install rm -f $(TARGET_DIR)/usr/bin/collectd-nagios +endef + +define COLLECTD_REMOVE_UNNEEDED_POSTGRESQL_DEFAULT_CONF rm -f $(TARGET_DIR)/usr/share/collectd/postgresql_default.conf endef
Signature · 1 line
2.17.1
PATCH 1/1 package/collectd: don't remove postgresql_default.conf
Quoted 14 lines · On Wed, 11 Mar 2020 15:13:11 +0100 Pascal de Bruijn <[email protected]>…
$(TARGET_DIR)/usr/share/collectd/postgresql_default.conf should not be removed when postgresql support is enabled, as that module tries to load that file by default.
Signed-off-by Pascal de Bruijn <[email protected]>--- package/collectd/collectd.mk | 5 +++++ 1 file changed, 5 insertions(+)package/collectd/collectd.mk +0
-0
package/collectd/collectd.mk endif · line 207
Quoted 6 lines
package/collectd/collectd.mk +2
-0@@ -202,6 +202,8 @@ endif ifeq ($(BR2_PACKAGE_POSTGRESQL),y) COLLECTD_CONF_OPTS += --with-libpq=$(STAGING_DIR)/usr/bin/pg_config COLLECTD_CONF_ENV += LIBS="-lpthread -lm" +else +COLLECTD_POST_INSTALL_TARGET_HOOKS += COLLECTD_REMOVE_UNNEEDED_POSTGRESQL_DEFAULT_CONF endif
I moved the hook registration into a condition based on BR2_PACKAGE_COLLECTD_POSTGRESQL instead of BR2_PACKAGE_POSTGRESQL. Indeed you can have BR2_PACKAGE_POSTGRESQL=y but BR2_PACKAGE_COLLECTD_POSTGRESQL disabled, and in this case, you want to remove the file.
Applied with this change. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/collectd: don't remove postgresql_default.conf
In reply to Pascal de BruijnQuoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Pascal" == Pascal de Bruijn <[email protected]> writes:
$(TARGET_DIR)/usr/share/collectd/postgresql_default.conf should not be removed when postgresql support is enabled, as that module tries to load that file by default.
Signed-off-by Pascal de Bruijn <[email protected]>
Committed to 2019.02.x, 2019.11.x and 2020.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard