mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH v4 4/4] collectd: Initial commit
Date: Mon, 30 Jun 2014 10:56:32 +0200	[thread overview]
Message-ID: <20140630085632.GF12903@pengutronix.de> (raw)
In-Reply-To: <1a6dff07f7c88c86170074c0804f2645@idefix.lespocky.dyndns.org>

Hi,

On Thu, Jun 26, 2014 at 03:56:49PM +0200, Alexander Dahl wrote:
> Am 2014-06-26 15:24, schrieb Markus Pargmann:
> >  generic/lib/systemd/system/collectd.service |  10 +++
> 
> What about busybox init? Can you provide an init script or something?

Usually systems run either busybox init or systemd but not both. I'd rather
not get a untested init script (or systemd service). If you need whatever
is missing, add it test it and send a patch. I'll be happy to merge it.

> >  rules/collectd.in                           |  24 +++++++
> >  rules/collectd.make                         | 107 ++++++++++++++++++++++++++++
> >  3 files changed, 141 insertions(+)
> >  create mode 100644 generic/lib/systemd/system/collectd.service
> >  create mode 100644 rules/collectd.in
> >  create mode 100644 rules/collectd.make
> > 
> > diff --git a/generic/lib/systemd/system/collectd.service
> > b/generic/lib/systemd/system/collectd.service
> > new file mode 100644
> > index 000000000000..e8100dff37f1
> > --- /dev/null
> > +++ b/generic/lib/systemd/system/collectd.service
> > @@ -0,0 +1,10 @@
> > +[Unit]
> > +Description=statistics collection daemon
> > +Documentation=man:collectd(1)
> > +After=local-fs.target network.target
> > +Requires=local-fs.target network.target
> > +
> > +[Service]
> > +ExecStart=/usr/sbin/collectd -C /etc/collectd.conf -f
> > +StandardOutput=syslog
> > +StandardError=syslog
> > diff --git a/rules/collectd.in b/rules/collectd.in
> > new file mode 100644
> > index 000000000000..a2fec6fcd45a
> > --- /dev/null
> > +++ b/rules/collectd.in
> > @@ -0,0 +1,24 @@
> > +## SECTION=test_suites
> 
> I wouldn't look for collectd in this section.

I suggested that to Markus. I'm open for sugestions, if you have a better
idea. But dumping everything in "Shell & Console Tools" is not a solution
either.

> > +
> > +menuconfig COLLECTD
> > +	tristate
> > +	select LIBMNL

[...]rules/collectd.in:5:warning: 'select' used by config symbol 'COLLECTD'
refers to undefined symbol 'LIBMNL' 

I don't think you submitted a patch for this yet.

> > +	select RRDTOOL
> > +	select RRDTOOL_RRDCACHED
> > +	select LIBOPING
> > +	prompt "collectd                      "
> > +	help
> > +	  collectd is a system monitor that records different system statistics
> > +	  and writes it to rrdtool.
> 
> rrdtool is only one possible output … ;-)
> 
> > +
> > +if COLLECTD
> > +
> > +config COLLECTD_SYSTEMD_SERVICE
> > +	bool "install systemd service file for collectd"
> > +	default y
> > +
> > +config COLLECTD_SYSTEMD_SERVICE_ENABLE
> > +	bool "enable collectd systemd service"
> > +	default n
> > +
> > +endif
> > diff --git a/rules/collectd.make b/rules/collectd.make
> > new file mode 100644
> > index 000000000000..351044747a71
> > --- /dev/null
> > +++ b/rules/collectd.make
> > @@ -0,0 +1,107 @@
> > +# -*-makefile-*-
> > +#
> > +# Copyright (C) 2014 by Markus Pargmann <mpa@pengutronix.de>
> > +#
> > +# See CREDITS for details about who has contributed to this project.
> > +#
> > +# For further information about the PTXdist project and license conditions
> > +# see the README file.
> > +#
> > +
> > +#
> > +# We provide this package
> > +#
> > +PACKAGES-$(PTXCONF_COLLECTD) += collectd
> > +
> > +#
> > +# Paths and names
> > +#
> > +COLLECTD_VERSION	:= 5.4.1
> > +COLLECTD		:= collectd-$(COLLECTD_VERSION)
> > +COLLECTD_SUFFIX		:= tar.bz2
> > +COLLECTD_URL		:= http://collectd.org/files/${COLLECTD}.${COLLECTD_SUFFIX}
> > +COLLECTD_MD5		:= 6f56c71c96573a7f4f7fb3bfab185974
> > +COLLECTD_DIR		:= $(BUILDDIR)/$(COLLECTD)
> > +COLLECTD_SOURCE		:= $(SRCDIR)/$(COLLECTD).$(COLLECTD_SUFFIX)
> > +COLLECTD_LICENSE	:= GPL2
> 
> This is GPLv2 on most of the other rules.

Indeed.

