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>
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
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
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
--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
+++ 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=
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
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");
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 @@
#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)
#ifdef TIVO_SUPPORT
ends_with(file, ".TiVo") ||
#endif
---
-2.20.1
-
+++ /dev/null
-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
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 @@
#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 @@
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)
{
--- a/containers.c
+++ b/containers.c
-@@ -50,23 +50,23 @@
+@@ -50,23 +50,23 @@ const struct container_s containers[] =
#define NINETY_DAYS "7776000"
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
{
int ret;
-@@ -1297,7 +1297,7 @@ BrowseContentDirectory(struct upnphttp *
+@@ -1301,7 +1301,7 @@ BrowseContentDirectory(struct upnphttp *
"<Result>"
"<DIDL-Lite"
CONTENT_DIRECTORY_SCHEMAS;
char *zErrMsg = NULL;
char *sql, *ptr;
struct Response args;
-@@ -1819,7 +1819,7 @@ SearchContentDirectory(struct upnphttp *
+@@ -1823,7 +1823,7 @@ SearchContentDirectory(struct upnphttp *
"<Result>"
"<DIDL-Lite"
CONTENT_DIRECTORY_SCHEMAS;
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)
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;
}
}
+++ /dev/null
---- 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)
- {