Accepting request 1198240 from Base:System
- Enable custom pcp-selinux module (bsc#1223260) OBS-URL: https://build.opensuse.org/request/show/1198240 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pcp?expand=0&rev=76
This commit is contained in:
commit
7ca0e1e015
@ -59,6 +59,11 @@ Tue May 14 20:25:32 UTC 2024 - Martin Schreiner <martin.schreiner@suse.com>
|
||||
man pages: man-spell and corrections
|
||||
docs: updated donations page with new fiscal sponsor details
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 14 15:36:47 UTC 2024 - Cathy Hu <cathy.hu@suse.com>
|
||||
|
||||
- Enable custom pcp-selinux module (bsc#1223260)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 15 10:51:06 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
127
pcp.spec
127
pcp.spec
@ -89,9 +89,8 @@ Patch6: 0006-pmsnap-control-var-www-srv-www.patch
|
||||
# PATCH-FIX-UPSTREAM, ddiss@suse.de
|
||||
Patch10: 0010-services-switch-logutil-and-pmieutil-scripts-from-ty.patch
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel}
|
||||
%global disable_selinux 0
|
||||
%else
|
||||
%if 0%{?suse_version} < 1600
|
||||
%global disable_selinux 1
|
||||
%endif
|
||||
|
||||
@ -368,7 +367,7 @@ BuildRequires: qt5-qtsvg-devel
|
||||
%endif # default_qt
|
||||
%endif # !disable_qt
|
||||
%if !%{disable_selinux}
|
||||
Requires: pcp-selinux = %{version}-%{release}
|
||||
Requires: (pcp-selinux = %{version}-%{release} if selinux-policy-targeted)
|
||||
%endif
|
||||
|
||||
Requires: bash
|
||||
@ -402,8 +401,7 @@ Provides: pcp-pmda-nvidia = %{version}
|
||||
%global _pmdasdir %{_localstatedir}/lib/pcp/pmdas
|
||||
%global _pmdasexecdir %{_libexecdir}/pcp/pmdas
|
||||
%global _testsdir %{_localstatedir}/lib/pcp/testsuite
|
||||
%global _selinuxdir %{_localstatedir}/lib/pcp/selinux
|
||||
%global _selinuxexecdir %{_libexecdir}/pcp/selinux
|
||||
%global _selinuxdir %{_datadir}/selinux/packages/targeted
|
||||
%global _logconfdir %{_localstatedir}/lib/pcp/config/pmlogconf
|
||||
%global _ieconfdir %{_localstatedir}/lib/pcp/config/pmieconf
|
||||
%global _tapsetdir %{_datadir}/systemtap/tapset
|
||||
@ -534,16 +532,6 @@ else
|
||||
fi
|
||||
}
|
||||
|
||||
%global selinux_handle_policy() %{expand:
|
||||
if [ %1 -ge 1 ]
|
||||
then
|
||||
%{_libexecdir}/pcp/bin/selinux-setup %{_selinuxdir} install %2
|
||||
elif [ %1 -eq 0 ]
|
||||
then
|
||||
%{_libexecdir}/pcp/bin/selinux-setup %{_selinuxdir} remove %2
|
||||
fi
|
||||
}
|
||||
|
||||
%description
|
||||
Performance Co-Pilot (PCP) provides a framework and services to support
|
||||
system-level performance monitoring and performance management.
|
||||
@ -554,6 +542,7 @@ applications to easily retrieve and process any subset of that data.
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-conf
|
||||
#
|
||||
@ -573,6 +562,7 @@ Performance Co-Pilot (PCP) run-time configuration
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-libs
|
||||
#
|
||||
@ -660,6 +650,7 @@ Performance Co-Pilot (PCP) headers for development.
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-devel
|
||||
#
|
||||
@ -680,6 +671,7 @@ Performance Co-Pilot (PCP) documentation and tools for development.
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-testsuite
|
||||
#
|
||||
@ -705,6 +697,7 @@ Quality assurance test suite for Performance Co-Pilot (PCP).
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# perl-PCP-PMDA. This is the PCP agent perl binding.
|
||||
#
|
||||
@ -727,6 +720,7 @@ an application, etc.
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# perl-PCP-MMV
|
||||
#
|
||||
@ -750,6 +744,7 @@ and analysis with pmchart, pmie, pmlogger and other PCP tools.
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# perl-PCP-LogImport
|
||||
#
|
||||
@ -770,6 +765,7 @@ they can be replayed with standard PCP monitoring tools.
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# perl-PCP-LogSummary
|
||||
#
|
||||
@ -793,6 +789,7 @@ exporting this data into third-party tools (e.g. spreadsheets).
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-import-sar2pcp
|
||||
#
|
||||
@ -816,6 +813,7 @@ into standard PCP archive logs for replay with any PCP monitoring tool.
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-import-iostat2pcp
|
||||
#
|
||||
@ -880,6 +878,7 @@ into standard PCP archive logs for replay with any PCP monitoring tool.
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-import-ganglia2pcp
|
||||
#
|
||||
@ -902,6 +901,7 @@ into standard PCP archive logs for replay with any PCP monitoring tool.
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-import-collectl2pcp
|
||||
#
|
||||
@ -963,6 +963,7 @@ See https://www.elastic.co/community for further details.
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-export-pcp2graphite
|
||||
#
|
||||
@ -985,6 +986,7 @@ to graphite (http://graphite.readthedocs.org).
|
||||
|
||||
|
||||
|
||||
|
||||
# pcp-export-pcp2influxdb
|
||||
#
|
||||
%package export-pcp2influxdb
|
||||
@ -1008,6 +1010,7 @@ to InfluxDB (https://influxdata.com/time-series-platform/influxdb).
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-export-pcp2json
|
||||
#
|
||||
@ -1028,6 +1031,7 @@ in JSON format.
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-export-pcp2spark
|
||||
#
|
||||
@ -1086,6 +1090,7 @@ in XML format.
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# pcp-export-pcp2zabbix
|
||||
#
|
||||
@ -1192,6 +1197,7 @@ collecting metrics about the ActiveMQ message broker.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-activemq
|
||||
#
|
||||
# pcp-pmda-bind2
|
||||
@ -1212,6 +1218,7 @@ collecting metrics from BIND (Berkeley Internet Name Domain).
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-bind2
|
||||
#
|
||||
# pcp-pmda-redis
|
||||
@ -1273,6 +1280,7 @@ collecting metrics about bonded network interfaces.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-bonding
|
||||
#
|
||||
# pcp-pmda-dbping
|
||||
@ -1294,6 +1302,7 @@ collecting metrics about the Database response times and Availablility.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-dbping
|
||||
#
|
||||
# pcp-pmda-ds389
|
||||
@ -1319,6 +1328,7 @@ collecting metrics about a 389 Directory Server.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-ds389
|
||||
#
|
||||
# pcp-pmda-ds389log
|
||||
@ -1340,6 +1350,7 @@ collecting metrics from a 389 Directory Server log.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-ds389log
|
||||
#
|
||||
# pcp-pmda-gpfs
|
||||
@ -1360,6 +1371,7 @@ collecting metrics about the GPFS filesystem.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-gpfs
|
||||
#
|
||||
# pcp-pmda-gpsd
|
||||
@ -1381,6 +1393,7 @@ collecting metrics about a GPS Daemon.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-gpsd
|
||||
#
|
||||
# pcp-pmda-docker
|
||||
@ -1397,6 +1410,7 @@ collecting metrics using the Docker daemon REST API.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-docker
|
||||
#
|
||||
# pcp-pmda-lustre
|
||||
@ -1417,6 +1431,7 @@ collecting metrics about the Lustre Filesystem.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-lustre
|
||||
#
|
||||
# pcp-pmda-lustrecomm
|
||||
@ -1438,6 +1453,7 @@ collecting metrics about the Lustre Filesystem Comms.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-lustrecomm
|
||||
#
|
||||
# pcp-pmda-memcache
|
||||
@ -1459,6 +1475,7 @@ collecting metrics about Memcached.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-memcache
|
||||
#
|
||||
# pcp-pmda-mysql
|
||||
@ -1484,6 +1501,7 @@ collecting metrics about the MySQL database.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-mysql
|
||||
#
|
||||
# pcp-pmda-named
|
||||
@ -1505,6 +1523,7 @@ collecting metrics about the Named nameserver.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-named
|
||||
# pcp-pmda-netfilter
|
||||
#
|
||||
@ -1525,6 +1544,7 @@ collecting metrics about the Netfilter packet filtering framework.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-netfilter
|
||||
#
|
||||
# pcp-pmda-news
|
||||
@ -1546,6 +1566,7 @@ collecting metrics about Usenet News.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-news
|
||||
#
|
||||
# pcp-pmda-nginx
|
||||
@ -1568,6 +1589,7 @@ collecting metrics about the Nginx Webserver.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-nginx
|
||||
#
|
||||
# pcp-pmda-oracle
|
||||
@ -1590,6 +1612,7 @@ collecting metrics about the Oracle database.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-oracle
|
||||
#
|
||||
# pcp-pmda-pdns
|
||||
@ -1611,6 +1634,7 @@ collecting metrics about the PowerDNS.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-pdns
|
||||
#
|
||||
# pcp-pmda-postfix
|
||||
@ -1649,6 +1673,7 @@ collecting metrics about the Postfix (MTA).
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-postfix
|
||||
#
|
||||
# pcp-pmda-rsyslog
|
||||
@ -1675,6 +1700,7 @@ collecting metrics about Rsyslog.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-rsyslog
|
||||
#
|
||||
# pcp-pmda-samba
|
||||
@ -1696,6 +1722,7 @@ collecting metrics about Samba.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-samba
|
||||
#
|
||||
# pcp-pmda-slurm
|
||||
@ -1757,6 +1784,7 @@ collecting metrics for VMware.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-vmware
|
||||
#
|
||||
# pcp-pmda-zimbra
|
||||
@ -1775,6 +1803,7 @@ collecting metrics about Zimbra.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-zimbra
|
||||
#
|
||||
# pcp-pmda-dm
|
||||
@ -1813,6 +1842,7 @@ collecting metrics about the gluster filesystem.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-gluster
|
||||
#
|
||||
# pcp-pmda-nfsclient
|
||||
@ -1870,6 +1900,7 @@ collecting metrics about compressed swap.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-zswap
|
||||
#
|
||||
# pcp-pmda-unbound
|
||||
@ -1890,6 +1921,7 @@ collecting metrics about the Unbound DNS Resolver.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-unbound
|
||||
#
|
||||
# pcp-pmda-mic
|
||||
@ -1910,6 +1942,7 @@ collecting metrics about Intel MIC cards.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-mic
|
||||
#
|
||||
# pcp-pmda-haproxy
|
||||
@ -1975,6 +2008,7 @@ collecting metrics about Elasticsearch.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-elasticsearch
|
||||
#
|
||||
# pcp-pmda-openvswitch
|
||||
@ -1995,6 +2029,7 @@ collecting metrics from Open vSwitch.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-openvswitch
|
||||
#
|
||||
# pcp-pmda-rabbitmq
|
||||
@ -2067,6 +2102,7 @@ extracting metrics from OpenMetrics (https://openmetrics.io/) endpoints.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-openmetrics
|
||||
#
|
||||
# pcp-pmda-lmsensors
|
||||
@ -2090,6 +2126,7 @@ collecting metrics about the Linux hardware monitoring sensors.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-lmsensors
|
||||
#
|
||||
# pcp-pmda-netcheck
|
||||
@ -2215,6 +2252,7 @@ collecting metrics about the Apache webserver.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-apache
|
||||
#
|
||||
# pcp-pmda-bash
|
||||
@ -2235,6 +2273,7 @@ collecting metrics about the Bash shell.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-bash
|
||||
#
|
||||
# pcp-pmda-cifs
|
||||
@ -2254,6 +2293,7 @@ collecting metrics about the Common Internet Filesytem.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-cifs
|
||||
#
|
||||
# pcp-pmda-cisco
|
||||
@ -2274,6 +2314,7 @@ collecting metrics about Cisco routers.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-cisco
|
||||
#
|
||||
# pcp-pmda-gfs2
|
||||
@ -2293,6 +2334,7 @@ collecting metrics about the Global Filesystem v2.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-gfs2
|
||||
#
|
||||
# pcp-pmda-logger
|
||||
@ -2314,6 +2356,7 @@ supports both sampled and event-style metrics.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-logger
|
||||
#
|
||||
# pcp-pmda-mailq
|
||||
@ -2334,6 +2377,7 @@ collecting metrics about email queues managed by sendmail.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-mailq
|
||||
#
|
||||
# pcp-pmda-mounts
|
||||
@ -2354,6 +2398,7 @@ collecting metrics about filesystem mounts.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-mounts
|
||||
#
|
||||
# pcp-pmda-nvidia-gpu
|
||||
@ -2373,6 +2418,7 @@ collecting metrics about Nvidia GPUs.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-nvidia-gpu
|
||||
#
|
||||
# pcp-pmda-roomtemp
|
||||
@ -2433,6 +2479,7 @@ collecting metrics about Sendmail traffic.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-sendmail
|
||||
#
|
||||
# pcp-pmda-shping
|
||||
@ -2454,6 +2501,7 @@ arbitrary shell commands.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-shping
|
||||
#
|
||||
# pcp-pmda-smart
|
||||
@ -2472,6 +2520,7 @@ smartmontools package.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-smart
|
||||
#
|
||||
# pcp-pmda-sockets
|
||||
@ -2490,6 +2539,7 @@ collecting per-socket statistics, making use of utilities such as 'ss'.
|
||||
|
||||
|
||||
|
||||
|
||||
#end pcp-pmda-sockets
|
||||
#
|
||||
# pcp-pmda-hacluster
|
||||
@ -2507,6 +2557,7 @@ collecting metrics about linux High Availability (HA) Clusters.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-hacluster
|
||||
#
|
||||
# pcp-pmda-summary
|
||||
@ -2565,6 +2616,7 @@ collecting metrics about trace performance data in applications.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-trace
|
||||
#
|
||||
# pcp-pmda-weblog
|
||||
@ -2586,6 +2638,7 @@ collecting metrics about web server logs.
|
||||
|
||||
|
||||
|
||||
|
||||
# end pcp-pmda-weblog
|
||||
# end C pmdas
|
||||
|
||||
@ -2944,8 +2997,6 @@ ls -1 %{buildroot}/%{_libexecdir}/pcp/bin |\
|
||||
%if !%{disable_selinux}
|
||||
ls -1 %{buildroot}/%{_selinuxdir} |\
|
||||
sed -e 's#^#'%{_selinuxdir}'\/#' > pcp-selinux.list
|
||||
ls -1 %{buildroot}/%{_selinuxexecdir} |\
|
||||
sed -e 's#^#'%{_selinuxexecdir}'\/#' >> pcp-selinux.list
|
||||
ls -1 %{buildroot}/%{_libexecdir}/pcp/bin |\
|
||||
grep -E 'selinux-setup' |\
|
||||
sed -e 's#^#'%{_libexecdir}/pcp/bin'\/#' >> pcp-selinux.list
|
||||
@ -3094,17 +3145,6 @@ fi
|
||||
%endif
|
||||
%endif #zeroconf
|
||||
|
||||
%if !%{disable_selinux}
|
||||
%post selinux
|
||||
%{selinux_handle_policy "$1" "pcpupstream"}
|
||||
|
||||
%triggerin selinux -- docker-selinux
|
||||
%{selinux_handle_policy "$1" "pcpupstream-docker"}
|
||||
|
||||
%triggerin selinux -- container-selinux
|
||||
%{selinux_handle_policy "$1" "pcpupstream-container"}
|
||||
%endif
|
||||
|
||||
%post
|
||||
PCP_PMNS_DIR=%{_pmnsdir}
|
||||
PCP_LOG_DIR=%{_logsdir}
|
||||
@ -3166,17 +3206,6 @@ PCP_LOG_DIR=%{_logsdir}
|
||||
%postun -n libpcp_web%{libpcp_web_sover} -p /sbin/ldconfig
|
||||
%endif
|
||||
|
||||
%if !%{disable_selinux}
|
||||
%preun selinux
|
||||
%{selinux_handle_policy "$1" "pcpupstream"}
|
||||
|
||||
%triggerun selinux -- docker-selinux
|
||||
%{selinux_handle_policy "$1" "pcpupstream-docker"}
|
||||
|
||||
%triggerun selinux -- container-selinux
|
||||
%{selinux_handle_policy "$1" "pcpupstream-container"}
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
@ -3188,6 +3217,25 @@ PCP_LOG_DIR=%{_logsdir}
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if !%{disable_selinux}
|
||||
%pre selinux
|
||||
%selinux_relabel_pre -s targeted
|
||||
|
||||
%post selinux
|
||||
PCP_SELINUX_DIR=%{_selinuxdir}
|
||||
semodule -r pcpupstream-container >/dev/null 2>&1 || true
|
||||
semodule -r pcpupstream-docker >/dev/null 2>&1 || true
|
||||
semodule -r pcpupstream >/dev/null 2>&1 || true
|
||||
%selinux_modules_install -s targeted "$PCP_SELINUX_DIR/pcp.pp.bz2"
|
||||
%selinux_relabel_post -s targeted
|
||||
|
||||
%postun selinux
|
||||
if [ $1 -eq 0 ]; then
|
||||
%selinux_modules_uninstall -s targeted pcp
|
||||
%selinux_relabel_post -s targeted
|
||||
fi
|
||||
%endif
|
||||
|
||||
%files -f base.list
|
||||
#
|
||||
# Note: there are some headers (e.g. domain.h) and in a few cases some
|
||||
@ -4068,7 +4116,6 @@ PCP_LOG_DIR=%{_logsdir}
|
||||
%if !%{disable_selinux}
|
||||
%files selinux -f pcp-selinux.list
|
||||
%dir %{_selinuxdir}
|
||||
%dir %{_selinuxexecdir}
|
||||
%endif
|
||||
|
||||
%if !%{disable_python3}
|
||||
|
Loading…
Reference in New Issue
Block a user