Blame SPECS/fence-virt.spec

e51146
Name:		fence-virt
e51146
Version:	0.3.2
e51146
Release:	14%{?dist}
e51146
Summary:	A pluggable fencing framework for virtual machines
e51146
Group:		System Environment/Base
e51146
License:	GPLv2+
e51146
e51146
%if 0%{?rhel}
e51146
ExclusiveArch: i686 x86_64 ppc64le
e51146
%endif
e51146
e51146
URL:		http://fence-virt.sourceforge.net
e51146
Source0:	http://people.redhat.com/rmccabe/fence-virt/%{name}-%{version}.tar.bz2
e51146
e51146
Patch0: bz1207422-client_do_not_truncate_vm_domains_in_list_output.patch
e51146
Patch1: bz1078197-fix_broken_restrictions_on_the_port_ranges.patch
e51146
Patch2: bz1204873-fix_delay_parameter_checking_copy_paste.patch
e51146
Patch3: bz1204877-remove_delay_from_the_status,_monitor_and_list.patch
e51146
Patch4: bz1334170-allow_fence_virtd_to_run_as_non_root.patch
e51146
Patch5: bz1334170-2-fix_use_of_undefined_#define.patch
e51146
Patch6: bz1291522-Install_firewalld_unit_file.patch
e51146
Patch7: bz1393958-cleanup_numeric_argument_parsing.patch
e51146
Patch8: bz1411910-fence_virtd_drop_legacy_sysvstartpriority_from_service.patch
e51146
Patch9: bz1334170-cleanup_documentation_of_the_tcp_listener.patch
e51146
Patch10: bz1092531-enable_hardening.patch
e51146
Patch11: bz1447700-virt_add_support_for_the_validate_all_status.patch
e51146
Patch12: bz1384181-make_the_libvirt_backend_survive_libvirtd.patch
e51146
Patch13: bz1600566-fence_virt-dont-report-success-incorrect-parameter.patch
e51146
e51146
BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
e51146
e51146
BuildRequires:	corosynclib-devel libvirt-devel
e51146
BuildRequires:	automake autoconf libxml2-devel nss-devel nspr-devel
e51146
BuildRequires:	flex bison libuuid-devel
e51146
e51146
BuildRequires: systemd-units
e51146
Requires(post):	systemd-sysv systemd-units firewalld-filesystem
e51146
Requires(preun):	systemd-units
e51146
Requires(postun):	systemd-units
e51146
e51146
Conflicts:	fence-agents < 3.0.5-2
e51146
e51146
e51146
%description
e51146
Fencing agent for virtual machines.
e51146
e51146
%global _hardened_build 1
e51146
e51146
%package -n fence-virtd
e51146
Summary:	Daemon which handles requests from fence-virt
e51146
Group:		System Environment/Base
e51146
e51146
%description -n fence-virtd
e51146
This package provides the host server framework, fence_virtd,
e51146
for fence_virt.  The fence_virtd host daemon is resposible for
e51146
processing fencing requests from virtual machines and routing
e51146
the requests to the appropriate physical machine for action.
e51146
e51146
e51146
%package -n fence-virtd-multicast
e51146
Summary:	Multicast listener for fence-virtd
e51146
Group:		System Environment/Base
e51146
Requires:	fence-virtd
e51146
e51146
%description -n fence-virtd-multicast
e51146
Provides multicast listener capability for fence-virtd.
e51146
e51146
e51146
%package -n fence-virtd-serial
e51146
Summary:	Serial VMChannel listener for fence-virtd
e51146
Group:		System Environment/Base
e51146
Requires:	libvirt >= 0.6.2
e51146
Requires:	fence-virtd
e51146
e51146
%description -n fence-virtd-serial
e51146
Provides serial VMChannel listener capability for fence-virtd.
e51146
e51146
%package -n fence-virtd-tcp
e51146
Summary:	Tcp listener for fence-virtd
e51146
Group:	System Environment/Base
e51146
Requires:	fence-virtd
e51146
e51146
%description -n fence-virtd-tcp
e51146
Provides TCP listener capability for fence-virtd.
e51146
e51146
%package -n fence-virtd-libvirt
e51146
Summary:	Libvirt backend for fence-virtd
e51146
Group:		System Environment/Base
e51146
Requires:	libvirt >= 0.6.0
e51146
Requires:	fence-virtd
e51146
e51146
%description -n fence-virtd-libvirt
e51146
Provides fence_virtd with a connection to libvirt to fence
e51146
virtual machines.  Useful for running a cluster of virtual
e51146
machines on a desktop.
e51146
e51146
e51146
%prep
e51146
%setup -q
e51146
e51146
%patch0 -p1 -b .bz1207422
e51146
%patch1 -p1 -b .bz1078197.1
e51146
%patch2 -p1 -b .bz1204873.1
e51146
%patch3 -p1 -b .bz1204877.1
e51146
%patch4 -p1 -b .bz1334170.1
e51146
%patch5 -p1 -b .bz1334170.2
e51146
%patch6 -p1 -b .bz1291522.1
e51146
%patch7 -p1 -b .bz1393958.1
e51146
%patch8 -p1 -b .bz1411910.1
e51146
%patch9 -p1 -b .bz1334170.1
e51146
%patch10 -p1 -b .bz1092531.1
e51146
%patch11 -p1 -b .bz1447700.1
e51146
%patch12 -p1 -b .bz1384181.1
e51146
%patch13 -p1 -F1
e51146
e51146
%build
e51146
%ifarch s390 s390x sparcv9 sparc64
e51146
export PIECFLAGS="-fPIE"
e51146
%else
e51146
export PIECFLAGS="-fpie"
e51146
%endif
e51146
e51146
export RELRO="-Wl,-z,relro,-z,now"
e51146
export CFLAGS="$RPM_OPT_FLAGS $CPPFLAGS $PIECFLAGS $RELRO"
e51146
export CXXFLAGS="$RPM_OPT_FLAGS $CPPFLAGS $PIECFLAGS $RELRO"
e51146
export LDFLAGS="$LDFLAGS -pie"
e51146
e51146
./autogen.sh
e51146
%{configure} --disable-libvirt-qmf-plugin --enable-tcp-plugin
e51146
make %{?_smp_mflags}
e51146
e51146
e51146
%install
e51146
rm -rf %{buildroot}
e51146
make install DESTDIR=%{buildroot}
e51146
e51146
# Systemd unit file
e51146
mkdir -p %{buildroot}/%{_unitdir}/
e51146
install -m 0644 fence_virtd.service %{buildroot}/%{_unitdir}/
e51146
e51146
# firewalld service file
e51146
mkdir -p %{buildroot}/%{_prefix}/lib/firewalld/services/
e51146
install -m 0644 fence_virt.xml %{buildroot}/%{_prefix}/lib/firewalld/services/
e51146
e51146
%clean
e51146
rm -rf %{buildroot}
e51146
e51146
e51146
%files
e51146
%defattr(-,root,root,-)
e51146
%doc COPYING TODO README
e51146
%{_sbindir}/fence_virt
e51146
%{_sbindir}/fence_xvm
e51146
%{_mandir}/man8/fence_virt.*
e51146
%{_mandir}/man8/fence_xvm.*
e51146
e51146
e51146
%post
e51146
ccs_update_schema > /dev/null 2>&1 ||:
e51146
# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
e51146
if [ $1 -eq 1 ] ; then 
e51146
    # Initial installation 