> > +
> > +# ----------------------------------------------------------------------------
> > +# Prepare
> > +# ----------------------------------------------------------------------------
> > +
> > +#COLLECTD_CONF_ENV	:= $(CROSS_ENV)

remove.

> > +
> > +#
> > +# autoconf
> > +#
> > +COLLECTD_CONF_TOOL	:= autoconf
> > +COLLECTD_CONF_OPT	:= $(CROSS_AUTOCONF_USR) \
> > +	--with-nan-emulation \
> > +	--with-fp-layout=nothing \
> 
> I assume this depends on the endianess of the target, and that's why I
> stopped, because I didn't had time to investigate that part. There are
> three options "nothing", "endianflip", and "intswap", and I guess those
> are related to target system endianess. If that's really the case,
> setting it to "nothing" could break things on a big or mixed endian
> platform?
> 
> > +	--without-java \
> > +	--disable-all-plugins \
> > +	--enable-contextswitch \
> > +	--enable-cpu \
> > +	--enable-cpufreq \
> > +	--enable-disk \
> > +	--enable-ethstat \
> > +	--enable-exec \
> > +	--enable-interface \
> > +	--enable-irq \
> > +	--enable-load \
> > +	--enable-logfile \
> > +	--enable-netlink \
> > +	--enable-network \
> > +	--enable-processes \
> > +	--enable-protocols \
> > +	--enable-rrdtool \
> > +	--enable-table \
> > +	--enable-uptime \
> > +	--enable-wireless \
> > +	--enable-ping
> > +
> > +
> > +# ----------------------------------------------------------------------------
> > +# Target-Install
> > +# ----------------------------------------------------------------------------
> > +
> > +$(STATEDIR)/collectd.targetinstall:
> > +	@$(call targetinfo)
> > +
> > +	@$(call install_init, collectd)
> > +	@$(call install_fixup, collectd, PRIORITY, optional)
> > +	@$(call install_fixup, collectd, SECTION, base)
> > +	@$(call install_fixup, collectd, AUTHOR, "Markus Pargmann
> > <mpa@pengutronix.de>")
> > +	@$(call install_fixup, collectd, DESCRIPTION, missing)
> > +
> > +
> > +	@for i in $(shell cd $(COLLECTD_PKGDIR) && find bin sbin usr/bin
> > usr/sbin -type f); do \
> > +		$(call install_copy, collectd, 0, 0, 0755, -, /$$i); \
> > +	done

Please add install_copy explicitly for all programs, unless there are a lot
of them.

> > +	@for i in $(shell cd $(COLLECTD_PKGDIR) && find lib usr/lib -name
> > "*.so*"); do \
> > +		$(call install_copy, collectd, 0, 0, 0644, -, /$$i); \
> > +	done
> > +	@links="$(shell cd $(COLLECTD_PKGDIR) && find lib usr/lib -type l)"; \
> > +	if [ -n "$$links" ]; then \
> > +		for i in $$links; do \
> > +			from="`readlink $(COLLECTD_PKGDIR)/$$i`"; \
> > +			to="/$$i"; \
> > +			$(call install_link, collectd, $$from, $$to); \
> > +		done; \
> > +	fi

Same here and use install_lib.

Michael

> > +
> > +	@$(call install_alternative, collectd, 0, 0, 0644, /etc/collectd.conf)
> > +
> > +	@$(call install_alternative, collectd, 0, 0, 0644,
> > /usr/share/collectd/types.db)
> > +ifdef PTXCONF_COLLECTD_SYSTEMD_SERVICE
> > +	@$(call install_alternative, collectd, 0, 0, 0644,
> > /lib/systemd/system/collectd.service)
> > +ifdef PTXCONF_COLLECTD_SYSTEMD_SERVICE_ENABLE
> > +	@$(call install_link, collectd, ../collectd.service,
> > /lib/systemd/system/multi-user.target.wants/collectd.service)
> > +endif
> > +endif
> > +
> > +	@$(call install_finish, collectd)
> > +
> > +	@$(call touch)
> > +
> > +# vim: syntax=make
> > -- 
> > 2.0.0
> 
> Greets
> Alex
> 
> -- 
> »With the first link, the chain is forged. The first speech censured,
> the first thought forbidden, the first freedom denied, chains us all
> irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
> *** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601  D1D5 8FBA 7744 CC87 10D0 ***
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

      reply	other threads:[~2014-06-30  8:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 13:24 [ptxdist] [PATCH v4 1/4] radvd: " Markus Pargmann
2014-06-26 13:24 ` [ptxdist] [PATCH v4 2/4] alfred: " Markus Pargmann
2014-06-26 13:24 ` [ptxdist] [PATCH v4 3/4] liboping: initial commit Markus Pargmann
2014-06-26 13:24 ` [ptxdist] [PATCH v4 4/4] collectd: Initial commit Markus Pargmann
2014-06-26 13:56   ` Alexander Dahl
2014-06-30  8:56     ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140630085632.GF12903@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox