Bug#694805: asterisk: please change Provides: asterisk-1.8 to Provides: asterisk-${source:Upstream-Version}

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sat Dec 1 23:34:21 UTC 2012


On Sat, Dec 01, 2012 at 01:14:00AM +0200, Tzafrir Cohen wrote:
> On Fri, Nov 30, 2012 at 10:08:43PM +0800, Paul Wise wrote:
> > Package: asterisk
> > Version: 1:1.8.13.1~dfsg-1
> > Severity: important
> > 
> > Asterisk seems to have changed its plugin ABI without bumping the
> > Provides. As a result asterisk-espeak and the other external modules are
> > not able to be loaded, even though they were built against asterisk-dev
> > version 1:1.8.10.1~dfsg-1, which also provided asterisk-1.8.
> > 
> > http://bugs.debian.org/689109
> > https://buildd.debian.org/status/fetch.php?pkg=asterisk-espeak&arch=i386&ver=2.1-1&stamp=1333714494
> > 
> > I would suggest changing Provides: asterisk-1.8 to something more
> > specific like Provides: asterisk-${source:Upstream-Version}. This will
> > ensure that future ABI breaks are handled properly since it is very hard
> > to ensure that plugin ABIs haven't changed.
> 
> A. FWIW, Upstream promises that the ABI would not on a LTS Asterisk
> version, and 1.8 is such.

Specifically, Digium provides some binary-only modules and hence they
have some idea of ABI stability and of module loading issues.

> 
> That said, the check that failed at the module load was not technically
> for a new ABI, but for some combination of build flags and such,
> originally from asterisk.h . I believe those have not changed. Will test
> that tommorow.

Rather, <asterisk/buildopts.h> . I'm not yet completely sure what's the
rationaly for this, but basically buildopts.h has a checksum that is
included into every module using the macro AST_MODULE_INFO_STANDARD that
every module includes:
http://svnview.digium.com/svn/asterisk/branches/1.8/include/asterisk/module.h?view=markup

It seems (seem gory details below) that the calculation of the checksum
depend on quite a few things that have nothing to do with the interface
Asterisk presents to modules.

I suppose that in the future we'll try to avoid changing it for no good
reason (or work with upstream to fix its creation or whatever).


The version of buildopts.h from current package:

/*
 * buildopts.h
 * Automatically generated
 */

#define LOADABLE_MODULES 1
#define AST_MODULE_CHAN_LOCAL 1
#define AST_MODULE_APP_VOICEMAIL 1
#define AST_MODULE_APP_MEETME 1
#define AST_MODULE_RES_MONITOR 1
#define AST_MODULE_RES_AGI 1
#define AST_MODULE_RES_ADSI 1
#define AST_MODULE_RES_SMDI 1
#define AST_MODULE_RES_ODBC 1
#define AST_MODULE_RES_CRYPTO 1
#define AST_MODULE_RES_JABBER 1
#define AST_MODULE_RES_AEL_SHARE 1
#define AST_MODULE_RES_FAX 1
#define AST_MODULE_G711_NEW_ALGORITHM 1
#define AST_BUILDOPT_SUM "ac1f6a56484a8820659555499174e588"
#define AST_BUILDOPTS "LOADABLE_MODULES"

We get the error in question if AST_BUILDOPT_SUM differs for the module
than the current value for Asterisk.

The script generating it has not changed for quite some time, and
specifically not in the whole 1.8 cycle:

$ cat build_tools/make_buildopts_h
#!/bin/sh

cat << END
/*
 * buildopts.h
 * Automatically generated
 */

END
TMP=`${GREP} -e "^MENUSELECT_CFLAGS" menuselect.makeopts | sed 's/MENUSELECT_CFLAGS\=//g' | sed 's/-D//g'`
for x in ${TMP}; do
        echo "#define ${x} 1"
        if test "x${BUILDOPTS}" != "x" ; then
                BUILDOPTS="${BUILDOPTS}, ${x}"
        else
                BUILDOPTS="${x}"
        fi
done
TMP=`${GREP} -e "^MENUSELECT_BUILD_DEPS" menuselect.makeopts | sed 's/MENUSELECT_BUILD_DEPS\=//g'`
for x in ${TMP}; do
        x2=`echo ${x} | tr a-z A-Z`
        echo "#define AST_MODULE_${x2} 1"
done
if ${GREP} "AST_DEVMODE" makeopts | ${GREP} -q "yes"
then
        echo "#define AST_DEVMODE 1"
        TMP="${TMP} AST_DEVMODE"
fi

BUILDSUM=`echo ${TMP} | ${MD5} | cut -c1-32`

