mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v4 1/4] radvd: Initial commit
@ 2014-06-26 13:24 Markus Pargmann
  2014-06-26 13:24 ` [ptxdist] [PATCH v4 2/4] alfred: " Markus Pargmann
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Markus Pargmann @ 2014-06-26 13:24 UTC (permalink / raw)
  To: ptxdist; +Cc: Markus Pargmann

Add radvd as package to ptxdist. Version 1.12 is used. A necessary patch
for not continous time is added which is not mainline yet.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---

Notes:
    Changes in v4:
     - Remove option to enable service
    
    Changes in v2:
     - Cleanup make file
     - Cleanup generated patch

 generic/etc/radvd.conf                             |  11 +
 generic/lib/systemd/system/radvd.service           |   8 +
 ...ime-Use-clock_gettime-and-monotonic-clock.patch | 256 +++++++++++++++++++++
 patches/radvd-1.12/series                          |   4 +
 rules/radvd.in                                     |  17 ++
 rules/radvd.make                                   |  58 +++++
 6 files changed, 354 insertions(+)
 create mode 100644 generic/etc/radvd.conf
 create mode 100644 generic/lib/systemd/system/radvd.service
 create mode 100644 patches/radvd-1.12/0001-time-Use-clock_gettime-and-monotonic-clock.patch
 create mode 100644 patches/radvd-1.12/series
 create mode 100644 rules/radvd.in
 create mode 100644 rules/radvd.make

diff --git a/generic/etc/radvd.conf b/generic/etc/radvd.conf
new file mode 100644
index 000000000000..5e1babe0ba7d
--- /dev/null
+++ b/generic/etc/radvd.conf
@@ -0,0 +1,11 @@
+
+interface RADVD_INTERFACE
+{
+	AdvSendAdvert on;
+
+	prefix RADVD_GATEWAY_SUBNET
+	{
+		AdvOnLink on;
+		AdvAutonomous on;
+	};
+};
diff --git a/generic/lib/systemd/system/radvd.service b/generic/lib/systemd/system/radvd.service
new file mode 100644
index 000000000000..c7be4f611321
--- /dev/null
+++ b/generic/lib/systemd/system/radvd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description = IPv6 router advertisement daemon
+Requires = network.target
+After = network.target
+
+[Service]
+ExecStart = /usr/sbin/radvd -C /etc/radvd.conf -p /run/radvd.pid -d 1
+
diff --git a/patches/radvd-1.12/0001-time-Use-clock_gettime-and-monotonic-clock.patch b/patches/radvd-1.12/0001-time-Use-clock_gettime-and-monotonic-clock.patch
new file mode 100644
index 000000000000..a14250c58c75
--- /dev/null
+++ b/patches/radvd-1.12/0001-time-Use-clock_gettime-and-monotonic-clock.patch
@@ -0,0 +1,256 @@
+From: Markus Pargmann <mpa@pengutronix.de>
+Date: Fri, 13 Jun 2014 16:11:32 +0200
+Subject: [PATCH] time: Use clock_gettime and monotonic clock
+
+Currently the system time is used to calculate the timeout in
+milliseconds for the poll function. This can lead to bugs as soon as the
+time of the system changes through NTP. For example starting radvd
+before NTP can lead to a 44 year jump, resulting in a poll timeout of
+10^6 seconds.
+
+This patch replaces all gettimeofday() usage by the better clock_gettime
+call using a monotonic clock which avoids those situations.
+
+Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
+---
+ includes.h |  1 +
+ process.c  | 12 ++++++------
+ radvd.c    |  8 ++++----
+ radvd.h    | 12 ++++++------
+ send.c     | 24 ++++++------------------
+ timer.c    | 35 +++++++++++++++++++----------------
+ 6 files changed, 42 insertions(+), 50 deletions(-)
+
+diff --git a/includes.h b/includes.h
+index 2111e6651d31..d621b5ee585e 100644
+--- a/includes.h
++++ b/includes.h
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <time.h>
+ #include <syslog.h>
+ #include <unistd.h>
+diff --git a/process.c b/process.c
+index 53a1150c2091..91011d036528 100644
+--- a/process.c
++++ b/process.c
+@@ -119,7 +119,7 @@ static void process_rs(struct Interface *iface, unsigned char *msg, int len, str
+ {
+ 	double delay;
+ 	double next;
+-	struct timeval tv;
++	struct timespec ts;
+ 	uint8_t *opt_str;
+ 
+ 	/* validation */
+@@ -154,22 +154,22 @@ static void process_rs(struct Interface *iface, unsigned char *msg, int len, str
+ 		opt_str += optlen;
+ 	}
+ 
+-	gettimeofday(&tv, NULL);
++	clock_gettime(CLOCK_MONOTONIC, &ts);
+ 
+ 	delay = MAX_RA_DELAY_TIME * rand() / (RAND_MAX + 1.0);
+ 
+ 	if (iface->UnicastOnly) {
+ 		send_ra_forall(iface, &addr->sin6_addr);
+-	} else if (timevaldiff(&tv, &iface->last_multicast) / 1000.0 < iface->MinDelayBetweenRAs) {
++	} else if (timespecdiff(&ts, &iface->last_multicast) / 1000.0 < iface->MinDelayBetweenRAs) {
+ 		/* last RA was sent only a few moments ago, don't send another immediately. */
+ 		next =
+-		    iface->MinDelayBetweenRAs - (tv.tv_sec + tv.tv_usec / 1000000.0) + (iface->last_multicast.tv_sec + iface->last_multicast.tv_usec / 1000000.0) + delay / 1000.0;
+-		iface->next_multicast = next_timeval(next);
++		    iface->MinDelayBetweenRAs - (ts.tv_sec + ts.tv_nsec / 1000000000.0) + (iface->last_multicast.tv_sec + iface->last_multicast.tv_nsec / 1000000000.0) + delay / 1000.0;
++		iface->next_multicast = next_timespec(next);
+ 	} else {
+ 		/* no RA sent in a while, send a multicast reply */
+ 		send_ra_forall(iface, NULL);
+ 		next = rand_between(iface->MinRtrAdvInterval, iface->MaxRtrAdvInterval);
+-		iface->next_multicast = next_timeval(next);
++		iface->next_multicast = next_timespec(next);
+ 	}
+ }
+ 
+diff --git a/radvd.c b/radvd.c
+index ab275efee40f..fcea72a2eea0 100644
+--- a/radvd.c
++++ b/radvd.c
+@@ -470,7 +470,7 @@ void timer_handler(void *data)
+ 		next = min(MAX_INITIAL_RTR_ADVERT_INTERVAL, next);
+ 	}
+ 
+-	iface->next_multicast = next_timeval(next);
++	iface->next_multicast = next_timespec(next);
+ }
+ 
+ void config_interface(void)
+@@ -499,12 +499,12 @@ void kickoff_adverts(void)
+ 	for (iface = IfaceList; iface; iface = iface->next) {
+ 		double next;
+ 
+-		gettimeofday(&iface->last_ra_time, NULL);
++		clock_gettime(CLOCK_MONOTONIC, &iface->last_ra_time);
+ 
+ 		if (iface->UnicastOnly)
+ 			continue;
+ 
+-		gettimeofday(&iface->last_multicast, NULL);
++		clock_gettime(CLOCK_MONOTONIC, &iface->last_multicast);
+ 
+ 		/* TODO: AdvSendAdvert is being checked in send_ra now so it can be removed here. */
+ 		if (!iface->AdvSendAdvert)
+@@ -516,7 +516,7 @@ void kickoff_adverts(void)
+ 			iface->init_racount++;
+ 
+ 			next = min(MAX_INITIAL_RTR_ADVERT_INTERVAL, iface->MaxRtrAdvInterval);
+-			iface->next_multicast = next_timeval(next);
++			iface->next_multicast = next_timespec(next);
+ 		}
+ 	}
+ }
+diff --git a/radvd.h b/radvd.h
+index d3b6957cff24..8db4b9dbe1c6 100644
+--- a/radvd.h
++++ b/radvd.h
+@@ -50,7 +50,7 @@ struct Interface {
+ 
+ 	int cease_adv;
+ 
+-	struct timeval last_ra_time;
++	struct timespec last_ra_time;
+ 
+ 	int IgnoreIfMissing;
+ 	int AdvSendAdvert;
+@@ -87,8 +87,8 @@ struct Interface {
+ 	struct AdvRDNSS *AdvRDNSSList;
+ 	struct AdvDNSSL *AdvDNSSLList;
+ 	struct Clients *ClientList;
+-	struct timeval last_multicast;
+-	struct timeval next_multicast;
++	struct timespec last_multicast;
++	struct timespec next_multicast;
+ 
+ 	/* Info whether this interface has failed in the past (and may need to be reinitialized) */
+ 	int HasFailed;
+@@ -212,9 +212,9 @@ void reload_config(void);
+ void reset_prefix_lifetimes(void);
+ 
+ /* timer.c */
+-struct timeval next_timeval(double next);
+-int timevaldiff(struct timeval const *a, struct timeval const *b);
+-int next_time_msec(struct Interface const *iface);
++struct timespec next_timespec(double next);
++int64_t timespecdiff(struct timespec const *a, struct timespec const *b);
++uint64_t next_time_msec(struct Interface const *iface);
+ int expired(struct Interface const *iface);
+ 
+ /* device.c */
+diff --git a/send.c b/send.c
+index fb14184d9d84..eaa9506bf6a0 100644
+--- a/send.c
++++ b/send.c
+@@ -76,18 +76,6 @@ static void send_ra_inc_len(size_t * len, int add)
+ 	}
+ }
+ 
+-static time_t time_diff_secs(const struct timeval *time_x, const struct timeval *time_y)
+-{
+-	time_t secs_diff;
+-
+-	secs_diff = time_x->tv_sec - time_y->tv_sec;
+-	if ((time_x->tv_usec - time_y->tv_usec) >= 500000)
+-		secs_diff++;
+-
+-	return secs_diff;
+-
+-}
+-
+ static void decrement_lifetime(const time_t secs, uint32_t * lifetime)
+ {
+ 
+@@ -118,8 +106,8 @@ int send_ra(struct Interface *iface, struct in6_addr *dest)
+ 	struct AdvDNSSL *dnssl;
+ 	struct AdvLowpanCo *lowpanco;
+ 	struct AdvAbro *abroo;
+-	struct timeval time_now;
+-	time_t secs_since_last_ra;
++	struct timespec time_now;
++	int64_t secs_since_last_ra;
+ 	char addr_str[INET6_ADDRSTRLEN];
+ 
+ 	unsigned char buff[MSG_SIZE_SEND];
+@@ -167,14 +155,14 @@ int send_ra(struct Interface *iface, struct in6_addr *dest)
+ 
+ 	if (dest == NULL) {
+ 		dest = (struct in6_addr *)all_hosts_addr;
+-		gettimeofday(&iface->last_multicast, NULL);
++		clock_gettime(CLOCK_MONOTONIC, &iface->last_multicast);
+ 	}
+ 
+-	gettimeofday(&time_now, NULL);
+-	secs_since_last_ra = time_diff_secs(&time_now, &iface->last_ra_time);
++	clock_gettime(CLOCK_MONOTONIC, &time_now);
++	secs_since_last_ra = timespecdiff(&time_now, &iface->last_ra_time) / 1000;
+ 	if (secs_since_last_ra < 0) {
+ 		secs_since_last_ra = 0;
+-		flog(LOG_WARNING, "gettimeofday() went backwards!");
++		flog(LOG_WARNING, "clock_gettime(CLOCK_MONOTONIC) went backwards!");
+ 	}
+ 	iface->last_ra_time = time_now;
+ 
+diff --git a/timer.c b/timer.c
+index ede0c36de499..622034290601 100644
+--- a/timer.c
++++ b/timer.c
+@@ -16,29 +16,32 @@
+ #include "config.h"
+ #include "radvd.h"
+ 
+-struct timeval next_timeval(double next)
++struct timespec next_timespec(double next)
+ {
+-	struct timeval tv;
+-	gettimeofday(&tv, NULL);
+-	tv.tv_sec += (int)next;
+-	tv.tv_usec += 1000000 * (next - (int)next);
+-	return tv;
++	struct timespec ts;
++
++	clock_gettime(CLOCK_MONOTONIC, &ts);
++	ts.tv_sec += (int)next;
++	ts.tv_nsec += 1000000000ULL * (next - (int)next);
++	return ts;
+ }
+ 
+-int timevaldiff(struct timeval const *a, struct timeval const *b)
++int64_t timespecdiff(struct timespec const *a, struct timespec const *b)
+ {
+-	int msec;
+-	msec = (a->tv_sec - b->tv_sec) * 1000;
+-	msec += (a->tv_usec - b->tv_usec) / 1000;
++	int64_t msec;
++	msec = ((int64_t)a->tv_sec - b->tv_sec) * 1000;
++	msec += ((int64_t)a->tv_nsec - b->tv_nsec) / (1000 * 1000);
+ 	return msec;
+ }
+ 
+ /* Returns when the next time should expire in milliseconds. */
+-int next_time_msec(struct Interface const *iface)
++uint64_t next_time_msec(struct Interface const *iface)
+ {
+-	struct timeval tv;
+-	int retval;
+-	gettimeofday(&tv, NULL);
+-	retval = timevaldiff(&iface->next_multicast, &tv);
+-	return retval >= 1 ? retval : 1;
++	struct timespec ts;
++	int64_t diff_ms;
++	clock_gettime(CLOCK_MONOTONIC, &ts);
++	diff_ms = timespecdiff(&iface->next_multicast, &ts);
++	if (diff_ms <= 0)
++		return 0;
++	return (uint64_t)diff_ms;
+ }
diff --git a/patches/radvd-1.12/series b/patches/radvd-1.12/series
new file mode 100644
index 000000000000..06b25c75bb01
--- /dev/null
+++ b/patches/radvd-1.12/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-time-Use-clock_gettime-and-monotonic-clock.patch
+# 7520c46047013d8255e352f310f0e087  - git-ptx-patches magic
diff --git a/rules/radvd.in b/rules/radvd.in
new file mode 100644
index 000000000000..9446bba34997
--- /dev/null
+++ b/rules/radvd.in
@@ -0,0 +1,17 @@
+## SECTION=networking
+
+menuconfig RADVD
+	bool
+	prompt "radvd                         "
+	select LIBDAEMON
+	help
+	  Router Advertisement Daemon
+
+if RADVD
+
+config RADVD_SYSTEMD_SERVICE
+	bool "install systemd service file for radvd"
+	default y
+
+endif
+
diff --git a/rules/radvd.make b/rules/radvd.make
new file mode 100644
index 000000000000..8fe2a12e0e92
--- /dev/null
+++ b/rules/radvd.make
@@ -0,0 +1,58 @@
+# -*-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_RADVD) += radvd
+
+#
+# Paths and names
+#
+RADVD_VERSION	:= 1.12
+RADVD		:= radvd-$(RADVD_VERSION)
+RADVD_SUFFIX	:= tar.xz
+RADVD_MD5	:= baddc38a5f26ca46a9ce7e778b59c1ae
+RADVD_URL	:= http://www.litech.org/radvd/dist/$(RADVD).$(RADVD_SUFFIX)
+RADVD_DIR	:= $(BUILDDIR)/$(RADVD)
+RADVD_SOURCE	:= $(SRCDIR)/$(RADVD).$(RADVD_SUFFIX)
+RADVD_LICENSE	:= BSD
+
+#
+# autoconf
+#
+RADVD_CONF_TOOL	:= autoconf
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/radvd.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, radvd)
+	@$(call install_fixup, radvd, PRIORITY, optional)
+	@$(call install_fixup, radvd, SECTION, base)
+	@$(call install_fixup, radvd, AUTHOR, "Markus Pargmann <mpa@pengutronix.de>")
+	@$(call install_fixup, radvd, DESCRIPTION, missing)
+
+	@$(call install_copy, radvd, 0, 0, 0755, -, /usr/sbin/radvd)
+	@$(call install_alternative, radvd, 0, 0, 0644, /etc/radvd.conf)
+
+ifdef PTXCONF_RADVD_SYSTEMD_SERVICE
+	@$(call install_alternative, radvd, 0, 0, 0644, /lib/systemd/system/radvd.service)
+	@$(call install_link, radvd, ../radvd.service, /lib/systemd/system/network.target.wants/radvd.service)
+endif
+
+	@$(call install_finish, radvd)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.0.0


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ptxdist] [PATCH v4 2/4] alfred: Initial commit
  2014-06-26 13:24 [ptxdist] [PATCH v4 1/4] radvd: Initial commit Markus Pargmann
@ 2014-06-26 13:24 ` 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
  2 siblings, 0 replies; 6+ messages in thread