e51146
    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
e51146
fi
e51146
e51146
%preun
e51146
# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
e51146
if [ $1 -eq 0 ] ; then
e51146
    # Package removal, not upgrade
e51146
    /bin/systemctl --no-reload disable fence_virtd.service &> /dev/null || :
e51146
    /bin/systemctl stop fence_virtd.service &> /dev/null || :
e51146
fi
e51146
e51146
%postun
e51146
# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
e51146
/bin/systemctl daemon-reload &> /dev/null || :
e51146
if [ $1 -ge 1 ] ; then
e51146
    # Package upgrade, not uninstall
e51146
    /bin/systemctl try-restart fence_virtd.service &> /dev/null || :
e51146
fi
e51146
e51146
e51146
%triggerun -- fence_virtd < 0.3.0-1
e51146
# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Packages_migrating_to_a_systemd_unit_file_from_a_SysV_initscript
e51146
/usr/bin/systemd-sysv-convert --save fence_virtd &> /dev/null || :
e51146
/sbin/chkconfig --del fence_virtd &> /dev/null || :
e51146
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
e51146
/bin/systemctl try-restart fence_virtd.service &> /dev/null || :
e51146
e51146
e51146
%files -n fence-virtd
e51146
%defattr(-,root,root,-)
e51146
%{_sbindir}/fence_virtd
e51146
%{_unitdir}/fence_virtd.service
e51146
%{_prefix}/lib/firewalld/services/fence_virt.xml
e51146
%config(noreplace) %{_sysconfdir}/fence_virt.conf
e51146
%dir %{_libdir}/%{name}
e51146
%{_mandir}/man5/fence_virt.conf.*
e51146
%{_mandir}/man8/fence_virtd.*
e51146
e51146
%files -n fence-virtd-multicast
e51146
%defattr(-,root,root,-)
e51146
%{_libdir}/%{name}/multicast.so
e51146
e51146
%files -n fence-virtd-serial
e51146
%defattr(-,root,root,-)
e51146
%{_libdir}/%{name}/serial.so
e51146
e51146
%files -n fence-virtd-tcp
e51146
%defattr(-,root,root,-)
e51146
%{_libdir}/%{name}/tcp.so
e51146
e51146
%files -n fence-virtd-libvirt
e51146
%defattr(-,root,root,-)
e51146
%{_libdir}/%{name}/libvirt.so
e51146
e51146
%changelog
e51146
* Tue Jan 22 2019 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.3.2-14
e51146
- fence_xvm/fence_virt: dont report success incorrect parameter
e51146
  Resolves: rhbz#1600566