echo "#define AST_BUILDOPT_SUM \"${BUILDSUM}\""
echo "#define AST_BUILDOPTS \"${BUILDOPTS}\""



I looked at various versions of asterisk 1.8.x that were included in
Debian. It seems that the checksum was changed 3 times in that series:




    asterisk-dev_1.8.7.1~dfsg-1_all.deb

diff --git a/usr/include/asterisk/buildopts.h b/usr/include/asterisk/buildopts.h
index 9ea98d4..92b5328 100644
--- a/usr/include/asterisk/buildopts.h
+++ b/usr/include/asterisk/buildopts.h
@@ -5,12 +5,12 @@
 
 #define LOADABLE_MODULES 1
 #define AST_MODULE_RES_ADSI 1
-#define AST_MODULE_RES_SMDI 1
 #define AST_MODULE_CHAN_LOCAL 1
 #define AST_MODULE_APP_VOICEMAIL 1
 #define AST_MODULE_APP_MEETME 1
 #define AST_MODULE_RES_MONITOR 1
 #define AST_MODULE_RES_AGI 1
+#define AST_MODULE_RES_SMDI 1
 #define AST_MODULE_RES_ODBC 1
 #define AST_MODULE_RES_JABBER 1
 #define AST_MODULE_RES_CRYPTO 1
@@ -18,5 +18,5 @@
 #define AST_MODULE_RES_FAX 1
 #define AST_MODULE_G711_NEW_ALGORITHM 1
 #define AST_MODULE_CHAN_USBRADIO 1
-#define AST_BUILDOPT_SUM "684d53d6a415e7be63daac3997faa601"
+#define AST_BUILDOPT_SUM "8586c2a7d357cb591cc3a6607a8f62d1"
 #define AST_BUILDOPTS "LOADABLE_MODULES"

This is probably because a certain module droppd or added dependency on
res_smdi.so. I'm not sure which one it is, and anyway, I'm not sure how
it is related to the interface to moduls.


    asterisk-dev_1.8.10.0~dfsg-1_all.deb

diff --git a/usr/include/asterisk/buildopts.h b/usr/include/asterisk/buildopts.h
index 92b5328..a07a29b 100644
--- a/usr/include/asterisk/buildopts.h
+++ b/usr/include/asterisk/buildopts.h
@@ -4,19 +4,19 @@
  */
 
 #define LOADABLE_MODULES 1
-#define AST_MODULE_RES_ADSI 1
 #define AST_MODULE_CHAN_LOCAL 1
 #define AST_MODULE_APP_VOICEMAIL 1
 #define AST_MODULE_APP_MEETME 1
 #define AST_MODULE_RES_MONITOR 1
 #define AST_MODULE_RES_AGI 1
+#define AST_MODULE_RES_ADSI 1
 #define AST_MODULE_RES_SMDI 1
 #define AST_MODULE_RES_ODBC 1
-#define AST_MODULE_RES_JABBER 1
 #define AST_MODULE_RES_CRYPTO 1
+#define AST_MODULE_RES_JABBER 1
 #define AST_MODULE_RES_AEL_SHARE 1
 #define AST_MODULE_RES_FAX 1
 #define AST_MODULE_G711_NEW_ALGORITHM 1
 #define AST_MODULE_CHAN_USBRADIO 1
-#define AST_BUILDOPT_SUM "8586c2a7d357cb591cc3a6607a8f62d1"
+#define AST_BUILDOPT_SUM "88eaa8f5c1bd988bedd71113385e0886"
 #define AST_BUILDOPTS "LOADABLE_MODULES"

A similar change.


    asterisk-dev_1.8.13.0~dfsg-1_all.deb

diff --git a/usr/include/asterisk/buildopts.h b/usr/include/asterisk/buildopts.h
index a07a29b..064c435 100644
--- a/usr/include/asterisk/buildopts.h
+++ b/usr/include/asterisk/buildopts.h
@@ -17,6 +17,5 @@
 #define AST_MODULE_RES_AEL_SHARE 1
 #define AST_MODULE_RES_FAX 1
 #define AST_MODULE_G711_NEW_ALGORITHM 1
-#define AST_MODULE_CHAN_USBRADIO 1
-#define AST_BUILDOPT_SUM "88eaa8f5c1bd988bedd71113385e0886"
+#define AST_BUILDOPT_SUM "ac1f6a56484a8820659555499174e588"
 #define AST_BUILDOPTS "LOADABLE_MODULES"

chan_usbradio is not adepndency of anything. Its rmoval should not
have changed any API / ABI.


-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the Pkg-voip-maintainers mailing list