mod_dosevasive rebuild and installation pbm

Hello,

We have a dual x86 xeon centos 4.3. We’d like to install dosevaisve from your src.rpm file

Basicly, we changed the spec file to allow a rebuild with the cos4x

We had


%define         build_cos_4x   0

%{?_with_cos4x:         %{expand: %%define build_cos_4x   1}}

%if %{build_cos_4x}
%define         release %{bversion}.%{rpmrelease}
%define         ostype CentOS 4.x
BuildRequires:  apr
BuildRequires:  apr-util
Requires:       httpd
%define         ccflags %{optflags}
%define         ldflags %{optflags}
%define         build_unk 0
%endif

Then we’ve done a rpmbuild -ba --with cos4x mod_dosevasive.spec

Evverything was fine : No errors.

And finaly we’ve done a rpm -ivh from the rpm file

Again there was no error.

But when we look at /etc/httpd/conf.d/ there is no dosevasive.conf file nor mod_dosevasive20.so file in modules

Any Idea ?

Thanks Pascal

Are you sure you installed the binary RPM Pascal? It should live in /usr/src/redhat/RPMS/<arch>/. If so could you do a:

rpm -qa | grep mod_doseva

to see if it’s installed.

Chris

yes we’ve done the rpm -ivh /usr/src/redhat/RPMS/x86_64/mod_dosevisive.xxx

When we rebuilded the rpm from the spec there was no error and it creates the src.rpm and the rpm.

rpm -qa | grep mod_dosevasive show it was installed.

Anyway, we’ve installed the last version, named mod_evasive (v 1.10.2) from source. Do you know a good tool to create SPEC file ?

We’ve also configure mod_evasive to use apf to ban the IP. Let us few days testing and if it works fine we’ll write an howto here

Pascal

Chris

I found the probleme.

The module mod_dosevasive20 is move in lib/httpd/modules/ and not in lib64/httpd/modules

When I look in the spec I see that the module is moved in %(_libdir) so it should be fine.
More when I look at /usr/lib/rpm/x86_64-linux/macros the _libdir is set to lib64
but in /usr/lib/rpm/macros it is set to lib and not lib64.
%_lib lib
%_libdir %{_exec_prefix}/%{_lib}

Well I assume it is the macro with lib that is choosed ? or the _libdir is overwrited somewhere.

How to be sure the rpmbuild use /usr/lib/rpm/x86_64-linux/macros rather than /usr/lib/rpm/macros ?

Thanks for your help

Pascal

Hi

Could, some one who have a x86_64 bits arch, tell me what is the value of
%_lib and %_libdir in these files :
/usr/lib/rpm/macros
/usr/lib/rpm/noarch-linux/macros
/usr/lib/rpm/x86_64-linux/macros

Personnaly I have :
lib in /usr/lib/rpm/macros
lib64 in /usr/lib/rpm/noarch-linux/macros and in /usr/lib/rpm/x86_64-linux/macros

I try to figure out if it is normal that each time we use libdir in a spec file it will use the one defined in /rpm/ or not. Basicly I try to be sure that autoconf and so rpm are well configured on my box. I also try to validate that every time a spec file will use libdir the files won’t always be write in lib rather than lib64 :wink: as I has with mod_dosevasive

Thanks

pascal