minidlna: update to 1.3.0

Fixes two CVEs relating to UPnP.

Removed libuuid dependency. It is not used.

Remove clock_gettime hack. It seems to have been fixed.

Removed upstream patches.

Refreshed the other ones.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-11-29 15:58:20 -08:00
parent 110ea1b994
commit f568979648
No known key found for this signature in database
GPG Key ID: 36D31CFA845F0E3B
9 changed files with 15 additions and 88 deletions

View File

@ -8,13 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=minidlna
PKG_RELEASE:=8
PKG_VERSION:=1.3.0
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.code.sf.net/p/minidlna/git
PKG_SOURCE_DATE:=2019-12-09
PKG_SOURCE_VERSION:=0763719f2776f91114bc5564919896f28e078c77
PKG_MIRROR_HASH:=93030a80eff44c0ec13f54daf3b2ba345b70ef8645e0343a34092f37d6f9e8dd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/minidlna
PKG_HASH:=47d9b06b4c48801a4c1112ec23d24782728b5495e95ec2195bbe5c81bc2d3c63
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-2.0-or-later BSD-3-Clause
@ -23,7 +22,6 @@ PKG_LICENSE_FILES:=COPYING LICENCE.miniupnpd
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=util-linux
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
@ -34,8 +32,7 @@ define Package/minidlna
TITLE:=UPnP A/V & DLNA Media Server
URL:=http://minidlna.sourceforge.net/
DEPENDS:= +libpthread +libexif +libjpeg +libsqlite3 +libffmpeg \
+libid3tag +libflac +libvorbis +libuuid \
$(ICONV_DEPENDS) $(INTL_DEPENDS)
+libid3tag +libflac +libvorbis $(ICONV_DEPENDS) $(INTL_DEPENDS)
USERID:=minidlna:minidlna
endef
@ -57,8 +54,6 @@ CONFIGURE_ARGS += \
--with-db-path="/var/run/minidlna" \
--with-log-path="/var/log"
TARGET_CFLAGS += -DHAVE_CLOCK_GETTIME
define Package/minidlna/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/minidlnad $(1)/usr/sbin/minidlnad

View File

@ -2,7 +2,7 @@
+++ b/Makefile.am
@@ -17,7 +17,7 @@
AM_CFLAGS = -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @STATIC_CFLAGS@
AM_CFLAGS = -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-SUBDIRS=po
+SUBDIRS=
@ -11,15 +11,12 @@
check_PROGRAMS = testupnpdescgen
--- a/configure.ac
+++ b/configure.ac
@@ -647,6 +647,8 @@ case "$target_os" in
@@ -658,6 +658,5 @@ case "$target_os" in
esac
-AC_OUTPUT([ po/Makefile.in
-Makefile
-])
+# AC_OUTPUT([ po/Makefile.in
+# Makefile
+# ])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT

View File

