Skip to contentSkip to conversation

package/collectd: don't remove postgresql_default.conf

PATCH New Pascal de Bruijn 3 participants 3 messages Mar 11, 2020 – Apr 7, 2020

lore
Share & tools
lore
#0 lore raw

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
index 9258977613..14f52d6e6e 100644
@@ -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
#1 lore raw

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.

---
 package/collectd/collectd.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/collectd/collectd.mk +0 -0
index 9258977613..14f52d6e6e 100644

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
#2 lore raw

PATCH 1/1 package/collectd: don't remove postgresql_default.conf

In reply to Pascal de Bruijn
Quoted 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.

Committed to 2019.02.x, 2019.11.x and 2020.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard