* [Buildroot] [PATCH] package/collectd: don't remove postgresql_default.conf
@ 2020-03-11 14:13 Pascal de Bruijn
2020-03-22 15:08 ` Thomas Petazzoni
2020-04-07 16:08 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Pascal de Bruijn @ 2020-03-11 14:13 UTC (permalink / raw)
To: buildroot
$(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 <p.debruijn@unilogic.nl>
---
package/collectd/collectd.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/collectd/collectd.mk b/package/collectd/collectd.mk
index 9258977613..14f52d6e6e 100644
--- a/package/collectd/collectd.mk
+++ b/package/collectd/collectd.mk
@@ -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
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/collectd: don't remove postgresql_default.conf
2020-03-11 14:13 [Buildroot] [PATCH] package/collectd: don't remove postgresql_default.conf Pascal de Bruijn
@ 2020-03-22 15:08 ` Thomas Petazzoni
2020-04-07 16:08 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2020-03-22 15:08 UTC (permalink / raw)
To: buildroot
On Wed, 11 Mar 2020 15:13:11 +0100
Pascal de Bruijn <p.debruijn@unilogic.nl> wrote:
> $(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 <p.debruijn@unilogic.nl>
> ---
> package/collectd/collectd.mk | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/package/collectd/collectd.mk b/package/collectd/collectd.mk
> index 9258977613..14f52d6e6e 100644
> --- a/package/collectd/collectd.mk
> +++ b/package/collectd/collectd.mk
> @@ -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
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/collectd: don't remove postgresql_default.conf
2020-03-11 14:13 [Buildroot] [PATCH] package/collectd: don't remove postgresql_default.conf Pascal de Bruijn
2020-03-22 15:08 ` Thomas Petazzoni
@ 2020-04-07 16:08 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-04-07 16:08 UTC (permalink / raw)
To: buildroot
>>>>> "Pascal" == Pascal de Bruijn <p.debruijn@unilogic.nl> 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 <p.debruijn@unilogic.nl>
Committed to 2019.02.x, 2019.11.x and 2020.02.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-07 16:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11 14:13 [Buildroot] [PATCH] package/collectd: don't remove postgresql_default.conf Pascal de Bruijn
2020-03-22 15:08 ` Thomas Petazzoni
2020-04-07 16:08 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.