[sr-dev] [tracker] Task opened: inconsitent config.mak for different targets

sip-router admin at sip-router.org
Thu Mar 25 15:18:57 CET 2010


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Ovidiu Sas (osas) 

Attached to Project - sip-router
Summary - inconsitent config.mak for different targets
Task Type - Bug Report
Category - tools/scripts
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - I'm working on building an rpm spec file for kamailio 3.0.1.
While building kamailio on CentOS I noticed that the default location for the config file is wrong (got /usr/etc/kamailio/ instead of /etc/kamailio/).
The make cfg options that I was using on centos are similar with the ones used to build a debian package.  

I did an experiment by playing with the config options and the results are different based on 'cfg_prefix' and 'basedir' options.


Here are the steps to reproduce the issue (on a debian box):
# get the latest kamailio code:
cd /usr/local/src
rm -rf kamailio-3.0.1
git clone --depth 1 git://git.sip-router.org/sip-router kamailio-3.0.1
cd kamailio-3.0.1
git checkout -b kamailio_3.0 origin/kamailio_3.0

# configure kamailio in debian style:
make cfg prefix=/usr cfg_prefix=/usr/local/src/kamailio-3.0.1/debian/kamailio cfg_target=/etc/kamailio/ basedir=/usr/local/src/kamailio-3.0.1/debian/kamailio
# save the generated config.mak file:
cp config.mak config.mak.deb

#clean up the repo:
rm -rf config.mak modules.lst

# configure kamailio in centos style:
make cfg prefix=/usr cfg_prefix=/var/tmp/kamailio-3.0.1-buildroot cfg-target=/etc/kamailio/ basedir=/var/tmp/kamailio-3.0.1-buildroot
# save the generated config.mak file:
cp config.mak config.mak.centos

# run a diff between the two generated file:
diff config.mak.centos config.mak.deb

The output is quite different:
11c11
< C_DEFS=   -DNAME='"kamailio"' -DVERSION='"3.0.1"' -DARCH='"i386"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 4.3.2"' -D__CPU_i386 -D__OS_linux -DSER_VER=3000001 -DCFG_DIR='"/usr/etc/kamailio/"' -DPKG_MALLOC -DSHM_MEM  -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR  -DF_MALLOC -DUSE_TLS -DTLS_HOOKS -DSTATISTICS -DMALLOC_STATS -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024  -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT
---
> C_DEFS=   -DNAME='"kamailio"' -DVERSION='"3.0.1"' -DARCH='"i386"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 4.3.2"' -D__CPU_i386 -D__OS_linux -DSER_VER=3000001 -DCFG_DIR='"/etc/kamailio/"' -DPKG_MALLOC -DSHM_MEM  -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR  -DF_MALLOC -DUSE_TLS -DTLS_HOOKS -DSTATISTICS -DMALLOC_STATS -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024  -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT
53c53
< basedir= /var/tmp/kamailio-3.0.1-buildroot
---
> basedir= /usr/local/src/kamailio-3.0.1/debian/kamailio
57c57
< cfg_prefix= /var/tmp/kamailio-3.0.1-buildroot
---
> cfg_prefix= /usr/local/src/kamailio-3.0.1/debian/kamailio
75c75
< cfg_target= $(prefix)/$(cfg_dir)
---
> cfg_target= /etc/kamailio/


The cfg_target is not identical for the two config files and therefore when kamailio is built on CentOS, the default kamailio config file location is /usr/etc/kamailio/ instead of being /etc/kamailio/.  I would expect the cfg_target to be identical in both cases.

Regards,
Ovidiu Sas

More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=50

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the sr-dev mailing list