From 97beb7d365ca6197c7e80e9dcb7fe91942f4b36e Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 29 Nov 2020 15:58:20 -0800 Subject: [PATCH] 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 (cherry picked from commit f5689796481c5b8e89cd3fff8b10ea6f675f85e9) --- multimedia/minidlna/Makefile | 17 +++++-------- .../patches/001-dont-build-po-files.patch | 7 ++---- .../patches/005-added-support-RMVB.patch | 11 +-------- multimedia/minidlna/patches/010-lg.patch | 24 ------------------- ...ntainer_definitions_into_a_structure.patch | 8 +------ ...tances_of_magic_container_s_as_const.patch | 8 +++---- multimedia/minidlna/patches/040-heroes.patch | 2 -- .../minidlna/patches/070-return-void.patch | 4 +--- 8 files changed, 15 insertions(+), 66 deletions(-) delete mode 100644 multimedia/minidlna/patches/010-lg.patch diff --git a/multimedia/minidlna/Makefile b/multimedia/minidlna/Makefile index fb69aa4f9f..25db032b50 100644 --- a/multimedia/minidlna/Makefile +++ b/multimedia/minidlna/Makefile @@ -8,13 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=minidlna -PKG_RELEASE:=6 +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 diff --git a/multimedia/minidlna/patches/001-dont-build-po-files.patch b/multimedia/minidlna/patches/001-dont-build-po-files.patch index 7d9f6b6373..f16514cbbf 100644 --- a/multimedia/minidlna/patches/001-dont-build-po-files.patch +++ b/multimedia/minidlna/patches/001-dont-build-po-files.patch @@ -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 diff --git a/multimedia/minidlna/patches/005-added-support-RMVB.patch b/multimedia/minidlna/patches/005-added-support-RMVB.patch index 86f6505182..ddf354f2d4 100644 --- a/multimedia/minidlna/patches/005-added-support-RMVB.patch +++ b/multimedia/minidlna/patches/005-added-support-RMVB.patch @@ -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 - diff --git a/multimedia/minidlna/patches/010-lg.patch b/multimedia/minidlna/patches/010-lg.patch deleted file mode 100644 index 1fb48b13cf..0000000000 --- a/multimedia/minidlna/patches/010-lg.patch +++ /dev/null @@ -1,24 +0,0 @@ -From eb473817d73b8740f27955f93950029fdfc9d73e Mon Sep 17 00:00:00 2001 -From: Daniel Kamil Kozar -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 diff --git a/multimedia/minidlna/patches/020-wrap_container_definitions_into_a_structure.patch b/multimedia/minidlna/patches/020-wrap_container_definitions_into_a_structure.patch index 4733b32fe2..859e9f437e 100644 --- a/multimedia/minidlna/patches/020-wrap_container_definitions_into_a_structure.patch +++ b/multimedia/minidlna/patches/020-wrap_container_definitions_into_a_structure.patch @@ -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) { diff --git a/multimedia/minidlna/patches/030-mark_all_instances_of_magic_container_s_as_const.patch b/multimedia/minidlna/patches/030-mark_all_instances_of_magic_container_s_as_const.patch index 44a27665bd..84a818835a 100644 --- a/multimedia/minidlna/patches/030-mark_all_instances_of_magic_container_s_as_const.patch +++ b/multimedia/minidlna/patches/030-mark_all_instances_of_magic_container_s_as_const.patch @@ -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 * "" "<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 * "" "<DIDL-Lite" CONTENT_DIRECTORY_SCHEMAS; diff --git a/multimedia/minidlna/patches/040-heroes.patch b/multimedia/minidlna/patches/040-heroes.patch index 5c2d313963..74a3e249a4 100644 --- a/multimedia/minidlna/patches/040-heroes.patch +++ b/multimedia/minidlna/patches/040-heroes.patch @@ -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) diff --git a/multimedia/minidlna/patches/070-return-void.patch b/multimedia/minidlna/patches/070-return-void.patch index 7109dd94ec..ec0e6d3736 100644 --- a/multimedia/minidlna/patches/070-return-void.patch +++ b/multimedia/minidlna/patches/070-return-void.patch @@ -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; } } -- 2.30.2