diff options
Diffstat (limited to 'meta/recipes-extended/sysstat')
6 files changed, 48 insertions, 77 deletions
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc index 5a7d2114ca..e5e134c038 100644 --- a/meta/recipes-extended/sysstat/sysstat.inc +++ b/meta/recipes-extended/sysstat/sysstat.inc @@ -10,24 +10,19 @@ SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/${BP}.tar.xz \ " UPSTREAM_CHECK_URI = "http://sebastien.godard.pagesperso-orange.fr/download.html" -UPSTREAM_VERSION_UNKNOWN = "1" DEPENDS += "base-passwd" # autotools-brokensep as this package doesn't use automake inherit autotools-brokensep gettext systemd upstream-version-is-even -PACKAGECONFIG ??= "" +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 } @@ -35,6 +30,9 @@ do_configure_prepend() { 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 @@ -46,10 +44,12 @@ do_install() { echo "d ${localstatedir}/log/sa - - - -" \ > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf - if ${@bb.utils.contains('PACKAGECONFIG', 'cron', 'false', 'true', d)}; then + # 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_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 + sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/sysstat.service fi fi } @@ -62,6 +62,6 @@ pkg_postinst_${PN} () { fi } -FILES_${PN} += "${libdir}/sa ${systemd_system_unitdir}" +FILES_${PN} += "${systemd_system_unitdir} ${nonarch_base_libdir}/systemd" 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..4067bb983b --- /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.in: 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.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index 48b9a31..cedeb43 100644 +--- a/configure.in ++++ b/configure.in +@@ -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_12.1.6.bb b/meta/recipes-extended/sysstat/sysstat_12.1.6.bb deleted file mode 100644 index 8cf8c36d9b..0000000000 --- a/meta/recipes-extended/sysstat/sysstat_12.1.6.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] = "d8e3bbb9c873dd370f6d33664e326570" -SRC_URI[sha256sum] = "f752f3c406153a6fc446496f1102872505ace3f0931d975c1d664c81ec09f129" diff --git a/meta/recipes-extended/sysstat/sysstat_12.4.3.bb b/meta/recipes-extended/sysstat/sysstat_12.4.3.bb new file mode 100644 index 0000000000..5a27de439f --- /dev/null +++ b/meta/recipes-extended/sysstat/sysstat_12.4.3.bb @@ -0,0 +1,7 @@ +require sysstat.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb" + +SRC_URI += "file://0001-configure.in-remove-check-for-chkconfig.patch" + +SRC_URI[sha256sum] = "ae432431f45aacbcabacfbbe129e2505e215cafa9ce996d7550c6091a46f0bfd" |