Mailinglist Archive: opensuse-packaging (250 mails)

< Previous Next >
Re: [opensuse-packaging] need help with .spec file
  • From: "Dominique Leuenberger" <Dominique.Leuenberger@xxxxxxxxxxxxx>
  • Date: Wed, 19 Aug 2009 15:26:58 +0200
  • Message-id: <4A8C19C2020000290002AC07@xxxxxxxxxxxxxxxxxxx>
On 8/19/2009 at 15:02, <doiggl@xxxxxxxxxxxxxxxxxx> wrote:
Thanks Dominique and Adrian for the info, your correct about the errors.
(using //.build.log)
... running 03-check-binary-kernel-log
... running 04-check-filelist
... checking filelist
cricket: "/etc/httpd/conf.d/cricket.conf" is not allowed anymore in SuSE

For this: you'll have to change your %install section.

you have now:
# # Set up an Apache config
# mkdir -p %{buildroot}/etc/httpd/conf.d
# cat > %{buildroot}/etc/httpd/conf.d/cricket.conf <<EOF

Change it to
# # Set up an Apache config
# mkdir -p %{buildroot}%{apache_sysconfdir}/conf.d
# cat > %{buildroot}%{apache_sysconfdir}/conf.d/cricket.conf <<EOF

For the errors with /var/cricket I'm not just sure what the right location
would be. I'd suggest you have a look at the FHS Specification to find a
proper place, depending on what the data is.

cricket-1.0.5-34.1.noarch.rpm: directories not owned by a package:
- /etc/httpd
- /etc/httpd/conf.d

This will be solved with the fix above. You'll have to change the %files
section though:
%config /etc/httpd/conf.d/cricket.conf
has to be replace by
%config %{apache_sysconfdir}/conf.d/cricket.conf

Then something else in your spec file:
# # added in %pre and %postun
# %pre
# id cricket >/dev/null 2>&1
# if [ $? -ne 0 ]; then
# /usr/sbin/useradd -r -d %{_libdir}/%{name} -c "cricket id" cricket
# /usr/sbin/groupadd apache
# fi
# %postun
# if [ $1 -eq 0 ]; then
# /usr/sbin/userdel cricket
# /usr/sbin/groupdel apache
# fi

Are you sure it's a good idea to mess with the group 'apache' ? The group name
does not sound like being related to your package. And apache2 in
openSUSE runs as user wwwrun / group www; those groups and users on the other
hand should not be touched by your package.
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >