Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 265567 - net-misc/asterisk-1.6.0.8: use 'imap' doesn't set 'IMAP_STORAGE' when compiling.
Summary: net-misc/asterisk-1.6.0.8: use 'imap' doesn't set 'IMAP_STORAGE' when compiling.
Status: RESOLVED DUPLICATE of bug 308561
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-09 16:43 UTC by Clinton James
Modified: 2010-11-30 22:03 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Clinton James 2009-04-09 16:43:56 UTC
USE imap isn't following through and adding the IMAP parts of the voicemail module for asterisk-1.6.0.8

Reproducible: Always

Steps to Reproduce:
1.  emerge asterisk-1.6.0.8 with the imap use 

Actual Results:  
grep "with IMAP" /usr/lib64/asterisk/modules/app_voicemail.so

The string "Comedian Mail (Voicemail System) with IMAP Storage" would be part of the compiled module (see apps/app_voicemail.c:479)
less usr/lib64/asterisk/modules/app_voicemail.so should also give you the imap function like: vm_imap_delete, imap_retrieve_greeting, imap_retrieve_file



Expected Results:  
By giving the 'imap' use parameter, the makeopts for "IMAP_STORAGE" should also be set.

# grep "with IMAP" /usr/lib64/asterisk/modules/app_voicemail.so
Binary file /usr/lib64/asterisk/modules/app_voicemail.so matches

# less /usr/lib64/asterisk/modules/app_voicemail.so
You should see 'imap*' functions

Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4600+-with-glibc2.2.5
Timestamp of tree: Thu, 09 Apr 2009 08:00:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.3.6-r6, 2.4.4-r14, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r8
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=athlon64 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US"
LC_ALL="en_US"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://gentoo.callone.net/portage"
USE="X aac accessibility acl acpi alsa amd64 apache2 berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread emboss encode esd evo examples fam firefox fortran freedtds freetds gdbm gif gnome gpm gstreamer gtk gtk2 hal howl iconv isdnlog jpeg ldap libnotify mad midi mikmod mmx mozdevelop mp3 mpeg mssql mudflap multilib ncurses new-login nptl nptlonly nsplugin nvidia ogg opengl openmp oss pam pcre pdf perl png postgres ppds pppd python qt3support quicktime readline reflection sdl session spell spl sqlite sqlite3 sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb userlocales vorbis xforms xine xinerama xml xorg xulrunner xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="vesa vga nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 RumpletonBongworth 2009-05-26 04:31:35 UTC
Here's a post from upstream which conveys best practice for setting custom menuselect options i.e. `make USER_MAKEOPTS=/path/to/custom.makeopts menuselect.makeopts`:

http://www.mail-archive.com/asterisk-dev@lists.digium.com/msg26857.html

The exact string that would need to be defined in a custom makeopts file is (I think):

MENUSELECT_OPTS_app_voicemail=IMAP_STORAGE

As an aside, even where USER_MAKEOPTS is not specified, the top-level Makefile looks for asterisk.makeopts under /etc and in the home directory of the user conducting the build. We may wish to consider whether this is desirable behaviour in the context of an ebuild.

Anyway, there are two issues that spring to my mind. The first is that the custom module filter (as controlled by $MODULES_LIST) needs to be reviewed. If the variable is defined then it already calls `emake menuselect.makeopts`, then proceeds to use some ugly looking sed hacks to modify the menuselect.makeopts file ... which we're not supposed to touch.

Secondly, the manner in which the c-client dep is substantiated needs be carefully considered and tested. Here's the blurb:

"Configure with ./configure --with-imap=/usr/src/imap
or where ever you built thfe UWashington IMAP Toolkit. This directory
will be searched for a source installation. If no source installation is
found there, then a package installation of the IMAP c-client will be 
searched for in this directory. If one is not found, then configure will fail

A second configure option is to not specify a directory (i.e.
./configure --with-imap). This will assume that you have the
imap-2004g source installed in the .. directory relative to the
Asterisk source. If you do not have this source, then configure will
default to the "system" option defined in the next paragraph

A third option is ./configure --with-imap=system. This will assume
that you have installed a dynamically linked version of the c-client
library (most likely via a package provided by your distro). This will
attempt to link agains -lc-client and will search for c-client headers
in your include path starting with the imap directory, and upon failure,
in the c-client directory."

Now, as far as I can tell, the ebuild already has this covered, thanks to the "*-imap-kerberos" patch. While I had little luck persuading ./configure to accept --with-imap=system using a vanilla source tree, the ebuild does detect the c-client library (at least, the local 1.4.25 ebuild that I am using does). However, I believe the process in the latter case relies on --with-imap being passed without any arguments. As long as it works, I suppose there's nothing wrong with that but I do wonder whether there is an impact in terms of whether we statically or dynamically link in the library?
Comment 2 Steven Gill 2009-10-07 23:52:30 UTC
Hi,

I added the flag to /etc/asterisk.makeopts.  I did notice an issue if you do this in combo with the h323 USE flag.  On the second pass of the build, it fails to find headers and libraries for imap, and the ebuild won't succeed.

Regards,

