diff --git a/.gitignore b/.gitignore index 98c9fe2..728873e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /aeolus-audrey-agent-0.4.0.tar.gz /aeolus-audrey-agent-0.4.2.tar.gz +/aeolus-audrey-agent-0.4.10.tar.gz diff --git a/aeolus-audrey-agent.spec b/aeolus-audrey-agent.spec index d12245b..f6855d7 100644 --- a/aeolus-audrey-agent.spec +++ b/aeolus-audrey-agent.spec @@ -13,31 +13,37 @@ # See the License for the specific language governing permissions and # limitations under the License. # + +%if 0%{?rhel} == 5 +# sitelib for noarch packages +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%endif + Name: aeolus-audrey-agent -Version: 0.4.2 -Release: 15%{?dist} +Version: 0.4.10 +Release: 1%{?dist} Summary: The Aeolus Audrey Startup Agent Group: Applications/System License: ASL 2.0 URL: http://aeolusproject.org -Source0: http://joev.fedorapeople.org/audrey-agent/aeolus-audrey-agent-%{version}.tar.gz +Source0: https://github.com/aeolusproject/audrey/tarball/1.0/aeolus-audrey-agent-%{version}.tar.gz # All of these are required for building since during the build # process "audrey --help" is executed to generate the man page. BuildRequires: help2man BuildRequires: facter python-httplib2 python-oauth2 -%if (0%{?fedora} <= 14 || 0%{?rhel} <= 6) -BuildRequires: python-argparse -BuildRequires: python-setuptools -%endif - Requires: facter python-httplib2 python-oauth2 Requires: python-argparse -%if (0%{?fedora} <= 14 || 0%{?rhel} <= 6) + +%if 0%{?rhel} == 5 || 0%{?rhel} == 6 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +BuildRequires: python-argparse +BuildRequires: python-setuptools Requires: python-argparse Requires: python-setuptools +%else +BuildRequires: systemd-units %endif BuildArch: noarch @@ -55,19 +61,79 @@ make %{?_smp_mflags} %install rm -rf %{buildroot} +mkdir -p %{buildroot}%{_sysconfdir}/sysconfig mkdir -p %{buildroot}%{_bindir} + +#install man files mkdir -p %{buildroot}%{_mandir}/man8 +install -m644 audrey.8 %{buildroot}%{_mandir}/man8 # copy over the audrey agent bits install audrey_agent.py %{buildroot}%{_bindir}/audrey -cp audrey.8 %{buildroot}%{_mandir}/man8 + +if [ 0%{?rhel} == 05 ] || [ 0%{?rhel} == 06 ]; then + # install the sysv service script + mkdir -p %{buildroot}/%{_initrddir}/%{name} + install -Dp -m755 scripts/audrey.sysv %{buildroot}%{_initrddir}/ZZaudrey +else + # install the systemd unit file + mkdir -p %{buildroot}/%{_unitdir}/ + install -m644 scripts/audrey.service %{buildroot}/%{_unitdir}/ +fi + +%pre +# this removes the audrey service +# in prep for the ZZaudrey service +# part of fix for BZ816104 +if [ -e %{_initrddir}/audrey ]; then +/sbin/chkconfig --del audrey +fi + +%post +if [ 0%{?rhel} == 05 ] || [ 0%{?rhel} == 06 ]; then +/sbin/chkconfig --add ZZaudrey +/sbin/chkconfig ZZaudrey on +else +/bin/systemctl enable audrey.service > /dev/null +fi + + +%preun +if [ "$1" = 0 ] ; then +if [ 0%{?rhel} == 05 ] || [ 0%{?rhel} == 06 ]; then +/sbin/chkconfig --del ZZaudrey +else +/bin/systemctl disable audrey.service > /dev/null +fi +fi %files +%defattr(-,root,root,-) %{_bindir}/audrey %{_mandir}/man8/audrey.8* +%if 0%{?rhel} == 5 || 0%{?rhel} == 6 +%{_initrddir}/ZZaudrey +%else +%{_unitdir}/audrey.service +%endif %doc COPYING %changelog +* Wed Jun 20 2012 Joe VLcek Radez 0.4.10-1 +- fix for BZ831645 +* Thu May 24 2012 Dan Radez 0.4.9-1 +- fix for BZ812915 +* Wed May 23 2012 Dan Radez 0.4.8-1 +- fix for BZ801861 +* Tue May 08 2012 Dan Radez 0.4.6-1 +- fix for BZ816104 +* Tue Mar 13 2012 Dan Radez 0.4.5-1 +- update the sysv priorities to fix BZ800251 +* Mon Mar 05 2012 Dan Radez 0.4.4-3 +- https://bugzilla.redhat.com/show_bug.cgi?id=798787 +- chkconfig on for http and configserver +* Wed Jan 25 2012 Dan Radez 0.4.4-2 +- adding rc.local modifications * Wed Dec 07 2011 Joe VLcek 0.4.0-14 - Define BuildRoot to address RHEL5 rpmbuild incompatibility * Tue Dec 06 2011 Joe VLcek 0.4.0-13 diff --git a/sources b/sources index 2036ad0..f414f6c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fd9a9d385a9d7435f94e0538f4e680d3 aeolus-audrey-agent-0.4.2.tar.gz +1829bd4c9ce8c898f0ccd7b2ee78969a aeolus-audrey-agent-0.4.10.tar.gz