Revision: 6117 http://ipcop.svn.sourceforge.net/ipcop/?rev=6117&view=rev Author: gespinasse Date: 2011-11-20 17:37:55 +0000 (Sun, 20 Nov 2011) Log Message: ----------- Fix capi4k-utils compilation. undefined reference to `__stack_chk_fail_local' was caused by unrequired -nostdlib use
Change capi20.h instead of changing each .c file include Add <stdlib.h> to fix implicit declaration of malloc and free. Disable libcapi20.a compilation as not used. Read ppp package version in a makefile variable using shell construction. That avoid using an extra long line later. I let compile the same code as before even we do not look to use some compiled parts (avmcapictrl and capiinit). Modified Paths: -------------- ipcop/trunk/lfs/capi4k-utils ipcop/trunk/make.sh ipcop/trunk/updates/2.0.3/ROOTFILES.i486-2.0.3 ipcop/trunk/updates/2.0.3/information.xml Added Paths: ----------- ipcop/trunk/config/rootfiles/common/capi4k-utils Copied: ipcop/trunk/config/rootfiles/common/capi4k-utils (from rev 6115, ipcop/trunk/config/rootfiles/common/capi4k-utils_SKIP) =================================================================== --- ipcop/trunk/config/rootfiles/common/capi4k-utils (rev 0) +++ ipcop/trunk/config/rootfiles/common/capi4k-utils 2011-11-20 17:37:55 UTC (rev 6117) @@ -0,0 +1,26 @@ +## capi4k-utils-2005-07-18 +## +#etc/drdsl +#etc/drdsl/adsl.conf +#etc/ppp/peers +#etc/ppp/peers/isdn +#etc/ppp/peers/isdn/arcor +#etc/ppp/peers/isdn/avm +#etc/ppp/peers/isdn/avm-ml +#etc/ppp/peers/isdn/leased +#etc/ppp/peers/isdn/otelo +#etc/ppp/peers/isdn/talkline +#sbin/avmcapictrl +#sbin/capiinit +#usr/include/capi20.h +#usr/include/capicmd.h +#usr/include/capiutils.h +#usr/lib/libcapi20.la +#usr/lib/libcapi20.so +#usr/lib/libcapi20.so.3 +#usr/lib/libcapi20.so.3.0.4 +#usr/lib/libcapi20dyn.a +usr/lib/pppd/2.4.5/capiplugin.so +usr/lib/pppd/2.4.5/userpass.so +#usr/share/man/man8/avmcapictrl.8 +#usr/share/man/man8/capiplugin.8 Modified: ipcop/trunk/lfs/capi4k-utils =================================================================== --- ipcop/trunk/lfs/capi4k-utils 2011-11-19 11:00:30 UTC (rev 6116) +++ ipcop/trunk/lfs/capi4k-utils 2011-11-20 17:37:55 UTC (rev 6117) @@ -43,6 +43,8 @@ DIR_APP = $(DIR_SRC)/capi4k-utils TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) +PPPVERSIONS:=$(shell grep --max-count=1 VER ppp | cut -d '=' -f2 | cut -d ' ' -f2) + ############################################################################### # Top-level Rules ############################################################################### @@ -85,23 +87,27 @@ cd $(DIR_APP) && patch -Np0 -i $(DIR_PATCHES)/capi4k-utils-20050718-msg2str-safety.diff cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/capi4k-utils-20050718-size_t.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)_ppp-2.4.5.patch - cd $(DIR_APP)/avmb1 && sed -i -e 's/include <linux\/capi.h>/include <linux\/types.h>\n#include <linux\/capi.h>/' avmcapictrl.c - cd $(DIR_APP)/avmb1 && sed -i -e 's/-O2/$(CFLAGS)/' configure - cd $(DIR_APP)/avmb1 && ./configure - cd $(DIR_APP)/avmb1 && make - cd $(DIR_APP)/avmb1 && make install - cd $(DIR_APP)/capiinit && sed -i -e 's/-O2/$(CFLAGS)/' configure - cd $(DIR_APP)/capiinit && ./configure - cd $(DIR_APP)/capiinit && make - cd $(DIR_APP)/capiinit && make install - cd $(DIR_APP)/capi20 && sed -i -e 's/include <linux\/capi.h>/include <linux\/types.h>\n#include <linux\/capi.h>/' capidyn.c - cd $(DIR_APP)/capi20 && sed -i -e 's/include <linux\/capi.h>/include <linux\/types.h>\n#include <linux\/capi.h>/' capi20.c - cd $(DIR_APP)/capi20 && sed -i -e 's/-O2/$(CFLAGS)/' configure - cd $(DIR_APP)/capi20 && SED=sed ./configure - cd $(DIR_APP)/capi20 && SED=sed make - cd $(DIR_APP)/capi20 && make install - PPPVER=`grep --max-count=1 VER $(DIR_SRC)/lfs/ppp | awk '{ print $$3 }'` && \ - cd $(DIR_APP)/pppdcapiplugin && PPPVERSIONS="$$PPPVER" make && PPPVERSIONS="$$PPPVER" make install + # Fix malloc and free implicit declaration + cd $(DIR_APP)/capi20 && sed -i -e 's:include <sys/time.h>:include <sys/time.h>\n#include <sys/types.h>\n#include <stdlib.h>:' capi20.h + # Fix undefined reference to `__stack_chk_fail_local' + cd $(DIR_APP)/pppdcapiplugin && sed -i -e 's/ -nostdlib//' Rules.make + # A few fixes borrowed from Gentoo + # Do we need that? : patch capiinit/capiinit.c to look also in /lib/firmware + # cd $(DIR_APP) && sed -i -e "s:\(\"/lib/firmware/isdn\",\):\1 \"/lib/firmware\",:g" capiinit/capiinit.c + # Patch all Makefile.* and Rules.make to use our CFLAGS + cd $(DIR_APP) && sed -i -e "s:^\(CFLAGS.*\)-O2:\1$(CFLAGS):g" */Makefile.* */Rules.make + # respect LDFLAGS : add + before = + cd $(DIR_APP) && sed -i -e "s:^LDFLAGS\s\(\s*\)=:LDFLAGS+\1=:g" {capiinfo,capiinit,capifax,rcapid,avmb1}/Makefile* pppdcapiplugin/Rules.make + + cd $(DIR_APP)/avmb1 && ./configure && make install + + cd $(DIR_APP)/capiinit && ./configure && make install + + # --disable-static remove libcapi20.a, not libcapi20dyn.a needed for plugins + cd $(DIR_APP)/capi20 && ./configure --disable-static && make install + + cd $(DIR_APP)/pppdcapiplugin && make install PPPVERSIONS=$(PPPVERSIONS) + @rm -rf $(DIR_APP) @$(POSTBUILD) Modified: ipcop/trunk/make.sh =================================================================== --- ipcop/trunk/make.sh 2011-11-19 11:00:30 UTC (rev 6116) +++ ipcop/trunk/make.sh 2011-11-20 17:37:55 UTC (rev 6117) @@ -1800,8 +1800,8 @@ chroot_make arping chroot_make beep chroot_make bind - #chroot_make capi4k-utils # does not compile (yet) with hardening - chroot_make db # squidGuard + chroot_make capi4k-utils + chroot_make db # squidGuard chroot_make dhcpcd chroot_make dnsmasq chroot_make ethtool Modified: ipcop/trunk/updates/2.0.3/ROOTFILES.i486-2.0.3 =================================================================== --- ipcop/trunk/updates/2.0.3/ROOTFILES.i486-2.0.3 2011-11-19 11:00:30 UTC (rev 6116) +++ ipcop/trunk/updates/2.0.3/ROOTFILES.i486-2.0.3 2011-11-20 17:37:55 UTC (rev 6117) @@ -1,4 +1,8 @@ ## please place IPCop files first, then packages sorted by alphabetical order ## +## capi4k-utils-2005-07-18 +/usr/lib/pppd/2.4.5/capiplugin.so +/usr/lib/pppd/2.4.5/userpass.so +## ## usb-modeswitch-1.9.2 fix to 'call to __builtin___strncat_chk might overflow destination buffer' /usr/sbin/usb_modeswitch_dispatcher Modified: ipcop/trunk/updates/2.0.3/information.xml =================================================================== --- ipcop/trunk/updates/2.0.3/information.xml 2011-11-19 11:00:30 UTC (rev 6116) +++ ipcop/trunk/updates/2.0.3/information.xml 2011-11-20 17:37:55 UTC (rev 6117) @@ -3,7 +3,8 @@ <version>2.0.3</version> <releasedate>2011-mm-dd</releasedate> <size>0</size> - <description>Fix _builtin___strncat_chk might overflow in usb-modemswitch-1.2.0.</description> + <description>Add again capi4k-utils plugins.<br /> + Fix _builtin___strncat_chk might overflow in usb-modemswitch-1.2.0.</description> <previousversion>2.0.2</previousversion> <installdate>INSTALLDATE</installdate> <latest /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Ipcop-svn mailing list Ipcop-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipcop-svn