summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-sound/peercast
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-sound/peercast')
-rw-r--r--media-sound/peercast/Manifest1
-rw-r--r--media-sound/peercast/files/peercast-0.1216-amd64.patch13
-rw-r--r--media-sound/peercast/files/peercast-0.1216-makefile.patch26
-rw-r--r--media-sound/peercast/files/peercast-0.1218-CVE-2008-2040.patch122
-rw-r--r--media-sound/peercast/files/peercast-0.1218-glibc-2.10.patch109
-rwxr-xr-xmedia-sound/peercast/files/peercast.initd28
-rw-r--r--media-sound/peercast/metadata.xml5
-rw-r--r--media-sound/peercast/peercast-0.1218-r2.ebuild53
8 files changed, 357 insertions, 0 deletions
diff --git a/media-sound/peercast/Manifest b/media-sound/peercast/Manifest
new file mode 100644
index 000000000000..a3f1c72cab2f
--- /dev/null
+++ b/media-sound/peercast/Manifest
@@ -0,0 +1 @@
+DIST peercast-0.1218-src.tgz 557909 RMD160 316c88ea087cc985ab172612eea6455140c1bf96 SHA1 1e6f7ecdad01e0c29f03f6c401e3c9972c8d90b6 SHA256 d480e3bc5a23c2e7612c05503852888126210e7159d07e9c36bf5e3716569036
diff --git a/media-sound/peercast/files/peercast-0.1216-amd64.patch b/media-sound/peercast/files/peercast-0.1216-amd64.patch
new file mode 100644
index 000000000000..95144730d580
--- /dev/null
+++ b/media-sound/peercast/files/peercast-0.1216-amd64.patch
@@ -0,0 +1,13 @@
+Index: work/core/common/sys.h
+===================================================================
+--- work.orig/core/common/sys.h
++++ work/core/common/sys.h
+@@ -322,7 +322,7 @@ public:
+ #define _BIG_ENDIAN 1
+ #endif
+
+-typedef long long int64_t;
++#include <stdint.h>
+
+ typedef int (*THREAD_FUNC)(ThreadInfo *);
+ #define THREAD_PROC int
diff --git a/media-sound/peercast/files/peercast-0.1216-makefile.patch b/media-sound/peercast/files/peercast-0.1216-makefile.patch
new file mode 100644
index 000000000000..e54c4ae622de
--- /dev/null
+++ b/media-sound/peercast/files/peercast-0.1216-makefile.patch
@@ -0,0 +1,26 @@
+Index: work/ui/linux/makefile
+===================================================================
+--- work.orig/ui/linux/makefile
++++ work/ui/linux/makefile
+@@ -79,10 +79,10 @@ clean:
+ rm -f $(LINUXOBJ) $(COREOBJ) $(TARGET) ${LIBOBJSTATIC} ${LIBOBJSHARED} $(COREOBJSTATIC)
+
+ %.o: %.cpp
+- $(CC) $(INCLUDES) $(CPPFLAGS) -fPIC -c $< -o $@
++ $(CC) $(CXXFLAGS) $(INCLUDES) $(CPPFLAGS) -fPIC -c $< -o $@
+
+ %.a: %.cpp
+- $(CC) $(INCLUDES) $(CPPFLAGS) -c $< -o $@
++ $(CC) $(CXXFLAGS) $(INCLUDES) $(CPPFLAGS) -c $< -o $@
+
+ DEPENDFILE = makedepend
+
+@@ -92,7 +92,7 @@ depend:
+ $(CC) $(INCLUDES) $(CPPFLAGS) -MD $(CORESOURCE) $(LINUXSOURCE) >> $(DEPENDFILE)
+
+ peercast-so: $(COREOBJSTATIC) $(COREOBJ) $(LINUXOBJ)
+- $(LD) $(LDSOFLAGS),$(LIBSONAME) -o ${LIBOBJSHARED} $(COREOBJ) -lc
++ $(LD) $(LDFLAGS) $(LDSOFLAGS),$(LIBSONAME) -o ${LIBOBJSHARED} $(COREOBJ) -lc
+ $(LD) $(LDFLAGS) -o $@ $(LINUXOBJ) $(LIBOBJSHARED) -ldl
+ ${AR} rcs $(LIBOBJSTATIC) $(COREOBJSTATIC)
+
diff --git a/media-sound/peercast/files/peercast-0.1218-CVE-2008-2040.patch b/media-sound/peercast/files/peercast-0.1218-CVE-2008-2040.patch
new file mode 100644
index 000000000000..23037ac82b74
--- /dev/null
+++ b/media-sound/peercast/files/peercast-0.1218-CVE-2008-2040.patch
@@ -0,0 +1,122 @@
+diff -Nurad peercast-0.1218+svn20080104/core/common/channel.cpp peercast-0.1218+svn20080104.new/core/common/channel.cpp
+--- peercast-0.1218+svn20080104/core/common/channel.cpp 2008-04-01 13:59:52.000000000 +0200
++++ peercast-0.1218+svn20080104.new/core/common/channel.cpp 2008-04-30 17:45:28.000000000 +0200
+@@ -440,7 +440,7 @@
+ if (http.isHeader(PCX_HS_POS))
+ streamPos = atoi(arg);
+ else
+- Servent::readICYHeader(http, info, NULL);
++ Servent::readICYHeader(http, info, NULL, 0);
+
+ LOG_CHANNEL("Channel fetch: %s",http.cmdLine);
+ }
+diff -Nurad peercast-0.1218+svn20080104/core/common/http.cpp peercast-0.1218+svn20080104.new/core/common/http.cpp
+--- peercast-0.1218+svn20080104/core/common/http.cpp 2008-04-01 13:59:52.000000000 +0200
++++ peercast-0.1218+svn20080104.new/core/common/http.cpp 2008-04-30 17:45:28.000000000 +0200
+@@ -102,7 +102,7 @@
+ return 0;
+ }
+ //-----------------------------------------
+-void HTTP::getAuthUserPass(char *user, char *pass)
++void HTTP::getAuthUserPass(char *user, char *pass, size_t ulen, size_t plen)
+ {
+ if (arg)
+ {
+@@ -119,10 +119,14 @@
+ if (s)
+ {
+ *s = 0;
+- if (user)
+- strcpy(user,str.cstr());
+- if (pass)
+- strcpy(pass,s+1);
++ if (user){
++ strncpy(user,str.cstr(), ulen);
++ user[ulen - 1] = 0;
++ }
++ if (pass){
++ strncpy(pass,s+1, plen);
++ pass[plen - 1] = 0;
++ }
+ }
+ }
+ }
+diff -Nurad peercast-0.1218+svn20080104/core/common/http.h peercast-0.1218+svn20080104.new/core/common/http.h
+--- peercast-0.1218+svn20080104/core/common/http.h 2008-04-01 13:59:52.000000000 +0200
++++ peercast-0.1218+svn20080104.new/core/common/http.h 2008-04-30 17:45:28.000000000 +0200
+@@ -176,7 +176,7 @@
+ char *getArgStr();
+ int getArgInt();
+
+- void getAuthUserPass(char *, char *);
++ void getAuthUserPass(char *, char *, size_t, size_t);
+
+ char cmdLine[8192],*arg;
+
+diff -Nurad peercast-0.1218+svn20080104/core/common/servent.h peercast-0.1218+svn20080104.new/core/common/servent.h
+--- peercast-0.1218+svn20080104/core/common/servent.h 2008-04-01 13:59:52.000000000 +0200
++++ peercast-0.1218+svn20080104.new/core/common/servent.h 2008-04-30 17:45:28.000000000 +0200
+@@ -206,7 +206,7 @@
+ void sendPCPChannel();
+ void checkPCPComms(Channel *, AtomStream &);
+
+- static void readICYHeader(HTTP &, ChanInfo &, char *);
++ static void readICYHeader(HTTP &, ChanInfo &, char *, size_t);
+ bool canStream(Channel *);
+
+ bool isConnected() {return status == S_CONNECTED;}
+diff -Nurad peercast-0.1218+svn20080104/core/common/servhs.cpp peercast-0.1218+svn20080104.new/core/common/servhs.cpp
+--- peercast-0.1218+svn20080104/core/common/servhs.cpp 2008-04-01 13:59:52.000000000 +0200
++++ peercast-0.1218+svn20080104.new/core/common/servhs.cpp 2008-04-30 17:45:28.000000000 +0200
+@@ -587,7 +587,7 @@
+ {
+ case ServMgr::AUTH_HTTPBASIC:
+ if (http.isHeader("Authorization"))
+- http.getAuthUserPass(user,pass);
++ http.getAuthUserPass(user,pass, sizeof(user), sizeof(pass));
+ break;
+ case ServMgr::AUTH_COOKIE:
+ if (http.isHeader("Cookie"))
+@@ -1405,7 +1405,7 @@
+
+ }
+ // -----------------------------------
+-void Servent::readICYHeader(HTTP &http, ChanInfo &info, char *pwd)
++void Servent::readICYHeader(HTTP &http, ChanInfo &info, char *pwd, size_t plen)
+ {
+ char *arg = http.getArgStr();
+ if (!arg) return;
+@@ -1429,8 +1429,10 @@
+ info.desc.set(arg,String::T_ASCII);
+ info.desc.convertTo(String::T_UNICODE);
+
+- }else if (http.isHeader("Authorization"))
+- http.getAuthUserPass(NULL,pwd);
++ }else if (http.isHeader("Authorization")){
++ if(pwd)
++ http.getAuthUserPass(NULL,pwd, 0, plen);
++ }
+ else if (http.isHeader(PCX_HS_CHANNELID))
+ info.id.fromStr(arg);
+ else if (http.isHeader("ice-password"))
+@@ -1501,7 +1503,7 @@
+ while (http.nextHeader())
+ {
+ LOG_DEBUG("ICY %s",http.cmdLine);
+- readICYHeader(http,info,loginPassword.cstr());
++ readICYHeader(http,info,loginPassword.cstr(), String::MAX_LEN);
+ }
+
+
+diff -Nurad peercast-0.1218+svn20080104/core/common/url.cpp peercast-0.1218+svn20080104.new/core/common/url.cpp
+--- peercast-0.1218+svn20080104/core/common/url.cpp 2008-04-01 13:59:52.000000000 +0200
++++ peercast-0.1218+svn20080104.new/core/common/url.cpp 2008-04-30 17:45:28.000000000 +0200
+@@ -171,7 +171,7 @@
+ LOG_CHANNEL("Fetch HTTP: %s",http.cmdLine);
+
+ ChanInfo tmpInfo = ch->info;
+- Servent::readICYHeader(http,ch->info,NULL);
++ Servent::readICYHeader(http,ch->info,NULL, 0);
+
+ if (!tmpInfo.name.isEmpty())
+ ch->info.name = tmpInfo.name;
diff --git a/media-sound/peercast/files/peercast-0.1218-glibc-2.10.patch b/media-sound/peercast/files/peercast-0.1218-glibc-2.10.patch
new file mode 100644
index 000000000000..3f290578dd50
--- /dev/null
+++ b/media-sound/peercast/files/peercast-0.1218-glibc-2.10.patch
@@ -0,0 +1,109 @@
+Index: work/core/common/common.h
+===================================================================
+--- work.orig/core/common/common.h
++++ work/core/common/common.h
+@@ -274,7 +274,7 @@ inline int strToID(char *str)
+ }
+
+ // -----------------------------------
+-char *getCGIarg(const char *str, const char *arg);
++const char *getCGIarg(const char *str, const char *arg);
+ bool cmpCGIarg(char *str, char *arg, char *value);
+ bool hasCGIarg(char *str, char *arg);
+
+Index: work/core/common/html.cpp
+===================================================================
+--- work.orig/core/common/html.cpp
++++ work/core/common/html.cpp
+@@ -103,7 +103,7 @@ void HTML::writeVariable(Stream &s,const
+ r = true;
+ }else if (varName.startsWith("loop.hit."))
+ {
+- char *idstr = getCGIarg(tmplArgs,"id=");
++ const char *idstr = getCGIarg(tmplArgs,"id=");
+ if (idstr)
+ {
+ GnuID id;
+@@ -136,7 +136,7 @@ void HTML::writeVariable(Stream &s,const
+ {
+ if (varName.startsWith("page.channel."))
+ {
+- char *idstr = getCGIarg(tmplArgs,"id=");
++ const char *idstr = getCGIarg(tmplArgs,"id=");
+ if (idstr)
+ {
+ GnuID id;
+@@ -150,7 +150,7 @@ void HTML::writeVariable(Stream &s,const
+
+ String v = varName+5;
+ v.append('=');
+- char *a = getCGIarg(tmplArgs,v);
++ const char *a = getCGIarg(tmplArgs,v);
+ if (a)
+ {
+ s.writeString(a);
+Index: work/core/common/sys.cpp
+===================================================================
+--- work.orig/core/common/sys.cpp
++++ work/core/common/sys.cpp
+@@ -740,12 +740,12 @@ void LogBuffer::write(const char *str, T
+ }
+
+ // -----------------------------------
+-char *getCGIarg(const char *str, const char *arg)
++const char *getCGIarg(const char *str, const char *arg)
+ {
+ if (!str)
+ return NULL;
+
+- char *s = strstr(str,arg);
++ const char *s = strstr(str,arg);
+
+ if (!s)
+ return NULL;
+Index: work/core/common/servhs.cpp
+===================================================================
+--- work.orig/core/common/servhs.cpp
++++ work/core/common/servhs.cpp
+@@ -150,10 +150,10 @@ void Servent::handshakeHTTP(HTTP &http,
+ if (!isAllowed(ALLOW_BROADCAST))
+ throw HTTPException(HTTP_SC_UNAVAILABLE,503);
+
+- char *pwdArg = getCGIarg(fn,"pass=");
+- char *songArg = getCGIarg(fn,"song=");
+- char *mountArg = getCGIarg(fn,"mount=");
+- char *urlArg = getCGIarg(fn,"url=");
++ const char *pwdArg = getCGIarg(fn,"pass=");
++ const char *songArg = getCGIarg(fn,"song=");
++ const char *mountArg = getCGIarg(fn,"mount=");
++ const char *urlArg = getCGIarg(fn,"url=");
+
+ if (pwdArg && songArg)
+ {
+@@ -560,7 +560,7 @@ bool Servent::handshakeAuth(HTTP &http,c
+ char user[64],pass[64];
+ user[0] = pass[0] = 0;
+
+- char *pwd = getCGIarg(args, "pass=");
++ const char *pwd = getCGIarg(args, "pass=");
+
+ if ((pwd) && strlen(servMgr->password))
+ {
+@@ -671,7 +671,7 @@ void Servent::handshakeCMD(char *cmd)
+ {
+ if (cmpCGIarg(cmd,"cmd=","redirect"))
+ {
+- char *j = getCGIarg(cmd,"url=");
++ const char *j = getCGIarg(cmd,"url=");
+ if (j)
+ {
+ termArgs(cmd);
+@@ -1079,7 +1079,7 @@ void Servent::handshakeCMD(char *cmd)
+ index++;
+ }
+
+- char *findArg = getCGIarg(cmd,"keywords=");
++ const char *findArg = getCGIarg(cmd,"keywords=");
+
+ if (hasCGIarg(cmd,"relay"))
+ {
diff --git a/media-sound/peercast/files/peercast.initd b/media-sound/peercast/files/peercast.initd
new file mode 100755
index 000000000000..d0adc83d00bd
--- /dev/null
+++ b/media-sound/peercast/files/peercast.initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile=/var/run/peercast.pid
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting peercast daemon"
+ start-stop-daemon --start --quiet --background \
+ --make-pidfile --pidfile ${pidfile} \
+ --chuid nobody:audio \
+ --exec /usr/sbin/peercast -- \
+ -i /usr/share/peercast/peercast.ini \
+ -l /var/log/peercast.log \
+ -P /usr/share/peercast
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping peercast daemon"
+ start-stop-daemon --stop --quiet --pidfile ${pidfile}
+ eend $?
+}
diff --git a/media-sound/peercast/metadata.xml b/media-sound/peercast/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-sound/peercast/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sound</herd>
+</pkgmetadata>
diff --git a/media-sound/peercast/peercast-0.1218-r2.ebuild b/media-sound/peercast/peercast-0.1218-r2.ebuild
new file mode 100644
index 000000000000..95282832db57
--- /dev/null
+++ b/media-sound/peercast/peercast-0.1218-r2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A client and server for Peercast P2P-radio network"
+HOMEPAGE="http://www.peercast.org"
+SRC_URI="http://www.peercast.org/src/${P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND=""
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-CVE-2008-2040.patch \
+ "${FILESDIR}"/${PN}-0.1216-makefile.patch \
+ "${FILESDIR}"/${PN}-0.1216-amd64.patch \
+ "${FILESDIR}"/${P}-glibc-2.10.patch
+}
+
+src_compile() {
+ append-ldflags -pthread
+
+ cd ui/linux
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" LDFLAGS="${LDFLAGS}" \
+ LD="$(tc-getCXX)" || die "emake failed"
+}
+
+src_install() {
+ dosbin ui/linux/peercast
+
+ insinto /usr/share/peercast
+ doins -r ui/html
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+}
+
+pkg_postinst() {
+ elog "Start Peercast with '/etc/init.d/peercast start' and point your"
+ elog "webbrowser to 'http://localhost:7144' to start using Peercast."
+ elog
+ elog "You can also run 'rc-update add peercast default' to make Peercast"
+ elog "start at boot."
+}