diff options
Diffstat (limited to 'meta/recipes-extended/sysstat')
6 files changed, 112 insertions, 133 deletions
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc deleted file mode 100644 index 0bc7e14d36..0000000000 --- a/meta/recipes-extended/sysstat/sysstat.inc +++ /dev/null @@ -1,65 +0,0 @@ -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" - -# autotools-brokensep as this package doesn't use automake -inherit autotools-brokensep gettext systemd - -PACKAGECONFIG ??= "" -PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors" - -EXTRA_OECONF += "--disable-stripping" - -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 - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - install -d ${D}/etc/default/volatiles - install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles - fi - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d - echo "d ${localstatedir}/log/sa - - - -" \ - > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf - fi - - 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}" diff --git a/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch b/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch deleted file mode 100644 index 1b63299aae..0000000000 --- a/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch +++ /dev/null @@ -1,59 +0,0 @@ -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(+) - -Index: sysstat-11.7.1/common.c -=================================================================== ---- sysstat-11.7.1.orig/common.c -+++ sysstat-11.7.1/common.c -@@ -20,6 +20,7 @@ - */ - - #include <stdio.h> -+#include <limits.h> - #include <string.h> - #include <stdlib.h> - #include <stdarg.h> -Index: sysstat-11.7.1/ioconf.c -=================================================================== ---- sysstat-11.7.1.orig/ioconf.c -+++ sysstat-11.7.1/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" -Index: sysstat-11.7.1/sa_common.c -=================================================================== ---- sysstat-11.7.1.orig/sa_common.c -+++ sysstat-11.7.1/sa_common.c -@@ -20,6 +20,7 @@ - */ - - #include <stdio.h> -+#include <limits.h> - #include <string.h> - #include <stdlib.h> - #include <stdint.h> diff --git a/meta/recipes-extended/sysstat/sysstat/0001-configure.in-remove-check-for-chkconfig.patch b/meta/recipes-extended/sysstat/sysstat/0001-configure.in-remove-check-for-chkconfig.patch new file mode 100644 index 0000000000..84383f955f --- /dev/null +++ b/meta/recipes-extended/sysstat/sysstat/0001-configure.in-remove-check-for-chkconfig.patch @@ -0,0 +1,31 @@ +From 1590cc614aaf0fb81cd804414d6c9d5a9227352c Mon Sep 17 00:00:00 2001 +From: Wenlin Kang <wenlin.kang@windriver.com> +Date: Tue, 5 Nov 2019 16:16:44 +0800 +Subject: [PATCH] configure.ac: remove check for chkconfig + +chkconfig can't work on cross-platform, so should remove check for it. + +Upstream-Status: Inappropriate [ embedded specific ] + +Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> +--- + configure.ac | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 48b9a31..cedeb43 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -42,7 +42,8 @@ AC_SUBST(VER_JSON) + AC_SUBST(VER_XML) + + AC_PATH_PROG(PATH_CP, cp) +-AC_PATH_PROG(PATH_CHKCONFIG, chkconfig) ++#AC_PATH_PROG(PATH_CHKCONFIG, chkconfig) ++AC_SUBST(PATH_CHKCONFIG) + + # Check for systemd + AC_CHECK_PROG(PKG_CONFIG, pkg-config, pkg-config) +-- +1.9.1 + diff --git a/meta/recipes-extended/sysstat/sysstat/sysstat.service b/meta/recipes-extended/sysstat/sysstat/sysstat.service index aff07109f5..ca46befb99 100644 --- a/meta/recipes-extended/sysstat/sysstat/sysstat.service +++ b/meta/recipes-extended/sysstat/sysstat/sysstat.service @@ -5,7 +5,7 @@ Description=Resets System Activity Logs Type=oneshot RemainAfterExit=yes User=root -ExecStart=@LIBDIR@/sa/sa1 --boot +ExecStart=@LIBEXECDIR@/sa/sa1 --boot [Install] WantedBy=multi-user.target diff --git a/meta/recipes-extended/sysstat/sysstat_11.7.4.bb b/meta/recipes-extended/sysstat/sysstat_11.7.4.bb deleted file mode 100644 index c9b9130e9f..0000000000 --- a/meta/recipes-extended/sysstat/sysstat_11.7.4.bb +++ /dev/null @@ -1,8 +0,0 @@ -require sysstat.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb" - -SRC_URI += "file://0001-Include-needed-headers-explicitly.patch" - -SRC_URI[md5sum] = "421f958db80e67a27eda1ff6b8ebcdeb" -SRC_URI[sha256sum] = "a96265a22784c29888669f961a0896841d177853f8f057efe063e891962b9090" diff --git a/meta/recipes-extended/sysstat/sysstat_12.7.5.bb b/meta/recipes-extended/sysstat/sysstat_12.7.5.bb new file mode 100644 index 0000000000..d598d5366f --- /dev/null +++ b/meta/recipes-extended/sysstat/sysstat_12.7.5.bb @@ -0,0 +1,80 @@ +SUMMARY = "System performance tools" +DESCRIPTION = "The sysstat utilities are a collection of performance monitoring tools for Linux." +HOMEPAGE = "https://sysstat.github.io/" +LICENSE = "GPL-2.0-or-later" +SECTION = "console/utils" + +SRC_URI = "git://github.com/sysstat/sysstat.git;protocol=https;branch=master \ + file://99_sysstat \ + file://sysstat.service \ + file://0001-configure.in-remove-check-for-chkconfig.patch \ + " + +LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb" + +SRCREV = "2d7682f26f42cef9127b123e319349b330c4ab8f" +S = "${WORKDIR}/git" + +DEPENDS += "base-passwd" + +# autotools-brokensep as this package doesn't use automake +inherit autotools-brokensep gettext systemd + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors" +PACKAGECONFIG[cron] = "--enable-install-cron --enable-copy-only,--disable-install-cron --disable-copy-only" +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}" + +EXTRA_OECONF += "--disable-stripping" + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "sysstat.service" +SYSTEMD_AUTO_ENABLE = "enable" + +do_configure:prepend() { + export sa_lib_dir=${libexecdir}/sa +} + +do_install() { + autotools_do_install + + # Don't version the documentation + mv ${D}${docdir}/${BP} ${D}${docdir}/${BPN} + + # don't install /var/log/sa when populating rootfs. Do it through volatile + rm -rf ${D}/var + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}/etc/default/volatiles + install -m 0644 ${UNPACKDIR}/99_sysstat ${D}/etc/default/volatiles + fi + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${nonarch_libdir}/tmpfiles.d + echo "d ${localstatedir}/log/sa - - - -" \ + > ${D}${nonarch_libdir}/tmpfiles.d/sysstat.conf + + # Unless both cron and systemd are enabled, install our own + # systemd unit file. Otherwise the package will install one. + if ${@bb.utils.contains('PACKAGECONFIG', 'cron systemd', 'false', 'true', d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/sysstat.service ${D}${systemd_system_unitdir} + sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_system_unitdir}/sysstat.service + fi + fi +} + +pkg_postinst:${PN} () { + if [ ! -n "$D" ]; then + if [ -e /etc/init.d/populate-volatile.sh ]; then + /etc/init.d/populate-volatile.sh update + fi + fi +} + +FILES:${PN} += " \ + ${systemd_system_unitdir} \ + ${nonarch_base_libdir}/systemd \ + ${nonarch_libdir}/tmpfiles.d \ +" + +TARGET_CC_ARCH += "${LDFLAGS}" + |