e51146
e51146
* Wed Aug 09 2017 Ryan McCabe <rmccabe@redhat.com> - 0.3.2-13
e51146
- fence_virtd: Make the libvirt backend survive libvirtd restarts
e51146
  Resolves: rhbz#1384181
e51146
- fence_xvm/fence_virt: Add support for the validate-all status
e51146
  Resolves: rhbz#1447700
e51146
e51146
* Wed Jun 14 2017 Ryan McCabe <rmccabe@redhat.com> - 0.3.2-12
e51146
- fence-virt: Rebuild to restore debuginfo
e51146
  Resolves: rhbz#1092531
e51146
e51146
* Mon May 22 2017 Ryan McCabe <rmccabe@redhat.com> - 0.3.2-11
e51146
- fence-virt: Enable PIE and full RELRO
e51146
  Resolves: rhbz#1092531
e51146
e51146
* Mon May 22 2017 Ryan McCabe <rmccabe@redhat.com> - 0.3.2-10
e51146
- fence-virt: Enable PIE and RELRO
e51146
  Resolves: rhbz#1092531
e51146
e51146
* Wed May 17 2017 Ryan McCabe <rmccabe@redhat.com> - 0.3.2-9
e51146
- fence-virtd: Cleanup documentation of the TCP listener
e51146
  Resolves: rhbz#1334170
e51146
e51146
* Wed Mar 15 2017 Ryan McCabe <rmccabe@redhat.com> - 0.3.2-8
e51146
- fence-virt: Build for ppc64le
e51146
  Resolves: rhbz#1402572
e51146
e51146
* Mon Mar 13 2017 Ryan McCabe <rmccabe@redhat.com> - 0.3.2-7
e51146
- fence_virtd: drop legacy SysVStartPriority from service
e51146
  Resolves: rhbz#1411910
e51146
e51146
* Mon Mar 13 2017 Ryan McCabe <rmccabe@redhat.com> - 0.3.2-6
e51146
- fence-virt: Cleanup numeric argument parsing
e51146
  Resolves: rhbz#1393958
e51146
e51146
* Tue Jun 28 2016 Ryan McCabe <rmccabe@redhat.com> - 0.3.2-5
e51146
- fence-virt: Add firewalld service file.
e51146
  Resolves: rhbz#1291522
e51146
e51146
* Mon Jun 27 2016 Ryan McCabe <rmccabe@redhat.com> - 0.3.2-4
e51146
- fence-virt: Enable the TCP listener plugin
e51146
  Resolves: rhbz#1334170
e51146
- Allow fence_virtd to run as non-root
e51146
  Fix use of undefined define
e51146
  Resolves: rhbz#1334170
e51146
e51146
* Mon Jun 27 2016 Ryan McCabe <rmccabe@redhat.com> - 0.3.2-3
e51146
- fence-virt: Fix broken restrictions on the port ranges
e51146
  Resolves: rhbz#1214301
e51146
- client: Fix "delay" parameter checking
e51146
  Resolves: rhbz#1204877
e51146
- Remove delay from the status, monitor and list
e51146
  Resolves: rhbz#1204877
e51146
e51146
* Fri Jul 17 2015 Ryan McCabe <rmccabe@redhat.com> - 0.3.2-2
e51146
- Do not truncate VM domains in the output of the list command.
e51146
  Resolves: rhbz#1207422
e51146
e51146
* Mon Sep 08 2014 Ryan McCabe <rmccabe@redhat.com> - 0.3.2-1
e51146
- Rebase to the 0.3.2 release.
e51146
  Resolves: rhbz#1111384