From: Markus Pargmann @ 2014-06-26 13:24 UTC (permalink / raw)
  To: ptxdist; +Cc: Markus Pargmann

Add A.L.F.R.E.D. daemon to ptxdist. It is used to distribute data
between nodes of batman mesh networks.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---

Notes:
    Changes in v4:
     - Add default interface bat0
    
    Changes in v2:
     - Cleanup make file

 generic/lib/systemd/system/alfred@.service     |  8 +++
 generic/lib/systemd/system/batadv-vis@.service |  9 ++++
 rules/alfred.in                                | 26 ++++++++++
 rules/alfred.make                              | 68 ++++++++++++++++++++++++++
 4 files changed, 111 insertions(+)
 create mode 100644 generic/lib/systemd/system/alfred@.service
 create mode 100644 generic/lib/systemd/system/batadv-vis@.service
 create mode 100644 rules/alfred.in
 create mode 100644 rules/alfred.make

diff --git a/generic/lib/systemd/system/alfred@.service b/generic/lib/systemd/system/alfred@.service
new file mode 100644
index 000000000000..08e014c417a2
--- /dev/null
+++ b/generic/lib/systemd/system/alfred@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description = A.L.F.R.E.D. server on interface %i
+BindsTo = sys-subsystem-net-devices-%i.device
+After = sys-subsystem-net-devices-%i.device
+
+[Service]
+ExecStart=/usr/bin/alfred -i %i
+
diff --git a/generic/lib/systemd/system/batadv-vis@.service b/generic/lib/systemd/system/batadv-vis@.service
new file mode 100644
index 000000000000..39b4b6f34710
--- /dev/null
+++ b/generic/lib/systemd/system/batadv-vis@.service
@@ -0,0 +1,9 @@
+[Unit]
+Description = batman-adv visualisation service on interface %i
+BindsTo = sys-subsystem-net-devices-%i.device
+After = sys-subsystem-net-devices-%i.device alfred@.service
+Requires = alfred@.service
+
+[Service]
+ExecStart=/usr/bin/batadv-vis -s -i %i
+
diff --git a/rules/alfred.in b/rules/alfred.in
new file mode 100644
index 000000000000..c4b88951a9b3
--- /dev/null
+++ b/rules/alfred.in
@@ -0,0 +1,26 @@
+## SECTION=networking
+
+menuconfig ALFRED
+	tristate
+	prompt "A.L.F.R.E.D.                  "
+	help
+	  Alfred is a distributed data distribution service which is used for
+	  batman mesh networks.
+
+if ALFRED
+
+config ALFRED_SYSTEMD_SERVICE
+	bool "install alfred and batadv-vis systemd service files"
+	default y
+
+config ALFRED_SYSTEMD_SERVICE_ALFRED_INTF
+	string "Enable alfred systemd service file for this interface"
+	default "bat0"
+	depends on ALFRED_SYSTEMD_SERVICE
+
+config ALFRED_SYSTEMD_SERVICE_BATADVVIS_INTF
+	string "Enable batadv-vis systemd service file for this interface"
+	default "bat0"
+	depends on ALFRED_SYSTEMD_SERVICE
+
+endif
diff --git a/rules/alfred.make b/rules/alfred.make
new file mode 100644
index 000000000000..9b74dfcd27de
--- /dev/null
+++ b/rules/alfred.make
@@ -0,0 +1,68 @@
+# -*-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_ALFRED) += alfred
+
+#
+# Paths and names
+#
+ALFRED_VERSION	:= 2014.1.0
+ALFRED_MD5	:= aaee0fbbc3aa011ba9c0a1d3f3b2801e
+ALFRED		:= alfred-$(ALFRED_VERSION)
+ALFRED_SUFFIX	:= tar.gz
+ALFRED_URL	:= http://downloads.open-mesh.org/batman/stable/sources/alfred/$(ALFRED).$(ALFRED_SUFFIX)
+ALFRED_SOURCE	:= $(SRCDIR)/$(ALFRED).$(ALFRED_SUFFIX)
+ALFRED_DIR	:= $(BUILDDIR)/$(ALFRED)
+ALFRED_LICENSE	:= unknown
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+ALFRED_CONF_TOOL	:= NO
+ALFRED_MAKE_ENV	:= $(CROSS_ENV) CONFIG_ALFRED_GPSD=n
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/alfred.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, alfred)
+	@$(call install_fixup, alfred,PRIORITY,optional)
+	@$(call install_fixup, alfred,SECTION,base)
+	@$(call install_fixup, alfred,AUTHOR,"Markus Pargmann <mpa@pengutronix.de>")
+	@$(call install_fixup, alfred,DESCRIPTION,missing)
+
+	@$(call install_copy, alfred, 0, 0, 0755, $(ALFRED_DIR)/alfred, /usr/bin/alfred)
+	@$(call install_copy, alfred, 0, 0, 0755, $(ALFRED_DIR)/vis/batadv-vis, /usr/bin/batadv-vis)
+
+ifdef PTXCONF_ALFRED_SYSTEMD_SERVICE
+	@$(call install_alternative, alfred, 0, 0, 0644, /lib/systemd/system/alfred@.service)
+	@$(call install_alternative, alfred, 0, 0, 0644, /lib/systemd/system/batadv-vis@.service)
+ifneq ($(PTXCONF_ALFRED_SYSTEMD_SERVICE_ALFRED_INTF),"")
+	@$(call install_link, alfred, ../alfred@.service, \
+	/lib/systemd/system/multi-user.target.wants/alfred@$(PTXCONF_ALFRED_SYSTEMD_SERVICE_ALFRED_INTF).service)
+endif
+ifneq ($(PTXCONF_ALFRED_SYSTEMD_SERVICE_BATADVVIS_INTF),"")
+	@$(call install_link, alfred, ../batadv-vis@.service, \
+	/lib/systemd/system/multi-user.target.wants/batadv-vis@$(PTXCONF_ALFRED_SYSTEMD_SERVICE_BATADVVIS_INTF).service)
+endif
+endif
+
+	@$(call install_finish, alfred)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.0.0


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ptxdist] [PATCH v4 3/4] liboping: initial commit
  2014-06-26 13:24 [ptxdist] [PATCH v4 1/4] radvd: Initial commit Markus Pargmann
  2014-06-26 13:24 ` [ptxdist] [PATCH v4 2/4] alfred: " Markus Pargmann
@ 2014-06-26 13:24 ` Markus Pargmann
  2014-06-26 13:24 ` [ptxdist] [PATCH v4 4/4] collectd: Initial commit Markus Pargmann
  2 siblings, 0 replies; 6+ messages in thread
From: Markus Pargmann @ 2014-06-26 13:24 UTC (permalink / raw)
  To: ptxdist; +Cc: Markus Pargmann

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 rules/liboping.in   |  7 +++++++
 rules/liboping.make | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)
 create mode 100644 rules/liboping.in
 create mode 100644 rules/liboping.make

diff --git a/rules/liboping.in b/rules/liboping.in
new file mode 100644
index 000000000000..b2c42cb0777b
--- /dev/null
+++ b/rules/liboping.in
@@ -0,0 +1,7 @@
+## SECTION=networking
+
+config LIBOPING
+	tristate
+	prompt "liboping"
+	help
+	  C library to generate ICMP requests
diff --git a/rules/liboping.make b/rules/liboping.make
new file mode 100644
index 000000000000..5923432869e2
--- /dev/null
+++ b/rules/liboping.make
@@ -0,0 +1,60 @@
+# -*-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_LIBOPING) += liboping
+
+#
+# Paths and names
+#
+LIBOPING_VERSION	:= 1.6.2
+LIBOPING_MD5		:= 6f3e0d38ea03362476ac3be8b3fd961e
+LIBOPING		:= liboping-$(LIBOPING_VERSION)
+LIBOPING_SUFFIX	:= tar.gz
+LIBOPING_URL		:= http://verplant.org/liboping/files//$(LIBOPING).$(LIBOPING_SUFFIX)
+LIBOPING_SOURCE	:= $(SRCDIR)/$(LIBOPING).$(LIBOPING_SUFFIX)
+LIBOPING_DIR		:= $(BUILDDIR)/$(LIBOPING)
+LIBOPING_LICENSE	:= LGPLv2.1+
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+LIBOPING_CONF_TOOL	:= autoconf
+LIBOPING_CONF_OPT	:= \
+	$(CROSS_AUTOCONF_USR) \
+	--disable-static \
+	--without-perl-bindings
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/liboping.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, liboping)
+	@$(call install_fixup, liboping,PRIORITY,optional)
+	@$(call install_fixup, liboping,SECTION,base)
+	@$(call install_fixup, liboping,AUTHOR,"Markus Pargmann <mpa@pengutronix.de>")
+	@$(call install_fixup, liboping,DESCRIPTION,missing)
+
+	@$(call install_lib, liboping, 0, 0, 0644, liboping)
+
+	@$(call install_finish, liboping)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.0.0


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ptxdist] [PATCH v4 4/4] collectd: Initial commit
  2014-06-26 13:24 [ptxdist] [PATCH v4 1/4] radvd: Initial commit 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 ` Markus Pargmann
  2014-06-26 13:56   ` Alexander Dahl
  2 siblings, 1 reply; 6+ messages in thread
From: Markus Pargmann @ 2014-06-26 13:24 UTC (permalink / raw)
  To: ptxdist; +Cc: Markus Pargmann

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 generic/lib/systemd/system/collectd.service |  10 +++
 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
+
+menuconfig COLLECTD
+	tristate
+	select LIBMNL
+	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.
+
+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
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#COLLECTD_CONF_ENV	:= $(CROSS_ENV)
+
+#
+# autoconf
+#
+COLLECTD_CONF_TOOL	:= autoconf
+COLLECTD_CONF_OPT	:= $(CROSS_AUTOCONF_USR) \
+	--with-nan-emulation \
+	--with-fp-layout=nothing \
+	--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
+	@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
+
+	@$(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


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH v4 4/4] collectd: Initial commit
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Dahl @ 2014-06-26 13:56 UTC (permalink / raw)
  To: ptxdist

Hei Markus, 

I had a look on building collectd myself earlier this week and it aside
after reading the section "Crosscompiling" in the README of collectd's
source. I've got a few remarks/questions.

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?

>  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.

> +
> +menuconfig COLLECTD
> +	tristate
> +	select LIBMNL
> +	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.

> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#COLLECTD_CONF_ENV	:= $(CROSS_ENV)
> +
> +#
> +# 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
> +	@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
> +
> +	@$(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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH v4 4/4] collectd: Initial commit
  2014-06-26 13:56   ` Alexander Dahl
@ 2014-06-30  8:56     ` Michael Olbrich
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2014-06-30  8:56 UTC (permalink / raw)
  To: ptxdist

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-06-30  8:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-26 13:24 [ptxdist] [PATCH v4 1/4] radvd: Initial commit 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox