[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

Re: [Openvpn-users] Re: [Openvpn-devel] bugfix: SuSE handling in openvpn.spec


  • Subject: Re: [Openvpn-users] Re: [Openvpn-devel] bugfix: SuSE handling in openvpn.spec
  • From: "Doncho N. Gunchev" <mr700@xxxxxxxxxxxx>
  • Date: Fri, 3 Dec 2004 17:37:14 +0200

On 2004 12 03 (Friday) 16:43, Stefan Engel wrote:
> Doncho N. Gunchev wrote:
> > On 2004 12 03 (Friday) 16:08, Stefan Engel wrote:
> > 
> >>Hi,
> >>
> >>there is a minor bug in openvpn.spec (v2.0_beta19). In the %files
> >>section the init script is always taken from /etc/rc.d/init.d instead
> >>of /etc/init.d in case of a SuSE distribution. This results in an
> >>rpm build error on SuSE systems.
...
> > 
> >     What gives "rpm --eval '%{_initrddir}'" on SuSE? In RH/FC it gives
> > "/etc/rc.d/init.d", which I use in my .spec file:
> > --- cut ---
> > # to fix later: '--program-suffix 2' is optional, so use * here
> > %{_initrddir}/*
> > --- cut ---
...
> 
> Using %{_initrddir} would be fine, if all rpm installation
> would treat it correctly.
> 
> SuSE 9.2 correctly reports /etc/init.d, but SuSE 9.1 doesn't :-(
> 
> rpm --eval '%{_initrddir}' results, _initrddir is defined in
> /usr/lib/rpm/i386-linux/macros:
> 
> SuSE 9.1: /etc/rc.d/init.d
> %_initrddir             %{_sysconfdir}/rc.d/init.d
> 
> SuSE 9.2: /etc/init.d
> %_initrddir             %{_sysconfdir}/init.d
> 
> SuSE 9.1 has no directory /etc/rc.d/init.d. Instead /etc/rc.d is
> a link to /etc/init.d thus resulting in /etc/init.d/init.d. This
> messes up the installation of the init-script.
> 
> The tests for SuSE in the spec file are correct in
> sections %description, %install, %post and %preun, they are
> only missing in the %files section.
> 

    I stilt hink %{_initrddir}/openvpn is the 'right(tm) thing' to use.
Wouldn't it be better to override %_initrddir for SuSE 9.1 (or any SuSE)
instead of branching %files (%define _initrddir %{_sysconfdir}/init.d)?
I wish rpm was much more compatible between distros, but Mandrake's rpm
differs too :(
    Can someone check these on mandrake? I verified %_initrddir is
fine for FC1, FC2 and FC3 (most likely for RH9 and ASP Linux too).

-- 
Regards,
  Doncho N. Gunchev    Registered Linux User #291323 at counter.li.org
  GPG-Key-ID: 1024D/DA454F79                        http://pgp.mit.edu
  Key fingerprint = 684F 688B C508 C609 0371  5E0F A089 CB15 DA45 4F79

Attachment: pgpl4tKPcdHMf.pgp
Description: PGP signature