diff options
author | Stefan Knoblich <stkn@gentoo.org> | 2005-06-24 16:40:42 +0000 |
---|---|---|
committer | Stefan Knoblich <stkn@gentoo.org> | 2005-06-24 16:40:42 +0000 |
commit | b59c0d5e6f3b17b231e7673f4b96ed342ab9f220 (patch) | |
tree | 6e619d840fc382de390de0136adccc6424f4717c /net-misc/zaptel | |
parent | fix localstatedir to point to /var/lib/bluetooth rather than /var/lib/lib/blu... (diff) | |
download | historical-b59c0d5e6f3b17b231e7673f4b96ed342ab9f220.tar.gz historical-b59c0d5e6f3b17b231e7673f4b96ed342ab9f220.tar.bz2 historical-b59c0d5e6f3b17b231e7673f4b96ed342ab9f220.zip |
Backported non-root changes to 1.0.4 and 1.0.6 for asterisk security update
Package-Manager: portage-2.0.51.22-r1
Diffstat (limited to 'net-misc/zaptel')
-rw-r--r-- | net-misc/zaptel/ChangeLog | 9 | ||||
-rw-r--r-- | net-misc/zaptel/Manifest | 6 | ||||
-rw-r--r-- | net-misc/zaptel/files/digest-zaptel-1.0.4-r1 | 1 | ||||
-rw-r--r-- | net-misc/zaptel/files/digest-zaptel-1.0.6-r1 | 3 | ||||
-rw-r--r-- | net-misc/zaptel/zaptel-1.0.4-r1.ebuild | 152 | ||||
-rw-r--r-- | net-misc/zaptel/zaptel-1.0.6-r1.ebuild | 221 |
6 files changed, 390 insertions, 2 deletions
diff --git a/net-misc/zaptel/ChangeLog b/net-misc/zaptel/ChangeLog index 747a4ef30853..cae66969eecd 100644 --- a/net-misc/zaptel/ChangeLog +++ b/net-misc/zaptel/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/zaptel # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.44 2005/06/24 16:01:03 stkn Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.45 2005/06/24 16:40:42 stkn Exp $ + +*zaptel-1.0.4-r1 (24 Jun 2005) + + 24 Jun 2005; Stefan Knoblich <stkn@gentoo.org> +zaptel-1.0.4-r1.ebuild, + +zaptel-1.0.6-r1.ebuild: + Backported non-root changes to zaptel-1.0.4 and 1.0.6 for asterisk security + fix. 24 Jun 2005; Stefan Knoblich <stkn@gentoo.org> zaptel-1.0.7-r1.ebuild: Renamed udev rules file to 10-zaptel.rules, making udev use our custom rules diff --git a/net-misc/zaptel/Manifest b/net-misc/zaptel/Manifest index 88b82944825d..5b696ea972a9 100644 --- a/net-misc/zaptel/Manifest +++ b/net-misc/zaptel/Manifest @@ -1,14 +1,17 @@ MD5 05d90593a79bdd69cdc1692cadcf4655 zaptel-1.0.7-r1.ebuild 6497 +MD5 71856b10539385021904f71c2eb532f7 zaptel-1.0.4-r1.ebuild 4433 +MD5 b121042253d6e684330d0990b8f667c2 zaptel-1.0.6-r1.ebuild 6220 MD5 ceeb5fcf63c6539d0bbbe196ee79952e zaptel-1.0.7.ebuild 6096 MD5 57a33550baf4bda34695fa3cb84a8012 zaptel-1.0.0.ebuild 3059 MD5 7245a92de844119cd4351807007616f0 zaptel-1.0.3.ebuild 3532 MD5 89874e5cbdf7262fe23db47cdb5a538e zaptel-1.0.4.ebuild 4473 MD5 cfce09091affa8e8668e7a22801ac097 zaptel-1.0.1.ebuild 3186 MD5 44cf247f04cc83413fcb40ed59d0847a metadata.xml 248 -MD5 dd59ae21e59f45a66da566c2c59ce3b0 ChangeLog 7820 +MD5 55295189b0751210a9f1350ddade1d4b ChangeLog 8039 MD5 eaa764a27a800be752aba85a7df8d342 zaptel-1.0.2.ebuild 3127 MD5 7316ffa750860754390bfe11d3d23d09 zaptel-1.0.6.ebuild 6265 MD5 8d66c378ea6b3b3f7bb2ee1fd2b6e51c zaptel-0.9.1.ebuild 3526 +MD5 0c81001d4c9efeeffeb1332580fb4cdc files/digest-zaptel-1.0.6-r1 212 MD5 296ec9da581d5768ca13840b1a32c33f files/digest-zaptel-1.0.7 212 MD5 0edad95ac20c6e43ea6ee933e25ac23a files/zaptel-1.0.1-skbuff.diff 564 MD5 9cf4f1d646d216441b7f4508ac7c0e8b files/digest-zaptel-1.0.0 64 @@ -35,5 +38,6 @@ MD5 0c81001d4c9efeeffeb1332580fb4cdc files/digest-zaptel-1.0.6 212 MD5 051e2ff3f1222e2b551a70e9cd1b31f0 files/digest-zaptel-1.0.4 64 MD5 c80f1e0e4038771d3e3bc08284ecf917 files/zaptel-0.9.1-modulesd.diff 1941 MD5 d40a84eeea5866a3afbac2603e970e7b files/zaptel-1.0.4-experimental-devfs26.diff 5982 +MD5 051e2ff3f1222e2b551a70e9cd1b31f0 files/digest-zaptel-1.0.4-r1 64 MD5 dbd81e086a8331bea5752bf92e288f43 files/digest-zaptel-1.0.1 64 MD5 3921a7fd4a60c8785d510e857ff2eabe files/digest-zaptel-0.9.1 64 diff --git a/net-misc/zaptel/files/digest-zaptel-1.0.4-r1 b/net-misc/zaptel/files/digest-zaptel-1.0.4-r1 new file mode 100644 index 000000000000..7aab20d1e64e --- /dev/null +++ b/net-misc/zaptel/files/digest-zaptel-1.0.4-r1 @@ -0,0 +1 @@ +MD5 ef189a00c823b3739cc706fe290433a2 zaptel-1.0.4.tar.gz 316205 diff --git a/net-misc/zaptel/files/digest-zaptel-1.0.6-r1 b/net-misc/zaptel/files/digest-zaptel-1.0.6-r1 new file mode 100644 index 000000000000..cfa408f2679f --- /dev/null +++ b/net-misc/zaptel/files/digest-zaptel-1.0.6-r1 @@ -0,0 +1,3 @@ +MD5 4f6b2627b45537774ac1aba3c17624c6 zaptel-1.0.6.tar.gz 316568 +MD5 b07d5f949b90677a2925ba2dd50593cb bristuff-0.2.0-RC7k.tar.gz 114265 +MD5 510ab7103516fd574fd5f38db2a08c81 zaphfc_0.2.0-RC7j_florz-4.diff.gz 10204 diff --git a/net-misc/zaptel/zaptel-1.0.4-r1.ebuild b/net-misc/zaptel/zaptel-1.0.4-r1.ebuild new file mode 100644 index 000000000000..553b08541cb4 --- /dev/null +++ b/net-misc/zaptel/zaptel-1.0.4-r1.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.0.4-r1.ebuild,v 1.1 2005/06/24 16:40:42 stkn Exp $ + +IUSE="devfs26" + +inherit toolchain-funcs eutils linux-info + +DESCRIPTION="Drivers for Digium and ZapataTelephony cards" +HOMEPAGE="http://www.asterisk.org" +SRC_URI="ftp://ftp.asterisk.org/pub/telephony/zaptel/zaptel-${PV}.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~x86 ~ppc ~amd64" + +DEPEND="virtual/libc + virtual/linux-sources + >=dev-libs/newt-0.50.0" + +pkg_setup() { + local pause_sec=0 + linux-info_pkg_setup + + if ! linux_chkconfig_present PPP ; then + einfo "" + einfo "PPP support isn't enabled or available as a module." + einfo "" + + einfo "If you aren't using PPP (eg. you're using voice ISDN" + einfo "or non-PPP data), then this is okay." + + einfo "Otherwise, if you want to use PPP over your hardware" + einfo "please quit now and reconfigure your kernel to include" + einfo "CONFIG_PPP, CONFIG_PPP_ASYNC, CONFIG_PPP_DEFLATE" + einfo "and CONFIG_PPPOE." + einfo "" + pause_sec=10 + fi + + # show an nice warning message about zaptel not supporting devfs on 2.6 + if kernel_is 2 6 && linux_chkconfig_present DEVFS_FS ; then + echo + einfo "You're using a 2.6 kernel with DEVFS." + einfo "The Zaptel drivers won't work unless you either:" + einfo " * switch to udev" + einfo " * write a script that re-creates the necessary device nodes for you" + einfo " * enable the devfs26 useflag (see below)" + einfo "" + einfo "There's an experimental patch which adds devfs support when using linux-2.6, but:" + einfo " 1. It's an ugly hack atm and needs a cleanup..." + einfo " 2. I was only abled to test loding / unloading with the ztd-eth driver..." + einfo " 3. I _really_ don't know if it works with real hardware..." + einfo " 4. It disables udev support to avoid conflicts" + eerror " 5. And more important: This is not officially supported by Digium / the Asterisk project!" + einfo "" + einfo "If you're still interested, abort now (ctrl+c) and enable the devfs26 USE-flag" + einfo "Feedback and bug-reports should go to: stkn@gentoo.org" + einfo "You have been warned!" + echo + pause_sec=$(($pause_sec + 20)) + fi + + # wait once, not multiple times + if [[ $pause_sec -gt 0 ]]; then + einfo "Sleeping $pause_sec seconds" + epause $pause_sec + fi +} + +src_unpack() { + unpack ${A} + + cd ${S} + # >= 1.0.3 requires new patch (-modulesd patch renamed to -gentoo) + epatch ${FILESDIR}/${PN}-1.0.3-gentoo.diff + + # remove all from install target + sed -i -e "s#^\(install:\)[ \t]\+all[ \t]\+\(.*\)#\1 \2#" Makefile + + # enable ztdummy... + sed -i -e "s:#\( ztdummy.*\):\1:" Makefile + + # devfs support + if use devfs26; then + einfo "Enabling experimental devfs support for linux-2.6..." + epatch ${FILESDIR}/${PN}-1.0.4-experimental-devfs26.diff + + # disable udev + sed -i -e "s:#define[\t ]\+\(CONFIG_ZAP_UDEV\):#undef \1:" \ + zconfig.h + fi + + # apply patch for gcc-3.4.x if that's the compiler in use... + # fixes (#76707) + if use x86 && [[ `gcc-fullversion` = "3.4.3" ]]; then + epatch ${FILESDIR}/${P}-gcc34.patch + fi +} + +src_compile() { + set_arch_to_kernel + make || die + set_arch_to_portage +} + +src_install() { + make INSTALL_PREFIX=${D} install || die + + dodoc ChangeLog README README.udev README.Linux26 README.fxsusb zaptel.init + dodoc zaptel.conf.sample LICENSE zaptel.sysconfig + + # additional tools + dobin ztmonitor ztspeed zttest + + # install init script + newinitd ${FILESDIR}/zaptel.rc6 zaptel + newconfd ${FILESDIR}/zaptel.confd zaptel + + # install devfsd rule file + insinto /etc/devfs.d + newins ${FILESDIR}/zaptel.devfsd zaptel + + # install udev rule file + insinto /etc/udev/rules.d + newins ${FILESDIR}/zaptel.udevd 10-zaptel.rules + + # fix permissions if there's no udev / devfs around + if [[ -d ${D}/dev/zap ]]; then + chown -R root:dialout ${D}/dev/zap + chmod -R u=rwX,g=rwX,o= ${D}/dev/zap + fi +} + +pkg_postinst() { + if use devfs26; then + ewarn "*** Warning! ***" + ewarn "Devfs support for linux-2.6 is experimental and not" + ewarn "supported by digium or the asterisk project!" + echo + ewarn "Send bug-reports to: stkn@gentoo.org" + fi + + echo + einfo "Use the /etc/init.d/zaptel script to load zaptel.conf settings on startup!" + + # fix permissions if there's no udev / devfs around + if [[ -d ${ROOT}/dev/zap ]]; then + chown -R root:dialout ${ROOT}/dev/zap + chmod -R u=rwX,g=rwX,o= ${ROOT}/dev/zap + fi +} diff --git a/net-misc/zaptel/zaptel-1.0.6-r1.ebuild b/net-misc/zaptel/zaptel-1.0.6-r1.ebuild new file mode 100644 index 000000000000..f97ccc5e122c --- /dev/null +++ b/net-misc/zaptel/zaptel-1.0.6-r1.ebuild @@ -0,0 +1,221 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.0.6-r1.ebuild,v 1.1 2005/06/24 16:40:42 stkn Exp $ + +IUSE="devfs26 bri florz" + +inherit toolchain-funcs eutils linux-mod + +BRI_VERSION="0.2.0-RC7k" +FLORZ_VERSION="0.2.0-RC7j_florz-4" + +DESCRIPTION="Drivers for Digium and ZapataTelephony cards" +HOMEPAGE="http://www.asterisk.org" +SRC_URI="ftp://ftp.asterisk.org/pub/telephony/zaptel/zaptel-${PV}.tar.gz + bri? ( http://www.junghanns.net/asterisk/downloads/bristuff-${BRI_VERSION}.tar.gz ) + florz? ( http://zaphfc.florz.dyndns.org/zaphfc_${FLORZ_VERSION}.diff.gz )" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~x86 ~ppc ~amd64" + +DEPEND="virtual/libc + virtual/linux-sources + >=dev-libs/newt-0.50.0" + +pkg_setup() { + linux-mod_pkg_setup + + # show an nice warning message about zaptel not supporting devfs on 2.6 + if kernel_is 2 6 && linux_chkconfig_present DEVFS_FS ; then + echo + einfo "You're using a 2.6 kernel with DEVFS." + einfo "The Zaptel drivers won't work unless you either:" + einfo " * switch to udev" + einfo " * write a script that re-creates the necessary device nodes for you" + einfo " * enable the devfs26 useflag (see below)" + einfo "" + einfo "There's an experimental patch which adds devfs support when using linux-2.6, but:" + einfo " 1. It's an ugly hack atm and needs a cleanup..." + einfo " 2. I was only abled to test loding / unloading with the ztd-eth driver..." + einfo " 3. I _really_ don't know if it works with real hardware..." + einfo " 4. It disables udev support to avoid conflicts" + eerror " 5. And more important: This is not officially supported by Digium / the Asterisk project!" + einfo "" + einfo "If you're still interested, abort now (ctrl+c) and enable the devfs26 USE-flag" + einfo "Feedback and bug-reports should go to: stkn@gentoo.org" + einfo "You have been warned!" + echo + einfo "Sleeping 20 Seconds..." + epause 20 + fi +} + +src_unpack() { + unpack ${A} + + cd ${S} + # >= 1.0.3 requires new patch (-modulesd patch renamed to -gentoo) + epatch ${FILESDIR}/${PN}-1.0.3-gentoo.diff + + # remove all from install target + sed -i -e "s#^\(install:\)[ \t]\+all[ \t]\+\(.*\)#\1 \2#" Makefile + + # enable ztdummy... + sed -i -e "s:#\( ztdummy.*\):\1:" Makefile + + # devfs support + if use devfs26; then + einfo "Enabling experimental devfs support for linux-2.6..." + epatch ${FILESDIR}/${PN}-1.0.4-experimental-devfs26.diff + + # disable udev + sed -i -e "s:#define[\t ]\+\(CONFIG_ZAP_UDEV\):#undef \1:" \ + zconfig.h + fi + + # apply patch for gcc-3.4.x if that's the compiler in use... + # fixes (#76707) + if use x86 && [[ `gcc-fullversion` = "3.4.3" ]]; then + epatch ${FILESDIR}/${PN}-1.0.4-gcc34.patch + fi + + # try to apply bristuff patch + if use bri; then + einfo "Patching zaptel w/ BRI stuff (${BRI_VERSION})" + epatch ${FILESDIR}/zaptel-bristuff-${BRI_VERSION}.patch + + cd ${WORKDIR}/bristuff-${BRI_VERSION} + + if use florz; then + einfo "Using florz patches (${FLORZ_VERSION}) for zaphfc" + epatch ${WORKDIR}/zaphfc_${FLORZ_VERSION}.diff + fi + + # patch includes + sed -i -e "s:^#include.*zaptel\.h.*:#include <zaptel.h>:" \ + qozap/qozap.c \ + zaphfc/zaphfc.c + + # patch makefiles + sed -i -e "s:^ZAP[\t ]*=.*:ZAP=-I${S}:" \ + -e "s:^MODCONF=.*:MODCONF=/etc/modules.d/zaptel:" \ + -e "s:linux-2.6:linux:g" \ + qozap/Makefile \ + zaphfc/Makefile + + sed -i -e "s:^\(CFLAGS+=-I. \).*:\1 \$(ZAP):" \ + zaphfc/Makefile + fi + + # replace `uname -r` with ${KV_FULL} in all Makefiles + find ${WORKDIR} -iname "Makefile" -exec sed -i -e "s:\`uname -r\`:${KV_FULL}:g" {} \; +} + +src_compile() { + # TODO: bristuff modules + + set_arch_to_kernel + make KERNEL_SOURCE=/usr/src/linux || die + + if use bri; then + cd ${WORKDIR}/bristuff-${BRI_VERSION} + make -C qozap || die + make -C zaphfc || die + fi + set_arch_to_portage +} + +src_install() { + make INSTALL_PREFIX=${D} install || die + + dodoc ChangeLog README README.udev README.Linux26 README.fxsusb zaptel.init + dodoc zaptel.conf.sample LICENSE zaptel.sysconfig + + # additional tools + dobin ztmonitor ztspeed zttest + + if use bri; then + einfo "Installing bri" + cd ${WORKDIR}/bristuff-${BRI_VERSION} + + insinto /lib/modules/${KV_FULL}/misc + doins qozap/qozap.${KV_OBJ} + doins zaphfc/zaphfc.${KV_OBJ} + + # install example configs for octoBRI and quadBRI + insinto /etc + doins qozap/zaptel.conf.octoBRI + newins qozap/zaptel.conf zaptel.conf.quadBRI + newins zaphfc/zaptel.conf zaptel.conf.zaphfc + + insinto /etc/asterisk + doins qozap/zapata.conf.octoBRI + newins qozap/zapata.conf zapata.conf.quadBRI + newins zaphfc/zapata.conf zapata.conf.zaphfc + + docinto bristuff + dodoc CHANGES INSTALL README-ZAPHFC-USERS.1st + + docinto bristuff/qozap + dodoc qozap/LICENSE qozap/TODO qozap/*.conf* + + docinto bristuff/zaphfc + dodoc zaphfc/LICENSE zaphfc/*.conf + fi + + # install init script + newinitd ${FILESDIR}/zaptel.rc6 zaptel + newconfd ${FILESDIR}/zaptel.confd zaptel + + # install devfsd rule file + insinto /etc/devfs.d + newins ${FILESDIR}/zaptel.devfsd zaptel + + # install udev rule file + insinto /etc/udev/rules.d + newins ${FILESDIR}/zaptel.udevd 10-zaptel.rules + + # fix permissions if there's no udev / devfs around + if [[ -d ${D}/dev/zap ]]; then + chown -R root:dialout ${D}/dev/zap + chmod -R u=rwX,g=rwX,o= ${D}/dev/zap + fi +} + +pkg_postinst() { + linux-mod_pkg_postinst + + if use devfs26; then + ewarn "*** Warning! ***" + ewarn "Devfs support for linux-2.6 is experimental and not" + ewarn "supported by digium or the asterisk project!" + echo + ewarn "Send bug-reports to: stkn@gentoo.org" + fi + + echo + einfo "Use the /etc/init.d/zaptel script to load zaptel.conf settings on startup!" + echo + + if use bri; then + einfo "Bristuff configs have been merged as:" + einfo "" + einfo "${ROOT}etc/" + einfo " zaptel.conf.zaphfc" + einfo " zaptel.conf.quadBRI" + einfo " zaptel.conf.octoBRI" + einfo "" + einfo "${ROOT}etc/asterisk/" + einfo " zapata.conf.zaphfc" + einfo " zapata.conf.quadBRI" + einfo " zapata.conf.octoBRI" + echo + fi + + # fix permissions if there's no udev / devfs around + if [[ -d ${ROOT}/dev/zap ]]; then + chown -R root:dialout ${ROOT}/dev/zap + chmod -R u=rwX,g=rwX,o= ${ROOT}/dev/zap + fi +} |