Roll new distfile and gc local patches
This commit is contained in:
parent
998b8f4b38
commit
8d92823768
@ -1,10 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.33 2012/04/19 21:39:08 dcoppa Exp $
|
||||
# $OpenBSD: Makefile,v 1.34 2012/04/20 08:22:34 dcoppa Exp $
|
||||
|
||||
COMMENT = console client for pandora
|
||||
|
||||
DISTNAME = pianobar-2012.03.17
|
||||
DISTNAME = pianobar-2012.04.14
|
||||
EXTRACT_SUFX = .tar.bz2
|
||||
REVISION = 3
|
||||
CATEGORIES = audio
|
||||
|
||||
MAINTAINER = David Coppa <dcoppa@openbsd.org>
|
||||
@ -37,6 +36,7 @@ CFLAGS += -DNDEBUG
|
||||
.endif
|
||||
|
||||
MAKE_FLAGS = DYNLINK=1 \
|
||||
CC=${CC} \
|
||||
LDFLAGS="-L${LOCALBASE}/lib" \
|
||||
LIBpiano_VERSION="${LIBpiano_VERSION}" \
|
||||
MANDIR="${PREFIX}/man"
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (pianobar-2012.03.17.tar.bz2) = HjefgJGmlzCygExCfmGCpw==
|
||||
RMD160 (pianobar-2012.03.17.tar.bz2) = 2NbVE+45T3bJNWa2zUJza+hO1hM=
|
||||
SHA1 (pianobar-2012.03.17.tar.bz2) = 2WliJwhIoa5swtRXmgAGlNwIdiM=
|
||||
SHA256 (pianobar-2012.03.17.tar.bz2) = SZNtXyN+SsqNe3fuVVlhc05os2Yz305i2EaLlhdTWRs=
|
||||
SIZE (pianobar-2012.03.17.tar.bz2) = 69272
|
||||
MD5 (pianobar-2012.04.14.tar.bz2) = EtEu0VK2UIkNzalXRbJ76A==
|
||||
RMD160 (pianobar-2012.04.14.tar.bz2) = FKoY76J07Bz1XxE31spQRG/KGsA=
|
||||
SHA1 (pianobar-2012.04.14.tar.bz2) = xFbeUkKA/EFYD1TOL9E62oTVchI=
|
||||
SHA256 (pianobar-2012.04.14.tar.bz2) = ufV+qXrcFWbRF6oegtkctZKSMQFKbWFpWwe0sLQgRtY=
|
||||
SIZE (pianobar-2012.04.14.tar.bz2) = 69280
|
||||
|
@ -1,20 +0,0 @@
|
||||
$OpenBSD: patch-contrib_pianobar_1,v 1.4 2012/04/16 13:09:26 dcoppa Exp $
|
||||
|
||||
Add option to enable TLS for all actions (not just sending login
|
||||
credentials). Useful to get around GeoIP restrictions.
|
||||
(upstream git commit 35763dea799c96361e288a10eab0fbd16c36e880)
|
||||
|
||||
--- contrib/pianobar.1.orig Tue Mar 20 14:47:07 2012
|
||||
+++ contrib/pianobar.1 Mon Apr 16 14:57:08 2012
|
||||
@@ -195,6 +195,11 @@ usually the value above). See section
|
||||
.B REMOTE CONTROL
|
||||
|
||||
.TP
|
||||
+.B force_tls = {0,1}
|
||||
+Use TLS for all actions (not just sending login credentials). Use if you are on
|
||||
+an untrusted network or to get around GeoIP restrictions.
|
||||
+
|
||||
+.TP
|
||||
.B format_list_song = %i) %a - %t%r
|
||||
Available format characters:
|
||||
|
@ -1,26 +0,0 @@
|
||||
$OpenBSD: patch-src_libwaitress_waitress_c,v 1.1 2012/03/29 13:54:17 dcoppa Exp $
|
||||
|
||||
Correctly initialize fd using -1
|
||||
(upstream git commit 7d659d4bd624b3100b0c0852039648d7803cbaf9)
|
||||
|
||||
--- src/libwaitress/waitress.c.orig Thu Mar 29 15:45:05 2012
|
||||
+++ src/libwaitress/waitress.c Thu Mar 29 15:47:03 2012
|
||||
@@ -1063,6 +1063,7 @@ WaitressReturn_t WaitressFetchCall (WaitressHandle_t *
|
||||
|
||||
/* initialize */
|
||||
memset (&waith->request, 0, sizeof (waith->request));
|
||||
+ waith->request.sockfd = -1;
|
||||
waith->request.dataHandler = WaitressHandleIdentity;
|
||||
waith->request.read = WaitressOrdinaryRead;
|
||||
waith->request.write = WaitressOrdinaryWrite;
|
||||
@@ -1104,7 +1105,9 @@ WaitressReturn_t WaitressFetchCall (WaitressHandle_t *
|
||||
gnutls_deinit (waith->request.tlsSession);
|
||||
gnutls_certificate_free_credentials (waith->tlsCred);
|
||||
}
|
||||
- close (waith->request.sockfd);
|
||||
+ if (waith->request.sockfd != -1) {
|
||||
+ close (waith->request.sockfd);
|
||||
+ }
|
||||
free (waith->request.buf);
|
||||
|
||||
if (wRet == WAITRESS_RET_OK &&
|
@ -1,32 +0,0 @@
|
||||
$OpenBSD: patch-src_main_c,v 1.7 2012/04/11 08:41:58 dcoppa Exp $
|
||||
|
||||
Warn if ctl is not a fifo.
|
||||
Ordinary files are not supported and cause problems, so close the
|
||||
fd and print a warning instead.
|
||||
(upstream git commit ed6d013054f589f2999926b02f4ac6dc76c7fe91)
|
||||
|
||||
--- src/main.c.orig Wed Apr 11 10:33:34 2012
|
||||
+++ src/main.c Wed Apr 11 10:32:20 2012
|
||||
@@ -369,9 +369,19 @@ int main (int argc, char **argv) {
|
||||
assert (sizeof (app.input.fds) / sizeof (*app.input.fds) >= 2);
|
||||
app.input.fds[1] = open (app.settings.fifo, O_RDWR);
|
||||
if (app.input.fds[1] != -1) {
|
||||
- FD_SET(app.input.fds[1], &app.input.set);
|
||||
- BarUiMsg (&app.settings, MSG_INFO, "Control fifo at %s opened\n",
|
||||
- app.settings.fifo);
|
||||
+ struct stat s;
|
||||
+
|
||||
+ /* check for file type, must be fifo */
|
||||
+ fstat (app.input.fds[1], &s);
|
||||
+ if (!S_ISFIFO (s.st_mode)) {
|
||||
+ BarUiMsg (&app.settings, MSG_ERR, "File at %s is not a fifo\n", app.settings.fifo);
|
||||
+ close (app.input.fds[1]);
|
||||
+ app.input.fds[1] = -1;
|
||||
+ } else {
|
||||
+ FD_SET(app.input.fds[1], &app.input.set);
|
||||
+ BarUiMsg (&app.settings, MSG_INFO, "Control fifo at %s opened\n",
|
||||
+ app.settings.fifo);
|
||||
+ }
|
||||
}
|
||||
app.input.maxfd = app.input.fds[0] > app.input.fds[1] ? app.input.fds[0] :
|
||||
app.input.fds[1];
|
@ -1,25 +0,0 @@
|
||||
$OpenBSD: patch-src_settings_c,v 1.1 2012/04/16 13:09:26 dcoppa Exp $
|
||||
|
||||
Add option to enable TLS for all actions (not just sending login
|
||||
credentials). Useful to get around GeoIP restrictions.
|
||||
(upstream git commit 35763dea799c96361e288a10eab0fbd16c36e880)
|
||||
|
||||
--- src/settings.c.orig Tue Mar 20 14:47:07 2012
|
||||
+++ src/settings.c Mon Apr 16 14:57:08 2012
|
||||
@@ -121,6 +121,7 @@ void BarSettingsRead (BarSettings_t *settings) {
|
||||
#endif
|
||||
#endif
|
||||
settings->autoselect = true;
|
||||
+ settings->forceTls = false;
|
||||
settings->history = 5;
|
||||
settings->volume = 0;
|
||||
settings->sortOrder = BAR_SORT_NAME_AZ;
|
||||
@@ -245,6 +246,8 @@ void BarSettingsRead (BarSettings_t *settings) {
|
||||
settings->fifo = strdup (val);
|
||||
} else if (streq ("autoselect", key)) {
|
||||
settings->autoselect = atoi (val);
|
||||
+ } else if (streq ("force_tls", key)) {
|
||||
+ settings->forceTls = atoi (val);
|
||||
} else if (streq ("tls_fingerprint", key)) {
|
||||
/* expects 40 byte hex-encoded sha1 */
|
||||
if (strlen (val) == 40) {
|
@ -1,16 +0,0 @@
|
||||
$OpenBSD: patch-src_settings_h,v 1.1 2012/04/16 13:09:26 dcoppa Exp $
|
||||
|
||||
Add option to enable TLS for all actions (not just sending login
|
||||
credentials). Useful to get around GeoIP restrictions.
|
||||
(upstream git commit 35763dea799c96361e288a10eab0fbd16c36e880)
|
||||
|
||||
--- src/settings.h.orig Tue Mar 20 14:47:07 2012
|
||||
+++ src/settings.h Mon Apr 16 14:57:08 2012
|
||||
@@ -81,6 +81,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
bool autoselect;
|
||||
+ bool forceTls;
|
||||
unsigned int history;
|
||||
int volume;
|
||||
BarStationSorting_t sortOrder;
|
@ -1,35 +0,0 @@
|
||||
$OpenBSD: patch-src_ui_c,v 1.9 2012/04/16 13:09:26 dcoppa Exp $
|
||||
|
||||
Add option to enable TLS for all actions (not just sending login
|
||||
credentials). Useful to get around GeoIP restrictions.
|
||||
(upstream git commit 35763dea799c96361e288a10eab0fbd16c36e880)
|
||||
|
||||
--- src/ui.c.orig Tue Mar 20 14:47:07 2012
|
||||
+++ src/ui.c Mon Apr 16 14:57:08 2012
|
||||
@@ -134,14 +134,15 @@ void BarUiMsg (const BarSettings_t *settings, const Ba
|
||||
/* fetch http resource (post request)
|
||||
* @param waitress handle
|
||||
* @param piano request (initialized by PianoRequest())
|
||||
+ * @param ignore libpiano TLS hint and use it always
|
||||
*/
|
||||
static WaitressReturn_t BarPianoHttpRequest (WaitressHandle_t *waith,
|
||||
- PianoRequest_t *req) {
|
||||
+ PianoRequest_t *req, bool forceTls) {
|
||||
waith->extraHeaders = "Content-Type: text/xml\r\n";
|
||||
waith->postData = req->postData;
|
||||
waith->method = WAITRESS_METHOD_POST;
|
||||
waith->url.path = req->urlPath;
|
||||
- waith->url.tls = req->secure;
|
||||
+ waith->url.tls = req->secure || forceTls;
|
||||
|
||||
return WaitressFetchBuf (waith, &req->responseData);
|
||||
}
|
||||
@@ -172,7 +173,7 @@ int BarUiPianoCall (BarApp_t * const app, PianoRequest
|
||||
return 0;
|
||||
}
|
||||
|
||||
- *wRet = BarPianoHttpRequest (&app->waith, &req);
|
||||
+ *wRet = BarPianoHttpRequest (&app->waith, &req, app->settings.forceTls);
|
||||
if (*wRet != WAITRESS_RET_OK) {
|
||||
BarUiMsg (&app->settings, MSG_NONE, "Network error: %s\n", WaitressErrorToStr (*wRet));
|
||||
if (req.responseData != NULL) {
|
Loading…
x
Reference in New Issue
Block a user