Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
managed
:
testing
>
func
> func.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File func.spec of Package func (Revision 2)
Currently displaying revision
2
,
show latest
%{!?python_version: %define python_version %(%{__python} -c "from distutils.sysconfig import get_python_version; print get_python_version()")} %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0) Summary: Remote management framework Name: func Version: 0.30 Release: 5%{?dist} Source0: %{name}-%{version}.tar.gz Source1: func.service License: GPLv2+ Group: Applications/System Requires: python >= 2.3 Requires: pyOpenSSL Requires: python-simplejson Requires: certmaster >= 0.28 Requires: logrotate BuildRequires: python-devel %if %is_suse BuildRequires: gettext-devel %else BuildRequires: python-setuptools %endif %if 0%{?fedora} >= 16 BuildRequires: systemd-units Requires(post): systemd-sysv Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units %endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildArch: noarch Url: https://fedorahosted.org/func/ %description func is a remote api for mangement, configuration, and monitoring of systems. %prep %setup -q %build %{__python} setup.py build %install test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT %{__python} setup.py install --prefix=/usr --root=$RPM_BUILD_ROOT touch $RPM_BUILD_ROOT/var/log/func/func.log touch $RPM_BUILD_ROOT/var/log/func/audit.log mkdir -p $RPM_BUILD_ROOT%{_bindir} install -m 755 init-scripts/funcd $RPM_BUILD_ROOT%{_sysconfdir}/init.d/funcd %if 0%{?fedora} >= 16 mkdir -p $RPM_BUILD_ROOT%{_unitdir} install -m0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/funcd.service rm -rf $RPM_BUILD_ROOT/etc/init.d %endif %clean rm -fr $RPM_BUILD_ROOT %files %defattr(-, root, root, -) %if "%{python_version}" >= "2.5" %{python_sitelib}/func*.egg-info %endif # Conditionally include funcd. %if 0%{?fedora} >= 16 %exclude %{_sysconfdir}/init.d/funcd %{_unitdir}/funcd.service %else %{_sysconfdir}/init.d/funcd %endif %{_bindir}/funcd %{_bindir}/func %{_bindir}/func-inventory %{_bindir}/func-create-module %{_bindir}/func-transmit %{_bindir}/func-build-map %{_bindir}/func-command %{_bindir}/func-down-hosts %{_bindir}/func-find-user %{_bindir}/func-grep %{_bindir}/func-list-vms-per-host %{_bindir}/func-ps-compare %{_bindir}/func-whatsmyname %{_bindir}/func-yum %{_bindir}/func-group #%{_bindir}/update-func %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/minion-acl.d/ %dir /etc/func/modules/ %config(noreplace) /etc/func/minion.conf %config(noreplace) /etc/func/async_methods.conf %config(noreplace) /etc/func/overlord.conf %config(noreplace) /etc/logrotate.d/func_rotate %config(noreplace) /etc/func/modules/Test.conf %config(noreplace) /etc/func/modules/Bridge.conf %config(noreplace) /etc/func/modules/Vlan.conf %config /etc/func/version %dir %{python_sitelib}/func %dir %{python_sitelib}/func/minion %dir %{python_sitelib}/func/overlord %dir %{python_sitelib}/func/overlord/cmd_modules %dir %{python_sitelib}/func/overlord/group %dir %{python_sitelib}/func/overlord/modules %dir %{python_sitelib}/func/yaml %{python_sitelib}/func/minion/*.py* %{python_sitelib}/func/minion/facts/*.py* %{python_sitelib}/func/minion/facts/modules/*.py* %{python_sitelib}/func/overlord/*.py* %{python_sitelib}/func/overlord/cmd_modules/*.py* %{python_sitelib}/func/overlord/group/*.py* %{python_sitelib}/func/overlord/modules/*.py* %{python_sitelib}/func/yaml/*.py* %{python_sitelib}/func/*.py* %dir %{python_sitelib}/func/minion/modules %{python_sitelib}/func/minion/modules/*.py* # we need to make the spec and setup.py find modules # in deep dirs automagically %dir %{python_sitelib}/func/minion/modules/netapp %dir %{python_sitelib}/func/minion/modules/netapp/vol %{python_sitelib}/func/minion/modules/*/*.py* %{python_sitelib}/func/minion/modules/*/*/*.py* %dir /var/log/func %attr(0600,root,root) %config(noreplace) %verify(not md5 size mtime) /var/log/func/func.log %attr(0600,root,root) %config(noreplace) %verify(not md5 size mtime) /var/log/func/audit.log %dir /var/lib/func #%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/log/prelink/prelink.log %doc AUTHORS README LICENSE CHANGES %{_mandir}/man1/func.1.gz %{_mandir}/man1/func-inventory.1.gz %{_mandir}/man1/funcd.1.gz %{_mandir}/man1/func-transmit.1.gz %{_mandir}/man1/func-build-map.1.gz %{_mandir}/man1/func-create-module.1.gz %post # systemd if [ -x /bin/systemctl ]; then if [ $1 -eq 1 ] ; then # Initial installation /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi fi # for suse if [ -x /usr/lib/lsb/install_initd ]; then /usr/lib/lsb/install_initd /etc/init.d/funcd # for red hat distros elif [ -x /sbin/chkconfig ]; then /sbin/chkconfig --add funcd # or, the old fashioned way else for i in 2 3 4 5; do ln -sf /etc/init.d/funcd /etc/rc.d/rc${i}.d/S99funcd done for i in 1 6; do ln -sf /etc/init.d/funcd /etc/rc.d/rc${i}.d/k01funcd done fi # fix perms on log files chmod 600 /var/log/func/func.log chmod 600 /var/log/func/audit.log # upgrade old installs if needed #/usr/bin/update-func exit 0 %preun if [ "$1" = 0 ] ; then /etc/init.d/funcd stop > /dev/null 2>&1 if [ -x /bin/systemctl ]; then # Package removal, not upgrade /bin/systemctl --no-reload disable funcd.service > /dev/null 2>&1 || : /bin/systemctl stop funcd.service > /dev/null 2>&1 || : elif [ -x /usr/lib/lsb/remove_initd ]; then /usr/lib/lsb/remove_initd /etc/init.d/funcd elif [ -x /sbin/chkconfig ]; then /sbin/chkconfig --del funcd else rm -f /etc/rc.d/rc?.d/???funcd fi fi %postun if [ -x /bin/systemctl ]; then /bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall /bin/systemctl try-restart funcd.service >/dev/null 2>&1 || : fi fi %if 0%{?fedora} >= 16 %triggerun -- func < 0.28-2 # Save the current service runlevel info # User must manually run systemd-sysv-convert --apply funcd # to migrate them to systemd targets /usr/bin/systemd-sysv-convert --save funcd >/dev/null 2>&1 ||: # Run these because the SysV package being removed won't do them /sbin/chkconfig --del funcd >/dev/null 2>&1 || : /bin/systemctl try-restart funcd.service >/dev/null 2>&1 || : %endif %changelog