summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2011-06-30 10:16:21 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2011-06-30 10:16:21 +0000
commit1d7e1bbfa5cdb3e8d6785dd02a69a007f3f26479 (patch)
tree946fda195bd30b0525e790d0db465b3b91a3dec3 /sys-fs
parentStable on amd64 wrt bug #373415 (diff)
downloadgentoo-2-1d7e1bbfa5cdb3e8d6785dd02a69a007f3f26479.tar.gz
gentoo-2-1d7e1bbfa5cdb3e8d6785dd02a69a007f3f26479.tar.bz2
gentoo-2-1d7e1bbfa5cdb3e8d6785dd02a69a007f3f26479.zip
Initial import wrt bug 189304, thanks to everyone involved
(Portage version: 2.2.0_alpha41/cvs/Linux x86_64)
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/mtpfs/ChangeLog10
-rw-r--r--sys-fs/mtpfs/files/mtpfs-0.9-overflow.patch16
-rw-r--r--sys-fs/mtpfs/metadata.xml14
-rw-r--r--sys-fs/mtpfs/mtpfs-0.9.ebuild46
4 files changed, 86 insertions, 0 deletions
diff --git a/sys-fs/mtpfs/ChangeLog b/sys-fs/mtpfs/ChangeLog
new file mode 100644
index 000000000000..a686e5486d3a
--- /dev/null
+++ b/sys-fs/mtpfs/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sys-fs/mtpfs
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mtpfs/ChangeLog,v 1.1 2011/06/30 10:16:21 xarthisius Exp $
+
+*mtpfs-0.9 (30 Jun 2011)
+
+ 30 Jun 2011; Kacper Kowalik <xarthisius@gentoo.org> +mtpfs-0.9.ebuild,
+ +files/mtpfs-0.9-overflow.patch, +metadata.xml:
+ Initial import wrt bug 189304, thanks to everyone involved
+
diff --git a/sys-fs/mtpfs/files/mtpfs-0.9-overflow.patch b/sys-fs/mtpfs/files/mtpfs-0.9-overflow.patch
new file mode 100644
index 000000000000..dfc5e1576b24
--- /dev/null
+++ b/sys-fs/mtpfs/files/mtpfs-0.9-overflow.patch
@@ -0,0 +1,16 @@
+Prevent possible overflow of destination buffer, as
+strncat appends the first num characters of source
+to destination, _plus_ a terminating null-character.
+
+Patch written by Kacper Kowalik <xarthisius@gentoo.org>
+--- a/id3read.c
++++ b/id3read.c
+@@ -269,7 +269,7 @@
+ if (strlen (trackstr) == 1) {
+ strcat (trackno, "0");
+ }
+- strncat (trackno, trackstr, sizeof (trackno));
++ strncat (trackno, trackstr, sizeof (trackno)-1);
+ g_free (trackstr);
+ g_free (posstr);
+ } else {
diff --git a/sys-fs/mtpfs/metadata.xml b/sys-fs/mtpfs/metadata.xml
new file mode 100644
index 000000000000..fa496483d762
--- /dev/null
+++ b/sys-fs/mtpfs/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>xarthisius@gentoo.org</email>
+ <name>Kacper Kowalik</name>
+ </maintainer>
+ <longdescription>
+ MTPfs is a FUSE filesystem that supports reading and writing from any
+ MTP device, as supported by libmtp. MTPfs includes extra features such
+ as playlist and meta information support for MP3 players.
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-fs/mtpfs/mtpfs-0.9.ebuild b/sys-fs/mtpfs/mtpfs-0.9.ebuild
new file mode 100644
index 000000000000..03395eb4c700
--- /dev/null
+++ b/sys-fs/mtpfs/mtpfs-0.9.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mtpfs/mtpfs-0.9.ebuild,v 1.1 2011/06/30 10:16:21 xarthisius Exp $
+
+EAPI=4
+
+inherit base
+
+DESCRIPTION="A FUSE filesystem providing access to MTP devices"
+HOMEPAGE="http://www.adebenham.com/mtpfs/"
+SRC_URI="http://www.adebenham.com/debian/${P/-/_}.orig.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+DEPEND="dev-libs/glib:2
+ media-libs/libid3tag
+ media-libs/libmad
+ media-libs/libmtp
+ sys-fs/fuse"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${P}.orig
+
+PATCHES=( "${FILESDIR}"/${P}-overflow.patch )
+DOCS=(AUTHORS NEWS README)
+
+src_configure() {
+ econf $(use_enable debug)
+}
+
+pkg_postinst() {
+ einfo "To mount your MTP device, issue:"
+ einfo " /usr/bin/mtpfs <mountpoint>"
+ echo
+ einfo "To unmount your MTP device, issue:"
+ einfo " /usr/bin/fusermount -u <mountpoint>"
+
+ if use debug; then
+ echo
+ einfo "You have enabled debugging output."
+ einfo "Please make sure you run mtpfs with the -d flag."
+ fi
+}