Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Apr 2012 15:11:28 -0500 (CDT)
From:      Rusty Nejdl <rnejdl@ringofsaturn.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/167345: Update port audio/pianobar to 2012.04.24 and include a patch
Message-ID:  <assp.04638c0b41.201204262011.q3QKBSuD054362@tethys.ringofsaturn.com>
Resent-Message-ID: <201204262020.q3QKKKBA079585@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         167345
>Category:       ports
>Synopsis:       Update port audio/pianobar to 2012.04.24 and include a patch
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 26 20:20:19 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Rusty Nejdl
>Release:        FreeBSD 9.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD tethys.ringofsaturn.com 9.0-STABLE FreeBSD 9.0-STABLE #6: Thu Mar 15 08:43:45 CDT 2012 root@tethys.ringofsaturn.com:/usr/obj/usr/src/sys/GENERIC amd64


>Description:
	The current version of pianobar does not work anymore, giving:

>How-To-Repeat:
	Run pianobar.
	
>Fix:

	

--- pianobar.diff begins here ---
diff -ruN pianobar/Makefile pianobar.new/Makefile
--- pianobar/Makefile	2012-01-11 23:43:46.000000000 -0600
+++ pianobar.new/Makefile	2012-04-26 14:55:27.000000000 -0500
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	pianobar
-PORTVERSION=	2012.01.10
+PORTVERSION=	2012.04.24
 CATEGORIES=	audio
 MASTER_SITES=	http://6xq.net/static/projects/${PORTNAME}/
 
diff -ruN pianobar/distinfo pianobar.new/distinfo
--- pianobar/distinfo	2012-01-11 23:43:46.000000000 -0600
+++ pianobar.new/distinfo	2012-04-26 14:55:38.000000000 -0500
@@ -1,2 +1,2 @@
-SHA256 (pianobar-2012.01.10.tar.bz2) = 6d19e5abde542bcdf8b9cfa50448fbe95c1e113f59e54065c9f4e0fbf78690f9
-SIZE (pianobar-2012.01.10.tar.bz2) = 68839
+SHA256 (pianobar-2012.04.24.tar.bz2) = 1286005b14ef58ea5b7baece054e772761e6351fdeceadd3a69e0a7c8b9bf28e
+SIZE (pianobar-2012.04.24.tar.bz2) = 69538
diff -ruN pianobar/files/patch-main.c pianobar.new/files/patch-main.c
--- pianobar/files/patch-main.c	1969-12-31 18:00:00.000000000 -0600
+++ pianobar.new/files/patch-main.c	2012-04-26 15:07:04.000000000 -0500
@@ -0,0 +1,35 @@
+--- src/main.c	2012-04-24 13:09:20.000000000 -0500
++++ src/main.c.new	2012-04-26 15:06:29.000000000 -0500
+@@ -77,10 +77,31 @@
+ 	WaitressReturn_t wRet;
+ 	PianoRequestDataLogin_t reqData;
+ 	bool ret;
++	WaitressHandle_t waithSync;
++	char *syncTime;
++	unsigned long int syncTimeInt;
++	
++	/* skip sync step by fetching time from somewhere else */
++	WaitressInit (&waithSync);
++	WaitressSetUrl (&waithSync, "http://ridetheclown.com/s2/synctime.php");
++	if (app->settings.proxy != NULL && strlen (app->settings.proxy) > 0) {
++	        WaitressSetProxy (&waithSync, app->settings.proxy);
++	}
++	wRet = WaitressFetchBuf (&waithSync, &syncTime);
++	WaitressFree (&waithSync);
++	if (wRet != WAITRESS_RET_OK) {
++	        BarUiMsg (&app->settings, MSG_ERR, "Unable to sync: %s\n",
++	                        WaitressErrorToStr (wRet));
++	        return false;
++	}
++
++	syncTimeInt = strtoul (syncTime, NULL, 0);
++	app->ph.timeOffset = time (NULL) - syncTimeInt;
++	free (syncTime);
+ 
+ 	reqData.user = app->settings.username;
+ 	reqData.password = app->settings.password;
+-	reqData.step = 0;
++	reqData.step = 1;
+ 
+ 	BarUiMsg (&app->settings, MSG_INFO, "Login... ");
+ 	ret = BarUiPianoCall (app, PIANO_REQUEST_LOGIN, &reqData, &pRet, &wRet);
diff -ruN pianobar/files/patch-piano.c pianobar.new/files/patch-piano.c
--- pianobar/files/patch-piano.c	1969-12-31 18:00:00.000000000 -0600
+++ pianobar.new/files/patch-piano.c	2012-04-26 15:07:27.000000000 -0500
@@ -0,0 +1,19 @@
+--- src/libpiano/piano.c	2012-04-24 13:09:20.000000000 -0500
++++ src/libpiano/piano.c.new	2012-04-26 15:04:49.000000000 -0500
+@@ -42,7 +42,7 @@
+ #include "crypt.h"
+ #include "config.h"
+ 
+-#define PIANO_PROTOCOL_VERSION "33"
++#define PIANO_PROTOCOL_VERSION "34"
+ #define PIANO_RPC_HOST "www.pandora.com"
+ #define PIANO_RPC_PORT "80"
+ #define PIANO_RPC_PATH "/radio/xmlrpc/v" PIANO_PROTOCOL_VERSION "?"
+@@ -272,6 +272,7 @@
+ 							"<?xml version=\"1.0\"?><methodCall>"
+ 							"<methodName>listener.authenticateListener</methodName>"
+ 							"<params><param><value><int>%lu</int></value></param>"
++							"<param><value><string></string></value></param>"
+ 							/* user */
+ 							"<param><value><string>%s</string></value></param>"
+ 							/* password */
--- pianobar.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:
 >pianobar
 Welcome to pianobar (2012.04.24)! Press ? for a list of commands.
 (i) Login... Error: Protocol incompatible. Please upgrade libpiano.
 
 Upgrading alone was not sufficient to fix it and this includes a patch to make this work again.  Please release this asap as the current version in ports is broken.
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?assp.04638c0b41.201204262011.q3QKBSuD054362>