diff options
author | Lockywolf <for_sbo.pcp_2023-06-16@lockywolf.net> | 2023-07-08 01:27:42 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-07-08 01:27:42 +0700 |
commit | a0faf729d59ca386c1a41c9be08600012c433e4f (patch) | |
tree | 663f2ae69be4818ee2e20602bb4168b47be762a8 /system/pcp | |
parent | 6d30429c269d9219ead7b7c3c8b78688b83683df (diff) |
system/pcp: Added (RedHat Co-Pilot).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/pcp')
-rw-r--r-- | system/pcp/README | 24 | ||||
-rw-r--r-- | system/pcp/doinst.sh | 9 | ||||
-rw-r--r-- | system/pcp/pcp.SlackBuild | 140 | ||||
-rw-r--r-- | system/pcp/pcp.info | 10 | ||||
-rw-r--r-- | system/pcp/slack-desc | 19 | ||||
-rw-r--r-- | system/pcp/sysuser.conf | 1 | ||||
-rw-r--r-- | system/pcp/tmpfile.conf | 7 |
7 files changed, 210 insertions, 0 deletions
diff --git a/system/pcp/README b/system/pcp/README new file mode 100644 index 0000000000000..2aa98c811047a --- /dev/null +++ b/system/pcp/README @@ -0,0 +1,24 @@ +RedHat Performance Co-Pilot is a distributed monitoring solution. + +Essentially it is a turbocharged sysstat, with support for much +more sources of data than the sysstat originally provided. + +1. Build and running requires a dedicated user add one like this: + +groupadd -r -g 377 pcp +useradd -r -u 377 -g 377 -m -d /var/lib/pcp/tmp -s /bin/false \ + pcp + +2. PCP conflicts with dstat, because it install (seemingly compatible) +binary with the same name. + +3. Optional deps not on SBo: qt3d (for qt5) + +4. Optional deps on SBo: libvirt-python, qt6(with qt3d), tsocks + +5. This SlackBuild uses Slackware's SysV-Init support, in that +it installs the service files into /etc/rc.d/init.d/ +If you need to enable any of them, you can add symlinks to them +in /etc/rc.d/rc$i.d, where $i is the runlevel, or you can call them +directly from rc.local. + diff --git a/system/pcp/doinst.sh b/system/pcp/doinst.sh new file mode 100644 index 0000000000000..65c7e2eeb9aa5 --- /dev/null +++ b/system/pcp/doinst.sh @@ -0,0 +1,9 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/system/pcp/pcp.SlackBuild b/system/pcp/pcp.SlackBuild new file mode 100644 index 0000000000000..d4cae53601723 --- /dev/null +++ b/system/pcp/pcp.SlackBuild @@ -0,0 +1,140 @@ +#!/bin/bash + +# Slackware build script for pcp + +# Copyright 2023 Lockywolf +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=pcp +VERSION=${VERSION:-6.0.4} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --disable-static \ + --exec-prefix=/usr/ \ + --mandir=/usr/man \ + --with-rcdir=/etc/rc.d \ + --with-rundir=/run/pcp \ + --with-tmpdir=/var/tmp \ + --with-logdir=/var/log/pcp \ + --with-qt \ + --build=$ARCH-slackware-linux + +make +make DIST_ROOT="$PKG" NO_CHOWN=true install_pcp + +mkdir -p "$PKG"/usr/doc/$PRGNAM-$VERSION +mv "$PKG"/usr/share/doc/* "$PKG"/usr/doc/$PRGNAM-$VERSION/ +rmdir "$PKG"/usr/share/doc + +find "$PKG"/usr/share/icons/ -type d -empty -delete || true + +install -D -m644 "$CWD"/sysuser.conf "$PKG"/usr/lib${LIBDIRSUFFIX}/sysusers.d/pcp.conf +install -D -m644 "$CWD"/tmpfile.conf "$PKG"/usr/lib${LIBDIRSUFFIX}/tmpfiles.d/pcp.conf + + +rm -rf "$PKG"/{var/lib/pcp/testsuite,run,var/tmp} + + + +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find "$PKG/usr/man/man3/" -type f -not -name '*.gz' -exec gzip -9 {} \; + +install -m644 -d "$PKG"/etc/rc.d/init.d +mv "$PKG"/etc/rc.d/{pcp,pmcd,pmie,pmlogger,pmproxy} "$PKG"/etc/rc.d/init.d/ + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ +CHANGELOG CONTRIBUTING.md COPYING README.github README.md \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/pcp/pcp.info b/system/pcp/pcp.info new file mode 100644 index 0000000000000..4fa12975d5310 --- /dev/null +++ b/system/pcp/pcp.info @@ -0,0 +1,10 @@ +PRGNAM="pcp" +VERSION="6.0.4" +HOMEPAGE="https://pcp.io" +DOWNLOAD="https://github.com/performancecopilot/pcp/archive/6.0.4/pcp-6.0.4.tar.gz" +MD5SUM="080191e19678546a293f65428ca43003" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="avahi libwww-perl perl-xml-libxml perl-File-Slurp lxml jsonpointer perl-yaml perl-JSON python3-psycopg2 perl-Net-SNMP python3-openpyxl" +MAINTAINER="Lockywolf" +EMAIL="for_sbo.pcp_2023-06-16@lockywolf.net" diff --git a/system/pcp/slack-desc b/system/pcp/slack-desc new file mode 100644 index 0000000000000..14980c36e98bf --- /dev/null +++ b/system/pcp/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +pcp: pcp (RedHat Performance Co-Pilot) +pcp: +pcp: pcp is a monitoring tool from RedHat, which supports a plethora of +pcp: data sources and sinks. +pcp: +pcp: +pcp: +pcp: +pcp: +pcp: +pcp: diff --git a/system/pcp/sysuser.conf b/system/pcp/sysuser.conf new file mode 100644 index 0000000000000..6483ff09a948f --- /dev/null +++ b/system/pcp/sysuser.conf @@ -0,0 +1 @@ +u pcp - "Performance Co-Pilot" /var/lib/pcp diff --git a/system/pcp/tmpfile.conf b/system/pcp/tmpfile.conf new file mode 100644 index 0000000000000..ba8e202ff8a8d --- /dev/null +++ b/system/pcp/tmpfile.conf @@ -0,0 +1,7 @@ +d /etc/pcp/nssdb 775 pcp pcp +d /run/pcp 775 pcp pcp +Z /var/log/pcp 775 pcp pcp +Z /var/lib/pcp/config/pmie 775 pcp pcp +Z /var/lib/pcp/config/pmlogger 775 pcp pcp +Z /var/lib/pcp/config/pmda 775 pcp pcp +Z /var/lib/pcp/tmp 775 pcp pcp |