e51146
e51146
* Wed Feb 19 2014 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-16
e51146
- Fail cleanly when unable to bind the TCP listener socket
e51146
e51146
* Tue Feb 18 2014 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-15
e51146
- Remove references to syslog.target from the fence_virtd systemd unit file
e51146
e51146
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.3.0-14
e51146
- Mass rebuild 2013-12-27
e51146
e51146
* Tue May 07 2013 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-13
e51146
- Rebuild
e51146
e51146
* Tue May 07 2013 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-12
e51146
- Drop libvirt-qmf-plugin
e51146
e51146
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-11
e51146
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
e51146
e51146
* Fri Nov 02 2012 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-10
e51146
- bswap fix for big endian
e51146
e51146
* Fri Nov 02 2012 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-9
e51146
- Return success if a domain exists but is already off.
e51146
e51146
* Thu Oct 25 2012 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-8
e51146
- Version bump
e51146
e51146
* Thu Oct 25 2012 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-7
e51146
- Fix uninitialized variable for the -w option.
e51146
e51146
* Mon Oct 15 2012 Ryan McCabe <rmccabe@redhat.com> - 0.3.0-6
e51146
- Add a -w (delay) option.
e51146
- Return failure when attempting to fence a nonexistent domain
e51146
- Improve man pages
e51146
e51146
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-5
e51146
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e51146
e51146
* Tue Mar 27 2012 Ryan McCabe <rmccabe@fedoraproject.org> 0.3.0-4
e51146
- Add QPid build fix patch from upstream.
e51146
e51146
* Fri Feb 10 2012 Lon Hohberger <lon@fedoraproject.org> 0.3.0-2
e51146
- Fix URL / Source0 lines
e51146
  Resolves: Fedora#706560
e51146
e51146
* Tue Feb 07 2012 Lon Hohberger <lhh@redhat.com> 0.3.0-1
e51146
- Rebase from upstream to 0.3.0
e51146
- Systemd unit file integration
e51146
- Pacemaker backend
e51146
- Various fixes for startup
e51146
- Rename libvirt-qpid to libvirt-qmf backend
e51146
- Updated default configuration for easier deployment on
e51146
  Fedora systems
e51146
e51146
* Tue Feb 07 2012 Lon Hohberger <lhh@redhat.com> - 0.2.3-6
e51146
- Bump and rebuild
e51146
e51146
* Tue Feb 07 2012 Lon Hohberger <lhh@redhat.com> - 0.2.3-5
e51146
- Fixup changelog
e51146
e51146
* Mon Feb 06 2012 Lon Hohberger <lhh@redhat.com> - 0.2.3-4
e51146
- Drop checkpoint backend since cman and openais are gone
e51146
e51146
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.3-3
e51146
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
e51146
e51146
* Fri Jul  8 2011 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.2.3-2
e51146
- add post call to fence-virt to integrate with cluster 3.1.4
e51146
e51146
* Wed Jun 29 2011 Fabio M. Di Nitto <fdinitto@redhat.com> 0.2.3-1
e51146
- new upstream release fix compat regression
e51146
e51146
* Mon Jun 27 2011 Fabio M. Di Nitto <fdinitto@redhat.com> 0.2.2-1
e51146
- new upstream release
e51146
e51146
* Mon May 09 2011 Fabio M. Di Nitto <fdinitto@redhat.com> 0.2.1-5
e51146
- Rebuilt for libqmfconsole soname change
e51146
e51146
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-4
e51146
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
e51146
e51146
* Thu Apr 01 2010 Lon Hohberger <lhh@redhat.com> 0.2.1-3
e51146
- Update specfile to require correct qpid/qmf libraries
e51146
- Resolves: bz#565111
e51146
e51146
* Tue Feb 23 2010 Fabio M. Di Nitto <fdinitto@redhat.com> 0.2.1-2
e51146
- Update spec file to handle correctly versioned Requires
e51146
e51146
* Fri Jan 15 2010 Lon Hohberger <lhh@redhat.com> 0.2.1-1
e51146
- Update to latest upstream version
e51146
- Fix bug around status return codes for VMs which are 'off'
e51146
e51146
* Thu Jan 14 2010 Lon Hohberger <lhh@redhat.com> 0.2-1
e51146
- Update to latest upstream version
e51146
- Serial & VMChannel listener support
e51146
- Static permission map support
e51146
- Man pages
e51146
- Init script
e51146
- Various bugfixes
e51146
e51146
* Mon Sep 21 2009 Lon Hohberger <lhh@redhat.com> 0.1.3-1
e51146
- Update to latest upstream version
e51146
- Adds libvirt-qpid backend support
e51146
- Fixes UUID operation with libvirt backend
e51146
- Adds man page for fence_xvm and fence_virt
e51146
- Provides fence_xvm compatibility for cluster 3.0.6
e51146
e51146
* Mon Sep 21 2009 Lon Hohberger <lhh@redhat.com> 0.1.2-1
e51146
- Update to latest upstream version
e51146
- Fix build issue on i686
e51146
e51146
* Mon Sep 21 2009 Lon Hohberger <lhh@redhat.com> 0.1.1-1
e51146
- Update to latest upstream version
e51146
- Clean up spec file
e51146
e51146
* Mon Sep 21 2009 Lon Hohberger <lhh@redhat.com> 0.1-2
e51146
- Spec file cleanup
e51146
e51146
* Thu Sep 17 2009 Lon Hohberger <lhh@redhat.com> 0.1-1
e51146
- Initial build for rawhide