summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/sysstat
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2023-09-17 11:38:46 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-18 08:53:10 +0100
commitb48000bba352b9c61d758fab9a3b0c11e5afa4c6 (patch)
treeee3d79a24db8a7924c183006689888f567958ba8 /meta/recipes-extended/sysstat
parent0be8df3e587e2efef6ad76be0439c4403f007c67 (diff)
downloadpoky-b48000bba352b9c61d758fab9a3b0c11e5afa4c6.tar.gz
sysstat: merge .inc into .bb
(From OE-Core rev: 06fb5a80464c1cfbc7fd57da688d49a0edac5e98) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/sysstat')
-rw-r--r--meta/recipes-extended/sysstat/sysstat.inc71
-rw-r--r--meta/recipes-extended/sysstat/sysstat_12.6.2.bb78
2 files changed, 73 insertions, 76 deletions
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
deleted file mode 100644
index 77337722ea..0000000000
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ /dev/null
@@ -1,71 +0,0 @@
1SUMMARY = "System performance tools"
2DESCRIPTION = "The sysstat utilities are a collection of performance monitoring tools for Linux."
3HOMEPAGE = "http://sebastien.godard.pagesperso-orange.fr/"
4LICENSE = "GPL-2.0-or-later"
5SECTION = "console/utils"
6
7SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/${BP}.tar.xz \
8 file://99_sysstat \
9 file://sysstat.service \
10 "
11
12UPSTREAM_CHECK_URI = "http://sebastien.godard.pagesperso-orange.fr/download.html"
13
14DEPENDS += "base-passwd"
15
16# autotools-brokensep as this package doesn't use automake
17inherit autotools-brokensep gettext systemd upstream-version-is-even
18
19PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
20PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors"
21PACKAGECONFIG[cron] = "--enable-install-cron --enable-copy-only,--disable-install-cron --disable-copy-only"
22PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}"
23
24EXTRA_OECONF += "--disable-stripping"
25
26SYSTEMD_PACKAGES = "${PN}"
27SYSTEMD_SERVICE:${PN} = "sysstat.service"
28SYSTEMD_AUTO_ENABLE = "enable"
29
30do_configure:prepend() {
31 export sa_lib_dir=${libexecdir}/sa
32}
33
34do_install() {
35 autotools_do_install
36
37 # Don't version the documentation
38 mv ${D}${docdir}/${BP} ${D}${docdir}/${BPN}
39
40 # don't install /var/log/sa when populating rootfs. Do it through volatile
41 rm -rf ${D}/var
42 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
43 install -d ${D}/etc/default/volatiles
44 install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles
45 fi
46 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
47 install -d ${D}${sysconfdir}/tmpfiles.d
48 echo "d ${localstatedir}/log/sa - - - -" \
49 > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf
50
51 # Unless both cron and systemd are enabled, install our own
52 # systemd unit file. Otherwise the package will install one.
53 if ${@bb.utils.contains('PACKAGECONFIG', 'cron systemd', 'false', 'true', d)}; then
54 install -d ${D}${systemd_system_unitdir}
55 install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_system_unitdir}
56 sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_system_unitdir}/sysstat.service
57 fi
58 fi
59}
60
61pkg_postinst:${PN} () {
62 if [ ! -n "$D" ]; then
63 if [ -e /etc/init.d/populate-volatile.sh ]; then
64 /etc/init.d/populate-volatile.sh update
65 fi
66 fi
67}
68
69FILES:${PN} += "${systemd_system_unitdir} ${nonarch_base_libdir}/systemd"
70
71TARGET_CC_ARCH += "${LDFLAGS}"
diff --git a/meta/recipes-extended/sysstat/sysstat_12.6.2.bb b/meta/recipes-extended/sysstat/sysstat_12.6.2.bb
index b5014eaefb..335ddd5746 100644
--- a/meta/recipes-extended/sysstat/sysstat_12.6.2.bb
+++ b/meta/recipes-extended/sysstat/sysstat_12.6.2.bb
@@ -1,9 +1,77 @@
1require sysstat.inc 1SUMMARY = "System performance tools"
2DESCRIPTION = "The sysstat utilities are a collection of performance monitoring tools for Linux."
3HOMEPAGE = "http://sebastien.godard.pagesperso-orange.fr/"
4LICENSE = "GPL-2.0-or-later"
5SECTION = "console/utils"
2 6
3LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb" 7SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/${BP}.tar.xz \
8 file://99_sysstat \
9 file://sysstat.service \
10 file://0001-configure.in-remove-check-for-chkconfig.patch \
11 file://CVE-2023-33204.patch \
12 "
4 13
5SRC_URI += "file://0001-configure.in-remove-check-for-chkconfig.patch \ 14LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
6 file://CVE-2023-33204.patch \
7 "
8 15
9SRC_URI[sha256sum] = "3e77134aedaa6fc57d9745da67edfd8990e19adee71ac47196229261c563fb48" 16SRC_URI[sha256sum] = "3e77134aedaa6fc57d9745da67edfd8990e19adee71ac47196229261c563fb48"
17UPSTREAM_CHECK_URI = "http://sebastien.godard.pagesperso-orange.fr/download.html"
18
19DEPENDS += "base-passwd"
20
21# autotools-brokensep as this package doesn't use automake
22inherit autotools-brokensep gettext systemd upstream-version-is-even
23
24PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
25PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors"
26PACKAGECONFIG[cron] = "--enable-install-cron --enable-copy-only,--disable-install-cron --disable-copy-only"
27PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}"
28
29EXTRA_OECONF += "--disable-stripping"
30
31SYSTEMD_PACKAGES = "${PN}"
32SYSTEMD_SERVICE:${PN} = "sysstat.service"
33SYSTEMD_AUTO_ENABLE = "enable"
34
35do_configure:prepend() {
36 export sa_lib_dir=${libexecdir}/sa
37}
38
39do_install() {
40 autotools_do_install
41
42 # Don't version the documentation
43 mv ${D}${docdir}/${BP} ${D}${docdir}/${BPN}
44
45 # don't install /var/log/sa when populating rootfs. Do it through volatile
46 rm -rf ${D}/var
47 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
48 install -d ${D}/etc/default/volatiles
49 install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles
50 fi
51 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
52 install -d ${D}${sysconfdir}/tmpfiles.d
53 echo "d ${localstatedir}/log/sa - - - -" \
54 > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf
55
56 # Unless both cron and systemd are enabled, install our own
57 # systemd unit file. Otherwise the package will install one.
58 if ${@bb.utils.contains('PACKAGECONFIG', 'cron systemd', 'false', 'true', d)}; then
59 install -d ${D}${systemd_system_unitdir}
60 install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_system_unitdir}
61 sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_system_unitdir}/sysstat.service
62 fi
63 fi
64}
65
66pkg_postinst:${PN} () {
67 if [ ! -n "$D" ]; then
68 if [ -e /etc/init.d/populate-volatile.sh ]; then
69 /etc/init.d/populate-volatile.sh update
70 fi
71 fi
72}
73
74FILES:${PN} += "${systemd_system_unitdir} ${nonarch_base_libdir}/systemd"
75
76TARGET_CC_ARCH += "${LDFLAGS}"
77