diff options
author | Stuart Shelton <stuart@shelton.me> | 2017-08-15 22:49:34 +0100 |
---|---|---|
committer | Stuart Shelton <stuart@shelton.me> | 2017-08-15 22:49:34 +0100 |
commit | 3020a755b8d85b6da7aec0c624d8b0a2414bd91b (patch) | |
tree | 0d7a4e7dbf15645fcb8f0ba0a0b40710ac3ddf82 /net-misc/minidlna | |
parent | Add sys-devel/binutils-2.28.1 (diff) | |
download | srcshelton-3020a755b8d85b6da7aec0c624d8b0a2414bd91b.tar.gz srcshelton-3020a755b8d85b6da7aec0c624d8b0a2414bd91b.tar.bz2 srcshelton-3020a755b8d85b6da7aec0c624d8b0a2414bd91b.zip |
Add net-misc/minidlna-1.2.0
Diffstat (limited to 'net-misc/minidlna')
-rw-r--r-- | net-misc/minidlna/Manifest | 5 | ||||
-rw-r--r-- | net-misc/minidlna/files/minidlna-1.2.0-logging.patch | 280 | ||||
-rw-r--r-- | net-misc/minidlna/files/minidlna-1.2.0-samsung.patch | 44 | ||||
-rw-r--r-- | net-misc/minidlna/files/minidlna-1.2.0-upnpsoap-samsung.patch | 24 | ||||
-rw-r--r-- | net-misc/minidlna/minidlna-1.2.0.ebuild | 108 |
5 files changed, 461 insertions, 0 deletions
diff --git a/net-misc/minidlna/Manifest b/net-misc/minidlna/Manifest index b9090a55..81e29269 100644 --- a/net-misc/minidlna/Manifest +++ b/net-misc/minidlna/Manifest @@ -4,11 +4,15 @@ AUX minidlna-1.1.0-r3.service 291 SHA256 ae2bef5cb3a888ce6530136551d2b9f53ceecae AUX minidlna-1.1.2.initd 1161 SHA256 878875ad0325dd1d86b71e8493bf84f34834580be9e965e6868e8064e17d94ba SHA512 12b9ad36b79d81e6d643e51d745a4a055d7c1ccd18f4d5e61742e1440cfa662ae34f74fec895cdd005cbc8aabc087ad75278b5607a27618fdc1ccd81410a1764 WHIRLPOOL 3cf7e1d8e879c33db1e45caf6db136d003860111dcebbfbf18fdf675ba6dde75d311936cb68903d822cc657415e5860467d94f2e0620bb9a901712a8e67d8bf2 AUX minidlna-1.1.2.service 234 SHA256 47d56bfb45709bfe5e2341068f8a980c3881f1ceaed41c9c4a979670205f692a SHA512 3142906fc795d1435071f47b0ba424be2a112b8ce515756f18612fef751b95ef9bfa3cd60d83bf36ed80944738e8a56383ddff2a2ea09af1d9e800f6063736f0 WHIRLPOOL 2ace2c3f73c2f745217017e988899285f74b87882d6dd20ab878845cf4e88d3e5bda60ca203e48c67d9cf1cc459944d8a815eeff9ea94ce7c8737c17a766cd9f AUX minidlna-1.1.5.initd 686 SHA256 f3c4a2ee62262b565b2ccf2bb0e1260aba3332e431e5eac8faa795c7aafa5cbc SHA512 2ba5e3f587e4e70e01be9ab6b731839824895ba7878f421be6bc883c5b4a416f0d3fc001d8a7c458e97632b4d96da0a412538e6f1f8e23106669c04d230cecfa WHIRLPOOL f97a08ff0e3790df6d4e0016fbb713c32d34a7ae67cdf7d2c00300b03c8d616be47f7643eb7d2b86165dabe610daf60552682701662cd9e806d931bcdca2ba63 +AUX minidlna-1.2.0-logging.patch 8698 SHA256 90069576c592150dbe8f071ed06aafb756d4fd2b626664f1ea9d16db5d35947b SHA512 53d307dfc3f354c88803cdb2b323b4380f8723d981bfe058b8b9ca20e142fcd9dbd670b15dd8c1aedf4225f2f6ca6f05e8bb5f9948a82f33b4faab6c49fd886a WHIRLPOOL 9b281d3936140e375dae3a9ff647867972c7aa0dd9fb9dd1b603a9f9f5fe547e4edddf66e5a8bb4a13a8a6be9e78635a2b5700920a6426d7258b10786a64e455 +AUX minidlna-1.2.0-samsung.patch 1741 SHA256 bda08acecaa3f8ece6b95c3ffcf1e3712db32f9234cf12b8fd635334b71bc252 SHA512 73641e37fe7cdd64b76247ac3357240718334e029154f6910125c81914c4119c09e2e2f1028388b4e34e2da7566c4f398047d9b1af025056ee43898e5c5dcb88 WHIRLPOOL a6426e7e74423789d5638a24d93fdfd49ee8d4fd112d2ae3c6b8181344b65d17813b70b3de63003db021664c34fbfffc2235622f322fb69679a4dabff38fdc6b +AUX minidlna-1.2.0-upnpsoap-samsung.patch 1553 SHA256 c4d5da1d8ef9ae89802423dfd4b12ad48340bf6027b18a30fa37c570f31b1b2c SHA512 e16991736e325c37a9d7fe0f7d7b4596b77344462c991d3cc38fb8e1449e83a452a3144d817b624fe79c07c96988957701b51aebc9388f959259f832f161010c WHIRLPOOL 94e25a1e4f93c7f34bd60cffd36f9ecc73f6e94541c2c84a3ad1cff21a866a0393bba39bbb344ac196c2e8b171707f19bbd01cd8d99cd4532a59076224e6748a DIST minidlna-1.1.0.tar.gz 423555 SHA256 c2ef2ebe4311d08a60a87ec0c86fbe5e7f4fd25b947841f1d71b0508c60a90e2 SHA512 9240d857fc3927c06183c04c4d657c1b2b0596f63dbc549f331b52032698349e82244870f2ebf6f8bc8bf0ff5f2ff88df69b53d280f5e5f9b618a5de58ac6f57 WHIRLPOOL 6c59fa9f4e05fcd0ca2a7fb23058edb5f86d32a93fbae6791f9224e18bba742997fe140082fadcd95b993041db3ef8c597e820d6fd21b3c873b6ac9db6f8688e DIST minidlna-1.1.2.tar.gz 671295 SHA256 97e2e9141c1190d76ad97f0da083874bccf9f9590841be9eb7668bcf695b7204 SHA512 bfaf99dc5a59635c4cd10bcd9d2668736318b7840d97761fce96cfe78e00bb8e06ab23945126ba8d06d43fb99855ece7d2cd4f96c2c25a5b4f4a2c3697339e26 WHIRLPOOL c5b03d20992439e38b87eb160197f1ba5eff74bc133a280c01597ce06bd574dab6571daf5605b65b971dedd1a4d6af98423f6986b9b54d7168ad3a467e4fb58c DIST minidlna-1.1.3.tar.gz 481789 SHA256 ed42d5cadf9488a95a0107341918879ef8ce4c650e19337688c46cdcd484bc4e SHA512 3b3c28ed17325a1d2c461c51c7958fcc7fd02b71332a952e06f0ad8bca04f8ff58a74bb3d221ad432282c7289953bd31c213c2703008fb36037c39a743001aa9 WHIRLPOOL 4ac0a4344feb026d483562d5711f3f3ce4f70d68d9b043ec54e7d3667c7b38e2d1b7df2cbb2a5c9d05d4afc29182fe65c95389530b187000e496902734bb498e DIST minidlna-1.1.4.tar.gz 494478 SHA256 9814c04a2c506a0dd942c4218d30c07dedf90dabffbdef2d308a3f9f23545314 SHA512 24c2d82222798278d60faa46c6d7b19e44a91868da869f7d2aa2bf3c68e343a6c2a323f67223ea69242919047b08f059ed9c7a49b0b516384244acd98b51db4e WHIRLPOOL 5f82dd2130086e90784b05d67037e9c40e20b539ddc1bfb3733910beee44578027d9c245aa1f6117ba05b3c039a2b32125ea561f71c63cf0e422664e7067007f DIST minidlna-1.1.5.tar.gz 488191 SHA256 8477ad0416bb2af5cd8da6dde6c07ffe1a413492b7fe40a362bc8587be15ab9b SHA512 2a8eaa42fcda6f98648f1726af5cdba6d2358c386440dd0de933364cfbd1ced2fee5f883033e1a5a692b760749beb2c12798020a3591ddcea22663102d4f3dfa WHIRLPOOL 8ed8fd62fb063b042a234c8647fa05c65e4f1e331a66efae8f361002f5cedcd2706d777348332075e3263e0d8bbde7794dd84fc400dfe3a656e5d70952427669 +DIST minidlna-1.2.0.tar.gz 489340 SHA256 8d34436580c4c44be25976d5e46bc5b71af69bf441c4492774eac001164c4433 SHA512 96dfe4d1f98b7797793b83246d9fbf9c09a885ba6c6a5be669c47eb53e8b6201a4c50723a726ffc3bb9bb96f5560a4880cdb86d6f63f3cc7360bc4e059704e4f WHIRLPOOL e6d80030aa30fc9bfb5bc9e12f48d19e0f7533f40ec56c1e6f749c031cf25edf393c9c6a50fa81879f80022fc2942102bbbd4a23dc7babf92a1914d67a0b8000 DIST minidlna-gentoo-artwork.patch.xz 49372 SHA256 37ae7228b07b7c81c8962c5dc88a41ed1691bdf1b019b654a9fc93ac1da0c7ce SHA512 3bdaadc2a2331e9ebf37ed80d1de7cebd6307ab068dc9cf067159b2c0754a765b2076c07e988602af4dd2d6c49c819da8a1f668258950e15592027b353f22b5e WHIRLPOOL e243b9b6a002af5e3ee1bb196239790ff86724624ebccb34c84ac072426341db6b5f44e455d13657d5284220fe2688ddf3a2ec0212a7b86525eb02a6c080af80 EBUILD minidlna-1.1.0-r3.ebuild 2345 SHA256 b740e8c0da7b5a6ddd782fe7df4bd4fd53ac2d4546d079c8fc015c4c7ca93259 SHA512 726d89090d09293257d9e88995ea7a8f1eaae87dd7341f3ac32cd2e04358472c425dc717f4e4cddc51ee35d625830f132357b535055f0774a067180b20aae7f6 WHIRLPOOL 026de15e5a300ae7ecb10b75ffda26d6578c0bc09575493cce19927bd041baa5da91a96fb4d1048769585d480d860591926844efcdcd0adbedcd1ef70d4acfad EBUILD minidlna-1.1.2.ebuild 2347 SHA256 3d323d1b4d785a6ed0b92a7f9b6dd85b1e65f2ede4d09d21bf6ebfaea3f4f362 SHA512 6ea012f60bca76e960cbd42e9f5b2340f3cebf2946b611359d561b2abdba1ab54be25d33c66b6d7fbc54ba1eb2e4b0a1cd1623d77c342ba88d3ad3e58799cec1 WHIRLPOOL d39eb31a91f7179a7d270f9b062d6e6f64eba3b42f39faf7d69071f1600c82821426b8930f4883055d972484ea15c00b009539a15b2352a84293c7c28dbd8c7c @@ -16,3 +20,4 @@ EBUILD minidlna-1.1.3.ebuild 2326 SHA256 67751a20916a1dc102b3bb31743d4d3a6e65831 EBUILD minidlna-1.1.4.ebuild 2501 SHA256 f261c8a13d49246f3528feca3b03bc831ad1d01cfc5abe4c69cbbc05333b1c0a SHA512 3df51f51eac71dc3c183c2361826002154bf4c3532b4d45a62d3a95b074b0eacee648086c57e1d74c0b0b2e7e625f42ff8213212ffb1f654f6d1637ae918feba WHIRLPOOL befe5517f6e243b1f2cf4d4b365fcb5afa7faa6afbaf280450881efa83655bf597a125fb38f7e30b19d9ef8c71104242fafa46619962af82e44e0b0883b82f4a EBUILD minidlna-1.1.5-r1.ebuild 2504 SHA256 ba8e154b1531ae095dccbbdae3c26b3abf65e482d1ae46d5ec83b58d6ed5a2c7 SHA512 c47e2e8366ac467718018daa9bd9657893aa70d952fa83ab7e6e7590508c4e4b3e9898797bf23c3791e4570ca06da812feb67212dbd2b7b3ebe6f6ca1537ff38 WHIRLPOOL d0157534139205c418e9d21f049d4a445bdba1f4e5475b0305c2202063a0e63db62810bc8806a54838638793f5db4492075626087cb02ac40185a996499d43e3 EBUILD minidlna-1.1.5.ebuild 2557 SHA256 1d885ef73d7acede46f362040347603b7eb7a30f66b808d96ace2fc87e06cd44 SHA512 8293992ea514696804b2566fc9184b14fd8fff81e0493f85402b3828c3cb4e18fff98378c5cc5f6c89900977eee170db81eecede1a867894ae83739839ff3a9e WHIRLPOOL c816027b6bcf7e534b44e289205cfa5e800bbde9615f7739d80fad997beeb0ec6e2379f9f669d1c12b1e916860dfc146fc6ce071c9be5f329d77af1e27b2c5ba +EBUILD minidlna-1.2.0.ebuild 2788 SHA256 1fb96965303ac5ba90bd8e55dc32a84977a054d98b7972717b88406b9dd3e921 SHA512 d3a82f6f4f5dc55e4f59497f2538a4502a1d42b4bdd0f31a12bf014f3c4f81cf23de2ad2221e170bd485c42440f39d14f8da3ea1697bfbaa0050d028138abf07 WHIRLPOOL 337a0e2ee9ffb13b6925d1b09fd578752b7224fd0cd149fc07e4f266d202c74e75092ee718a918a0fa08ca1866886edb99fb9273178d783215ae6bb9d256c9b1 diff --git a/net-misc/minidlna/files/minidlna-1.2.0-logging.patch b/net-misc/minidlna/files/minidlna-1.2.0-logging.patch new file mode 100644 index 00000000..d108710f --- /dev/null +++ b/net-misc/minidlna/files/minidlna-1.2.0-logging.patch @@ -0,0 +1,280 @@ +--- a/upnpsoap.c ++++ b/upnpsoap.c +@@ -97,7 +97,7 @@ + * Defined by UPnP vendor. + */ + static void +-SoapError(struct upnphttp * h, int errCode, const char * errDesc) ++SoapError(struct upnphttp * h, int errCode, const char * errDesc, const char * errDetail) + { + static const char resp[] = + "<s:Envelope " +@@ -120,7 +120,7 @@ + char body[2048]; + int bodylen; + +- DPRINTF(E_WARN, L_HTTP, "Returning UPnPError %d: %s\n", errCode, errDesc); ++ DPRINTF(E_WARN, L_HTTP, "Returning UPnPError %d: %s (%s)\n", errCode, errDesc, errDetail); + bodylen = snprintf(body, sizeof(body), resp, errCode, errDesc); + BuildResp2_upnphttp(h, 500, "Internal Server Error", body, bodylen); + SendResp_upnphttp(h); +@@ -205,7 +205,7 @@ + BuildSendAndCloseSoapResp(h, body, bodylen); + } + else +- SoapError(h, 402, "Invalid Args"); ++ SoapError(h, 402, "Invalid Args", "GetValueFromNameValueList(&data, 'DeviceID') returned false in IsAuthorizedValidated()"); + + ClearNameValueList(&data); + } +@@ -351,11 +351,11 @@ + id = strtol(id_str, &endptr, 10); + if (!id_str || endptr == id_str) + { +- SoapError(h, 402, "Invalid Args"); ++ SoapError(h, 402, "Invalid Args", "GetValueFromNameValueList(&data, 'ConnectionID' returned false or NULL in GetCurrentConnectionInfo"); + } + else if(id != 0) + { +- SoapError(h, 701, "No such object error"); ++ SoapError(h, 701, "No such object error", "Object ID is not zero in GetCurrentConnectionInfo"); + } + else + { +@@ -1257,7 +1257,7 @@ + RequestedCount = atoi(ptr); + if( RequestedCount < 0 ) + { +- SoapError(h, 402, "Invalid Args"); ++ SoapError(h, 402, "Invalid Args", "RequestedCount < 0"); + goto browse_error; + } + if( !RequestedCount ) +@@ -1266,17 +1266,24 @@ + StartingIndex = atoi(ptr); + if( StartingIndex < 0 ) + { +- SoapError(h, 402, "Invalid Args"); ++ SoapError(h, 402, "Invalid Args", "StartingIndex < 0"); + goto browse_error; + } + if( !BrowseFlag || (strcmp(BrowseFlag, "BrowseDirectChildren") && strcmp(BrowseFlag, "BrowseMetadata")) ) + { +- SoapError(h, 402, "Invalid Args"); ++ SoapError(h, 402, "Invalid Args", "BrowseFlags not set, or different to both 'BrowseDirectChildren' and 'BrowseMetadata'"); + goto browse_error; + } + if( !ObjectID && !(ObjectID = GetValueFromNameValueList(&data, "ContainerID")) ) + { +- SoapError(h, 402, "Invalid Args"); +- goto browse_error; ++ if (h->req_client && (h->req_client->type->flags & FLAG_SAMSUNG_DCM10)) ++ { ++ ObjectID = "0"; ++ } ++ else ++ { ++ SoapError(h, 402, "Invalid Args", "ObjectID not set and could not be read from GetValueFromNameValueList(ContainerID)"); ++ goto browse_error; ++ } + } + +@@ -1394,7 +1394,7 @@ + /* If it's a DLNA client, return an error for bad sort criteria */ + if( ret < 0 && ((args.flags & FLAG_DLNA) || GETFLAG(DLNA_STRICT_MASK)) ) + { +- SoapError(h, 709, "Unsupported or invalid sort criteria"); ++ SoapError(h, 709, "Unsupported or invalid sort criteria", "DLNA clients receive error for bad sort criteria"); + goto browse_error; + } + +@@ -1410,7 +1410,7 @@ + { + DPRINTF(E_WARN, L_HTTP, "SQL error: %s\nBAD SQL: %s\n", zErrMsg, sql); + sqlite3_free(zErrMsg); +- SoapError(h, 709, "Unsupported or invalid sort criteria"); ++ SoapError(h, 709, "Unsupported or invalid sort criteria", "SQL error - see log for details"); + goto browse_error; + } + sqlite3_free(sql); +@@ -1419,7 +1419,7 @@ + { + if( !object_exists(ObjectID) ) + { +- SoapError(h, 701, "No such object error"); ++ SoapError(h, 701, "No such object error", "totalMatches == 0 && !object_exists(ObjectID)"); + goto browse_error; + } + } +@@ -1751,7 +1751,7 @@ + { + if( !(ContainerID = GetValueFromNameValueList(&data, "ObjectID")) ) + { +- SoapError(h, 402, "Invalid Args"); ++ SoapError(h, 402, "Invalid Args", "GetValueFromNameValueList(ObjectID) == 0"); + goto search_error; + } + } +@@ -1807,7 +1807,7 @@ + if( totalMatches < 0 ) + { + /* Must be invalid SQL, so most likely bad or unhandled search criteria. */ +- SoapError(h, 708, "Unsupported or invalid search criteria"); ++ SoapError(h, 708, "Unsupported or invalid search criteria", "totalMatches < 0"); + goto search_error; + } + /* Does the object even exist? */ +@@ -1815,7 +1815,7 @@ + { + if( !object_exists(ContainerID) ) + { +- SoapError(h, 710, "No such container"); ++ SoapError(h, 710, "No such container", "totalMatches == 0 && !object_exists(ContainerID)"); + goto search_error; + } + } +@@ -1825,7 +1825,7 @@ + /* If it's a DLNA client, return an error for bad sort criteria */ + if( ret < 0 && ((args.flags & FLAG_DLNA) || GETFLAG(DLNA_STRICT_MASK)) ) + { +- SoapError(h, 709, "Unsupported or invalid sort criteria"); ++ SoapError(h, 709, "Unsupported or invalid sort criteria", "parse_sort_criteria() < 0"); + goto search_error; + } + +@@ -1892,7 +1892,7 @@ + + if(!var_name) + { +- SoapError(h, 402, "Invalid Args"); ++ SoapError(h, 402, "Invalid Args", "GetValueFromNameValueList(varName) returned error"); + } + else if(strcmp(var_name, "ConnectionStatus") == 0) + { +@@ -1905,7 +1905,7 @@ + else + { + DPRINTF(E_WARN, L_HTTP, "%s: Unknown: %s\n", action, THISORNUL(var_name)); +- SoapError(h, 404, "Invalid Var"); ++ SoapError(h, 404, "Invalid Var", "QueryStateVariable() called to request variable name other than 'ConnectionStatus'"); + } + + ClearNameValueList(&data); +@@ -1969,7 +1969,7 @@ + + if (!ObjectID || !CurrentTagValue || !NewTagValue) + { +- SoapError(h, 402, "Invalid Args"); ++ SoapError(h, 402, "Invalid Args", "ObjectID, CurrentTagValue, or NewTagValue equal to zero"); + ClearNameValueList(&data); + return; + } +@@ -1981,7 +1981,7 @@ + detailID = sql_get_int64_field(db, "SELECT DETAIL_ID from OBJECTS where OBJECT_ID = '%q'", rid); + if (detailID <= 0) + { +- SoapError(h, 701, "No such object"); ++ SoapError(h, 701, "No such object", "detailID from database not > 0"); + ClearNameValueList(&data); + return; + } +@@ -2030,7 +2030,7 @@ + if (ret == SQLITE_OK) + BuildSendAndCloseSoapResp(h, resp, sizeof(resp)-1); + else +- SoapError(h, 501, "Action Failed"); ++ SoapError(h, 501, "Action Failed", "SQLite response not SQLITE_OK"); + + ClearNameValueList(&data); + } +@@ -2115,7 +2115,7 @@ + BuildSendAndCloseSoapResp(h, resp, sizeof(resp)-1); + } + else +- SoapError(h, 402, "Invalid Args"); ++ SoapError(h, 402, "Invalid Args", "!(ObjectID && PosSecond)"); + + ClearNameValueList(&data); + } +@@ -2178,6 +2178,6 @@ + DPRINTF(E_WARN, L_HTTP, "SoapMethod: Unknown: %.*s\n", methodlen, p); + } + +- SoapError(h, 401, "Invalid Action"); ++ SoapError(h, 401, "Invalid Action", "action does not contain '#' character, or SoapMethod failed"); + } + +--- a/sql.c.dist ++++ b/sql.c +@@ -30,7 +30,7 @@ + char *errMsg = NULL; + char *sql; + va_list ap; +- //DPRINTF(E_DEBUG, L_DB_SQL, "SQL: %s\n", sql); ++ //DPRINTF(E_DEBUG, L_DB_SQL, "SQL (exec): %s\n", sql); + + va_start(ap, fmt); + sql = sqlite3_vmprintf(fmt, ap); +@@ -52,7 +52,7 @@ + { + int ret; + char *errMsg = NULL; +- //DPRINTF(E_DEBUG, L_DB_SQL, "SQL: %s\n", sql); ++ //DPRINTF(E_DEBUG, L_DB_SQL, "SQL (get_table): %s\n", sql); + + ret = sqlite3_get_table(db, sql, pazResult, pnRow, pnColumn, &errMsg); + if( ret != SQLITE_OK ) +@@ -78,7 +78,7 @@ + sql = sqlite3_vmprintf(fmt, ap); + va_end(ap); + +- //DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql); ++ //DPRINTF(E_DEBUG, L_DB_SQL, "sql (int): %s\n", sql); + + switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL)) + { +@@ -114,7 +114,7 @@ + ret = sqlite3_column_int(stmt, 0); + break; + default: +- DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s\n%s\n", __func__, sqlite3_errmsg(db), sql); ++ DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s (%d)\n%s\n", __func__, sqlite3_errmsg(db), result, sql); + ret = -1; + break; + } +@@ -137,7 +137,7 @@ + sql = sqlite3_vmprintf(fmt, ap); + va_end(ap); + +- //DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql); ++ //DPRINTF(E_DEBUG, L_DB_SQL, "sql (int64): %s\n", sql); + + switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL)) + { +@@ -173,7 +173,7 @@ + ret = sqlite3_column_int64(stmt, 0); + break; + default: +- DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s\n%s\n", __func__, sqlite3_errmsg(db), sql); ++ DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s (%d)\n%s\n", __func__, sqlite3_errmsg(db), result, sql); + ret = -1; + break; + } +@@ -202,7 +202,7 @@ + sql = sqlite3_vmprintf(fmt, ap); + va_end(ap); + +- //DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql); ++ //DPRINTF(E_DEBUG, L_DB_SQL, "sql (text): %s\n", sql); + + switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL)) + { +@@ -250,7 +250,7 @@ + break; + + default: +- DPRINTF(E_WARN, L_DB_SQL, "SQL step failed: %s\n", sqlite3_errmsg(db)); ++ DPRINTF(E_WARN, L_DB_SQL, "SQL step failed: %s (%d)\n", sqlite3_errmsg(db), result); + str = NULL; + break; + } diff --git a/net-misc/minidlna/files/minidlna-1.2.0-samsung.patch b/net-misc/minidlna/files/minidlna-1.2.0-samsung.patch new file mode 100644 index 00000000..64449618 --- /dev/null +++ b/net-misc/minidlna/files/minidlna-1.2.0-samsung.patch @@ -0,0 +1,44 @@ +diff --git a/containers.c b/containers.c +index e1a9c57d9..f5cece11d 100644 +--- a/containers.c ++++ b/containers.c +@@ -32,8 +32,10 @@ const char *music_artist_id = MUSIC_ARTIST_ID; + const char *music_album_id = MUSIC_ALBUM_ID; + const char *music_plist_id = MUSIC_PLIST_ID; + const char *music_dir_id = MUSIC_DIR_ID; ++const char *video_id = VIDEO_ID; + const char *video_all_id = VIDEO_ALL_ID; + const char *video_dir_id = VIDEO_DIR_ID; ++const char *image_id = IMAGE_ID; + const char *image_all_id = IMAGE_ALL_ID; + const char *image_date_id = IMAGE_DATE_ID; + const char *image_camera_id = IMAGE_CAMERA_ID; +@@ -111,6 +113,11 @@ struct magic_container_s magic_containers[] = + { NULL, "16", &image_dir_id, NULL, NULL, NULL, NULL, NULL, NULL, -1, FLAG_MS_PFS }, + { NULL, "D2", &image_camera_id, NULL, NULL, NULL, NULL, NULL, NULL, -1, FLAG_MS_PFS }, + ++ /* Samsung DCM10 containers for Series E(?) */ ++ { NULL, "I", &image_id, NULL, NULL, NULL, NULL, NULL, NULL, -1, FLAG_SAMSUNG_DCM10 }, ++ { NULL, "A", &music_id, NULL, NULL, NULL, NULL, NULL, NULL, -1, FLAG_SAMSUNG_DCM10 }, ++ { NULL, "V", &video_id, NULL, NULL, NULL, NULL, NULL, NULL, -1, FLAG_SAMSUNG_DCM10 }, ++ + /* Jump straight to Music on audio-only devices */ + { NULL, "0", &music_id, NULL, "0", NULL, NULL, NULL, NULL, -1, FLAG_AUDIO_ONLY }, + +diff --git a/upnpsoap.c b/upnpsoap.c +index 61067e772..05bf9378e 100644 +--- a/upnpsoap.c ++++ b/upnpsoap.c +@@ -2081,6 +2088,12 @@ SamsungGetFeatureList(struct upnphttp * h, const char * action) + image = runtime_vars.root_container; + } + } ++ else if (h->req_client && (h->req_client->type->flags & FLAG_SAMSUNG_DCM10)) ++ { ++ audio = "A"; ++ video = "V"; ++ image = "I"; ++ } + + len = snprintf(body, sizeof(body), resp, audio, video, image); + diff --git a/net-misc/minidlna/files/minidlna-1.2.0-upnpsoap-samsung.patch b/net-misc/minidlna/files/minidlna-1.2.0-upnpsoap-samsung.patch new file mode 100644 index 00000000..235246de --- /dev/null +++ b/net-misc/minidlna/files/minidlna-1.2.0-upnpsoap-samsung.patch @@ -0,0 +1,24 @@ +--- a/upnpsoap.c ++++ b/upnpsoap.c +@@ -1123,10 +1123,17 @@ + { + /* Video and audio album art is handled differently */ + if( *mime == 'v' && (passed_args->filter & FILTER_RES) && !(passed_args->flags & FLAG_MS_PFS) ) { +- ret = strcatf(str, "<res protocolInfo=\"http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN\">" +- "http://%s:%d/AlbumArt/%s-%s.jpg" +- "</res>", +- lan_addr[passed_args->iface].str, runtime_vars.port, album_art, detailID); ++ if(passed_args->client == ESamsungSeriesCDE ) { ++ ret = strcatf(str, "<res dlna:profileID=\"JPEG_SM\" xmlns:dlna=\"urn:schemas-dlna-org:metadata-1-0/\" protocolInfo=\"http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=01;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=00D00000000000000000000000000000\" resolution=\"320x320\">" ++ "http://%s:%d/AlbumArt/%s-%s.jpg" ++ "</res>", ++ lan_addr[passed_args->iface].str, runtime_vars.port, album_art, detailID); ++ } else { ++ ret = strcatf(str, "<res protocolInfo=\"http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN\">" ++ "http://%s:%d/AlbumArt/%s-%s.jpg" ++ "</res>", ++ lan_addr[passed_args->iface].str, runtime_vars.port, album_art, detailID); ++ } + } else if( passed_args->filter & FILTER_UPNP_ALBUMARTURI ) { + ret = strcatf(str, "<upnp:albumArtURI"); + if( passed_args->filter & FILTER_UPNP_ALBUMARTURI_DLNA_PROFILEID ) { diff --git a/net-misc/minidlna/minidlna-1.2.0.ebuild b/net-misc/minidlna/minidlna-1.2.0.ebuild new file mode 100644 index 00000000..cd5f8392 --- /dev/null +++ b/net-misc/minidlna/minidlna-1.2.0.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils linux-info systemd toolchain-funcs user + +DESCRIPTION="The ReadyMedia DLNA/UPnP-AV compliant media server" +HOMEPAGE="http://minidlna.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz + https://dev.gentoo.org/~xmw/${PN}-gentoo-artwork.patch.xz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="digikam netgear readynas systemd tivo" + +RDEPEND="dev-db/sqlite:3 + media-libs/flac + media-libs/libexif + media-libs/libid3tag + media-libs/libogg + media-libs/libvorbis + virtual/ffmpeg + virtual/jpeg:0" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +CONFIG_CHECK="~INOTIFY_USER" + +PATCHES=( + "${WORKDIR}"/${PN}-gentoo-artwork.patch + "${FILESDIR}"/${P}-logging.patch + "${FILESDIR}"/${P}-samsung.patch +) + #"${FILESDIR}"/${P}-clients-samsung.patch + #"${FILESDIR}"/${P}-upnpsoap-samsung.patch + +pkg_setup() { + local my_is_new="yes" + + [[ -d "${EPREFIX}"/var/lib/${PN} ]] && my_is_new="no" + enewgroup ${PN} + enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} + if [[ -d "${EPREFIX}"/var/lib/${PN} && "${my_is_new}" == "yes" ]] ; then + # created by above enewuser command w/ wrong group and permissions + chown ${PN}:${PN} "${EPREFIX}"/var/lib/${PN} || die + chmod 0750 "${EPREFIX}"/var/lib/${PN} || die + # if user already exists, but /var/lib/minidlna is missing + # rely on ${D}/var/lib/minidlna created in src_install + fi + + linux-info_pkg_setup +} + +src_prepare() { + sed -e "/log_dir/s:/var/log:/var/log/${PN}:" \ + -e "/db_dir/s:/var/cache/:/var/lib/:" \ + -i ${PN}.conf || die + + default +} + +src_configure() { + econf \ + --disable-silent-rules \ + --with-db-path=/var/lib/${PN} \ + --with-log-path=/var/log/${PN} \ + $(use_enable netgear) \ + $(use_enable readynas) \ + $(use_enable tivo) +} + +src_install() { + default + + #bug 536532 + use digikam && dosym /usr/sbin/${PN}d /usr/bin/${PN} + + insinto /etc + doins ${PN}.conf + + newconfd "${FILESDIR}"/${PN}-1.0.25.confd ${PN} + newinitd "${FILESDIR}"/${PN}-1.1.5.initd ${PN} + + if use systemd; then + systemd_newunit "${FILESDIR}"/${PN}-1.1.2.service ${PN}.service + echo "d /var/run/${PN} 0755 ${PN} ${PN} -" > "${T}"/${PN}.conf + systemd_dotmpfilesd "${T}"/${PN}.conf + fi + + dodir /var/{lib,log}/${PN} + fowners ${PN}:${PN} /var/{lib,log}/${PN} + fperms 0750 /var/{lib,log}/${PN} + + dodoc AUTHORS NEWS README TODO + doman ${PN}d.8 ${PN}.conf.5 +} + +pkg_postinst() { + ewarn "For legal reasons, the MiniDLNA projet is now known as ReadyMedia" + elog "minidlna now runs as minidlna:minidlna (bug 426726)," + elog "logfile is moved to /var/log/minidlna/minidlna.log," + elog "cache is moved to /var/lib/minidlna." + elog "Please edit /etc/conf.d/${PN} and file ownerships to suit your needs." +} + +# vi: set diffopt=iwhite,filler: |