Re: [exim] Default enabling of dnsdb

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Todd Lyons
Date:  
À: Matt
CC: exim-users
Sujet: Re: [exim] Default enabling of dnsdb
On Wed, May 6, 2009 at 8:11 AM, Matt <lm7812@???> wrote:
>> All the sturm und drang is 'coz some folks can't be bothered to remove
>> that '#' on their own.
> Its not so easy if your using a precompiled rpm.


If you can carve out a little time, you should set up your own rpm
build environment and get used to rebuilding rpms with your own
tweaks. It solves MANY problems (though it introduces others). In
the above case, a one liner added to the spec file will remove that #
out of the respective file.

If you don't know how to set up your own rpm build environment, and
assuming you're in a RedHat/CentOS type environment, it's relatively
easy (never done anything with Suse, so unsure of the differences
there). I suggest that you don't do it on a live public facing box,
but that's up to you. Change to your designated rpm build user (don't
use root):

export ARCH=`uname -m`
mkdir -p ~/RPM/{RPMS,SRPMS,SOURCES,SPECS,BUILD,tmp}
mkdir -p ~/RPM/RPMS/$ARCH ~/RPM/RPMS/noarch

# Build an .rpmrc config file
echo 'buildarchtranslate: i386: $ARCH' > ~/.rpmrc
echo 'buildarchtranslate: i486: $ARCH' >> ~/.rpmrc
echo 'buildarchtranslate: i586: $ARCH' >> ~/.rpmrc
echo 'buildarchtranslate: i686: $ARCH' >> ~/.rpmrc

# Build an .rpmmacros config file
echo "%_topdir /home/${USERNAME}/rpm" > ~/.rpmmacros
echo "%_tmppath /home/${USERNAME}/rpm/tmp" >> ~/.rpmmacros
echo "#%_signature gpg" >> ~/.rpmmacros
echo "#%_gpg_name ${USER} <${USER}@${HOSTNAME}>
%_gpg_path ~/.gnupg" >> ~/.rpmmacros
export DISTRO=`grep -v '^$' /etc/issue | head -n 1 | sed -e 's/\s\?\\\\\w//g'`
# Should result in "%distribution CentOs release 4.7" for example
echo "%distribution $DISTRO" >> ~/.rpmmacros
# Should result in "%vendor CentOS" for example
echo "%vendor `echo $DISTRO | awk '{print $1}'`" >> ~/.rpmmacros

Make sure that you have the rpm-devel package installed. You'll also
have to install various devel packages as you build this or that
src.rpm.

To use the resulting build environment:
1. download a src rpm you want to build (as the build user)
2. rpm -ivh PACKAGE.src.rpm (.rpmmacros file tells rpm to install it
into your ~/RPM/* heirarchy).
3. vim ~/RPM/SPECS/PACKAGE.spec
a. Increase the release version by one minor point. How spec files
do this will vary.
b. Add a line to the changelog int he same format as what is already there.
c. The spec file is laid out in stages (prep,build,install). Change
things in the spec file you want, for example removing the # before
building as described in the previous email would probably be best
done at the end of the prep stage.
4. rpmbuild -ba ~/RPM/SPECS/PACKAGE.spec

It takes a bit of staring at it to get used to the spec file format,
but basically variables that begin with % are rpm macro variables, and
variables that begin with $ are variables that the shell expands.

If none of this interests you, you are welcome to ignore it all :-)

-- 
Regards...      Todd