What is tmpdir?

Tomasz Kłoczko kloczek w rudy.mif.pg.gda.pl
Wto, 27 Cze 2000, 07:59:22 CEST


On Mon, 26 Jun 2000, Pavel Roskin wrote:

> Hello!
> 
> I cannot rebuild heimdal-0.2t-1.src.rpm on Linux/PPC 1999 Q3 because
> heimdal.spec uses %{tmpdir} that is not defined. I have upgraded to
> rpm-3.0.4 but it also doesn't define %{tmpdir}
> 
> However, %{_tmppath} is defined to /var/lib, and this is probably what you
> meant. Changelog for rpm mentions %{_tmppath} in 2.4.x versions of rpm, so
> it should be Ok to rely on it.

We are use own version rpm with fiew changes (some now are included in rpm
4.0 and 3.0.5 branches and seems next rpm 3.0.5 will provide some PLD
specyfic changes). One of this diffrences betweend stock and PLD version 
rpm is %{_tmppath} macro:

%tmpdir         %(echo "${TMPDIR:-/tmp}")

If you don't want switch to oure modified rpm version simple put above in
your private ~/.rpmmacros. As you can see %{tmpdir} macro is not the same
as %{_tmppath}.

> Another problem is that many utilities (e.g. ftpd) are installed under
> /usr/libexec but are expected to be found in /usr/sbin.
> This patch to heimdal.spec made it possible to rebuild the package on
> Linux/PPC:
[..]
> @@ -236,7 +236,8 @@
>  	--enable-new-des3-code \
>  	--with-readline \
>  	--with-x \
> -	--with-ipv6
> +	--with-ipv6 \
> +	--libexecdir=%{_libexecdir}

No this next issue from PLD specyfic rpm macros. In stock rpm %configure
macro looks like this:

%configure      \
	%{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force} \
	CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix}

but we are useing much more enhanced version like this:

%configure { CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
 FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
 unset LINGUAS || : ; \
 ./configure %{_target_platform} \
        --prefix=%{_prefix} \
        --exec-prefix=%{_exec_prefix} \
        --bindir=%{_bindir} \
        --sbindir=%{_sbindir} \
        --sysconfdir=%{_sysconfdir} \
        --datadir=%{_datadir} \
        --includedir=%{_includedir} \
        --libdir=%{_libdir} \
        --libexecdir=%{_libexecdir} \
        --localstatedir=%{_localstatedir} \
        --sharedstatedir=%{_sharedstatedir} \
        --mandir=%{_mandir} \
        --infodir=%{_infodir} }

If you look on top heimdal.spec you can find on top:

%define         _libexecdir     %{_sbindir}

which assigns %{_libexecdir} to %{_sbindir} and cause installing binaries
like ftpd in %{_sbindir}. This assingment is usd in %configure and passing
next time --libexecdir=%{_libexecdir} in this situation is not neccessary
:_)

If you want use spec files prepared for PLD you can also add above to
private ~/.rpmmacros or if you want you can also use modified version rpm
avalaible on ftp.pld.org.pl (also you must known we have all resources
neccessary for build any package stored in cvs and also we use some very
simple tools which allow build any packake directly from cvs resources). I
must point that above modifications are temporary (compare to stock rpm
3.0.4) because rpm 4.0 branch have integrated some changes (for example in
rpm 3.0.4 you cand find oure enhanced %configure version but ..
commented :-)

>  # --enable-netinfo - czo to takiego ?
>  # można używać albo krb5.conf albo netinfo
> ===================
> 
> You may want to make it differently, but please test your SPRMS. I don't
> even understand how you managed to compile this for Intel.

All is correct because we use slightli modified rpm :-)
We are tested this on x86, sparc and AXP and I'm glad to see starting test
this on PPC ;-)

Continue about heimdal. For (de)registering inet managed services we also
uses some enhanctments provided be rc-inetd pacgage (very simple, small
and usefull wrapper which allow manage configuration any kind tcp server
[1]). Using rc-inetd adds very interesting abilities - you can switch on
the fly between any kind inet daemon by simple upgrade/install other kind
tcp server.

I also must point that current heimdal package is not finished (this
is why this is now avalaible on ftp.pld.org.pl/stable/test directory).

[1] - now we have backends for clasic inetd and rlinetd (most of as use
rlinetd) but prepare more backend for example for xinetd, tcp served,
superd or any other can be performed in fiew minutes.

kloczek
-- 
-----------------------------------------------------------
*Ludzie nie mają problemów, tylko sobie sami je stwarzają*
-----------------------------------------------------------
Tomasz Kłoczko, sys adm @zie.pg.gda.pl|*e-mail: kloczek w rudy.mif.pg.gda.pl*



Więcej informacji o liście dyskusyjnej pld-devel-pl