summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2009-03-01 14:07:03 +0000
committerPatrick Lauer <patrick@gentoo.org>2009-03-01 14:07:03 +0000
commitaa39d8e4ad9b7e4fc7882a0a689c535aeb401b98 (patch)
treed09e372b5984b48620fc3606d5c9dc5472b281cd /media-sound/edna
parentReally fix bug 232636. export LC_ALL=C (diff)
downloadhistorical-aa39d8e4ad9b7e4fc7882a0a689c535aeb401b98.tar.gz
historical-aa39d8e4ad9b7e4fc7882a0a689c535aeb401b98.tar.bz2
historical-aa39d8e4ad9b7e4fc7882a0a689c535aeb401b98.zip
Bump to 0.6. Fixes #137569. Patches by Chris Mayo.
Package-Manager: portage-2.2_rc23/cvs/Linux x86_64
Diffstat (limited to 'media-sound/edna')
-rw-r--r--media-sound/edna/ChangeLog12
-rw-r--r--media-sound/edna/Manifest10
-rw-r--r--media-sound/edna/edna-0.6.ebuild71
-rw-r--r--media-sound/edna/files/edna-0.6-SystemExit.patch11
-rw-r--r--media-sound/edna/files/edna-0.6-daemon.patch67
-rw-r--r--media-sound/edna/files/edna-0.6-flac.patch79
-rw-r--r--media-sound/edna/files/edna-0.6-syslog.patch83
-rw-r--r--media-sound/edna/files/edna.gentoo19
8 files changed, 339 insertions, 13 deletions
diff --git a/media-sound/edna/ChangeLog b/media-sound/edna/ChangeLog
index 46070c8545fa..0b89739445a5 100644
--- a/media-sound/edna/ChangeLog
+++ b/media-sound/edna/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for media-sound/edna
-# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/edna/ChangeLog,v 1.27 2007/02/22 00:57:12 peper Exp $
+# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/edna/ChangeLog,v 1.28 2009/03/01 14:07:03 patrick Exp $
+
+*edna-0.6 (01 Mar 2009)
+
+ 01 Mar 2009; Patrick Lauer <patrick@gentoo.org>
+ +files/edna-0.6-SystemExit.patch, +files/edna-0.6-daemon.patch,
+ +files/edna-0.6-flac.patch, +files/edna-0.6-syslog.patch,
+ files/edna.gentoo, +edna-0.6.ebuild:
+ Bump to 0.6. Fixes #137569. Patches by Chris Mayo.
22 Feb 2007; Piotr Jaroszyński <peper@gentoo.org> ChangeLog:
Transition to Manifest2.
diff --git a/media-sound/edna/Manifest b/media-sound/edna/Manifest
index d201a0617781..944768e99ed1 100644
--- a/media-sound/edna/Manifest
+++ b/media-sound/edna/Manifest
@@ -1,7 +1,13 @@
AUX edna-0.5-pep-0263.patch 317 RMD160 850793cb853123695acb8fe8276126346876c111 SHA1 3278f364e6871f2ab356e20a940e6481af068934 SHA256 eba488c71fdccfeb0e6caaeda263e7c01933a1d05d8d274396662bb8d964a27e
-AUX edna.gentoo 585 RMD160 7e5ffefa80094ca61131979a728393d0b65c1d40 SHA1 d45cd7a117a84653fbebbb1fcdbf2b2e99e600e4 SHA256 574ea1b983c50e4c4908ad2fc35d631a263d137f96b8c78a36bd592b9e21e4a6
+AUX edna-0.6-SystemExit.patch 357 RMD160 bf043fe4ebfc12cfd130552022371c5b8ae926b8 SHA1 5555640f8ee2a999a06bd3692d80426c596ea02f SHA256 530edecafcce36325efa7a68bb44438141639cc2d46bcda6cdf647ae28477cbf
+AUX edna-0.6-daemon.patch 2160 RMD160 a40da9f232c166e0c5a90faa559c7e46860454a1 SHA1 38c4197267cbd082c9ba3242868f93ddc4677d0e SHA256 eda1dc40464a031f816f1023978bb2f7180532cd1e3d134d9bbf52f37cdb7fcd
+AUX edna-0.6-flac.patch 1989 RMD160 bdeb4f744c2faef539f87cb1d57ee7dccd9bda9f SHA1 04e93c520240e4b0ee88b4958f80fd5c9d369cec SHA256 ff09556d11afa9c3681c71e6223f0fe1de10f7f4e345023ef4f6ebd45f80bea8
+AUX edna-0.6-syslog.patch 2455 RMD160 5c9dbf707b653f63d79fa60bc69df9e4ead03466 SHA1 58b8d27ec56303a04a99dc13b36ef74e4cdf8a6b SHA256 0f1afbe35cffbb0cd355ef658e2fee142f9e05e7e798a989dd08a0cf850cb453
+AUX edna.gentoo 594 RMD160 6b0c0ceb5911faee458040b3575d4367996ac725 SHA1 4a30ab16f1b93b2e37414a6c8e723279f694ede2 SHA256 4c2bc86ab3505f0756b4c1fa28fa24bbce451d5f4972fb1b2df41c84acacb34f
DIST edna-0.5.tar.gz 85785 RMD160 38319a59268499a39ee97424edc2b223f3a344c4 SHA1 cb6cb35bce6c3bf14cba074925b6d37fb4345bc1 SHA256 334e9b9a487757bde196470933a006b4511336d81d47a77e4dceed96bfe4937f
+DIST edna-0.6.tar.gz 50303 RMD160 07fceaf28b7e091467cc18fd3d514495c0e50440 SHA1 277f4b224d076394345f1edc002a17800a6c2cd0 SHA256 601aea3af9fe37407cd9523978e69c71785e09b5d8d57ca911a74c3ce3740c4c
EBUILD edna-0.5-r4.ebuild 1597 RMD160 d15c137c3d065f8e1f32fb40e384cd5ed7176de9 SHA1 81a268c1e4bcf2157b25e31a7c14c2764bb93944 SHA256 b0e923b54a6b8c90d97257320ae3c8c0333765575a2a17c6e22049910ed647c8
EBUILD edna-0.5-r5.ebuild 1758 RMD160 13d4fd83672550914394b11618d779444ca624cd SHA1 4f8436adccf7de47d042d0bc7c82d04bd79577d7 SHA256 49ebea1b652c41d5e384cb9cc069d3a923871ed70c78fe2cdf6b98702c9eb78c
-MISC ChangeLog 3341 RMD160 ac6beff896cfc0262e5e5a49bb92bdd268ff08ac SHA1 028918c1b73bcc47703c306bf653296150d53f80 SHA256 cecd88917e18efffdd7cb7f0a00ee74c3ef267cdc78c043b61df74ba1134cc89
+EBUILD edna-0.6.ebuild 2076 RMD160 1d322cc5ef705a2edf9492c9938bf6aeac570cdc SHA1 a389e1fb23f2a98952edfaee92aa5f836f650358 SHA256 6ec09e6bccf6471105ad8c97aef995d800deb3294c1f770445cfe7961e4cd86f
+MISC ChangeLog 3637 RMD160 f42037128fe6fc6f00636373e495148d0b1ac3c4 SHA1 6386bc015727a1126b798af3228a67d2e4aff139 SHA256 daf761cb7170f73841b7ae787efc3a57c0128f8517804a2b61e7cce9c5320e11
MISC metadata.xml 330 RMD160 15abb2fc2786bf6dbda1a48b0bd2e51028a85d37 SHA1 43c0bb1be43f31604352caa50c0c4929fc0fb78a SHA256 691fb9397d2913866ca08147165b309ccfb120a1720a28d4d01977e2f8fcf25c
diff --git a/media-sound/edna/edna-0.6.ebuild b/media-sound/edna/edna-0.6.ebuild
new file mode 100644
index 000000000000..ed855fb00934
--- /dev/null
+++ b/media-sound/edna/edna-0.6.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/edna/edna-0.6.ebuild,v 1.1 2009/03/01 14:07:03 patrick Exp $
+
+inherit eutils
+
+IUSE="flac vorbis"
+
+DESCRIPTION="Greg Stein's python streaming audio server for desktop or LAN use"
+HOMEPAGE="http://edna.sourceforge.net/"
+
+SRC_URI="mirror://sourceforge/edna/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+
+DEPEND="|| ( >=dev-lang/python-2.5 ( >=dev-lang/python-2.3 >=dev-python/ctypes-1.0.0 ) )
+ flac? ( media-libs/mutagen )
+ oggvorbis? ( dev-python/pyogg )"
+RDEPEND=${DEPEND}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${P}"-SystemExit.patch
+ epatch "${FILESDIR}/${P}"-flac.patch
+ epatch "${FILESDIR}/${P}"-daemon.patch
+ epatch "${FILESDIR}/${P}"-syslog.patch
+}
+
+src_install() {
+ einfo "Installing in daemon mode"
+ newinitd "${FILESDIR}"/edna.gentoo edna
+
+ dodir /usr/bin /usr/$(get_libdir)/edna /usr/$(get_libdir)/edna/templates
+ exeinto /usr/bin ; newexe edna.py edna
+ exeinto /usr/$(get_libdir)/edna ; doexe ezt.py
+ exeinto /usr/$(get_libdir)/edna ; doexe MP3Info.py
+ insinto /usr/$(get_libdir)/edna/templates
+ insopts -m 644
+ doins templates/*
+ insinto /usr/$(get_libdir)/edna/resources
+ doins resources/*
+
+ insinto /etc/edna
+ insopts -m 644
+ doins edna.conf
+ dosym /usr/$(get_libdir)/edna/resources /etc/edna/resources
+ dosym /usr/$(get_libdir)/edna/templates /etc/edna/templates
+
+ dodoc README ChangeLog
+ dohtml -r www/*
+}
+
+pkg_postinst() {
+ enewgroup edna
+ enewuser edna -1 -1 -1 edna
+
+ einfo
+ einfo "Edit edna.conf to taste before starting (multiple source"
+ einfo "directories are allowed). Test edna from a shell prompt"
+ einfo "until you have it configured properly, then add edna to"
+ einfo "the default runlevel when you're ready. Add the USE flag"
+ einfo "vorbis if you want edna to serve ogg files."
+ einfo
+ einfo "See edna.conf and the html docs for more info, and set"
+ einfo "PYTHONPATH=/usr/lib/edna to run from a shell prompt."
+ einfo
+}
diff --git a/media-sound/edna/files/edna-0.6-SystemExit.patch b/media-sound/edna/files/edna-0.6-SystemExit.patch
new file mode 100644
index 000000000000..78aec6f3176a
--- /dev/null
+++ b/media-sound/edna/files/edna-0.6-SystemExit.patch
@@ -0,0 +1,11 @@
+--- edna.py.orig 2007-01-27 15:31:00.000000000 +0000
++++ edna.py 2007-01-27 16:03:30.000000000 +0000
+@@ -1159,7 +1159,7 @@
+
+ if os.path.isfile(fname) != 1:
+ print "edna: %s:No such file" %fname
+- raise systemExit
++ raise SystemExit
+
+ if daemon_mode:
+ daemonize('/dev/null', '/var/log/edna.log', '/var/log/edna.log', '/var/run/edna.pid')
diff --git a/media-sound/edna/files/edna-0.6-daemon.patch b/media-sound/edna/files/edna-0.6-daemon.patch
new file mode 100644
index 000000000000..e003689956a7
--- /dev/null
+++ b/media-sound/edna/files/edna-0.6-daemon.patch
@@ -0,0 +1,67 @@
+--- edna.py.orig 2007-01-27 18:49:16.000000000 +0000
++++ edna.py 2007-01-27 18:47:19.000000000 +0000
+@@ -36,7 +36,9 @@
+ import string
+ import os
+ import cgi
++import ctypes
+ import urllib
++import pwd
+ import socket
+ import re
+ import stat
+@@ -1149,7 +1151,7 @@
+ print ' if config-file is not specified, then edna.conf is used'
+ sys.exit(0)
+
+-def daemonize(stdin='/dev/null', stdout='/dev/null', stderr='/dev/null',pname=''):
++def daemonize(stdin='/dev/null', stdout='/dev/null', stderr='/dev/null', pname='', uid = None):
+ '''This forks the current process into a daemon.
+ The stdin, stdout, and stderr arguments are file names that
+ will be opened and be used to replace the standard file descriptors
+@@ -1159,6 +1161,11 @@
+ if it shares a file with stdout then interleaved output
+ may not appear in the order that you expect.
+ '''
++ # Rename process in /proc/<pid>/stat from python to edna
++ # (helps start-stop-daemon find us)
++ libc = ctypes.CDLL('/lib/libc.so.6')
++ libc.prctl(15, 'edna\0', 0, 0, 0)
++
+ # Do first fork.
+ try:
+ pid = os.fork()
+@@ -1186,6 +1193,8 @@
+ sys.stderr.write("fork #2 failed: (%d) %s\n" % (e.errno, e.strerror) )
+ sys.exit(1)
+ # Now I am a daemon!
++ # If specified change the process owner
++ if uid: os.setuid(uid)
+ # Redirect standard file descriptors.
+ si = open(stdin, 'r')
+ so = open(stdout, 'a+')
+@@ -1198,9 +1207,16 @@
+ if __name__ == '__main__':
+ fname = 'edna.conf'
+ daemon_mode=0
++ uid = os.getuid()
++ pidfile = '/var/run/edna.pid'
+ for a in sys.argv[1:]:
+ if a == "--daemon":
+ daemon_mode=1
++ elif a.startswith("--user"):
++ uname = a.split("=")[1].strip()
++ uid = pwd.getpwnam(uname)[2]
++ elif a.startswith("--pidfile"):
++ pidfile = a.split("=")[1].strip()
+ elif a == "--help" or a == "-h" or string.find(a, '--')==0:
+ usage()
+ else:
+@@ -1211,6 +1227,6 @@
+ raise SystemExit
+
+ if daemon_mode:
+- daemonize('/dev/null', '/var/log/edna.log', '/var/log/edna.log', '/var/run/edna.pid')
++ daemonize(uid = uid, pname = pidfile)
+
+ run_server(fname)
diff --git a/media-sound/edna/files/edna-0.6-flac.patch b/media-sound/edna/files/edna-0.6-flac.patch
new file mode 100644
index 000000000000..b22687d2fb05
--- /dev/null
+++ b/media-sound/edna/files/edna-0.6-flac.patch
@@ -0,0 +1,79 @@
+--- edna.py.orig 2007-01-31 19:25:14.000000000 +0000
++++ edna.py 2007-01-31 20:55:09.000000000 +0000
+@@ -64,6 +64,12 @@
+ oggSupport = 'no'
+
+ try:
++ from mutagen.flac import FLAC
++ flacSupport = True
++except ImportError:
++ flacSupport = False
++
++try:
+ import cStringIO
+ StringIO = cStringIO
+ except ImportError:
+@@ -920,6 +926,9 @@
+ if ext == '.ogg':
+ info = OggInfo(fullpath)
+ self.__dict__.update(info.__dict__)
++ elif ext == '.flac':
++ info = FlacInfo(fullpath)
++ self.__dict__.update(info.__dict__)
+ else:
+ info = MP3Info.MP3Info(open(fullpath, 'rb'))
+ self.__dict__.update(info.__dict__)
+@@ -1001,6 +1010,45 @@
+ self.transcoded = val
+ self.valid = 1
+
++class FlacInfo:
++ def __init__(self, name):
++ # Setup the defaults
++ self.valid = 0
++ self.total_time = 0
++ self.samplerate = 'unknown'
++ self.bitrate = 'unknown'
++ self.mode = ''
++ self.mode_extension = ''
++
++ if not flacSupport: return
++
++ mflac = FLAC(name)
++ streaminfo = mflac.metadata_blocks[0]
++
++ self.samplerate = streaminfo.sample_rate
++ self.total_time = streaminfo.length
++ self.bitrate =int(round((streaminfo.bits_per_sample * streaminfo.total_samples) / streaminfo.length))
++ self.filesize = os.path.getsize(name) / (1024 ** 2)
++
++ for key, val in mflac.tags:
++ if key == 'TITLE':
++ self.title = val
++ elif key == 'ARTIST':
++ self.artist = val
++ elif key == 'ALBUM':
++ self.album = val
++ elif key == 'DATE':
++ self.year = val
++ elif key == 'GENRE':
++ self.genre = val
++ elif key == 'VENDOR':
++ self.vendor = val
++ elif key == 'TRACKNUMBER':
++ self.track = val
++ elif key == 'DESCRIPTION':
++ self.comment = val
++
++ self.valid = 1
+
+ def _usable_file(fname):
+ return fname[0] != '.'
+@@ -1044,6 +1092,7 @@
+ '.avi' : 'video/x-msvideo',
+ '.mpg' : 'video/mpeg',
+ '.ogg' : 'application/x-ogg',
++ '.flac' : 'audio/x-flac',
+ '.m4a' : 'audio/mp4',
+ '.mp4' : 'video/mp4',
+ }
diff --git a/media-sound/edna/files/edna-0.6-syslog.patch b/media-sound/edna/files/edna-0.6-syslog.patch
new file mode 100644
index 000000000000..4ff0bbf8bdb9
--- /dev/null
+++ b/media-sound/edna/files/edna-0.6-syslog.patch
@@ -0,0 +1,83 @@
+--- edna.py.orig 2007-01-27 18:53:24.000000000 +0000
++++ edna.py 2007-01-27 18:58:38.000000000 +0000
+@@ -42,6 +42,7 @@
+ import socket
+ import re
+ import stat
++import syslog
+ import random
+ import time
+ import struct
+@@ -144,6 +145,12 @@
+ self.log = open(log, 'a')
+ except IOError:
+ pass
++ else:
++ try:
++ syslog.openlog('edna')
++ self.log = True
++ except:
++ pass
+
+ template_path = config.get('server', 'template-dir')
+ template_file = config.get('server', 'template')
+@@ -254,7 +261,7 @@
+ (config.get('server', 'binding-hostname'), self.port),
+ EdnaRequestHandler)
+ except socket.error, value:
+- self.log_message( "edna: bind(): %s" % str(value[1]) )
++ self.log_message( "bind(): %s" % str(value[1]) )
+ raise SystemExit
+
+ def server_bind(self):
+@@ -290,12 +297,17 @@
+ return 0
+
+ def log_message(self, msg):
+- if self.log:
+- try:
+- self.log.write(msg + '\n')
+- self.log.flush()
+- except IOError:
+- pass
++ if self.log == True:
++ try:
++ syslog.syslog(msg)
++ except:
++ pass
++ elif self.log:
++ try:
++ self.log.write('edna: ' + msg + '\n')
++ self.log.flush()
++ except IOError:
++ pass
+
+ def debug_message(self, msg):
+ if debug_level<1:
+@@ -1125,21 +1137,21 @@
+
+ svr = Server(fname)
+ if oggSupport == 'yes':
+- svr.log_message('edna: Ogg Vorbis support enabled')
++ svr.log_message('Ogg Vorbis support enabled')
+ else:
+- svr.log_message('edna: Ogg Vorbis support disabled, to enable it you will need to install the "pyogg" and the "pyvorbis" modules')
++ svr.log_message('Ogg Vorbis support disabled, to enable it you will need to install the "pyogg" and the "pyvorbis" modules')
+
+- svr.log_message("edna: serving on port %d..." % svr.port)
++ svr.log_message("serving on port %d..." % svr.port)
+ try:
+ while running:
+ # print 'waiting ... '
+ if config_needed:
+- svr.log_message('edna: Reloading config %s' % fname)
++ svr.log_message('Reloading config %s' % fname)
+ svr.server_close()
+ svr = Server(fname)
+ config_needed = None
+ svr.handle_request()
+- svr.log_message ("edna: exiting")
++ svr.log_message ("exiting")
+ sys.exit(0)
+ except KeyboardInterrupt:
+ print "\nCaught ctr-c, taking down the server"
diff --git a/media-sound/edna/files/edna.gentoo b/media-sound/edna/files/edna.gentoo
index cf46fc45398f..04660e0ffe3f 100644
--- a/media-sound/edna/files/edna.gentoo
+++ b/media-sound/edna/files/edna.gentoo
@@ -7,24 +7,25 @@
# pidfile: /var/run/ednad.pid
# config:
-export PYTHONPATH=/usr/lib/edna
+PYTHONPATH=/usr/lib/edna
EDNA=/usr/bin/edna
EDNACONF=/etc/edna/edna.conf
PIDFILE=/var/run/edna.pid
+USER=edna
depend() {
- need local
+ need local
}
start() {
- ebegin "Starting ednad mp3 server"
- start-stop-daemon -m -b --start --quiet --pidfile $PIDFILE \
- --exec $EDNA -- $EDNACONF
- eend $?
+ ebegin "Starting edna mp3 server"
+ start-stop-daemon --env PYTHONPATH=$PYTHONPATH \
+ --start --exec $EDNA -- --daemon --user=$USER --pidfile=$PIDFILE $EDNACONF
+ eend $?
}
stop() {
- ebegin "Stopping ednad"
- start-stop-daemon -o --quiet --stop --pidfile $PIDFILE
- eend $?
+ ebegin "Stopping ednad"
+ start-stop-daemon --quiet --stop --pidfile $PIDFILE
+ eend $?
}