Browse Source

resurrected sar to read dumps from Ubuntu Bionic

master
Tamás Gérczei 1 month ago
parent
commit
6188801e33
5 changed files with 153 additions and 0 deletions
  1. +5
    -0
      app-admin/sysstat/Manifest
  2. +38
    -0
      app-admin/sysstat/files/sysstat-11.0.4-cron.patch
  3. +11
    -0
      app-admin/sysstat/files/sysstat-11.7.3-flags.patch
  4. +18
    -0
      app-admin/sysstat/files/sysstat.init.d
  5. +81
    -0
      app-admin/sysstat/sysstat-11.6.1.ebuild

+ 5
- 0
app-admin/sysstat/Manifest View File

@ -0,0 +1,5 @@
AUX sysstat-11.0.4-cron.patch 1609 BLAKE2B b190f9b6e47da5240ced4fed912bdcdb130d88cf326e0e8109dc5996c22c812c64f2dfaaa6b0456b368d2b59aa30271b4de402bd83c2754c0224b4fd6598c604 SHA512 531340bb0770c07743caa6c760584c0f4cda5a5db7dd46bd2eee8ae1cccabecffee084571fb68a3510735b04430f2bb454068d9983da2856a0459ccb258eb89d
AUX sysstat-11.7.3-flags.patch 274 BLAKE2B 67abbdad7a4cf9f20af1baf16e0c73c63f49718cc0fb3c70bc681e8cdda29394ea5a75d871c76f658305b26d44d1034d09079f3b6306a4dd466cd0775b5514b2 SHA512 80dd658b06f2e1072a3a58bbe84770170f1cb6c3e2ae0d660713a007b0e9e59c45b710cc1484c94ec466759455ae18a7fbae237b6674ee9ddb43a7a4502cb0d5
AUX sysstat.init.d 378 BLAKE2B fe781f1a53e183023da2b46ecefb37881eedf8e8df2623927b24f33aa3344776b39db038d598ad050f1d48462d52300fb17731f29b0a8ab9c800fbe379efa249 SHA512 328ee3d40d45a0b1702c74fe0195ce4444cc8f63cb0fa68ba40ca20cfa183dd7acf4fc846cd76a4bcf426a3b4064316061dbbf26ca20047711528399e17b20b4
DIST sysstat-11.6.1.tar.gz 612919 BLAKE2B 8391e9690f979f1cfb4f23c12e042e10e40faa502715d1a67460b2957625c509435d55d903e405b7f37fb431d0d2cb1c17a56fb4704428d0ba27d83a2b6076db SHA512 6bb6110df49c01fb40c5c0bf348980dc6047e08c68a17a05a94943d026dc18a8cc7422a401798a03ab3e301cbfb98c188affe196240bae95316109c573ef6f8b
EBUILD sysstat-11.6.1.ebuild 1697 BLAKE2B 324b3f29cd5f16aa49906899800e10654e2dbe44cae89fe636b24a966fb7492563f3b55fd3c19f84cadc15a64a3f56a797848d69ddd96ab286d66554bdf6e856 SHA512 16e7d56294fe96c2145787ea8727ad41e55a3f567046c4fd6c36f41b62d516f9777b16d2c52e0308cf46eade70239336255b7e355762b2ac72478bd1f9088c04

+ 38
- 0
app-admin/sysstat/files/sysstat-11.0.4-cron.patch View File

