[exim] Building Exim in a VServer

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Marcin Krol
Fecha:  
A: exim-users
Asunto: [exim] Building Exim in a VServer
Hello everyone,

Has anyone done that thing? (i.e. building Exim in a
http://linux-vserver.org )

I have trouble building Exim in vserver, Makefile seems not to work correctly.
The host OS is Debian Etch 64-bit and Exim builds fine on it. The guests are
32-bit virtual servers:

Linux da2.domeny.com 2.6.22.14 #1 SMP Mon Dec 3 12:50:45 CET 2007 i686
GNU/Linu

However, inside a guest (virtual server instance), the building process fails,
make either when done manually or by script (below) fails with this info:

% make

/bin/sh: line 0: cd: build-Linux-i386: No such file or directory
make[1]: Entering directory `/usr/local/exim-4.69'

>>> Creating links to source files...

mkdir: cannot create directory `build-Linux-i386': File exists
*** It appears that ../scripts/MakeLinks was previously interrupted.
*** You need to remove the build directory, and then run 'make' again.
make[1]: *** [build-directory] Error 1
make[1]: Leaving directory `/usr/local/exim-4.69'
make: *** [go] Error 2
make: *** Waiting for unfinished jobs....

Now this was cleanly unpacked exim 4.69 source - first there's
no "build-Linux-i386" directory, and then it complains it already exists.

Anybody knows why make complains and how to fix that?


---------------->script<------------------
#!/bin/bash -x


mkdir /usr/sbin/bak
cp -p /usr/sbin/exim /usr/sbin/bak/exim_stary.bak
cd /usr/sbin
mv exi* /tmp

cd /usr/local
rm -rf exim-* dlfunc
chmod 755 /usr/bin/wget
wget ftp://ftp.easynet.be/exim/exim/exim4/exim-4.68.tar.gz

cp -v /etc/exim.conf /root/exim-`date '+m%m_d%d-%H_%M'`.save.conf

tar xvzf exim-4.68.tar.gz
cd /usr/local/exim-4.68/Local
wget http://www.directadmin.com/Makefile
perl -pi -e 's/^EXTRALIBS/#EXTRALIBS/' /usr/local/exim-4.68/Local/Makefile
ldconfig

cat >> /usr/local/exim-4.68/Local/Makefile << EOF

HAVE_ICONV=yes
CFLAGS=-O -I/usr/local/include -I/usr/local/exim-4.68/build-Linux-i386 -I/usr/local/exim-4.68/src
EXTRALIBS_EXIM=-L/usr/local/lib -liconv -export-dynamic -ldl

EXPAND_DLFUNC=yes

EOF

perl -pi -e "s/#define PROCESS_INFO_SIZE +256/#define PROCESS_INFO_SIZE
2048/g" /usr/local/exim-4.68/src/macros.h

cd /usr/lib
ln -s libperl.so.5.8.8 libperl.so

cd /usr/local/exim-4.68
make
make install
cp -fp /usr/sbin/exim-4.68-1 /usr/sbin/exim
chmod 4755 /usr/sbin/exim

cd /usr/local/dlfunc
rm -f *.o
aptitude install libgeoip-dev libgeoip1
make
cp exim-ext.so /usr/sbin
rm -f *.o

#wget -O /etc/exim.conf http://files.directadmin.com/services/exim.conf
#wget -O /etc/exim.pl http://files.directadmin.com/services/exim.pl

chmod 755 /etc/exim.pl

cd /etc/virtual
touch blacklist_domains whitelist_from use_rbl_domains bad_sender_hosts
blacklist_senders whitelist_domains whitelist_hosts whitelist_senders
echo 0 > limit
mkdir usage
chown mail:mail blacklist_domains whitelist_from use_rbl_domains
bad_sender_hosts blacklist_senders whitelist_domains whitelist_hosts
whitelist_senders limit usage

#rm -rf /usr/local/exim-4.68.tar.gz
------------------><---------------------

--
Marcin Krol