summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Briesenick <sbriesen@gentoo.org>2010-12-19 12:40:55 +0000
committerStefan Briesenick <sbriesen@gentoo.org>2010-12-19 12:40:55 +0000
commit6a827ac0483a82ca7b60f1994ab6af2997f1d6e2 (patch)
treeeefb73afc7e6423f1c9037253678ba34b0295ef1 /net-dialup
parentx86 stable wrt security bug #349045 (diff)
downloadhistorical-6a827ac0483a82ca7b60f1994ab6af2997f1d6e2.tar.gz
historical-6a827ac0483a82ca7b60f1994ab6af2997f1d6e2.tar.bz2
historical-6a827ac0483a82ca7b60f1994ab6af2997f1d6e2.zip
added updated ebuild for kernels >= 2.6.34, thanks to Tilo Prütz. Solving bug #348424.
Package-Manager: portage-2.2.0_alpha8/cvs/Linux x86_64
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/fcpci/ChangeLog9
-rw-r--r--net-dialup/fcpci/Manifest5
-rw-r--r--net-dialup/fcpci/fcpci-0.1-r2.ebuild70
-rw-r--r--net-dialup/fcpci/files/fcpci-linux-2.6.34.diff126
4 files changed, 208 insertions, 2 deletions
diff --git a/net-dialup/fcpci/ChangeLog b/net-dialup/fcpci/ChangeLog
index e40d1d093c0d..61207b9d7bf6 100644
--- a/net-dialup/fcpci/ChangeLog
+++ b/net-dialup/fcpci/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-dialup/fcpci
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/fcpci/ChangeLog,v 1.20 2010/12/19 12:37:18 sbriesen Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/fcpci/ChangeLog,v 1.21 2010/12/19 12:40:55 sbriesen Exp $
+
+*fcpci-0.1-r2 (19 Dec 2010)
+
+ 19 Dec 2010; Stefan Briesenick <sbriesen@gentoo.org> +fcpci-0.1-r2.ebuild,
+ +files/fcpci-linux-2.6.34.diff:
+ added updated ebuild for kernels >= 2.6.34, thanks to Tilo Prütz. Solving
+ bug #348424.
19 Dec 2010; Stefan Briesenick <sbriesen@gentoo.org> -fcpci-0.1.ebuild,
-fcpci-0.1-r1.ebuild:
diff --git a/net-dialup/fcpci/Manifest b/net-dialup/fcpci/Manifest
index aaf2e85c3b61..108d86002c37 100644
--- a/net-dialup/fcpci/Manifest
+++ b/net-dialup/fcpci/Manifest
@@ -1,2 +1,5 @@
-MISC ChangeLog 2349 RMD160 5875f7048edf2fe6c1212974ccc2fb285c107c95 SHA1 2eb24f4960df6330f90743fdb4d5c4dabc3133b2 SHA256 1802e00f5f7732ea1c18244faa84bf0aaea9f14f662a15f14fa630b539251a57
+AUX fcpci-linux-2.6.34.diff 4358 RMD160 63ba14a64be689ac4f15cfe010106a9a3c4e7c41 SHA1 8b53b1a43cb5615995502239a40687d61443a27c SHA256 82f72dda3f5a6956e5e35990e0b431ff11c8f9a4f046f991d19aca95d79dfd6e
+DIST fcpci-0.1-0.src.rpm 1419782 RMD160 d6313192d01e0f6a64f890b3015e0541c9dbfbd3 SHA1 08e88c9b395b783dc8dce91b61f286f1c05a261e SHA256 f39c7cb83b21fa9ba1de71f357c72552aa1c5327d7ad4ac55274e71e9da3f8e4
+EBUILD fcpci-0.1-r2.ebuild 1709 RMD160 0ff96486e52eae34ab0275cd381960093cb45dc7 SHA1 cdb866e4a8df03e101b82788d91893f41df44055 SHA256 4e2a8fb2e54a3d68d9dfd43071fe73edf61c6a1a1302f4eb7189917ba97c51d2
+MISC ChangeLog 2582 RMD160 86a683a0457757351298a90a167171fb1286e59b SHA1 a34e605a6f808a9224c20cfbbb1a1912599e3f93 SHA256 fae58ed30a959fa5c0e119075528e100442b0690ed0b3151508cdd038b2e5426
MISC metadata.xml 263 RMD160 ea2e7ecb186a7fd9b309bd3aff02c9e139981ce8 SHA1 62ca0c83d00d102d78427e59920cf79b62d37dc1 SHA256 ad6c0344e90e2a2c1f631b6d6e0242799bec90eee1eaccdc04674f52be49ea75
diff --git a/net-dialup/fcpci/fcpci-0.1-r2.ebuild b/net-dialup/fcpci/fcpci-0.1-r2.ebuild
new file mode 100644
index 000000000000..eb6da2f2c0b8
--- /dev/null
+++ b/net-dialup/fcpci/fcpci-0.1-r2.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/fcpci/fcpci-0.1-r2.ebuild,v 1.1 2010/12/19 12:40:55 sbriesen Exp $
+
+#EAPI=2 # currently not possible because of linux-mod
+
+inherit eutils rpm linux-mod versionator
+
+DESCRIPTION="AVM kernel 2.6 modules for Fritz!Card PCI"
+HOMEPAGE="http://opensuse.foehr-it.de/"
+SRC_URI="http://opensuse.foehr-it.de/rpms/11_2/src/${P}-0.src.rpm"
+#-> ${P}-0.src-11_2.rpm" # needs EAPI=2
+
+LICENSE="AVM-FC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="!net-dialup/fritzcapi"
+RDEPEND="${DEPEND} net-dialup/capi4k-utils"
+
+RESTRICT="primaryuri" # because we can't use EAPI=2
+
+S="${WORKDIR}/fritz"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ if ! kernel_is 2 6; then
+ die "This package works only with 2.6 kernel!"
+ fi
+
+ BUILD_TARGETS="all"
+ BUILD_PARAMS="KDIR=${KV_DIR} LIBDIR=${S}/src"
+ MODULE_NAMES="${PN}(net:${S}/src)"
+}
+
+src_unpack() {
+ local BIT="" PAT="012345"
+ if use amd64; then
+ BIT="64bit-" PAT="1234"
+ fi
+ if kernel_is ge 2 6 31 ; then
+ PAT="${PAT}67"
+ fi
+
+ rpm_unpack "${A}" || die "failed to unpack ${A} file"
+ DISTDIR="${WORKDIR}" unpack ${PN}-suse[0-9][0-9]-${BIT}[0-9].[0-9]*-[0-9]*.tar.gz
+
+ cd "${S}"
+ epatch $(sed -n "s|^Patch[${PAT}]:\s*\(.*\)|../\1|p" ../${PN}.spec)
+ if kernel_is ge 2 6 34 ; then
+ epatch "${FILESDIR}"/fcpci-linux-2.6.34.diff
+ fi
+
+ convert_to_m src/Makefile
+
+ for i in lib/*-lib.o; do
+ einfo "Localize symbols in ${i##*/} ..."
+ objcopy -L memcmp -L memcpy -L memmove -L memset -L strcat \
+ -L strcmp -L strcpy -L strlen -L strncmp -L strncpy "${i}"
+ done
+}
+
+src_install() {
+ linux-mod_src_install
+ dodoc CAPI*.txt
+ dohtml *.html
+}
+
diff --git a/net-dialup/fcpci/files/fcpci-linux-2.6.34.diff b/net-dialup/fcpci/files/fcpci-linux-2.6.34.diff
new file mode 100644
index 000000000000..ea20ac5176e6
--- /dev/null
+++ b/net-dialup/fcpci/files/fcpci-linux-2.6.34.diff
@@ -0,0 +1,126 @@
+--- fritz/src/driver.c.orig 2010-12-09 16:47:24.552314553 +0100
++++ fritz/src/driver.c 2010-12-09 16:53:16.040981703 +0100
+@@ -48,6 +48,8 @@
+ #include "defs.h"
+ #include "lib.h"
+ #include "driver.h"
++#include <linux/proc_fs.h>
++#include <linux/seq_file.h>
+
+ /*---------------------------------------------------------------------------*\
+ \*---------------------------------------------------------------------------*/
+@@ -220,16 +220,6 @@
+ } /* kill_version */
+
+ /*---------------------------------------------------------------------------*\
+-\*---------------------------------------------------------------------------*/
+-static void pprintf (char * page, int * len, const char * fmt, ...) {
+- va_list args;
+-
+- va_start (args, fmt);
+- *len += vsprintf (page + *len, fmt, args);
+- va_end (args);
+-} /* pprintf */
+-
+-/*---------------------------------------------------------------------------*\
+ \*-C-------------------------------------------------------------------------*/
+ static inline int in_critical (void) {
+
+@@ -490,39 +480,33 @@
+
+ /*---------------------------------------------------------------------------*\
+ \*---------------------------------------------------------------------------*/
+-static int __kcapi ctr_info (
+- char * page,
+- char ** start,
+- off_t ofs,
+- int count,
+- int * eof,
+- struct capi_ctr * ctrl
+-) {
++static int __kcapi ctr_info (struct seq_file *m, void *v)
++{
++ struct capi_ctr *ctrl = m->private;
+ card_t * card;
+ char * temp;
+ unsigned char flag;
+- int len = 0;
+
+ assert (ctrl != NULL);
+ card = (card_t *) ctrl->driverdata;
+ assert (card != NULL);
+- pprintf (page, &len, "%-16s %s\n", "name", SHORT_LOGO);
+- pprintf (page, &len, "%-16s 0x%04x\n", "io", card->base);
+- pprintf (page, &len, "%-16s %d\n", "irq", card->irq);
++ seq_printf(m, "%-16s %s\n", "name", SHORT_LOGO);
++ seq_printf(m, "%-16s 0x%04x\n", "io", card->base);
++ seq_printf(m, "%-16s %d\n", "irq", card->irq);
+ temp = card->version ? card->string[1] : "A1";
+- pprintf (page, &len, "%-16s %s\n", "type", temp);
++ seq_printf(m, "%-16s %s\n", "type", temp);
+ temp = card->version ? card->string[0] : "-";
+ #if defined (__fcclassic__) || defined (__fcpcmcia__)
+- pprintf (page, &len, "%-16s 0x%04x\n", "revision", card->info);
++ seq_printf(m, "%-16s 0x%04x\n", "revision", card->info);
+ #elif defined (__fcpci__)
+- pprintf (page, &len, "%-16s %d\n", "class", card_id);
++ seq_printf(m, "%-16s %d\n", "class", card_id);
+ #endif
+- pprintf (page, &len, "%-16s %s\n", "ver_driver", temp);
+- pprintf (page, &len, "%-16s %s\n", "ver_cardtype", SHORT_LOGO);
++ seq_printf(m, "%-16s %s\n", "ver_driver", temp);
++ seq_printf(m, "%-16s %s\n", "ver_cardtype", SHORT_LOGO);
+
+ flag = ((unsigned char *) (ctrl->profile.manu))[3];
+ if (flag) {
+- pprintf(page, &len, "%-16s%s%s%s%s%s%s%s\n", "protocol",
++ seq_printf(m, "%-16s%s%s%s%s%s%s%s\n", "protocol",
+ (flag & 0x01) ? " DSS1" : "",
+ (flag & 0x02) ? " CT1" : "",
+ (flag & 0x04) ? " VN3" : "",
+@@ -534,21 +518,29 @@
+ }
+ flag = ((unsigned char *) (ctrl->profile.manu))[5];
+ if (flag) {
+- pprintf(page, &len, "%-16s%s%s%s%s\n", "linetype",
++ seq_printf(m, "%-16s%s%s%s%s\n", "linetype",
+ (flag & 0x01) ? " point to point" : "",
+ (flag & 0x02) ? " point to multipoint" : "",
+ (flag & 0x08) ? " leased line without D-channel" : "",
+ (flag & 0x04) ? " leased line with D-channel" : ""
+ );
+ }
+- if (len < ofs) {
+- return 0;
+- }
+- *eof = 1;
+- *start = page - ofs;
+- return ((count < len - ofs) ? count : len - ofs);
++ return 0;
+ } /* ctr_info */
+
++static int ctr_proc_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, ctr_info, PDE(inode)->data);
++}
++
++const struct file_operations ctr_proc_fops = {
++ .owner = THIS_MODULE,
++ .open = ctr_proc_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
+ /*---------------------------------------------------------------------------*\
+ \*---------------------------------------------------------------------------*/
+ static void __kcapi reset_ctrl (struct capi_ctr * ctrl) {
+@@ -626,7 +618,7 @@
+ ctrl->release_appl = release_appl;
+ ctrl->send_message = send_msg;
+ ctrl->procinfo = proc_info;
+- ctrl->ctr_read_proc = ctr_info;
++ ctrl->proc_fops = &ctr_proc_fops;
+ if (0 != (res = attach_capi_ctr (ctrl))) {
+ dec_use_count ();
+ stop (card);