Search
j0ke.net Open Build Service
>
Projects
>
devel
:
erlang
>
CouchDB
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 27
[-]
[+]
Changed
couchdb.spec
@@ -34,12 +34,23 @@ rmdir %{buildroot}/%{_sysconfdir}/default rm -Rf %{buildroot}%{_datadir}/doc/%{name} sed -i s@default@sysconfig@g %{buildroot}/%{_sysconfdir}/init.d/%{name} +# match entrys in config file +mkdir -p %{buildroot}/var/log/%{name} +mkdir -p %{buildroot}/var/lib/%{name} + +%pre +# Create `couchdb' user on the system if necessary +if /usr/bin/id %{name} > /dev/null 2>&1 ; then + : # user already exists +else + /usr/sbin/useradd -r -d %{_datadir}/%{name} -s /bin/bash -c "CouchDB" %{name} || \ + %nnmmsg Unexpected error adding user "%{name}". Aborting install process. +fi %post -useradd -d %{_datadir}/%{name} -g www -s /bin/bash -c "CouchDB" %{name} %fillup_and_insserv couchdb -%preun +%postun userdel %{name} %files @@ -55,6 +66,9 @@ %{_mandir}/man1 %{_datadir}/%{name} %{_docdir}/%{name} +%defattr(-,couchdb,www) +%dir /var/log/%{name} +%dir /var/lib/%{name} %changelog * Fri Mar 21 2008 Carsten Schoene <cs@linux-administrator.com>