Blame SPECS/fence-virt.spec

268ae7
###############################################################################
268ae7
###############################################################################
268ae7
##
268ae7
##  Copyright (C) 2019 Red Hat, Inc.  All rights reserved.
268ae7
##
268ae7
##  This copyrighted material is made available to anyone wishing to use,
268ae7
##  modify, copy, or redistribute it subject to the terms and conditions
268ae7
##  of the GNU General Public License v.2.
268ae7
##
268ae7
###############################################################################
268ae7
###############################################################################
268ae7
268ae7
Name:    fence-virt
268ae7
Summary: A pluggable fencing framework for virtual machines
268ae7
Version: 1.0.0
ed9a6b
Release: 6%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
268ae7
License: GPLv2+
268ae7
Group:   System Environment/Base
268ae7
URL:     https://github.com/ClusterLabs/fence-virt
268ae7
Source0: %{name}-%{version}%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.bz2
16e1a6
Patch0:  bz1927171-fence_xvm-fix-typo.patch
ed9a6b
Patch1:  bz2132010-fence_virt-add-note-reboot-action.patch
ed9a6b
Patch2:  bz2138825-fence_virtd-update-manpage.patch
ed9a6b
Patch3:  bz2144530-fence_virtd-warn-files-not-mode-600.patch
ed9a6b
Patch4:  bz2149649-fence_virtd-update-fence_virt.conf-manpage.patch
da3fa2
da3fa2
%if 0%{?rhel}
da3fa2
ExclusiveArch: i686 x86_64
da3fa2
%endif
da3fa2
268ae7
%if 0%{?suse_version}
268ae7
%define nss_devel mozilla-nss-devel
268ae7
%define nspr_devel mozilla-nspr-devel
268ae7
%define systemd_units systemd
268ae7
%else
268ae7
%define nss_devel nss-devel
268ae7
%define nspr_devel nspr-devel
268ae7
%define systemd_units systemd-units
268ae7
%endif
da3fa2
268ae7
BuildRequires: gcc
268ae7
BuildRequires: corosynclib-devel libvirt-devel
268ae7
BuildRequires: automake autoconf libtool libxml2-devel %{nss_devel} %{nspr_devel}
268ae7
BuildRequires: flex bison libuuid-devel
da3fa2
268ae7
BuildRequires:    systemd-units
268ae7
Requires(post):   systemd-sysv systemd-units
268ae7
Requires(preun):  systemd-units
268ae7
Requires(postun): systemd-units
da3fa2
da3fa2
Conflicts:	fence-agents < 3.0.5-2
da3fa2
da3fa2
%prep
ed9a6b
%setup -q -n %{name}-%{version}%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
ed9a6b
%patch0 -p1
ed9a6b
%patch1 -p1
ed9a6b
%patch2 -p1
ed9a6b
%patch3 -p1
ed9a6b
%patch4 -p1
da3fa2
da3fa2
%build
da3fa2
./autogen.sh
da3fa2
%{configure} --disable-libvirt-qmf-plugin --enable-cpg-plugin
da3fa2
make %{?_smp_mflags}
da3fa2
da3fa2
%install
da3fa2
rm -rf %{buildroot}
da3fa2
make install DESTDIR=%{buildroot}
da3fa2
da3fa2
# Systemd unit file
da3fa2
mkdir -p %{buildroot}/%{_unitdir}/
da3fa2
install -m 0644 fence_virtd.service %{buildroot}/%{_unitdir}/
da3fa2
268ae7
rm -f %{buildroot}/%{_libdir}/%{name}/*.*a
da3fa2
da3fa2
%post
da3fa2
ccs_update_schema > /dev/null 2>&1 ||:
da3fa2
# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
268ae7
if [ $1 -eq 1 ]; then
268ae7
    # Initial installation
da3fa2
    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
da3fa2
fi
da3fa2
da3fa2
%preun
da3fa2
# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
268ae7
if [ $1 -eq 0 ]; then
da3fa2
    # Package removal, not upgrade
da3fa2
    /bin/systemctl --no-reload disable fence_virtd.service &> /dev/null || :
da3fa2
    /bin/systemctl stop fence_virtd.service &> /dev/null || :
da3fa2
fi
da3fa2
da3fa2
%postun
da3fa2
# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
da3fa2
/bin/systemctl daemon-reload &> /dev/null || :
268ae7
if [ $1 -ge 1 ]; then
da3fa2
    # Package upgrade, not uninstall
da3fa2
    /bin/systemctl try-restart fence_virtd.service &> /dev/null || :
da3fa2
fi
da3fa2
da3fa2
%triggerun -- fence_virtd < 0.3.0-1
da3fa2
# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Packages_migrating_to_a_systemd_unit_file_from_a_SysV_initscript
da3fa2
/usr/bin/systemd-sysv-convert --save fence_virtd &> /dev/null || :
da3fa2
/sbin/chkconfig --del fence_virtd &> /dev/null || :
da3fa2
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
da3fa2
/bin/systemctl try-restart fence_virtd.service &> /dev/null || :
da3fa2
268ae7
%description
268ae7
Fencing agent for virtual machines.
268ae7
268ae7
%files
268ae7
%doc COPYING TODO README
268ae7
%{_sbindir}/fence_virt
268ae7
%{_sbindir}/fence_xvm
268ae7
%{_mandir}/man8/fence_virt.*
268ae7
%{_mandir}/man8/fence_xvm.*
da3fa2
268ae7
%package -n fence-virtd
268ae7
Summary: Daemon which handles requests from fence-virt
268ae7
Group:   System Environment/Base
268ae7
%description -n fence-virtd
268ae7
This package provides the host server framework, fence_virtd,
268ae7
for fence_virt.  The fence_virtd host daemon is resposible for
268ae7
processing fencing requests from virtual machines and routing
268ae7
the requests to the appropriate physical machine for action.
da3fa2
%files -n fence-virtd
da3fa2
%{_sbindir}/fence_virtd
da3fa2
%{_unitdir}/fence_virtd.service
da3fa2
%config(noreplace) %{_sysconfdir}/fence_virt.conf
da3fa2
%dir %{_libdir}/%{name}
268ae7
%{_libdir}/%{name}/vsock.so
da3fa2
%{_mandir}/man5/fence_virt.conf.*
da3fa2
%{_mandir}/man8/fence_virtd.*
da3fa2
268ae7
%package -n fence-virtd-multicast
268ae7
Summary:  Multicast listener for fence-virtd
268ae7
Group:	  System Environment/Base
268ae7
Requires: fence-virtd
268ae7
%description -n fence-virtd-multicast
268ae7
Provides multicast listener capability for fence-virtd.
da3fa2
%files -n fence-virtd-multicast
da3fa2
%{_libdir}/%{name}/multicast.so
da3fa2
268ae7
%package -n fence-virtd-serial
268ae7
Summary:  Serial VMChannel listener for fence-virtd
268ae7
Group:    System Environment/Base
268ae7
Requires: libvirt >= 0.6.2
268ae7
Requires: fence-virtd
268ae7
%description -n fence-virtd-serial
268ae7
Provides serial VMChannel listener capability for fence-virtd.
da3fa2
%files -n fence-virtd-serial
da3fa2
%{_libdir}/%{name}/serial.so
da3fa2
268ae7
%package -n fence-virtd-tcp
268ae7
Summary:  TCP listener for fence-virtd
268ae7
Group:    System Environment/Base
268ae7
Requires: fence-virtd
268ae7
%description -n fence-virtd-tcp
268ae7
Provides TCP listener capability for fence-virtd.
da3fa2
%files -n fence-virtd-tcp
da3fa2
%{_libdir}/%{name}/tcp.so
da3fa2
268ae7
%package -n fence-virtd-libvirt
268ae7
Summary:  Libvirt backend for fence-virtd
268ae7
Group:    System Environment/Base
268ae7
Requires: libvirt >= 0.6.0
268ae7
Requires: fence-virtd
268ae7
%description -n fence-virtd-libvirt
268ae7
Provides fence_virtd with a connection to libvirt to fence
268ae7
virtual machines.  Useful for running a cluster of virtual
268ae7
machines on a desktop.
da3fa2
%files -n fence-virtd-libvirt
268ae7
%{_libdir}/%{name}/virt.so
da3fa2
268ae7
%package -n fence-virtd-cpg
268ae7
Summary:  CPG/libvirt backend for fence-virtd
268ae7
Group:    System Environment/Base
268ae7
Requires: corosynclib
268ae7
Requires: fence-virtd
268ae7
%description -n fence-virtd-cpg
268ae7
Provides fence_virtd with a connection to libvirt to fence
268ae7
virtual machines. Uses corosync CPG to keep track of VM
268ae7
locations to allow for non-local VMs to be fenced when VMs
268ae7
are located on corosync cluster nodes.
da3fa2
%files -n fence-virtd-cpg
da3fa2
%{_libdir}/%{name}/cpg.so
da3fa2
da3fa2
%changelog
ed9a6b
* Fri Dec  2 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 1.0.0-6
ed9a6b
- fence_virtd: add info about multiple uuid/ip entries to manpage
ed9a6b
ed9a6b
  Resolves: rhbz#2149649
ed9a6b
ed9a6b
* Tue Nov 22 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 1.0.0-5
ed9a6b
- fence_virtd: warn if config or key file(s) are not mode 600
ed9a6b
ed9a6b
  Resolves: rhbz#bz2144530
ed9a6b
ed9a6b
* Mon Oct 31 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 1.0.0-4
ed9a6b
- fence_virtd: add link to uri examples and uri w/socket path
ed9a6b
  example for when VMS are run as non-root user to manpage
ed9a6b
ed9a6b
  Resolves: rhbz#2138825
ed9a6b
ed9a6b
* Wed Oct  5 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 1.0.0-3
ed9a6b
- fence_virt: add note that reboot-action doesnt power on nodes that
ed9a6b
  are powered off
ed9a6b
  Resolves: rhbz#2132010
ed9a6b
16e1a6
* Fri Oct 15 2021 Oyvind Albrigtsen <oalbrigt@redhat.com> - 1.0.0-2
16e1a6
- fence_xvm: fix typo
16e1a6
  Resolves: rhbz#1927171
16e1a6
268ae7
* Wed Mar 11 2020 Oyvind Albrigtsen <oalbrigt@redhat.com> - 1.0.0-1
268ae7
- Rebase to fence-virt-1.0.0
268ae7
  Resolves: rhbz#1774394
268ae7
268ae7
* Thu Jan 30 2020 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.4.0-9
47a836
- fence_virtd: fix segfault when no domains are found
47a836
  Resolves: rhbz#1766993
47a836
47a836
* Tue Jul 23 2019 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.4.0-7
47a836
- fence_xvm/fence_virt: dont report success for incorrect parameter
47a836
  Resolves: rhbz#1668357
47a836
da3fa2
* Tue Apr  9 2019 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.4.0-6
da3fa2
- Harden with -fPIE and -Wl,-z,now
da3fa2
  Resolves: rhbz#1624110
da3fa2
- Add CI gating tests
da3fa2
  Resolves: rhbz#1682883
da3fa2
da3fa2
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-4
da3fa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
da3fa2
da3fa2
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-3
da3fa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
da3fa2
da3fa2
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-2
da3fa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
da3fa2
da3fa2
* Mon Jun 05 2017 Ryan McCabe <rmccabe@redhat.com> - 0.4.0-1
da3fa2
- Rebase to fence-virt-0.4.0
da3fa2
da3fa2
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-7
da3fa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
da3fa2
da3fa2
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-6
da3fa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
da3fa2
da3fa2
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.2-5
da3fa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
da3fa2
da3fa2
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.3.2-4
da3fa2
- Rebuilt for GCC 5 C++11 ABI change
da3fa2
da3fa2
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.2-3
da3fa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
da3fa2
da3fa2
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.2-2
da3fa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
da3fa2
da3fa2
* Mon Nov 04 2013 Ryan McCabe <rmccabe@redhat.com> - 0.3.2-1
da3fa2
- New upstream version 0.3.2
da3fa2
da3fa2
* Sun Nov 03 2013 Ryan McCabe <rmccabe@redhat.com> - 0.3.1-1
da3fa2
- Drop executable flags of manual pages
da3fa2
- Fix for missed libvirtd events
da3fa2
- Fix for broken systemd service file
da3fa2
da3fa2
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-15
da3fa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
da3fa2
da3fa2
* Wed Jul 10 2013 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-14
da3fa2
- Fail properly when unable to bind the TCP listener socket.
da3fa2
- Resolves: rhbz#814515
da3fa2
da3fa2
* Tue May 07 2013 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-13
da3fa2
- Rebuild
da3fa2
da3fa2
* Tue May 07 2013 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-12
da3fa2
- Drop libvirt-qmf-plugin
da3fa2
da3fa2
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-11
da3fa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
da3fa2
da3fa2
* Fri Nov 02 2012 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-10
da3fa2
- bswap fix for big endian
da3fa2
da3fa2
* Fri Nov 02 2012 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-9
da3fa2
- Return success if a domain exists but is already off.
da3fa2
da3fa2
* Thu Oct 25 2012 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-8
da3fa2
- Version bump
da3fa2
da3fa2
* Thu Oct 25 2012 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-7
da3fa2
- Fix uninitialized variable for the -w option.
da3fa2
da3fa2
* Mon Oct 15 2012 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-6
da3fa2
- Add a -w (delay) option.
da3fa2
- Return failure when attempting to fence a nonexistent domain
da3fa2
- Improve man pages
da3fa2
da3fa2
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-5
da3fa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
da3fa2
da3fa2
* Tue Mar 27 2012 Ryan McCabe <rmccabe@fedoraproject.org> 0.3.0-4
da3fa2
- Add QPid build fix patch from upstream.
da3fa2
da3fa2
* Fri Feb 10 2012 Lon Hohberger <lon@fedoraproject.org> 0.3.0-2
da3fa2
- Fix URL / Source0 lines
da3fa2
  Resolves: Fedora#706560
da3fa2
da3fa2
* Tue Feb 07 2012 Lon Hohberger <lhh@redhat.com> 0.3.0-1
da3fa2
- Rebase from upstream to 0.3.0
da3fa2
- Systemd unit file integration
da3fa2
- Pacemaker backend
da3fa2
- Various fixes for startup
da3fa2
- Rename libvirt-qpid to libvirt-qmf backend
da3fa2
- Updated default configuration for easier deployment on
da3fa2
  Fedora systems
da3fa2
da3fa2
* Tue Feb 07 2012 Lon Hohberger <lhh@redhat.com> - 0.2.3-6
da3fa2
- Bump and rebuild
da3fa2
da3fa2
* Tue Feb 07 2012 Lon Hohberger <lhh@redhat.com> - 0.2.3-5
da3fa2
- Fixup changelog
da3fa2
da3fa2
* Mon Feb 06 2012 Lon Hohberger <lhh@redhat.com> - 0.2.3-4
da3fa2
- Drop checkpoint backend since cman and openais are gone
da3fa2
da3fa2
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.3-3
da3fa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
da3fa2
da3fa2
* Fri Jul  8 2011 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.2.3-2
da3fa2
- add post call to fence-virt to integrate with cluster 3.1.4
da3fa2
da3fa2
* Wed Jun 29 2011 Fabio M. Di Nitto <fdinitto@redhat.com> 0.2.3-1
da3fa2
- new upstream release fix compat regression
da3fa2
da3fa2
* Mon Jun 27 2011 Fabio M. Di Nitto <fdinitto@redhat.com> 0.2.2-1
da3fa2
- new upstream release
da3fa2
da3fa2
* Mon May 09 2011 Fabio M. Di Nitto <fdinitto@redhat.com> 0.2.1-5
da3fa2
- Rebuilt for libqmfconsole soname change
da3fa2
da3fa2
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-4
da3fa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
da3fa2
da3fa2
* Thu Apr 01 2010 Lon Hohberger <lhh@redhat.com> 0.2.1-3
da3fa2
- Update specfile to require correct qpid/qmf libraries
da3fa2
- Resolves: bz#565111
da3fa2
da3fa2
* Tue Feb 23 2010 Fabio M. Di Nitto <fdinitto@redhat.com> 0.2.1-2
da3fa2
- Update spec file to handle correctly versioned Requires
da3fa2
da3fa2
* Fri Jan 15 2010 Lon Hohberger <lhh@redhat.com> 0.2.1-1
da3fa2
- Update to latest upstream version
da3fa2
- Fix bug around status return codes for VMs which are 'off'
da3fa2
da3fa2
* Thu Jan 14 2010 Lon Hohberger <lhh@redhat.com> 0.2-1
da3fa2
- Update to latest upstream version
da3fa2
- Serial & VMChannel listener support
da3fa2
- Static permission map support
da3fa2
- Man pages
da3fa2
- Init script
da3fa2
- Various bugfixes
da3fa2
da3fa2
* Mon Sep 21 2009 Lon Hohberger <lhh@redhat.com> 0.1.3-1
da3fa2
- Update to latest upstream version
da3fa2
- Adds libvirt-qpid backend support
da3fa2
- Fixes UUID operation with libvirt backend
da3fa2
- Adds man page for fence_xvm and fence_virt
da3fa2
- Provides fence_xvm compatibility for cluster 3.0.6
da3fa2
da3fa2
* Mon Sep 21 2009 Lon Hohberger <lhh@redhat.com> 0.1.2-1
da3fa2
- Update to latest upstream version
da3fa2
- Fix build issue on i686
da3fa2
da3fa2
* Mon Sep 21 2009 Lon Hohberger <lhh@redhat.com> 0.1.1-1
da3fa2
- Update to latest upstream version
da3fa2
- Clean up spec file
da3fa2
da3fa2
* Mon Sep 21 2009 Lon Hohberger <lhh@redhat.com> 0.1-2
da3fa2
- Spec file cleanup
da3fa2
da3fa2
* Thu Sep 17 2009 Lon Hohberger <lhh@redhat.com> 0.1-1
da3fa2
- Initial build for rawhide