diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/poky/meta/recipes-extended/sysstat | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/poky/meta/recipes-extended/sysstat')
6 files changed, 63 insertions, 89 deletions
diff --git a/external/poky/meta/recipes-extended/sysstat/sysstat.inc b/external/poky/meta/recipes-extended/sysstat/sysstat.inc index 0bc7e14d..8fd87b94 100644 --- a/external/poky/meta/recipes-extended/sysstat/sysstat.inc +++ b/external/poky/meta/recipes-extended/sysstat/sysstat.inc @@ -4,35 +4,35 @@ HOMEPAGE = "http://sebastien.godard.pagesperso-orange.fr/" LICENSE = "GPLv2+" SECTION = "console/utils" -SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.xz \ +SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/${BP}.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 +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=${libdir}/sa + 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 @@ -43,23 +43,25 @@ do_install() { 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 + # 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#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/sysstat.service + fi + fi } 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 + if [ ! -n "$D" ]; then + if [ -e /etc/init.d/populate-volatile.sh ]; then + /etc/init.d/populate-volatile.sh update + fi + fi } - -FILES_${PN} += "${libdir}/sa" +FILES_${PN} += "${systemd_system_unitdir}" TARGET_CC_ARCH += "${LDFLAGS}" diff --git a/external/poky/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch b/external/poky/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch deleted file mode 100644 index 1b63299a..00000000 --- a/external/poky/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/external/poky/meta/recipes-extended/sysstat/sysstat/0001-configure.in-remove-check-for-chkconfig.patch b/external/poky/meta/recipes-extended/sysstat/sysstat/0001-configure.in-remove-check-for-chkconfig.patch new file mode 100644 index 00000000..4067bb98 --- /dev/null +++ b/external/poky/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/external/poky/meta/recipes-extended/sysstat/sysstat/sysstat.service b/external/poky/meta/recipes-extended/sysstat/sysstat/sysstat.service index aff07109..ca46befb 100644 --- a/external/poky/meta/recipes-extended/sysstat/sysstat/sysstat.service +++ b/external/poky/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/external/poky/meta/recipes-extended/sysstat/sysstat_11.7.4.bb b/external/poky/meta/recipes-extended/sysstat/sysstat_11.7.4.bb deleted file mode 100644 index c9b9130e..00000000 --- a/external/poky/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/external/poky/meta/recipes-extended/sysstat/sysstat_12.2.1.bb b/external/poky/meta/recipes-extended/sysstat/sysstat_12.2.1.bb new file mode 100644 index 00000000..2a90f89d --- /dev/null +++ b/external/poky/meta/recipes-extended/sysstat/sysstat_12.2.1.bb @@ -0,0 +1,8 @@ +require sysstat.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb" + +SRC_URI += "file://0001-configure.in-remove-check-for-chkconfig.patch" + +SRC_URI[md5sum] = "9dfff5fac24e35bd92fb7896debf2ffb" +SRC_URI[sha256sum] = "8edb0e19b514ac560a098a02933a4735b881296d61014db89bf80f05dd7a4732" |