pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/audio Revive audio/rtunes.
details: https://anonhg.NetBSD.org/pkgsrc/rev/61e1a573ffb0
branches: trunk
changeset: 449433:61e1a573ffb0
user: nia <nia%pkgsrc.org@localhost>
date: Tue Mar 30 12:01:04 2021 +0000
description:
Revive audio/rtunes.
We fixed the undefined behaviour and made it work with openssl-1.1.
diffstat:
audio/Makefile | 3 +-
audio/rtunes/DESCR | 4 +
audio/rtunes/Makefile | 30 ++++++++++
audio/rtunes/PLIST | 4 +
audio/rtunes/distinfo | 12 ++++
audio/rtunes/patches/patch-rtunes_Makefile | 29 +++++++++
audio/rtunes/patches/patch-rtunes_cipher.c | 68 +++++++++++++++++++++++
audio/rtunes/patches/patch-rtunes_parse.y | 21 +++++++
audio/rtunes/patches/patch-rtunes_rtsp.c | 33 +++++++++++
audio/rtunes/patches/patch-rtunes_rtunes.1 | 67 ++++++++++++++++++++++
audio/rtunes/patches/patch-rtunes_rtunes.c | 88 ++++++++++++++++++++++++++++++
11 files changed, 358 insertions(+), 1 deletions(-)
diffs (truncated from 413 to 300 lines):
diff -r 7e3fe5d2a6dd -r 61e1a573ffb0 audio/Makefile
--- a/audio/Makefile Tue Mar 30 11:17:23 2021 +0000
+++ b/audio/Makefile Tue Mar 30 12:01:04 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.624 2021/02/18 16:38:26 nia Exp $
+# $NetBSD: Makefile,v 1.625 2021/03/30 12:01:04 nia Exp $
#
COMMENT= Audio tools, players, and libraries
@@ -411,6 +411,7 @@
SUBDIR+= rip
SUBDIR+= rosegarden
SUBDIR+= rsynth
+SUBDIR+= rtunes
SUBDIR+= rubberband
SUBDIR+= ruby-mp3info
SUBDIR+= ruby-taglib
diff -r 7e3fe5d2a6dd -r 61e1a573ffb0 audio/rtunes/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/rtunes/DESCR Tue Mar 30 12:01:04 2021 +0000
@@ -0,0 +1,4 @@
+rtunes streams audio to an AirTunes compatible receivers.
+
+This is a fork of rtunes 0.8, to fix compilation issues on modern systems
+(e.g. support newer OpenSSL versions)
diff -r 7e3fe5d2a6dd -r 61e1a573ffb0 audio/rtunes/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/rtunes/Makefile Tue Mar 30 12:01:04 2021 +0000
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.14 2021/03/30 12:01:04 nia Exp $
+
+DISTNAME= rtunes-0.8
+CATEGORIES= audio
+MASTER_SITES= http://www.nazgul.ch/dev/
+
+MAINTAINER= nia%NetBSD.org@localhost
+HOMEPAGE= http://www.nazgul.ch/dev_rtunes.html
+COMMENT= Stream audio to an AirTunes device
+LICENSE= modified-bsd
+
+BUILD_DIRS= rtunes
+INSTALL_DIRS= rtunes
+
+MAKE_FLAGS+= NOGCCERROR=1
+MAKE_FLAGS+= NOCLANGERROR=1
+
+USE_BSD_MAKEFILE= yes
+
+INSTALLATION_DIRS+= bin
+INSTALLATION_DIRS+= ${PKGMANDIR}/man1
+INSTALLATION_DIRS+= ${PKGMANDIR}/man5
+
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} != "NetBSD" && ${OPSYS} != "OpenBSD"
+LDFLAGS+= -lbsd
+. include "../../devel/libbsd/buildlink3.mk"
+.endif
+.include "../../security/openssl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 7e3fe5d2a6dd -r 61e1a573ffb0 audio/rtunes/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/rtunes/PLIST Tue Mar 30 12:01:04 2021 +0000
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.4 2021/03/30 12:01:04 nia Exp $
+bin/rtunes
+man/man1/rtunes.1
+man/man5/rtunes.conf.5
diff -r 7e3fe5d2a6dd -r 61e1a573ffb0 audio/rtunes/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/rtunes/distinfo Tue Mar 30 12:01:04 2021 +0000
@@ -0,0 +1,12 @@
+$NetBSD: distinfo,v 1.8 2021/03/30 12:01:04 nia Exp $
+
+SHA1 (rtunes-0.8.tar.gz) = 16830fbdceaf2d70943113ee427ad9eeeddaed14
+RMD160 (rtunes-0.8.tar.gz) = 725b454b9c0f7d7b1170d8c89ec70536cd86d0ae
+SHA512 (rtunes-0.8.tar.gz) = 8e540b66c16d4a5f745999ceb6c07853dccf8270b5e5650cf3c21297dd45add3583ee0e866b27fb7082a279375b4be95f301ff1157e455a7d959b60f9a30a924
+Size (rtunes-0.8.tar.gz) = 21636 bytes
+SHA1 (patch-rtunes_Makefile) = f46e906afff59ad0f31817c0a87c622f37fa0597
+SHA1 (patch-rtunes_cipher.c) = 9b55b4f5fd0e48ba9039f52f2925bd1005e9a68b
+SHA1 (patch-rtunes_parse.y) = 76294edfb4d0c56cb08189578d7fe9991c533cb3
+SHA1 (patch-rtunes_rtsp.c) = ab8f8bf845258b9a994e02195fe65ce9ceba2c07
+SHA1 (patch-rtunes_rtunes.1) = c3d64a8c671dac0fdf1cd87ccbc562f2fb0d446e
+SHA1 (patch-rtunes_rtunes.c) = 0a177c985c642b9b1cfa122aa9ff67b5e54f5038
diff -r 7e3fe5d2a6dd -r 61e1a573ffb0 audio/rtunes/patches/patch-rtunes_Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/rtunes/patches/patch-rtunes_Makefile Tue Mar 30 12:01:04 2021 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-rtunes_Makefile,v 1.1 2021/03/30 12:01:04 nia Exp $
+
+Merge fixes from https://github.com/erincandescent/rtunes
+
+--- rtunes/Makefile.orig 2009-06-27 10:10:32.000000000 +0000
++++ rtunes/Makefile
+@@ -10,22 +10,12 @@ SRCS+= y.tab.h
+ y.tab.h: parse.y
+ .endif
+
+-.if ${OS} == "NetBSD"
+-VPATH= ../libbsd
+-SRCS+= strtonum.c
+-.endif
+-
+ CFLAGS+= -Wall -Wstrict-prototypes -ansi
+ LDADD+= -lcrypto
+ LINTFLAGS+= -u
+
+ CLEANFILES+= y.tab.h
+
+-PIPE= -pipe
+-
+ MAN= rtunes.1 rtunes.conf.5
+-MANDIR= /usr/local/man/cat
+-
+-BINDIR= /usr/local/bin
+
+ .include <bsd.prog.mk>
diff -r 7e3fe5d2a6dd -r 61e1a573ffb0 audio/rtunes/patches/patch-rtunes_cipher.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/rtunes/patches/patch-rtunes_cipher.c Tue Mar 30 12:01:04 2021 +0000
@@ -0,0 +1,68 @@
+$NetBSD: patch-rtunes_cipher.c,v 1.1 2021/03/30 12:01:04 nia Exp $
+
+Merge fixes from https://github.com/erincandescent/rtunes
+
+--- rtunes/cipher.c.orig 2009-06-27 10:10:32.000000000 +0000
++++ rtunes/cipher.c
+@@ -26,10 +26,6 @@
+ #include "extern.h"
+ #include "proto.h"
+
+-#ifdef __linux__
+-#include "../libbsd/arc4random.h"
+-#endif
+-
+ /*
+ * cipher_ aes_sendsample()
+ * AES encrypt audio sample
+@@ -62,7 +58,7 @@ cipher_aes_sendsample(unsigned char *buf
+ len_encrypt = len;
+
+ /* prepend sample header */
+- memcpy(buf + 16, buf, len_encrypt);
++ memmove(buf + 16, buf, len_encrypt);
+ memcpy(buf, header, 16L);
+ /* write sample size into header */
+ j = len_encrypt + 12;
+@@ -122,15 +118,11 @@ cipher_rsa_encrypt_aeskey(unsigned char
+
+ /* initialize RSA public key */
+ key = RSA_new();
+- key->n = BN_bin2bn(n_bin, 256, key->n);;
+- key->e = BN_bin2bn(e_bin, 3, key->e);
+- key->d = NULL;
+- key->p = NULL;
+- key->q = NULL;
+- key->dmp1 = NULL;
+- key->dmq1 = NULL;
+- key->iqmp = NULL;
+-
++ RSA_set0_key(key,
++ BN_bin2bn(n_bin, 256, NULL),
++ BN_bin2bn(e_bin, 3, NULL),
++ NULL);
++
+ /* RSA encrypt */
+ to = malloc(256);
+ if (RSA_public_encrypt(16, aeskey, to, key, RSA_PKCS1_OAEP_PADDING) < 1)
+@@ -150,18 +142,11 @@ cipher_rsa_encrypt_aeskey(unsigned char
+ unsigned char *
+ cipher_aes_generate_key(void)
+ {
+- int i, v;
+ unsigned char *p = NULL;
+- unsigned char key[16];
+-
+- for (i = 0; i <= sizeof(key) - sizeof(v); i += sizeof(v)) {
+- v = arc4random();
+- memcpy(&key[i], &v, sizeof(v));
+- }
+
+ p = malloc(16);
+- memcpy(p, key, 16);
+-
++ RAND_bytes(p, 16);
++
+ return (p);
+ }
+
diff -r 7e3fe5d2a6dd -r 61e1a573ffb0 audio/rtunes/patches/patch-rtunes_parse.y
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/rtunes/patches/patch-rtunes_parse.y Tue Mar 30 12:01:04 2021 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-rtunes_parse.y,v 1.3 2021/03/30 12:01:04 nia Exp $
+
+Merge fixes from https://github.com/erincandescent/rtunes
+
+--- rtunes/parse.y.orig 2009-06-27 10:10:32.000000000 +0000
++++ rtunes/parse.y
+@@ -27,9 +27,13 @@
+ #include <stdarg.h>
+ #include <stdint.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <syslog.h>
+-
++#ifdef __linux__
++#include <bsd/stdlib.h>
++#endif
++
+ FILE *fin;
+ int lineno = 1;
+ int errors = 0;
diff -r 7e3fe5d2a6dd -r 61e1a573ffb0 audio/rtunes/patches/patch-rtunes_rtsp.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/rtunes/patches/patch-rtunes_rtsp.c Tue Mar 30 12:01:04 2021 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-rtunes_rtsp.c,v 1.1 2021/03/30 12:01:04 nia Exp $
+
+Merge fixes from https://github.com/erincandescent/rtunes
+
+--- rtunes/rtsp.c.orig 2009-06-27 10:10:32.000000000 +0000
++++ rtunes/rtsp.c
+@@ -19,15 +19,14 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <openssl/rand.h>
+
+ #include "config.h"
+ #include "extern.h"
+ #include "proto.h"
+
+ #ifdef __linux__
+-#include "../libbsd/strlcpy.h"
+-#include "../libbsd/strlcat.h"
+-#include "../libbsd/arc4random.h"
++#include "bsd/string.h"
+ #endif
+
+ /* global vars local */
+@@ -48,7 +47,7 @@ rtsp_generate_sid(char *buf, int len)
+ int i = 0;
+
+ while (i < 1000000000)
+- i = arc4random();
++ RAND_bytes((unsigned char*) &i, sizeof(i));
+
+ snprintf(buf, len, "%d", i);
+
diff -r 7e3fe5d2a6dd -r 61e1a573ffb0 audio/rtunes/patches/patch-rtunes_rtunes.1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/rtunes/patches/patch-rtunes_rtunes.1 Tue Mar 30 12:01:04 2021 +0000
@@ -0,0 +1,67 @@
+$NetBSD: patch-rtunes_rtunes.1,v 1.1 2021/03/30 12:01:04 nia Exp $
+
+Merge fixes from https://github.com/erincandescent/rtunes
+
+--- rtunes/rtunes.1.orig 2009-06-26 14:43:09.000000000 +0000
++++ rtunes/rtunes.1
+@@ -15,22 +15,23 @@
+ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ .\"
+-.Dd Feb 10, 2008
++.Dd March 24, 2021
+ .Dt RTUNES 1
+ .Os
+ .Sh NAME
+ .Nm rtunes
+-.Nd Stream audio data to an Apple AirPort Express device
++.Nd Stream audio data to an Apple AirPlay device
+ .Sh SYNOPSIS
+ .Nm rtunes
+ .Op Fl 46
+ .Op Fl f Ar configfile
+ .Op Fl h Ar host
++.Op Fl p Ar port
+ .Ar file(s)
+ .Sh DESCRIPTION
+ .Nm
+-streams files containing Apple Lossless audio data to an Apple AirPort
+-Express device.
++streams files containing Apple Lossless audio data to an Apple AirPlay
++device.
+ If a '-' is given as the
+ .Ar file(s)
+ argument,
+@@ -40,7 +41,7 @@ and encodes it to the Apple Lossless for
+ With this method it is possible to stream audio data from any source
+ that can output raw PCM audio data on stdout, e.g.:
+ .Bd -literal -offset indent
+-madplay -S -R44100 -o raw:- benson.mp3 | rtunes -
++mpg123 -o raw -r 44100 benson.mp3 | rtunes -h 10.69.69.147 -p 36666 -
+ .Ed
+ .Pp
+ Here the audio player madplay is used to decode benson.mp3 to raw PCM
+@@ -56,17 +57,20 @@ Use only IPv6 transport.
+ .It Fl f
+ Specify an alternative configuration file.
Home |
Main Index |
Thread Index |
Old Index