diff --git a/audio/hgd/Makefile b/audio/hgd/Makefile index b357b81294c..dfd8a10004d 100644 --- a/audio/hgd/Makefile +++ b/audio/hgd/Makefile @@ -1,8 +1,7 @@ -# $OpenBSD: Makefile,v 1.8 2011/10/17 12:40:44 espie Exp $ +# $OpenBSD: Makefile,v 1.9 2011/11/02 21:26:57 edd Exp $ COMMENT = music system for hackathons -DISTNAME = hgd-0.4.1 -REVISION = 1 +DISTNAME = hgd-0.5.0 CATEGORIES = audio net HOMEPAGE = https://github.com/vext01/hgd/ diff --git a/audio/hgd/distinfo b/audio/hgd/distinfo index 2920b3b08f6..38ba99ce1c1 100644 --- a/audio/hgd/distinfo +++ b/audio/hgd/distinfo @@ -1,5 +1,5 @@ -MD5 (hgd-0.4.1.tar.gz) = uiZnbJ5RFvWm6oWTl5qaQw== -RMD160 (hgd-0.4.1.tar.gz) = Ox+BZzMcjZykA6gitkrexfyuhJA= -SHA1 (hgd-0.4.1.tar.gz) = BKs+/sYdu6SJQ1RaZ3y6CYr8F84= -SHA256 (hgd-0.4.1.tar.gz) = jmy4y+B2wtwzDKV0AMEynfEr+dfaMiu/lBs05Hoa8kY= -SIZE (hgd-0.4.1.tar.gz) = 234290 +MD5 (hgd-0.5.0.tar.gz) = zPXDchO/osc4JmUnCsebag== +RMD160 (hgd-0.5.0.tar.gz) = GReNcCj3x79q+odGySRhHOD3VQk= +SHA1 (hgd-0.5.0.tar.gz) = lqFnVzDG3gkGO0X5JPqosb3STHM= +SHA256 (hgd-0.5.0.tar.gz) = Y2bExEvT8NDYmQ8eaZOiMRz785bRKTO5JvcpnwnMhNI= +SIZE (hgd-0.5.0.tar.gz) = 252162 diff --git a/audio/hgd/patches/patch-Makefile_in b/audio/hgd/patches/patch-Makefile_in index ea32b29be2b..877fa130372 100644 --- a/audio/hgd/patches/patch-Makefile_in +++ b/audio/hgd/patches/patch-Makefile_in @@ -1,12 +1,9 @@ -$OpenBSD: patch-Makefile_in,v 1.1 2011/08/27 17:15:17 edd Exp $ ---- Makefile.in.orig Sat Aug 27 13:01:43 2011 -+++ Makefile.in Sat Aug 27 13:03:48 2011 -@@ -18,7 +18,7 @@ BSD_LDFLAGS=@BSD_LIBS@ - TAG_CFLAGS=@TAGLIB_CFLAGS@ - TAG_LDFLAGS=@TAGLIB_LIBS@ - --CFLAGS+=@CFLAGS@ -Wall -Wextra -+CFLAGS+=@CFLAGS@ -Wall - LDFLAGS+=@LIBS@ - CPPFLAGS+=@CPPFLAGS@ +$OpenBSD: patch-Makefile_in,v 1.2 2011/11/02 21:26:57 edd Exp $ +--- Makefile.in.orig Wed Nov 2 20:03:24 2011 ++++ Makefile.in Wed Nov 2 20:03:12 2011 +@@ -1,4 +1,4 @@ +-CC?=@CC@ ++CC=@CC@ + PY_LDFLAGS+=@PYTHON_LDFLAGS@ + PY_CFLAGS+=@PYTHON_CFLAGS@ diff --git a/audio/hgd/patches/patch-hgd-netd_c b/audio/hgd/patches/patch-hgd-netd_c deleted file mode 100644 index 85397ef5497..00000000000 --- a/audio/hgd/patches/patch-hgd-netd_c +++ /dev/null @@ -1,34 +0,0 @@ -$OpenBSD: patch-hgd-netd_c,v 1.1 2011/09/06 21:33:40 edd Exp $ - -Fix for #77, seg fault when a client attempts to queue without being logged in. - ---- hgd-netd.c.orig Sun Jul 24 18:29:43 2011 -+++ hgd-netd.c Sat Aug 27 22:51:01 2011 -@@ -303,6 +303,13 @@ hgd_cmd_queue(struct hgd_session *sess, char **args) - ssize_t write_ret; - char *filename, *tag_artist, *tag_title; - -+ if (sess->user == NULL) { -+ hgd_sock_send_line(sess->sock_fd, sess->ssl, -+ "err|user_not_identified"); -+ ret = HGD_FAIL; -+ goto clean; -+ } -+ - if ((flood_limit >= 0) && - (hgd_num_tracks_user(sess->user->name) >= flood_limit)) { - -@@ -320,13 +327,6 @@ hgd_cmd_queue(struct hgd_session *sess, char **args) - if ((bytes == 0) || ((long int) bytes > max_upload_size)) { - DPRINTF(HGD_D_WARN, "Incorrect file size"); - hgd_sock_send_line(sess->sock_fd, sess->ssl, "err|size"); -- ret = HGD_FAIL; -- goto clean; -- } -- -- if (sess->user == NULL) { -- hgd_sock_send_line(sess->sock_fd, sess->ssl, -- "err|user_not_identified"); - ret = HGD_FAIL; - goto clean; - } diff --git a/audio/hgd/patches/patch-hgdc_c b/audio/hgd/patches/patch-hgdc_c new file mode 100644 index 00000000000..18ccd2ad6d6 --- /dev/null +++ b/audio/hgd/patches/patch-hgdc_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-hgdc_c,v 1.1 2011/11/02 21:26:57 edd Exp $ +--- hgdc.c.orig Tue Nov 1 17:24:51 2011 ++++ hgdc.c Tue Nov 1 17:24:58 2011 +@@ -478,7 +478,7 @@ hgd_usage() + printf(" user-add [password]\tAdd a user\n"); + printf(" user-del \t\tRemove a user\n"); + printf(" user-list\t\t\tList Users\n"); +- printf(" user-mkadmin \tGrant user admin rights\n"); ++ printf(" user-mkadmin \t\tGrant user admin rights\n"); + printf(" user-noadmin \t\tRevoke user admin rights\n"); + + printf("\n Options include:\n"); diff --git a/audio/hgd/pkg/PLIST b/audio/hgd/pkg/PLIST index 26f254515e8..537ca713b34 100644 --- a/audio/hgd/pkg/PLIST +++ b/audio/hgd/pkg/PLIST @@ -1,24 +1,25 @@ -@comment $OpenBSD: PLIST,v 1.4 2011/07/25 23:07:49 edd Exp $ +@comment $OpenBSD: PLIST,v 1.5 2011/11/02 21:26:57 edd Exp $ %%python%% @newgroup _hgd:665 @newuser _hgd:665:_hgd:daemon:HGD Server:/var/empty:/sbin/nologin @bin bin/hgdc +@bin sbin/hgd-admin +@bin sbin/hgd-netd +@bin sbin/hgd-playd @man man/man1/hgd-admin.1 @man man/man1/hgd-netd.1 @man man/man1/hgd-playd.1 @man man/man1/hgdc.1 @man man/man7/hgd-proto.7 -@bin sbin/hgd-admin -@bin sbin/hgd-netd -@bin sbin/hgd-playd share/doc/hgd/ share/doc/hgd/README +share/doc/pkg-readmes/${FULLPKGNAME} share/examples/hgd/ share/examples/hgd/hgd.rc share/examples/hgd/hgdc.rc -@sample ${SYSCONFDIR}/hgd/plugins/ @rcscript ${RCDIR}/hgd_netd @rcscript ${RCDIR}/hgd_playd +@sample ${SYSCONFDIR}/hgd/plugins/ @owner _hgd @group _hgd @sample /var/hgd/ diff --git a/audio/hgd/pkg/README b/audio/hgd/pkg/README new file mode 100644 index 00000000000..1f732e0ba61 --- /dev/null +++ b/audio/hgd/pkg/README @@ -0,0 +1,49 @@ +$OpenBSD: README,v 1.1 2011/11/02 21:26:57 edd Exp $ + ++----------------------------------------------------------------------- +| Running ${FULLPKGNAME} on OpenBSD ++----------------------------------------------------------------------- + +Running a Server +================ + +All commands shown here are run as root. + +Prepare the Server +------------------ + +First you should create the SQLite database (which needs to be owned by +the _hgd user): + ${TRUEPREFIX}/sbin/hgd-admin db-init && chown _hgd /var/hgd/* + +Next you should add users. For each user you would run: + ${TRUEPREFIX}/sbin/hgd-admin user-add + +Users can be promoted to admins: + ${TRUEPREFIX}/sbin/hgd-admin user-mkadmin + +Start the Server +---------------- + +Start hgd_netd and hgd_playd using the standard rc.d procedures: + ${RCDIR}/hgd_netd start && ${RCDIR}/hgd_playd start + +Check everything went OK: + ${TRUEPREFIX}/sbin/hgd-admin status + +Using the HGD Client +==================== + +You can (for example) queue a track like this: + hgdc -u q + +See the manual pages for more information. + +Miscellaneous Notes +=================== + +* Both the client and server are configurable using a config file. See the + example config files and manual pages for details. + +* If you use aucat, remember that the _hgd user must have access to the aucat + socket.