Add cache directory to common package

e9
Erik Johnson 10 years ago
parent 0820b5344c
commit 6d78f5c883

1
.gitignore vendored

@ -40,3 +40,4 @@
/salt-2014.1.5.tar.gz /salt-2014.1.5.tar.gz
/salt-2014.1.7.tar.gz /salt-2014.1.7.tar.gz
/salt-2014.1.10.tar.gz /salt-2014.1.10.tar.gz
/SaltTesting-2014.8.5.tar.gz

@ -5,18 +5,18 @@
%define __python %{_bindir}/python%{?pybasever} %define __python %{_bindir}/python%{?pybasever}
%endif %endif
%global include_tests 0 %global include_tests 1
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%{!?pythonpath: %global pythonpath %(%{__python} -c "import os, sys; print(os.pathsep.join(x for x in sys.path if x))")} %{!?pythonpath: %global pythonpath %(%{__python} -c "import os, sys; print(os.pathsep.join(x for x in sys.path if x))")}
%define _salttesting SaltTesting %define _salttesting SaltTesting
%define _salttesting_ver 2014.4.24 %define _salttesting_ver 2014.8.5
Name: salt Name: salt
Version: 2014.1.10 Version: 2014.1.10
Release: 1%{?dist} Release: 2%{?dist}
Summary: A parallel remote execution system Summary: A parallel remote execution system
Group: System Environment/Daemons Group: System Environment/Daemons
@ -34,7 +34,6 @@ Source8: README.fedora
Source9: logrotate.salt Source9: logrotate.salt
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch BuildArch: noarch
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
@ -126,6 +125,9 @@ servers, handle them quickly and through a simple and manageable interface.
Summary: Management component for salt, a parallel remote execution system Summary: Management component for salt, a parallel remote execution system
Group: System Environment/Daemons Group: System Environment/Daemons
Requires: salt = %{version}-%{release} Requires: salt = %{version}-%{release}
%if ! (0%{?rhel} >= 7 || 0%{?fedora} >= 15)
Requires: systemd-python
%endif
%description -n salt-master %description -n salt-master
The Salt master is the central server to which all minions connect. The Salt master is the central server to which all minions connect.
@ -134,7 +136,6 @@ The Salt master is the central server to which all minions connect.
Summary: Client component for salt, a parallel remote execution system Summary: Client component for salt, a parallel remote execution system
Group: System Environment/Daemons Group: System Environment/Daemons
Requires: salt = %{version}-%{release} Requires: salt = %{version}-%{release}
Requires: systemd-python
%description -n salt-minion %description -n salt-minion
Salt minion is queried and controlled from the master. Salt minion is queried and controlled from the master.
@ -147,29 +148,31 @@ Salt minion is queried and controlled from the master.
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf %{buildroot}
cd $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} cd $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}
%{__python} setup.py install -O1 --root $RPM_BUILD_ROOT %{__python} setup.py install -O1 --root %{buildroot}
install -d -m 0755 %{buildroot}%{_var}/cache/salt
%if ! (0%{?rhel} >= 7 || 0%{?fedora} >= 15) %if ! (0%{?rhel} >= 7 || 0%{?fedora} >= 15)
mkdir -p $RPM_BUILD_ROOT%{_initrddir} mkdir -p %{buildroot}%{_initrddir}
install -p %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/ install -p %{SOURCE2} %{buildroot}%{_initrddir}/
install -p %{SOURCE3} $RPM_BUILD_ROOT%{_initrddir}/ install -p %{SOURCE3} %{buildroot}%{_initrddir}/
install -p %{SOURCE4} $RPM_BUILD_ROOT%{_initrddir}/ install -p %{SOURCE4} %{buildroot}%{_initrddir}/
%else %else
mkdir -p $RPM_BUILD_ROOT%{_unitdir} mkdir -p %{buildroot}%{_unitdir}
install -p -m 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_unitdir}/ install -p -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/
install -p -m 0644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/ install -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/
install -p -m 0644 %{SOURCE7} $RPM_BUILD_ROOT%{_unitdir}/ install -p -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/
%endif %endif
install -p %{SOURCE8} . install -p %{SOURCE8} .
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d/
install -p %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/salt install -p %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/salt
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/salt/ mkdir -p %{buildroot}%{_sysconfdir}/salt/
install -p -m 0640 conf/minion $RPM_BUILD_ROOT%{_sysconfdir}/salt/minion install -p -m 0640 conf/minion %{buildroot}%{_sysconfdir}/salt/minion
install -p -m 0640 conf/master $RPM_BUILD_ROOT%{_sysconfdir}/salt/master install -p -m 0640 conf/master %{buildroot}%{_sysconfdir}/salt/master
%if ((0%{?rhel} >= 6 || 0%{?fedora} > 12) && 0%{?include_tests}) %if ((0%{?rhel} >= 6 || 0%{?fedora} > 12) && 0%{?include_tests})
%check %check
@ -178,7 +181,7 @@ PYTHONPATH=%{pythonpath}:$RPM_BUILD_DIR/%{name}-%{version}/%{_salttesting}-%{_sa
%endif %endif
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf %{buildroot}
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
@ -186,6 +189,7 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/%{name}/* %{python_sitelib}/%{name}/*
%{python_sitelib}/%{name}-%{version}-py?.?.egg-info %{python_sitelib}/%{name}-%{version}-py?.?.egg-info
%{_sysconfdir}/logrotate.d/salt %{_sysconfdir}/logrotate.d/salt
%{_var}/cache/salt
%doc %{_mandir}/man7/salt.7.* %doc %{_mandir}/man7/salt.7.*
%doc $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/README.fedora %doc $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/README.fedora
@ -328,9 +332,15 @@ rm -rf $RPM_BUILD_ROOT
%endif %endif
%changelog %changelog
* Tue Aug 5 2014 Erik Johnson <erik@saltstack.com> - 2014.1.10-2
- Deploy cachedir with package
* Mon Aug 4 2014 Erik Johnson <erik@saltstack.com> - 2014.1.10-1 * Mon Aug 4 2014 Erik Johnson <erik@saltstack.com> - 2014.1.10-1
- Update to bugfix release 2014.1.10 - Update to bugfix release 2014.1.10
* Thu Jul 10 2014 Erik Johnson <erik@saltstack.com> - 2014.1.7-3
- Add logrotate script
* Thu Jul 10 2014 Erik Johnson <erik@saltstack.com> - 2014.1.7-1 * Thu Jul 10 2014 Erik Johnson <erik@saltstack.com> - 2014.1.7-1
- Update to bugfix release 2014.1.7 - Update to bugfix release 2014.1.7

@ -1,2 +1,2 @@
ff6dff1ce949ab176745a30bde17e81d salt-2014.1.10.tar.gz ff6dff1ce949ab176745a30bde17e81d salt-2014.1.10.tar.gz
4e91e01fc1819c783097dd484947442d SaltTesting-2014.4.24.tar.gz 98fde1446d85ad42eaf2949871037b87 SaltTesting-2014.8.5.tar.gz

Loading…
Cancel
Save