@ -0,0 +1,38 @@
--- a/Makefile.in
+++ b/Makefile.in
@@ -368,25 +368,19 @@
$(CHOWN) $(CRON_OWNER) $(DESTDIR)$(SA_DIR)
ifdef SYSTEMD_UNIT_DIR
mkdir -p $(DESTDIR)$(SYSTEMD_UNIT_DIR)
-else
- if [ -d /etc/cron.d ]; then \
- mkdir -p $(DESTDIR)/etc/cron.d; \
- elif [ -d /etc/cron.hourly -a -d /etc/cron.daily ]; then \
- mkdir -p $(DESTDIR)/etc/cron.hourly $(DESTDIR)/etc/cron.daily; \
- fi
- if [ -d $(INIT_DIR) ]; then \
- mkdir -p $(DESTDIR)$(INIT_DIR); \
- elif [ -d $(RC_DIR) ]; then \
+endif
+ifeq ($(INSTALL_CRON),y)
+ mkdir -p $(DESTDIR)/etc/cron.d; \
+ mkdir -p $(DESTDIR)$(INIT_DIR); \
+ if [ -d $(RC_DIR) ]; then \
mkdir -p $(DESTDIR)$(RC_DIR); \
fi
endif
- if [ -z "$(SYSTEMD_UNIT_DIR)" -o ! -d "$(DESTDIR)$(SYSTEMD_UNIT_DIR)" ]; then \
- if [ -d $(DESTDIR)/etc/cron.d ]; then \
- $(INSTALL_DATA) cron/sysstat.crond $(DESTDIR)/etc/cron.d/sysstat; \
- elif [ -d $(DESTDIR)/etc/cron.hourly -a -d $(DESTDIR)/etc/cron.daily ]; then \
- $(INSTALL_BIN) cron/sysstat.cron.hourly $(DESTDIR)/etc/cron.hourly/sysstat; \
- $(INSTALL_BIN) cron/sysstat.cron.daily $(DESTDIR)/etc/cron.daily/sysstat; \
- fi \
+ if [ -d $(DESTDIR)/etc/cron.d ]; then \
+ $(INSTALL_DATA) cron/sysstat.crond $(DESTDIR)/etc/cron.d/sysstat; \
+ elif [ -d $(DESTDIR)/etc/cron.hourly -a -d $(DESTDIR)/etc/cron.daily ]; then \
+ $(INSTALL_BIN) cron/sysstat.cron.hourly $(DESTDIR)/etc/cron.hourly/sysstat; \
+ $(INSTALL_BIN) cron/sysstat.cron.daily $(DESTDIR)/etc/cron.daily/sysstat; \
fi
ifeq ($(COPY_ONLY),n)
if [ \( -z "$(SYSTEMD_UNIT_DIR)" -o ! -d "$(DESTDIR)$(SYSTEMD_UNIT_DIR)" \) -a ! -d $(DESTDIR)/etc/cron.d ]; then \

+ 11
- 0
app-admin/sysstat/files/sysstat-11.7.3-flags.patch View File

@ -0,0 +1,11 @@
--- a/Makefile.in
+++ b/Makefile.in
@@ -71,7 +71,7 @@
# Compiler flags
CFLAGS = @CFLAGS@ -Wall -Wstrict-prototypes -pipe -O2
DFLAGS = @DFLAGS@
-LFLAGS = @STRIP@
+LFLAGS = $(LDFLAGS)
DFLAGS += -DSA_DIR=\"$(SA_DIR)\" -DSADC_PATH=\"$(SADC_PATH)\"
DFLAGS += $(DFSENSORS)

+ 18
- 0
app-admin/sysstat/files/sysstat.init.d View File

@ -0,0 +1,18 @@
#!/sbin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
use hostname
}
start() {
ebegin "Writing a dummy startup record using sadc (see sadc(8))..."
/usr/lib/sa/sa1 --boot
eend $?
}
stop() {
ebegin "Cannot stop writing a dummy startup record (see sadc(8))..."
eend $?
}

+ 81
- 0
app-admin/sysstat/sysstat-11.6.1.ebuild View File

@ -0,0 +1,81 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils flag-o-matic systemd toolchain-funcs
DESCRIPTION="System performance tools for Linux"
HOMEPAGE="http://pagesperso-orange.fr/sebastien.godard/"
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 hppa ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="debug nls lm-sensors selinux static"
CDEPEND="
nls? ( virtual/libintl )
lm-sensors? ( sys-apps/lm-sensors:= )
"
DEPEND="
${CDEPEND}
nls? ( sys-devel/gettext )
"
RDEPEND="
${CDEPEND}
selinux? ( sec-policy/selinux-sysstat )
"
PATCHES=(
"${FILESDIR}"/${PN}-11.0.4-cron.patch
"${FILESDIR}"/${PN}-11.7.3-flags.patch
)
src_prepare() {
if use nls; then
strip-linguas -i nls/
local lingua pofile
for pofile in nls/*.po; do
lingua=${pofile/nls\/}
lingua=${lingua/.po}
if ! has ${lingua} ${LINGUAS}; then
rm "nls/${lingua}.po" || die
fi
done
fi
default
}
src_configure() {
tc-export AR
use static && append-ldflags -static
sa_lib_dir=/usr/lib/sa \
conf_dir=/etc \
econf \
$(use_enable lm-sensors sensors) \
$(use_enable nls) \
$(usex debug --enable-debuginfo '') \
--enable-copy-only \
--enable-documentation \
--enable-install-cron \
--with-systemdsystemunitdir=$(systemd_get_systemunitdir)
}
src_install() {
keepdir /var/log/sa
emake \
CHOWN=true \
DESTDIR="${D}" \
DOC_DIR=/usr/share/doc/${PF} \
MANGRPARG='' \
install
dodoc -r contrib/
newinitd "${FILESDIR}"/${PN}.init.d ${PN}
systemd_dounit ${PN}.service
rm "${D}"/usr/share/doc/${PF}/COPYING || die
}

Loading…
Cancel
Save