update to icecast 2.0 now that is considered stable.

done by and new maintainer Moritz Grimm <gtgbr at gmx dot net>.
This commit is contained in:
fgsch 2004-02-02 19:32:36 +00:00
parent 6b4017e27e
commit 3768b09c9c
17 changed files with 263 additions and 210 deletions

View File

@ -1,27 +1,39 @@
# $OpenBSD: Makefile,v 1.22 2002/11/24 10:04:59 brad Exp $
# Uses pthreads
# $OpenBSD: Makefile,v 1.23 2004/02/02 19:32:36 fgsch Exp $
COMMENT= "Internet based broadcasting system"
COMMENT= "server for streaming Ogg Vorbis and MP3"
DISTNAME= icecast-1.3.12
DISTNAME= icecast-2.0.0
CATEGORIES= net audio
MASTER_SITES= http://www.icecast.org/releases/
HOMEPAGE= http://www.icecast.org/
MAINTAINER= Federico Schwindt <fgsch@openbsd.org>
MAINTAINER= Moritz Grimm <gtgbr@gmx.net>
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS= --with-crypt --with-libwrap
MASTER_SITES= http://icecast.org/files/
DOCS= AUTHORS BUGS CHANGES COPYING FAQ README
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= --localstatedir=/var
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
LIB_DEPENDS= curl.2::net/curl \
xslt.1::textproc/libxslt \
vorbis.2,vorbisenc.2::audio/libvorbis
SEPARATE_BUILD= simple
post-build:
@sed -e 's,##PREFIX##,${TRUEPREFIX},g' < ${FILESDIR}/README.OpenBSD > \
${WRKBUILD}/README.OpenBSD
post-install:
cd ${WRKSRC}; ${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/icecast
${INSTALL_DATA} ${WRKBUILD}/README.OpenBSD \
${PREFIX}/share/doc/icecast/README.OpenBSD
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
MD5 (icecast-1.3.12.tar.gz) = 69ba36d30722884ea538b70628f1de80
RMD160 (icecast-1.3.12.tar.gz) = 7b576dbc16103c01b5393880ab51c532662334a9
SHA1 (icecast-1.3.12.tar.gz) = bacb760390453718de536b85979ff3a9a73c7710
MD5 (icecast-2.0.0.tar.gz) = d3e902bee8c0a60ad7d5d054a2047aa1
RMD160 (icecast-2.0.0.tar.gz) = b9f16916914fbb256ed80ab8c72338588a0659fd
SHA1 (icecast-2.0.0.tar.gz) = 76f41f807bdff5dfb50d5b67075fc401de7e270a

View File

@ -0,0 +1,74 @@
Icecast v2 is very versatile and can be used in many different setups.
Because there is not "one true way" to install and configure it - every
user will have his individual preferences and needs (a streaming service
provider has different requirements than someone who wants to set up a
jukebox at home.)
To make things easier, here is a small step-by-step guide to get Icecast v2
running in a basic setup, which uses its chrooting feature and drops
privileges to an unprivileged account.
1. Read the documentation, so you know what you are doing. It is also
very helpful to know what Icecast v2 is doing for you, and what it
is not.
2. Create an unprivileged user _icecast - preferrably with an UID that
does not conflict with other ports, system UIDs or regular users.
I suggest something between 200 and 499.
# useradd -c "Icecast Server" -d /nonexistent -g =uid \
-s /sbin/nologin -u 200 _icecast
3. Create a working directory for Icecast.
# mkdir /var/icecast
4. Copy the examples into the working directory
# cp -R ##PREFIX##/share/examples/icecast/* /var/icecast
5. Create Icecast's log directory and logfiles, make them accessible
to the Icecast user.
# cd /var/icecast
# mkdir log
# touch log/error.log log/access.log
# chown _icecast:_icecast log/*.log
6. There is an icecast.xml.dist in /var/icecast - rename it and adjust it.
Consult the documentation and comments about the various options.
Important settings for this particular setup are outlined below.
# mv icecast.xml.dist icecast.xml
# chmod 600 icecast.xml
(Mode 600 is highly recommended; icecast.xml contains plain-text
passwords.)
Now load icecast.xml in your favorite editor, and:
Change <basedir> to /var/icecast
Change <logdir> to /log
Change <webroot> to /web
Change <adminroot> to /admin
Change <chroot> to 1
Uncomment the <changeowner> directive, replace "nobody" and "nogroup"
with "_icecast", respectively
7. Start Icecast and monitor error.log for errors and clues on how to
solve any issues.
# icecast -c /var/icecast/icecast.xml
8. Connect to the server with a source client and have fun. There are
many different source clients available for different platforms.
*nix users may find Ices0 to stream MP3, and Ices2 to stream Ogg Vorbis
useful. For WinAMP and XMMS there is Oddcast DSP on
http://www.oddsock.org/
Remember to give your mountpoint a proper name - MP3 streams should
use no extension, Ogg Vorbis streams should use .ogg, so that dumb or
broken players can send the stream to the correct decoder.
For starters, you should let the source client set the mountpoint;
pre-defined mountpoints are an advanced feature and not necessary
for basic streaming.

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-Makefile_in,v 1.1 2004/02/02 19:32:37 fgsch Exp $
--- Makefile.in.orig 2004-01-07 22:52:09.000000000 +0100
+++ Makefile.in 2004-01-08 15:49:28.000000000 +0100
@@ -120,7 +120,7 @@ EXTRA_DIST = HACKING m4/acx_pthread.m4 m
docdir = $(datadir)/doc/$(PACKAGE)
-doc_DATA = README AUTHORS COPYING NEWS TODO
+doc_DATA = AUTHORS NEWS
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-admin_Makefile_in,v 1.1 2004/02/02 19:32:37 fgsch Exp $
--- admin/Makefile.in.orig 2004-01-07 22:52:09.000000000 +0100
+++ admin/Makefile.in 2004-01-08 15:53:04.000000000 +0100
@@ -33,7 +33,7 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
-pkgdatadir = $(datadir)/@PACKAGE@
+pkgdatadir = $(datadir)/examples/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-conf_Makefile_in,v 1.1 2004/02/02 19:32:37 fgsch Exp $
--- conf/Makefile.in.orig 2004-01-07 22:52:09.000000000 +0100
+++ conf/Makefile.in 2004-01-08 15:49:28.000000000 +0100
@@ -114,7 +114,7 @@ AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = icecast.xml.in
DISTCLEANFILES = icecast.xml.dist
-docdir = $(datadir)/$(PACKAGE)/doc
+docdir = $(datadir)/examples/$(PACKAGE)
doc_DATA = icecast.xml.dist
edit = sed -e 's,@pkgdatadir\@,$(pkgdatadir),g' \

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-conf_icecast_xml_in,v 1.1 2004/02/02 19:32:37 fgsch Exp $
--- conf/icecast.xml.in.orig 2004-01-08 15:13:21.000000000 +0100
+++ conf/icecast.xml.in 2004-01-26 08:33:24.000000000 +0100
@@ -78,7 +78,7 @@
</mount>
-->
- <fileserve>1</fileserve>
+ <fileserve>0</fileserve>
<paths>
<!-- basedir is only used if chroot is enabled -->
@@ -89,7 +89,7 @@
<logdir>@localstatedir@/log/@PACKAGE@</logdir>
<webroot>@pkgdatadir@/web</webroot>
<adminroot>@pkgdatadir@/admin</adminroot>
- <!-- <pidfile>@pkgdatadir@/icecast.pid</pidfile> -->
+ <!-- <pidfile>@localstatedir@/run/icecast.pid</pidfile> -->
<!-- Aliases: treat requests for 'source' path as being for 'dest' path
May be made specific to a port or bound address using the "port"

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-configure,v 1.7 2002/11/24 10:04:59 brad Exp $
--- configure.orig Wed Apr 10 18:50:20 2002
+++ configure Sun Nov 24 04:45:56 2002
@@ -876,16 +876,16 @@ if test "x$enable_fsstd" = "xyes"; then
else
ICECAST_BINDIR=${prefix}/bin
ICECAST_SBINDIR=${prefix}/bin
- ICECAST_ETCDIR=conf
- ICECAST_ETCDIR_INST=${prefix}/conf
- ICECAST_SHAREDIR=${prefix}
- ICECAST_LOGDIR=logs
- ICECAST_LOGDIR_INST=${prefix}/logs
- ICECAST_TEMPLATEDIR=templates
- ICECAST_TEMPLATEDIR_INST=${prefix}/templates
- ICECAST_STATICDIR=static
- ICECAST_STATICDIR_INST=${prefix}/static
- ICECAST_DOCDIR=${prefix}/doc
+ ICECAST_ETCDIR=${sysconfdir}/icecast
+ ICECAST_ETCDIR_INST=${prefix}/share/examples/icecast
+ ICECAST_SHAREDIR=${prefix}/share/icecast
+ ICECAST_LOGDIR=/var/log/icecast
+ ICECAST_LOGDIR_INST=/var/log/icecast
+ ICECAST_TEMPLATEDIR=${prefix}/share/icecast/templates
+ ICECAST_TEMPLATEDIR_INST=${prefix}/share/icecast/templates
+ ICECAST_STATICDIR=${prefix}/share/icecast/static
+ ICECAST_STATICDIR_INST=${prefix}/share/icecast/static
+ ICECAST_DOCDIR=${prefix}/share/doc/icecast
USE_FSSTD=no
fi

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-doc_Makefile_in,v 1.1 2004/02/02 19:32:37 fgsch Exp $
--- doc/Makefile.in.orig 2004-01-07 22:52:09.000000000 +0100
+++ doc/Makefile.in 2004-01-08 15:49:29.000000000 +0100
@@ -111,7 +111,7 @@ install_sh = @install_sh@
AUTOMAKE_OPTIONS = foreign
-docdir = $(datadir)/doc/icecast
+docdir = $(datadir)/doc/@PACKAGE@
doc_DATA = index.html icecast2_admin.html icecast2_basicsetup.html \
icecast2_config_file.html icecast2_faq.html icecast2_glossary.html \
icecast2_introduction.html icecast2_relay.html icecast2_stats.html \

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_admin_c,v 1.1 2004/02/02 19:32:37 fgsch Exp $
--- src/admin.c.orig 2004-01-31 20:23:33.000000000 +0100
+++ src/admin.c 2004-01-31 20:30:32.000000000 +0100
@@ -180,7 +180,7 @@ xmlDocPtr admin_build_sourcelist(char *c
snprintf(buf, sizeof(buf)-1, "%ld", source->listeners);
xmlNewChild(srcnode, NULL, "listeners", buf);
memset(buf, '\000', sizeof(buf));
- snprintf(buf, sizeof(buf)-1, "%ld", now - source->con->con_time);
+ snprintf(buf, sizeof(buf), "%ld", (long int)(now - source->con->con_time));
xmlNewChild(srcnode, NULL, "Connected", buf);
xmlNewChild(srcnode, NULL, "Format",
source->format->format_description);
@@ -527,7 +527,7 @@ static void command_show_listeners(clien
xmlNewChild(listenernode, NULL, "UserAgent", "Unknown");
}
memset(buf, '\000', sizeof(buf));
- snprintf(buf, sizeof(buf)-1, "%ld", now - current->con->con_time);
+ snprintf(buf, sizeof(buf), "%ld", (long int)(now - current->con->con_time));
xmlNewChild(listenernode, NULL, "Connected", buf);
memset(buf, '\000', sizeof(buf));
snprintf(buf, sizeof(buf)-1, "%lu", current->con->id);

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-src_fserve_c,v 1.1 2004/02/02 19:32:37 fgsch Exp $
--- src/fserve.c.orig 2004-01-26 08:33:44.000000000 +0100
+++ src/fserve.c 2004-01-26 08:37:22.000000000 +0100
@@ -414,8 +414,11 @@ int fserve_client_create(client_t *httpc
static int _compare_clients(void *compare_arg, void *a, void *b)
{
- connection_t *cona = (connection_t *)a;
- connection_t *conb = (connection_t *)b;
+ fserve_t *clienta = (fserve_t *)a;
+ fserve_t *clientb = (fserve_t *)b;
+
+ connection_t *cona = clienta->client->con;
+ connection_t *conb = clientb->client->con;
if (cona->id < conb->id) return -1;
if (cona->id > conb->id) return 1;

View File

@ -1,40 +0,0 @@
$OpenBSD: patch-src_utility_c,v 1.2 2003/04/15 18:49:56 avsm Exp $
--- src/utility.c.orig Wed Apr 10 23:37:34 2002
+++ src/utility.c Tue Apr 15 19:34:51 2003
@@ -102,7 +102,6 @@ int password_match(const char *crypted,
return 0;
#else
- char salt[3];
char *test_crypted;
extern char *crypt(const char *, const char *);
@@ -111,18 +110,8 @@ int password_match(const char *crypted,
return 0;
}
- if (ice_strncmp(crypted, "$1$", 3)) {
- salt[0] = crypted[0];
- salt[1] = crypted[1];
- } else {
- salt[0] = crypted[3];
- salt[1] = crypted[4];
- }
-
- salt[2] = '\0';
-
thread_mutex_lock(&info.misc_mutex);
- test_crypted = crypt(uncrypted, salt);
+ test_crypted = crypt(uncrypted, crypted);
if (test_crypted == NULL) {
write_log(LOG_DEFAULT, "WARNING - crypt() failed, refusing access");
thread_mutex_unlock(&info.misc_mutex);
@@ -1509,7 +1498,7 @@ next_mount_point ()
count++;
}
- snprintf (apan, BUFSIZE, "icy_%d", count);
+ snprintf (apan, sizeof apan, "icy_%d", count);
return &apan[0];
}

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-web_Makefile_in,v 1.1 2004/02/02 19:32:37 fgsch Exp $
--- web/Makefile.in.orig 2004-01-07 22:52:11.000000000 +0100
+++ web/Makefile.in 2004-01-08 15:51:52.000000000 +0100
@@ -33,7 +33,7 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
-pkgdatadir = $(datadir)/@PACKAGE@
+pkgdatadir = $(datadir)/examples/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..

View File

@ -1,25 +0,0 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.3 2002/11/24 10:04:59 brad Exp $
#
# icecast de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_DIR=${SYSCONFDIR}/icecast
LOG_DIR=/var/log/icecast
echo
echo "+---------------"
echo "| To completely deinstall the $1 package you need to perform"
echo "| these steps as root:"
echo "|"
echo "| rm -rf $CONFIG_DIR"
echo "| rm -rf $LOG_DIR"
echo "|"
echo "| Do not do this if you plan on re-installing $1"
echo "| at some future time."
echo "+---------------"
echo
exit 0

View File

@ -1,2 +1,21 @@
Icecast is an Internet based broadcasting system based on the Mpeg Layer III
streaming technology. It is, however, not limited to streaming mp3 files.
Icecast is a streaming media server which currently supports Ogg
Vorbis and MP3 audio streams. It can be used to create an Internet
radio station or a privately running jukebox and many things in
between. It is very versatile in that new formats can be added
relatively easily and supports open standards for communication and
interaction.
Icecast v2 is a complete rewrite of the old Icecast streaming server.
It was designed to be highly efficient and have low memory requirements.
Additional features are, among others:
* a web-based administration interface including simple file serving
* supports listing in stream directories
* new relay system
After many years of development, testing and even production use,
Icecast v2 is also very stable.
Security features include chroot()ing and dropping privileges, if
configured to do so.

View File

@ -1,70 +0,0 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.6 2002/11/24 10:04:59 brad Exp $
#
# Pre/post-installation setup of icecast
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_DIR=${SYSCONFDIR}/icecast
CONFIG_FILE=$CONFIG_DIR/icecast.conf
SAMPLE_CONFIG_DIR=$PREFIX/share/examples/icecast
LOG_DIR=/var/log/icecast
install -d -o root -g wheel -m 755 $LOG_DIR
do_notice()
{
echo
echo "+---------------"
echo "| The existing $1 configuration files in $CONFIG_DIR,"
echo "| have NOT been changed. You may want to compare them to the"
echo "| current sample files, $SAMPLE_CONFIG_DIR/icecast.conf.dist,"
echo "| and update your configuration as needed."
echo "+---------------"
echo
}
do_install()
{
install -d -o root -g wheel -m 755 $CONFIG_DIR
install -o root -g wheel -m 600 $SAMPLE_CONFIG_DIR/icecast.conf.dist $CONFIG_FILE
echo
echo "+---------------"
echo "| The $1 configuration files in $CONFIG_DIR,"
echo "| have been installed. Please view these files and change"
echo "| the configuration to meet your needs."
echo "|"
echo "| To produce the crypted passwords, use encrypt(1)."
echo "+---------------"
echo
}
# verify proper execution
#
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
# Verify/process the command
#
case $2 in
PRE-INSTALL)
: nothing to pre-install for this port
;;
POST-INSTALL)
if [ -f $CONFIG_FILE ]; then
do_notice $1
else
do_install $1
fi
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0

View File

@ -1,34 +1,28 @@
@comment $OpenBSD: PLIST,v 1.4 2002/03/03 01:37:38 brad Exp $
@comment $OpenBSD: PLIST,v 1.5 2004/02/02 19:32:37 fgsch Exp $
bin/icecast
share/doc/icecast/AUTHORS
share/doc/icecast/BUGS
share/doc/icecast/CHANGES
share/doc/icecast/COPYING
share/doc/icecast/FAQ
share/doc/icecast/README
share/doc/icecast/manual.html
share/examples/icecast/groups.aut.dist
share/examples/icecast/icecast.conf.dist
share/examples/icecast/mounts.aut.dist
share/examples/icecast/users.aut.dist
share/icecast/templates/306.html
share/icecast/templates/400.html
share/icecast/templates/403.html
share/icecast/templates/404.html
share/icecast/templates/504.html
share/icecast/templates/admin.html
share/icecast/templates/admin_change.html
share/icecast/templates/admin_describe.html
share/icecast/templates/alias_add.html
share/icecast/templates/alias_del.html
share/icecast/templates/bodytag.html
share/icecast/templates/footer.html
share/icecast/templates/header.html
share/icecast/templates/info.html
share/icecast/templates/list_directory.html
share/icecast/templates/mountlist.html
share/icecast/templates/statistics.html
@dirrm share/icecast/templates
@dirrm share/icecast
share/doc/icecast/NEWS
share/doc/icecast/README.OpenBSD
share/doc/icecast/icecast2_admin.html
share/doc/icecast/icecast2_basicsetup.html
share/doc/icecast/icecast2_config_file.html
share/doc/icecast/icecast2_faq.html
share/doc/icecast/icecast2_glossary.html
share/doc/icecast/icecast2_introduction.html
share/doc/icecast/icecast2_relay.html
share/doc/icecast/icecast2_stats.html
share/doc/icecast/icecast2_win32.html
share/doc/icecast/icecast2_yp.html
share/doc/icecast/index.html
share/examples/icecast/admin/listclients.xsl
share/examples/icecast/admin/listmounts.xsl
share/examples/icecast/admin/moveclients.xsl
share/examples/icecast/admin/response.xsl
share/examples/icecast/admin/stats.xsl
share/examples/icecast/icecast.xml.dist
share/examples/icecast/web/status.xsl
share/examples/icecast/web/status2.xsl
@dirrm share/examples/icecast/web
@dirrm share/examples/icecast/admin
@dirrm share/examples/icecast
@dirrm share/doc/icecast