diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-extended/sysstat')
5 files changed, 140 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc new file mode 100644 index 000000000..c35329193 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc @@ -0,0 +1,57 @@ +SUMMARY = "System performance tools" +DESCRIPTION = "The sysstat utilities are a collection of performance monitoring tools for Linux." +HOMEPAGE = "http://sebastien.godard.pagesperso-orange.fr/" +LICENSE = "GPLv2+" +SECTION = "console/utils" + +SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.xz \ + file://99_sysstat \ + file://sysstat.service \ + " + +UPSTREAM_CHECK_URI = "http://sebastien.godard.pagesperso-orange.fr/download.html" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar" + +DEPENDS += "base-passwd" + +inherit autotools-brokensep gettext systemd + +EXTRA_OECONF += "--disable-sensors" +EXTRA_OEMAKE += 'LFLAGS=""' + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "sysstat.service" +SYSTEMD_AUTO_ENABLE = "enable" + +do_configure_prepend() { + export sa_lib_dir=${libdir}/sa +} + +do_install() { + autotools_do_install + + # don't install /var/log/sa when populating rootfs. Do it through volatile + + rm -rf ${D}/var + install -d ${D}/etc/default/volatiles + install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system + sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service +} + +pkg_postinst_${PN} () { + if [ -n "$D" ]; then + exit 0 + fi + if [ -e /etc/init.d/populate-volatile.sh ]; then + /etc/init.d/populate-volatile.sh update + fi +} + + +FILES_${PN} += "${libdir}/sa" + +TARGET_CC_ARCH += "${LDFLAGS}" +LDFLAGS_append_libc-uclibc = " -lintl" diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch new file mode 100644 index 000000000..c12652307 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch @@ -0,0 +1,62 @@ +From 42325faa88d64cce799977d611b2792beb154643 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 14 Sep 2015 08:36:59 +0000 +Subject: [PATCH] Include needed headers explicitly + +on glibc these headers get pulled in indirectly via other .h files +but right fix is to include them directly when used + +fixes + +error: use of undeclared identifier 'PATH_MAX' +error: called object type 'unsigned int' is not a function or function pointer +dm_major = major(aux.st_rdev); + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + common.c | 1 + + ioconf.c | 1 + + sa_common.c | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/common.c b/common.c +index a23155b..ad86446 100644 +--- a/common.c ++++ b/common.c +@@ -20,6 +20,7 @@ + */ + + #include <stdio.h> ++#include <limits.h> + #include <string.h> + #include <stdlib.h> + #include <time.h> +diff --git a/ioconf.c b/ioconf.c +index 7d88c5d..6d67691 100644 +--- a/ioconf.c ++++ b/ioconf.c +@@ -27,6 +27,7 @@ + #include <errno.h> + #include <dirent.h> + #include <sys/stat.h> ++#include <sys/types.h> + + #include "ioconf.h" + #include "common.h" +diff --git a/sa_common.c b/sa_common.c +index b7351d9..c9e3299 100644 +--- a/sa_common.c ++++ b/sa_common.c +@@ -20,6 +20,7 @@ + */ + + #include <stdio.h> ++#include <limits.h> + #include <string.h> + #include <stdlib.h> + #include <time.h> +-- +2.5.2 + diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/99_sysstat b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/99_sysstat new file mode 100644 index 000000000..0b0ec30de --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/99_sysstat @@ -0,0 +1 @@ +d root root 0755 /var/log/sa none diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/sysstat.service b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/sysstat.service new file mode 100644 index 000000000..aff07109f --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat/sysstat.service @@ -0,0 +1,12 @@ +[Unit] +Description=Resets System Activity Logs + +[Service] +Type=oneshot +RemainAfterExit=yes +User=root +ExecStart=@LIBDIR@/sa/sa1 --boot + +[Install] +WantedBy=multi-user.target + diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.2.0.bb b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.2.0.bb new file mode 100644 index 000000000..7a8eb96ad --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.2.0.bb @@ -0,0 +1,8 @@ +require sysstat.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" + +SRC_URI += "file://0001-Include-needed-headers-explicitly.patch" + +SRC_URI[md5sum] = "e8b615775ad98780e3f0675b91eddb19" +SRC_URI[sha256sum] = "9806b9a662568796d3fb93ecd01ecea10d815e668337a646494953bff4bc4155" |