Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#511 osipsconfig - wrong path

1.8.x
closed-invalid
tools (25)
2
2015-04-07
2012-04-16
Nick Altmann
No

Configuration files in /etc, but wrong path used when osipsconfig tries to generate config:

Config generated : /usr/etc/opensips/opensips_residential_2012-4-16_13:24:43.cfg = FAILED. Press any key to continue

Discussion

  • Hi Nick,

    How are you running osipsconfig ? From debs, or sources & make install ?

    Regards,
    Vlad

     
    • assigned_to: nobody --> vladut-paiu
    • status: open --> open-accepted
     
  • Nick Altmann
    Nick Altmann
    2012-04-17

    I build my own rpm.

     
  • Nick Altmann
    Nick Altmann
    2012-04-17

    There are:
    LOCALBASE=/usr CFLAGS="%{optflags}" %{__make} all %{?_smp_mflags} TLS=1 \ exclude_modules="%EXCLUDE_MODULES" \ cfg-target=%{_sysconfdir}/opensips/ \ modules-prefix=%{buildroot}/%{_prefix} \ modules-dir=%{_lib}/%{name}/modules

    opensips compiles with /etc/opensips for configs, but osipsconfig tries to write files to /usr/etc/opensips ...

     
    • priority: 5 --> 7
     
  • Hi,

    From your paste, LOCALBASE is /usr/ thus the configuration files would get dumped in /usr/etc/, not in /etc/ as you said in the initial comment.

    Are you running the lastest OpenSIPS 1.8 ? There were some issues recently fixed about this. If not, please do a svn update and try again.

    Also, can you please do
    make opensipsmc
    and paste here the output ?

    The MENUCONFIG_CFG_PATH define represents where the m4 templates are located, and MENUCONFIG_GEN_PATH is the path where the actual cfgs will get dumped.

    Regards,
    Vlad

     
  • Nick Altmann
    Nick Altmann
    2012-04-23

    I'm on the latest SVN.

    But cfg-target in my example is cfg-target=%{_sysconfdir}/opensips/
    In general Make.conf when make opensipsmc MENUCONFIG_GEN_PATH=$(cfg-target)

    So, MENUCONFIG_GEN_PATH=/etc/opensips/

     
  • Hi,

    Ok then, please paste the part of the installation when the osipsconfig is compiled & installed, I'm curious about the compile time defines that osipsconfig receives.

    Regards,
    Vlad

     
  • Nick Altmann
    Nick Altmann
    2012-04-23

    mkdir -p /usr/etc/opensips/
    mkdir -p /usr/share/opensips/
    cd menuconfig;make proper;make MENUCONFIG_CFG_PATH=/usr/share/opensips//menuconfig_templates/ MENUCONFIG_GEN_PATH=/etc/opensips/ MENUCONFIG_HAVE_SOURCES=0
    make[1]: Entering directory `/root/rpmbuild/BUILD/opensips-1.8.0.8952-tls/menuconfig'
    rm -f configure
    rm -f cfg.o curses.o items.o commands.o menus.o parser.o main.o
    make[1]: Leaving directory `/root/rpmbuild/BUILD/opensips-1.8.0.8952-tls/menuconfig'
    make[1]: Entering directory `/root/rpmbuild/BUILD/opensips-1.8.0.8952-tls/menuconfig'
    gcc -g -Wall -DMENUCONFIG_CFG_PATH=\"/usr/share/opensips//menuconfig_templates/\" -DMENUCONFIG_GEN_PATH=\"/etc/opensips/\" -DMENUCONFIG_HAVE_SOURCES=0 -c -o cfg.o cfg.c
    gcc -g -Wall -DMENUCONFIG_CFG_PATH=\"/usr/share/opensips//menuconfig_templates/\" -DMENUCONFIG_GEN_PATH=\"/etc/opensips/\" -DMENUCONFIG_HAVE_SOURCES=0 -c -o curses.o curses.c
    gcc -g -Wall -DMENUCONFIG_CFG_PATH=\"/usr/share/opensips//menuconfig_templates/\" -DMENUCONFIG_GEN_PATH=\"/etc/opensips/\" -DMENUCONFIG_HAVE_SOURCES=0 -c -o items.o items.c
    gcc -g -Wall -DMENUCONFIG_CFG_PATH=\"/usr/share/opensips//menuconfig_templates/\" -DMENUCONFIG_GEN_PATH=\"/etc/opensips/\" -DMENUCONFIG_HAVE_SOURCES=0 -c -o commands.o commands.c
    gcc -g -Wall -DMENUCONFIG_CFG_PATH=\"/usr/share/opensips//menuconfig_templates/\" -DMENUCONFIG_GEN_PATH=\"/etc/opensips/\" -DMENUCONFIG_HAVE_SOURCES=0 -c -o menus.o menus.c
    gcc -g -Wall -DMENUCONFIG_CFG_PATH=\"/usr/share/opensips//menuconfig_templates/\" -DMENUCONFIG_GEN_PATH=\"/etc/opensips/\" -DMENUCONFIG_HAVE_SOURCES=0 -c -o parser.o parser.c
    gcc -g -Wall -DMENUCONFIG_CFG_PATH=\"/usr/share/opensips//menuconfig_templates/\" -DMENUCONFIG_GEN_PATH=\"/etc/opensips/\" -DMENUCONFIG_HAVE_SOURCES=0 -c -o main.o main.c
    gcc -o configure -g -Wall -DMENUCONFIG_CFG_PATH=\"/usr/share/opensips//menuconfig_templates/\" -DMENUCONFIG_GEN_PATH=\"/etc/opensips/\" -DMENUCONFIG_HAVE_SOURCES=0 cfg.o curses.o items.o commands.o menus.o parser.o main.o -lcurses
    make[1]: Leaving directory `/root/rpmbuild/BUILD/opensips-1.8.0.8952-tls/menuconfig'
    mkdir -p /usr/share/opensips//menuconfig_templates/
    cp menuconfig/configs/* /usr/share/opensips//menuconfig_templates/

     
  • Hi Nick,

    Ok, the compile flags seem ok, so this is really strange.
    Are you sure that you're not running an older osipsconfig, located in the path ?

    Please try to run the osipsconfig with an absolute path to make sure you are hitting the right binary file.

    Regards,
    Vlad

     
  • Nick Altmann
    Nick Altmann
    2012-04-23

    root@opensips ~$ rpm -qa|grep opensips
    opensips-1.8.0.8952-1.x86_64

    root@opensips ~$ which osipsconfig
    /usr/sbin/osipsconfig

    root@opensips-2-1 ~$ ls -al /usr/sbin/osipsconfig
    -rwxr-xr-x 1 root root 31856 Apr 23 12:06 /usr/sbin/osipsconfig

    (compiled today!!!)

    root@opensips ~$ /usr/sbin/osipsconfig

    Generate OpenSIPS Script -> Residential Script -> Generate Residential Script

    Config generated : /usr/etc/opensips/opensips_residential_2012-4-23_13:13:48.cfg = FAILED. Press any key to continue

     
  • Nick Altmann
    Nick Altmann
    2012-04-23

    Ops. Sorry for bug (3 replies).

     
  • Hi Nick,

    I have checked and double checked the menuconfig code, and the MENUCONFIG_GEN_PATH define is the one that dictates the directory, and I can't find any way in which that define can be over-ridden.

    As a last resort, can you please, privately, send me access to your server so I can have a look ?

    Regards,
    Vlad

     
    • priority: 7 --> 2
    • status: open-accepted --> open-works-for-me
     
    • status: open-works-for-me --> closed-invalid