Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 646162

Summary: media-tv/plex-media-server keeps old libraries waiting in @preserved-rebuild forever
Product: Gentoo Linux Reporter: Dudu Edri <duduedri96>
Component: Current packagesAssignee: Stephen Shkardoon <ss23>
Status: RESOLVED OBSOLETE    
Severity: normal CC: andy.dalton, james05+gentoo, owmcclung, proxy-maint, spiderx, treecleaner
Priority: Normal Keywords: NeedPatch, PMASKED
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=644694
https://bugs.gentoo.org/show_bug.cgi?id=646066
Whiteboard:
Package list:
Runtime testing required: ---
Deadline: 2020-10-20   
Attachments: emerge --info

Description Dudu Edri 2018-01-30 21:18:00 UTC
Created attachment 517186 [details]
emerge --info

As described in previous fixed bug reports:
https://bugs.gentoo.org/644694

and *mostly*:
https://bugs.gentoo.org/646066

As a reminder, plex has its own libraries bundled with the upstream package, and they are extracted to /usr/lib/plexmediaserver. That caused revdep-rebuild to ask for a rebuild of plex-media-server, which would not help since the libraries will not be compiled, just extracted from the upstream package.
The previous bug was fixed by adding a mask to plex's library path in /etc/revdep-rebuild/80plexmediaserver.

After removing a library which is not a dependency of plex at all, I keep getting messages from "emerge --depclean" urging me to run "emerge @preserved-rebuild", for the same reason of the previous bug I mentioned above. Needless to say that rebuilding plex doesn't help.

I wonder whether there is a way to mask plex's library here, to prevent it from being examined by depclean.

If there isn't a way to do so, I advise putting plex's libraries somewhere else - since putting them under /usr/lib will always trigger some mechanism for library consistency.



Example:
After running "emerge --depclean", I get this message:
!!! existing preserved libs:                       
>>> package: x11-libs/libva-2.0.0
 *  - /usr/lib64/libva.so.2               
 *  - /usr/lib64/libva.so.2.0.0
 *      used by /usr/lib/plexmediaserver/Plex DLNA Server (media-tv/plex-media-server-1.10.1-r1)
 *      used by /usr/lib/plexmediaserver/Plex Media Scanner (media-tv/plex-media-server-1.10.1-r1)
 *      used by /usr/lib/plexmediaserver/Plex Media Server (media-tv/plex-media-server-1.10.1-r1)
 *      used by 5 other files  
 *  - /usr/lib64/libva-drm.so.2                                                                 
 *  - /usr/lib64/libva-drm.so.2.0.0                                                               
 *      used by /usr/lib/plexmediaserver/Plex DLNA Server (media-tv/plex-media-server-1.10.1-r1) 
 *      used by /usr/lib/plexmediaserver/Plex Media Scanner (media-tv/plex-media-server-1.10.1-r1)
 *      used by /usr/lib/plexmediaserver/Plex Media Server (media-tv/plex-media-server-1.10.1-r1)
 *      used by 4 other files      
Use emerge @preserved-rebuild to rebuild packages using these libraries





and running emerge @preserved-rebuild:

dudu-gentoo ~ # emerge -a @preserved-rebuild

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] media-tv/plex-media-server-1.10.1-r1

Would you like to merge these packages? [Yes/No] y
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) media-tv/plex-media-server-1.10.1-r1::gentoo
>>> Installing (1 of 1) media-tv/plex-media-server-1.10.1-r1::gentoo
>>> Jobs: 1 of 1 complete                           Load avg: 0.73, 1.12, 1.15

 * Messages for package media-tv/plex-media-server-1.10.1-r1:

 * Plex Media Server is now installed. Please check the configuration file in /etc/plex/plexmediaserver to verify the default settings.
 * To start the Plex Server, run 'rc-config start plex-media-server', you will then be able to access your library at http://<ip>:32400/web/
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

!!! existing preserved libs:
>>> package: x11-libs/libva-2.0.0
 *  - /usr/lib64/libva.so.2
 *  - /usr/lib64/libva.so.2.0.0
 *      used by /usr/lib/plexmediaserver/Plex DLNA Server (media-tv/plex-media-server-1.10.1-r1)
 *      used by /usr/lib/plexmediaserver/Plex Media Scanner (media-tv/plex-media-server-1.10.1-r1)
 *      used by /usr/lib/plexmediaserver/Plex Media Server (media-tv/plex-media-server-1.10.1-r1)
 *      used by 5 other files
 *  - /usr/lib64/libva-drm.so.2
 *  - /usr/lib64/libva-drm.so.2.0.0
 *      used by /usr/lib/plexmediaserver/Plex DLNA Server (media-tv/plex-media-server-1.10.1-r1)
 *      used by /usr/lib/plexmediaserver/Plex Media Scanner (media-tv/plex-media-server-1.10.1-r1)
 *      used by /usr/lib/plexmediaserver/Plex Media Server (media-tv/plex-media-server-1.10.1-r1)
 *      used by 4 other files
Use emerge @preserved-rebuild to rebuild packages using these libraries
Comment 1 Dudu Edri 2018-01-30 21:32:50 UTC
In order to emphasize the issue, consider the two following commands outputs (the output without grep is much longer with a lot of libraries; I just showing one library):

dudu-gentoo ~ # ldd /usr/lib/plexmediaserver/Plex\ DLNA\ Server | grep libva
        libva.so.2 => /usr/lib64/libva.so.2 (0x00007fbc0378c000)
        libva-drm.so.2 => /usr/lib64/libva-drm.so.2 (0x00007fbc03589000)


And the other one, with LD_LIBRARY_PATH set to /usr/lib/plexmediaserver (as put in plex's environment when it is starts):

dudu-gentoo ~ # LD_LIBRARY_PATH="/usr/lib/plexmediaserver" ldd /usr/lib/plexmediaserver/Plex\ DLNA\ Server | grep libva
        libva.so.2 => /usr/lib/plexmediaserver/libva.so.2 (0x00007f71ad533000)
        libva-drm.so.2 => /usr/lib/plexmediaserver/libva-drm.so.2 (0x00007f71ad331000)


Thanks.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2018-01-31 05:05:54 UTC

*** This bug has been marked as a duplicate of bug 646066 ***
Comment 3 Pacho Ramos gentoo-dev 2018-10-08 13:59:08 UTC
but the problem here is that plex requires x11-libs/libva:0/2 dep I think
Comment 4 Dudu Edri 2018-10-08 16:51:18 UTC
(In reply to Pacho Ramos from comment #3)
> but the problem here is that plex requires x11-libs/libva:0/2 dep I think

yes, but not exactly.
It requires a number of libraries, but they come packed with it inside the debian package. The current ebuild just extracts them to a known location and uses LD_* environment variables to make that work. It doesn't matter whether we recompile the package or not - the libraries are pre-compiled and the linkage wouldn't change.
Comment 5 Tony Vroon (RETIRED) gentoo-dev 2019-02-08 13:51:44 UTC
The 1.14.1 (current) release is now in the tree; I take it their appetite for outdated libraries has not abated?
Comment 6 Rafael Kitover 2019-03-30 12:12:13 UTC
Also this stuff links to openssl 1.0, which is annoying when you're trying to upgrade to 1.1 and get rid of 1.0.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-10-20 15:53:39 UTC
Package removed.