diff --git a/fence-agents.spec b/fence-agents.spec index 00e0c53..a315343 100644 --- a/fence-agents.spec +++ b/fence-agents.spec @@ -1,15 +1,19 @@ -# Copyright 2004-2011 Red Hat, Inc. -# This copyrighted material is made available to anyone wishing to use, -# modify, copy, or redistribute it subject to the terms and conditions -# of the GNU General Public License v.2. - -# keep around ready for later user -## global alphatag git0a6184070 +############################################################################### +############################################################################### +## +## Copyright (C) 2019-2021 Red Hat, Inc. All rights reserved. +## +## This copyrighted material is made available to anyone wishing to use, +## modify, copy, or redistribute it subject to the terms and conditions +## of the GNU General Public License v.2. +## +############################################################################### +############################################################################### Name: fence-agents Summary: Set of unified programs capable of host isolation ("fencing") -Version: 4.7.1 -Release: 3%{?alphatag:.%{alphatag}}%{?dist} +Version: 4.9.0 +Release: 1%{?alphatag:.%{alphatag}}%{?dist} License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/fence-agents Source0: https://fedorahosted.org/releases/f/e/fence-agents/%{name}-%{version}.tar.gz @@ -67,6 +71,7 @@ fence-agents-sanbox2 \\ fence-agents-sbd \\ fence-agents-scsi \\ fence-agents-vbox \\ +fence-virt \\ fence-agents-vmware \\ fence-agents-vmware-rest \\ fence-agents-vmware-soap \\ @@ -98,8 +103,7 @@ EOF) # Build dependencies ## general -BuildRequires: autoconf automake libtool -BuildRequires: make +BuildRequires: autoconf automake libtool make ## compiled code (-kdump) BuildRequires: gcc ## man pages generating @@ -132,27 +136,48 @@ BuildRequires: python-novaclient python-keystoneclient %endif %endif +# fence-virt +%if 0%{?suse_version} +%define nss_devel mozilla-nss-devel +%define nspr_devel mozilla-nspr-devel +%define systemd_units systemd +%else +%define nss_devel nss-devel +%define nspr_devel nspr-devel +%define systemd_units systemd-units +%endif + +BuildRequires: corosynclib-devel libvirt-devel +BuildRequires: libxml2-devel %{nss_devel} %{nspr_devel} +BuildRequires: flex bison libuuid-devel +BuildRequires: %{systemd_units} + + # turn off the brp-python-bytecompile script # (for F28+ or equivalent, the latter is the preferred form) %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompilespace:.*$!!g') #undefine __brp_python_bytecompile %prep -%autosetup -p1 +%setup -q -n %{name}-%{version}%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}} +%autopatch -p1 # prevent compilation of something that won't get used anyway sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac %build -if [ -z "$PYTHON " ]; then +%if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} PYTHON="%{__python3}" -fi +%endif ./autogen.sh -%{configure} +%{configure} --disable-libvirt-qmf-plugin CFLAGS="$(echo '%{optflags}')" make %{_smp_mflags} %install +rm -rf %{buildroot} make install DESTDIR=%{buildroot} +mkdir -p %{buildroot}/%{_unitdir}/ +install -m 0644 agents/virt/fence_virtd.service %{buildroot}/%{_unitdir}/ # bytecompile Python source code in a non-standard location %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 %py_byte_compile %{__python3} %{buildroot}%{_datadir}/fence @@ -164,9 +189,40 @@ make install DESTDIR=%{buildroot} chmod 0755 %{buildroot}%{_datadir}/fence/*.py # remove docs rm -rf %{buildroot}/usr/share/doc/fence-agents +# remove .a files +rm -f %{buildroot}/%{_libdir}/%{name}/*.*a +rm -f %{buildroot}/%{_libdir}/fence-virt/*.*a %post ccs_update_schema > /dev/null 2>&1 ||: +# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +fi + +%preun +# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable fence_virtd.service &> /dev/null || : + /bin/systemctl stop fence_virtd.service &> /dev/null || : +fi + +%postun +# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd +/bin/systemctl daemon-reload &> /dev/null || : +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart fence_virtd.service &> /dev/null || : +fi + +%triggerun -- fence_virtd < 0.3.0-1 +# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Packages_migrating_to_a_systemd_unit_file_from_a_SysV_initscript +/usr/bin/systemd-sysv-convert --save fence_virtd &> /dev/null || : +/sbin/chkconfig --del fence_virtd &> /dev/null || : +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +/bin/systemctl try-restart fence_virtd.service &> /dev/null || : %description A collection of executables to handle isolation ("fencing") of possibly @@ -1182,7 +1238,90 @@ Fence agent for IBM z/VM over IP. %{_sbindir}/fence_zvmip %{_mandir}/man8/fence_zvmip.8* +# fence-virt + +%package -n fence-virt +Summary: A pluggable fencing framework for virtual machines +Requires(post): systemd-sysv %{systemd_units} +Requires(preun): %{systemd_units} +Requires(postun): %{systemd_units} +%description -n fence-virt +Fencing agent for virtual machines. +%files -n fence-virt +%doc agents/virt/docs/* +%{_sbindir}/fence_virt +%{_sbindir}/fence_xvm +%{_mandir}/man8/fence_virt.* +%{_mandir}/man8/fence_xvm.* + +%package -n fence-virtd +Summary: Daemon which handles requests from fence-virt +%description -n fence-virtd +This package provides the host server framework, fence_virtd, +for fence_virt. The fence_virtd host daemon is resposible for +processing fencing requests from virtual machines and routing +the requests to the appropriate physical machine for action. +%files -n fence-virtd +%{_sbindir}/fence_virtd +%{_unitdir}/fence_virtd.service +%config(noreplace) %{_sysconfdir}/fence_virt.conf +%dir %{_libdir}/fence-virt +%{_libdir}/fence-virt/vsock.so +%{_mandir}/man5/fence_virt.conf.* +%{_mandir}/man8/fence_virtd.* + +%package -n fence-virtd-multicast +Summary: Multicast listener for fence-virtd +Requires: fence-virtd +%description -n fence-virtd-multicast +Provides multicast listener capability for fence-virtd. +%files -n fence-virtd-multicast +%{_libdir}/fence-virt/multicast.so + +%package -n fence-virtd-serial +Summary: Serial VMChannel listener for fence-virtd +Requires: libvirt >= 0.6.2 +Requires: fence-virtd +%description -n fence-virtd-serial +Provides serial VMChannel listener capability for fence-virtd. +%files -n fence-virtd-serial +%{_libdir}/fence-virt/serial.so + +%package -n fence-virtd-tcp +Summary: TCP listener for fence-virtd +Requires: fence-virtd +%description -n fence-virtd-tcp +Provides TCP listener capability for fence-virtd. +%files -n fence-virtd-tcp +%{_libdir}/fence-virt/tcp.so + +%package -n fence-virtd-libvirt +Summary: Libvirt backend for fence-virtd +Requires: libvirt >= 0.6.0 +Requires: fence-virtd +%description -n fence-virtd-libvirt +Provides fence_virtd with a connection to libvirt to fence +virtual machines. Useful for running a cluster of virtual +machines on a desktop. +%files -n fence-virtd-libvirt +%{_libdir}/fence-virt/virt.so + +%package -n fence-virtd-cpg +Summary: CPG/libvirt backend for fence-virtd +Requires: corosynclib +Requires: fence-virtd +%description -n fence-virtd-cpg +Provides fence_virtd with a connection to libvirt to fence +virtual machines. Uses corosync CPG to keep track of VM +locations to allow for non-local VMs to be fenced when VMs +are located on corosync cluster nodes. +%files -n fence-virtd-cpg +%{_libdir}/fence-virt/cpg.so + %changelog +* Fri Jun 4 2021 Oyvind Albrigtsen - 4.9.0-1 +- new upstream release + * Thu Feb 11 2021 Oyvind Albrigtsen - 4.7.1-3 - add aliyun subpackage - fence-agents-mpath: add missing fence_mpath_check* diff --git a/sources b/sources index ecf6a61..9015052 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fence-agents-4.7.1.tar.gz) = 9973d80fa9545f44d0202e6841eeadaf9facdaca2a4a67827369b5fe63a58bc830a5fb91dc94c5a90dc1f8cf4a07198fd52eb46f3974b4730f69013154493527 +SHA512 (fence-agents-4.9.0.tar.gz) = 4df897f32e8d272cf27bfd2501ce2e91f8a91726a066df89f6bea668960919a5bc069e1e71c5ec2ced0512291a2e28eb365daee8362e47a8a72be4bfac1e4ec6