diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/bcfg2.spec | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/misc/bcfg2.spec b/misc/bcfg2.spec index 9cf91d16a..21516c0ed 100644 --- a/misc/bcfg2.spec +++ b/misc/bcfg2.spec @@ -35,7 +35,7 @@ Group: Applications/System %endif License: BSD URL: http://bcfg2.org -Source0: ftp://ftp.mcs.anl.gov/pub/bcfg/%{name}-%{version}.tar.gz +Source0: ftp://ftp.mcs.anl.gov/pub/bcfg/%{name}-%{version}%{?_pre_rc}.tar.gz # Used in %%check Source1: http://www.w3.org/2001/XMLSchema.xsd %if %{?rhel}%{!?rhel:10} <= 5 || 0%{?suse_version} @@ -68,7 +68,6 @@ BuildRequires: buildsys-macros BuildRequires: python-ssl %else # rhel > 5 # EL5 lacks python-mock, so test suite is disabled -BuildRequires: python-sqlalchemy BuildRequires: python-nose BuildRequires: mock BuildRequires: m2crypto @@ -279,6 +278,8 @@ This package includes the Bcfg2 CherryPy server backend. %package web Summary: Bcfg2 Web Reporting Interface +Requires: bcfg2-server = %{version}-%{release} +Requires: httpd %if 0%{?suse_version} Group: System/Management Requires: python-django >= 1.2 @@ -287,9 +288,7 @@ Requires: python-django-south >= 0.7 Group: System Tools Requires: Django >= 1.2 Requires: Django-south >= 0.7 -Requires: bcfg2-server %endif -Requires: httpd %if "%{_vendor}" == "redhat" Requires: mod_wsgi %global apache_conf %{_sysconfdir}/httpd @@ -418,14 +417,13 @@ awk ' # Fixup some paths %{__perl} -pi -e 's@/etc/default@%{_sysconfdir}/sysconfig@g' tools/bcfg2-cron - %{__perl} -pi -e 's@/usr/lib/bcfg2@%{_libexecdir}@g' debian/bcfg2.cron.daily %{__perl} -pi -e 's@/usr/lib/bcfg2@%{_libexecdir}@g' debian/bcfg2.cron.hourly # Get rid of extraneous shebangs for f in `find src/lib -name \*.py` do - sed -i -e '/^#!/,1d' $f + %{__sed} -i -e '/^#!/,1d' $f done sed -i "s/apache2/httpd/g" misc/apache/bcfg2.conf @@ -533,11 +531,13 @@ sed "s@http://www.w3.org/2001/xml.xsd@file://$(pwd)/schemas/xml.xsd@" \ # Initial installation %if 0%{?suse_version} %fillup_and_insserv -f bcfg2 - %else %if 0%{?fedora} >= 16 - /bin/systemctl daemon-reload >/dev/null 2>&1 || : %else + %if 0%{?fedora} >= 16 + /bin/systemctl daemon-reload >/dev/null 2>&1 || : + %else /sbin/chkconfig --add bcfg2 - %endif %endif + %endif + %endif fi %endif @@ -549,11 +549,13 @@ sed "s@http://www.w3.org/2001/xml.xsd@file://$(pwd)/schemas/xml.xsd@" \ # Initial installation %if 0%{?suse_version} %fillup_and_insserv -f bcfg2-server - %else %if 0%{?fedora} >= 16 - /bin/systemctl daemon-reload >/dev/null 2>&1 || : %else + %if 0%{?fedora} >= 16 + /bin/systemctl daemon-reload >/dev/null 2>&1 || : + %else /sbin/chkconfig --add bcfg2-server - %endif %endif + %endif + %endif fi %endif @@ -565,13 +567,15 @@ sed "s@http://www.w3.org/2001/xml.xsd@file://$(pwd)/schemas/xml.xsd@" \ # Package removal, not upgrade %if 0%{?suse_version} %stop_on_removal bcfg2 - %else %if 0%{?fedora} >= 16 + %else + %if 0%{?fedora} >= 16 /bin/systemctl --no-reload disable bcfg2.service > /dev/null 2>&1 || : /bin/systemctl stop bcfg2.service > /dev/null 2>&1 || : - %else + %else /sbin/service bcfg2 stop &>/dev/null || : /sbin/chkconfig --del bcfg2 - %endif %endif + %endif + %endif fi %endif @@ -584,13 +588,15 @@ sed "s@http://www.w3.org/2001/xml.xsd@file://$(pwd)/schemas/xml.xsd@" \ %if 0%{?suse_version} %stop_on_removal bcfg2-server %stop_on_removal bcfg2-report-collector - %else %if 0%{?fedora} >= 16 + %else + %if 0%{?fedora} >= 16 /bin/systemctl --no-reload disable bcfg2-server.service > /dev/null 2>&1 || : /bin/systemctl stop bcfg2-server.service > /dev/null 2>&1 || : - %else + %else /sbin/service bcfg2-server stop &>/dev/null || : /sbin/chkconfig --del bcfg2-server - %endif %endif + %endif + %endif fi %endif @@ -605,11 +611,13 @@ sed "s@http://www.w3.org/2001/xml.xsd@file://$(pwd)/schemas/xml.xsd@" \ # Package upgrade, not uninstall %if 0%{?suse_version} %insserv_cleanup - %else %if 0%{?fedora} >= 16 - /bin/systemctl try-restart bcfg2.service >/dev/null 2>&1 || : %else + %if 0%{?fedora} >= 16 + /bin/systemctl try-restart bcfg2.service >/dev/null 2>&1 || : + %else /sbin/service bcfg2 condrestart &>/dev/null || : - %endif %endif + %endif + %endif fi %endif @@ -682,8 +690,7 @@ sed "s@http://www.w3.org/2001/xml.xsd@file://$(pwd)/schemas/xml.xsd@" \ %{python_sitelib}/Bcfg2/Client %{python_sitelib}/Bcfg2/Compat.py* %{python_sitelib}/Bcfg2/Logger.py* -%{python_sitelib}/Bcfg2/Options.py* -%{python_sitelib}/Bcfg2/Proxy.py* +%{python_sitelib}/Bcfg2/Options %{python_sitelib}/Bcfg2/Utils.py* %{python_sitelib}/Bcfg2/version.py* %if 0%{?suse_version} @@ -705,20 +712,15 @@ sed "s@http://www.w3.org/2001/xml.xsd@file://$(pwd)/schemas/xml.xsd@" \ %config(noreplace) %{_sysconfdir}/sysconfig/bcfg2-server %{_sbindir}/bcfg2-* %dir %{_localstatedir}/lib/%{name} -%{python_sitelib}/Bcfg2/Cache.py* -%{python_sitelib}/Bcfg2/Encryption.py* -%{python_sitelib}/Bcfg2/SSLServer.py* -%{python_sitelib}/Bcfg2/Statistics.py* %{python_sitelib}/Bcfg2/settings.py* %{python_sitelib}/Bcfg2/Server %{python_sitelib}/Bcfg2/Reporting %{python_sitelib}/Bcfg2/manage.py* -%exclude %{python_sitelib}/Bcfg2/Server/CherryPyCore.py +%exclude %{python_sitelib}/Bcfg2/Server/CherrypyCore.py %dir %{_datadir}/bcfg2 %{_datadir}/bcfg2/schemas %{_datadir}/bcfg2/xsl-transforms -%{_datadir}/bcfg2/Hostbase %if 0%{?suse_version} %{_sbindir}/rcbcfg2-server %config(noreplace) /var/adm/fillup-templates/sysconfig.bcfg2-server @@ -733,7 +735,7 @@ sed "s@http://www.w3.org/2001/xml.xsd@file://$(pwd)/schemas/xml.xsd@" \ %if 0%{?rhel} == 5 || 0%{?suse_version} %defattr(-,root,root,-) %endif -%{python_sitelib}/Bcfg2/Server/CherryPyCore.py +%{python_sitelib}/Bcfg2/Server/CherrypyCore.py %files web %if 0%{?rhel} == 5 || 0%{?suse_version} |