File zope-VerboseSecurity.spec of Package zope-VerboseSecurity

%define product   VerboseSecurity
%define version   0.6
%define release   3

%define zope_home %{_prefix}/lib/zope
%define software_home %{zope_home}/lib/python

Summary:   A Zope product that helps explain the reason for denied security access
Name:      zope-%{product}
Version:   %{version}
Release:   %{release}
License:   ZPL
Group:     System/Servers
Source0:   %{product}-%{version}.tar.bz2
URL:       http://hathawaymix.org/Software/VerboseSecurity
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir
BuildArch: noarch
Requires:  zope

#----------------------------------------------------------------------
%description
Zope has a flexible, fine-grained security model that lets you configure
context-dependent mappings from users to roles and from roles to
permissions. The model fits most organizations' needs and has been used
all over the world, but the flexibility sometimes comes at a price of
complexity.

One major difficulty in using the Zope security model is its lack of
clarity when access is denied. Because production sites should not reveal
too much about the site to those who are denied access, the lack of
verbosity in the default Zope security policy is appropriate for such
sites. But site developers need more details.

This product attempts to explain the complete reasoning for failed
access. It shows what object was being accessed, what permission is
required to access it, what roles map to that permission in that context,
the executable object and its owner, the effective proxy roles, and other
pertinent information. All of this information appears in the exception
message when access is denied.

#----------------------------------------------------------------------
%prep
%setup -c

%build

%install
%{__rm} -rf  %{buildroot}
%{__mkdir_p} %{buildroot}/%{software_home}/Products
%{__cp} -a * %{buildroot}%{software_home}/Products/

%clean
%{__rm} -rf %{buildroot}

%post
if [ "`%{_prefix}/bin/zopectl status`" != "daemon manager not running" ] ; then
  service zope restart
fi

%postun
if [ -f "%{_prefix}/bin/zopectl" ] && [ "`%{_prefix}/bin/zopectl status`" != "daemon manager not running" ] ; then
  service zope restart
fi

%files
%defattr(0644, zope, zope, 0755)
%doc %{product}/CHANGES.txt %{product}/README.txt %{product}/version.txt
%{software_home}/Products/*

#----------------------------------------------------------------------
%changelog
* Mon Jan 22 2007 Kevin Deldycke <kevin@nexedi.com> 0.6-3mdv2007.0
- Rebuild for Mandriva 2007.0

* Wed Feb 01 2006 Kevin Deldycke <kevin@nexedi.com> 0.6-2mdk
- Give ownership to zope

* Tue Jan 31 2006 Kevin Deldycke <kevin@nexedi.com> 0.6-1mdk
- Initial release
openSUSE Build Service is sponsored by