directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <ole.er...@gmail.com>
Subject Re: [Installer] Possible Bug - apacheds start fails because it cannot create the rolling log
Date Mon, 14 May 2007 15:18:11 GMT
Yup - It's in there.

Also - Here is how the JPackage
creates the user for the Tomcat install
(I'm guessing you are going to ask me to add
this to the JIRA next, so I'll go ahead and add it :-) ):

%pre
# Add the "tomcat" user and group
# we need a shell to be able to use su - later
if grep ^tomcat: /etc/group 1>/dev/null 2>/dev/null; then
echo Group tomcat already exists, not adding group
else
if grep :%{tcuid}: /etc/group 1>/dev/null 2>/dev/null; then
echo GID %{tcuid} already exists, not adding group
else
%{_sbindir}/groupadd -g %{tcuid} -r tomcat 2> /dev/null || :
fi
fi
if grep ^tomcat: /etc/passwd 1>/dev/null 2>/dev/null; then
echo User tomcat already exists, not adding user
else
if grep x:%{tcuid}: /etc/passwd 1>/dev/null 2>/dev/null; then
echo UID %{tcuid} already exists, not adding user
else
%{_sbindir}/useradd -c "Tomcat" -u %{tcuid} -g tomcat \
     -s /bin/sh -r -d %{homedir} tomcat 2> /dev/null || :
fi
fi

Also - Here's a sampling of how JPackage assigns file
ownership:

# Directories with special permissions
%attr(775,root,tomcat) %dir %{appdir}
%attr(775,root,tomcat) %dir %{confdir}
%attr(775,root,tomcat) %dir %{tempdir}
%attr(775,root,tomcat) %dir %{workdir}
%attr(755,tomcat,tomcat) %dir %{logdir}
%attr(775,root,tomcat) %dir %{confdir}/Catalina
%attr(775,root,tomcat) %dir %{confdir}/Catalina/localhost
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{bindir}/*
%attr(755,root,root) %{_sysconfdir}/init.d/%{name}
%attr(644,root,tomcat) %config(noreplace) %{confdir}/catalina.policy
%attr(644,root,tomcat) %config(noreplace) %{confdir}/catalina.properties
%attr(660,root,tomcat) %config(noreplace) %{confdir}/jk2.properties
%attr(660,root,tomcat) %config(noreplace) %{confdir}/logging.properties
%attr(660,root,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml


So if we converted our spec over to something similar to this,
and then fix the uninstall part (Still looking into)
I think we should have a pretty solid RPM.

SNIP

Cheers,
- Ole


Mime
View raw message