Steve(In reply to comment #0)
> USE imap isn't following through and adding the IMAP parts of the voicemail
> module for asterisk-1.6.0.8
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1.  emerge asterisk-1.6.0.8 with the imap use 
> 
> Actual Results:  
> grep "with IMAP" /usr/lib64/asterisk/modules/app_voicemail.so
> 
> The string "Comedian Mail (Voicemail System) with IMAP Storage" would be part
> of the compiled module (see apps/app_voicemail.c:479)
> less usr/lib64/asterisk/modules/app_voicemail.so should also give you the imap
> function like: vm_imap_delete, imap_retrieve_greeting, imap_retrieve_file
> 
> 
> 
> Expected Results:  
> By giving the 'imap' use parameter, the makeopts for "IMAP_STORAGE" should also
> be set.
> 
> # grep "with IMAP" /usr/lib64/asterisk/modules/app_voicemail.so
> Binary file /usr/lib64/asterisk/modules/app_voicemail.so matches
> 
> # less /usr/lib64/asterisk/modules/app_voicemail.so
> You should see 'imap*' functions
> 
> Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.1.2,
> glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 x86_64)
> =================================================================
> System uname:
> Linux-2.6.27-gentoo-r8-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4600+-with-glibc2.2.5
> Timestamp of tree: Thu, 09 Apr 2009 08:00:01 +0000
> app-shells/bash:     3.2_p39
> dev-java/java-config: 1.3.7-r1, 2.1.7
> dev-lang/python:     2.3.6-r6, 2.4.4-r14, 2.5.2-r7
> dev-python/pycrypto: 2.0.1-r8
> dev-util/cmake:      2.6.2-r1
> sys-apps/baselayout: 1.12.11.1
> sys-apps/sandbox:    1.2.18.1-r2
> sys-devel/autoconf:  2.13, 2.63
> sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
> sys-devel/binutils:  2.18-r3
> sys-devel/gcc-config: 1.4.0-r4
> sys-devel/libtool:   1.5.26
> virtual/os-headers:  2.6.27-r2
> ACCEPT_KEYWORDS="amd64"
> CBUILD="x86_64-pc-linux-gnu"
> CFLAGS="-O2 -march=athlon64 -pipe"
> CHOST="x86_64-pc-linux-gnu"
> CONFIG_PROTECT="/etc"
> CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/
> /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo
> /etc/udev/rules.d"
> CXXFLAGS="-O2 -march=athlon64 -pipe"
> DISTDIR="/usr/portage/distfiles"
> FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms
> strict unmerge-orphans userfetch"
> GENTOO_MIRRORS="http://distfiles.gentoo.org
> http://distro.ibiblio.org/pub/linux/distributions/gentoo"
> LANG="en_US"
> LC_ALL="en_US"
> LDFLAGS="-Wl,-O1"
> LINGUAS="en"
> MAKEOPTS="-j5"
> PKGDIR="/usr/portage/packages"
> PORTAGE_CONFIGROOT="/"
> PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
> --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles
> --exclude=/local --exclude=/packages"
> PORTAGE_TMPDIR="/var/tmp"
> PORTDIR="/usr/portage"
> SYNC="rsync://gentoo.callone.net/portage"
> USE="X aac accessibility acl acpi alsa amd64 apache2 berkdb bluetooth branding
> bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread emboss encode
> esd evo examples fam firefox fortran freedtds freetds gdbm gif gnome gpm
> gstreamer gtk gtk2 hal howl iconv isdnlog jpeg ldap libnotify mad midi mikmod
> mmx mozdevelop mp3 mpeg mssql mudflap multilib ncurses new-login nptl nptlonly
> nsplugin nvidia ogg opengl openmp oss pam pcre pdf perl png postgres ppds pppd
> python qt3support quicktime readline reflection sdl session spell spl sqlite
> sqlite3 sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode
> usb userlocales vorbis xforms xine xinerama xml xorg xulrunner xv zlib"
> ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x
> ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3
> trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw
> asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa
> lfloat linear meter mmap_emul mulaw multi null plug rate route share shm
> softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon
> authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile
> authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate
> dir disk_cache env expires ext_filter file_cache filter headers include info
> log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling
> status unique_id userdir usertrack vhost_alias" ELIBC="glibc"
> INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz
> cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en"
> USERLAND="GNU" VIDEO_CARDS="vesa vga nvidia"
> Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK,
> PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS,
> PORTDIR_OVERLAY
> 

Comment 3 Tony Vroon (RETIRED) gentoo-dev 2009-10-22 10:54:15 UTC
This has never worked properly, I'm going to stop pretending that it does. USE=imap is removed for 1.6.1.6-r1; I will accept a new bug report with the complete set of required patching & ebuild changes.
Comment 4 RumpletonBongworth 2010-11-27 13:41:19 UTC
Just in case anyone strays upon this stale bug, please note that the issue is now being addressed by bug 308561.
Comment 5 RumpletonBongworth 2010-11-30 22:03:03 UTC
Re-opening to mark as a duplicate of the aforementioned bug. Having potentially useful commentary split across multiple 'RESOLVED' bugs that are difficult to retrospectively find is a tad awkward.
Comment 6 RumpletonBongworth 2010-11-30 22:03:11 UTC

*** This bug has been marked as a duplicate of bug 308561 ***