Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 637974 - media-libs/libdvdcss-1.4.0: cache directory not used
Summary: media-libs/libdvdcss-1.4.0: cache directory not used
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-18 01:23 UTC by tbartdev
Modified: 2018-12-13 19:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
adapted ebuild (libdvdcss-1.4.0-r1.ebuild,886 bytes, text/plain)
2017-11-18 01:23 UTC, tbartdev
Details
upstream patch ac90030..6e5d6e1 (cache_dir_handling_fixes_1.diff,445 bytes, patch)
2017-11-18 01:25 UTC, tbartdev
Details | Diff
upstream patch 7d86a08..408ec2f (cache_dir_handling_fixes_2.diff,530 bytes, patch)
2017-11-18 01:25 UTC, tbartdev
Details | Diff
upstream patch 2f78b78..7d86a08 (cache_dir_handling_fixes_3.diff,536 bytes, patch)
2017-11-18 01:26 UTC, tbartdev
Details | Diff
upstream patch 6e5d6e1..a957325 (cache_dir_handling_fixes_4.diff,1.99 KB, patch)
2017-11-18 01:26 UTC, tbartdev
Details | Diff
patch fixing wrong path string manipulation (cache_dir_handling_fixes_5.diff,888 bytes, patch)
2017-11-18 01:28 UTC, tbartdev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tbartdev 2017-11-18 01:23:44 UTC
Created attachment 504582 [details]
adapted ebuild

This is more or less https://trac.videolan.org/vlc/ticket/16347 although the fix mentioned there did not work for me.

v1.3.0 worked flawlessly on my device, but 1.4.0 does not use the cache directory (usually at ~/.dvdcss) anymore, neither for writing found keys, nor for getting them instead of computing them again.

Normally, users won't notice, as calculating the keys is really fast on moderate hardware.

However, I need to copy the keys to a RPi system as it cannot compute them correctly with every disk. Playing a DVD on my main device however produced no new keys in ~/.dvdcss since 1.4.0

Using DVDCSS_VERBOSE=2 when playing a DVD shows errors like


libdvdcss error: failed creating cache directory


Please find attached an updated ebuild + patchset for fixing the issue. My programming skills are pretty basic, so please check thoroughly.
The first four patches are taken directly from upstream as they also handle other errors related to the cache dir.

I'll try to send the patch upstream as well.
Comment 1 tbartdev 2017-11-18 01:25:19 UTC
Created attachment 504584 [details, diff]
upstream patch ac90030..6e5d6e1
Comment 2 tbartdev 2017-11-18 01:25:48 UTC
Created attachment 504586 [details, diff]
upstream patch 7d86a08..408ec2f
Comment 3 tbartdev 2017-11-18 01:26:17 UTC
Created attachment 504588 [details, diff]
upstream patch 2f78b78..7d86a08
Comment 4 tbartdev 2017-11-18 01:26:56 UTC
Created attachment 504590 [details, diff]
upstream patch 6e5d6e1..a957325
Comment 5 tbartdev 2017-11-18 01:28:02 UTC
Created attachment 504592 [details, diff]
patch fixing wrong path string manipulation
Comment 6 tbartdev 2017-11-22 19:42:52 UTC
Added a comment to the existing upstream bug, hoping it will get attention without opening a new one with the same issue..

https://trac.videolan.org/vlc/ticket/16347#comment:9
Comment 7 Thomas Petersen 2018-04-28 22:15:18 UTC
I can comfirm that creation of cache subdirectories fails with libdvdcss-1.4.0 because of the use of overlapping buffers with sprintf. The problem probably appeared after some gcc/glibc upgrade.

The patch by tbartdev does the trick and appears to have been accepted upstream. With libdvdcss-1.4.2 the cache is functioning properly again.

Stabilizing 1.4.2 would solve this problem.
Comment 8 Steve Dibb (RETIRED) gentoo-dev 2018-12-13 19:10:50 UTC
(In reply to Thomas Petersen from comment #7)
> I can comfirm that creation of cache subdirectories fails with
> libdvdcss-1.4.0 because of the use of overlapping buffers with sprintf. The
> problem probably appeared after some gcc/glibc upgrade.
> 
> The patch by tbartdev does the trick and appears to have been accepted
> upstream. With libdvdcss-1.4.2 the cache is functioning properly again.
> 
> Stabilizing 1.4.2 would solve this problem.

Closing out since 1.4.2 is stable.