@ -9,11 +9,9 @@ Subject: [PATCH] Added support RMVB.
utils.c | 3 +++
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/metadata.c b/metadata.c
index 9cd86dc..2d13480 100644
--- a/metadata.c
+++ b/metadata.c
@@ -862,6 +862,10 @@ GetVideoMetadata(const char *path, const char *name)
@@ -862,6 +862,10 @@ GetVideoMetadata(const char *path, const
xasprintf(&m.mime, "video/x-matroska");
else if( strcmp(ctx->iformat->name, "flv") == 0 )
xasprintf(&m.mime, "video/x-flv");
@ -24,8 +22,6 @@ index 9cd86dc..2d13480 100644
if( m.mime )
goto video_no_dlna;
diff --git a/upnpglobalvars.h b/upnpglobalvars.h
index 1a2fb5e..2cbe24c 100644
--- a/upnpglobalvars.h
+++ b/upnpglobalvars.h
@@ -172,7 +172,8 @@
@ -38,8 +34,6 @@ index 1a2fb5e..2cbe24c 100644
#define DLNA_FLAG_DLNA_V1_5 0x00100000
#define DLNA_FLAG_HTTP_STALLING 0x00200000
diff --git a/utils.c b/utils.c
index dc936f9..006f611 100644
--- a/utils.c
+++ b/utils.c
@@ -377,6 +377,8 @@ mime_to_ext(const char * mime)
@ -59,6 +53,3 @@ index dc936f9..006f611 100644
#ifdef TIVO_SUPPORT
ends_with(file, ".TiVo") ||
#endif
--
2.20.1

View File

@ -1,24 +0,0 @@
From eb473817d73b8740f27955f93950029fdfc9d73e Mon Sep 17 00:00:00 2001
From: Daniel Kamil Kozar <dkk089@gmail.com>
Date: Sat, 15 Dec 2018 00:55:20 +0100
Subject: [PATCH] LG webOS 3.5 devices require audio/flac in order to detect
FLAC
Imported from https://sourceforge.net/p/minidlna/patches/176/
---
clients.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clients.c b/clients.c
index 42f0d1c..d324eab 100644
--- a/clients.c
+++ b/clients.c
@@ -164,7 +164,7 @@ struct client_type_s client_types[] =
/* USER-AGENT: Linux/2.6.35 UPnP/1.0 DLNADOC/1.50 INTEL_NMPR/2.0 LGE_DLNA_SDK/1.6.0 */
{ ELGNetCastDevice,
- FLAG_DLNA | FLAG_CAPTION_RES,
+ FLAG_DLNA | FLAG_CAPTION_RES | FLAG_MIME_FLAC_FLAC,
"LG",
"LGE_DLNA_SDK/1.6.0",
EUserAgent

View File

@ -9,8 +9,6 @@ Subject: [PATCH] Wrap container definitions into a structure
scanner.c | 33 ++++++---------------------------
3 files changed, 39 insertions(+), 27 deletions(-)
diff --git a/containers.c b/containers.c
index f5cece1..19a0bb1 100644
--- a/containers.c
+++ b/containers.c
@@ -23,6 +23,31 @@
@ -45,8 +43,6 @@ index f5cece1..19a0bb1 100644
#define NINETY_DAYS "7776000"
const char *music_id = MUSIC_ID;
diff --git a/containers.h b/containers.h
index aef77c5..1fcf7cd 100644
--- a/containers.h
+++ b/containers.h
@@ -16,6 +16,14 @@
@ -64,11 +60,9 @@ index aef77c5..1fcf7cd 100644
struct magic_container_s {
const char *name;
const char *objectid_match;
diff --git a/scanner.c b/scanner.c
index a730567..eb26c9e 100644
--- a/scanner.c
+++ b/scanner.c
@@ -529,30 +529,7 @@ insert_file(const char *name, const char *path, const char *parentID, int object
@@ -529,30 +529,7 @@ insert_file(const char *name, const char
int
CreateDatabase(void)
{

View File

@ -12,7 +12,7 @@ Subject: [PATCH] Mark all instances of magic_container_s as const
--- a/containers.c
+++ b/containers.c
@@ -50,23 +50,23 @@
@@ -50,23 +50,23 @@ const struct container_s containers[] =
#define NINETY_DAYS "7776000"
@ -96,7 +96,7 @@ Subject: [PATCH] Mark all instances of magic_container_s as const
if( sql_get_int_field(db, "SELECT 1 from OBJECTS where OBJECT_ID = '%s'", magic->objectid_match) == 0 )
--- a/upnpsoap.c
+++ b/upnpsoap.c
@@ -800,7 +800,7 @@ add_res(char *size, char *duration, char
@@ -804,7 +804,7 @@ add_res(char *size, char *duration, char
}
static int
@ -105,7 +105,7 @@ Subject: [PATCH] Mark all instances of magic_container_s as const
{
int ret;
@@ -1297,7 +1297,7 @@ BrowseContentDirectory(struct upnphttp *
@@ -1301,7 +1301,7 @@ BrowseContentDirectory(struct upnphttp *
"<Result>"
"&lt;DIDL-Lite"
CONTENT_DIRECTORY_SCHEMAS;
@ -114,7 +114,7 @@ Subject: [PATCH] Mark all instances of magic_container_s as const
char *zErrMsg = NULL;
char *sql, *ptr;
struct Response args;
@@ -1819,7 +1819,7 @@ SearchContentDirectory(struct upnphttp *
@@ -1823,7 +1823,7 @@ SearchContentDirectory(struct upnphttp *
"<Result>"
"&lt;DIDL-Lite"
CONTENT_DIRECTORY_SCHEMAS;

View File

@ -7,8 +7,6 @@ Subject: [PATCH] What about David Bowie's "Heroes"?
utils.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/utils.c b/utils.c
index dc936f9..dfa2b65 100644
--- a/utils.c
+++ b/utils.c
@@ -87,13 +87,6 @@ trim(char *str)

View File

@ -7,11 +7,9 @@ Subject: [PATCH] No return in a function returning non-void
upnpdescgen.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/upnpdescgen.c b/upnpdescgen.c
index 85ce185..78d5754 100644
--- a/upnpdescgen.c
+++ b/upnpdescgen.c
@@ -525,6 +525,7 @@ genXML(char *str, int *len, int *tmplen, const struct XMLElt *p)
@@ -525,6 +525,7 @@ genXML(char * str, int * len, int * tmpl
pile[top].eltname = eltname;
}
}

View File

@ -1,22 +0,0 @@
--- a/image_utils.c
+++ b/image_utils.c
@@ -190,7 +190,7 @@ jpeg_memory_src(j_decompress_ptr cinfo,
src->pub.bytes_in_buffer = bufsize;
}
-jmp_buf setjmp_buffer;
+static jmp_buf setjmp_buffer;
/* Don't exit on error like libjpeg likes to do */
static void
libjpeg_error_handler(j_common_ptr cinfo)
--- a/metadata.c
+++ b/metadata.c
@@ -502,7 +502,7 @@ GetAudioMetadata(const char *path, const
}
/* For libjpeg error handling */
-jmp_buf setjmp_buffer;
+static jmp_buf setjmp_buffer;
static void
libjpeg_error_handler(j_common_ptr cinfo)
{