swupd-client
swupd-client copied to clipboard
3rd-party: allow exporting the lib folder of a bundle
I have been experimenting with building my own 3rd-party bundles and while most of the bundles work fine without having their lib folder in the LD_LIBRARY_PATH it can be useful to export the libraries to the LD_LIBRARY_PATH. A good example for this need is having a build of ffmpeg installed as a 3rd-party bundle when the lib folder of this ffmpeg build is not available in the LD_LIBRARY_PATH applications like vlc (and likely others as well) can't make proper use of the added codecs.
Thank you for the feedback. So far, as you noticed, we only support exporting binaries, but exporting libraries and .desktop files is going to be supported in the future.
@gregor160300 A work around for this is to have whatever applications are requiring the 3rd-party libraries in the same mix repo.
Great to hear that you are planning on supporting more export options. I did consider building vlc within the same mix however I found that it was easier to just run LD_LIBRARY_PATH=/opt/3rd-party/bundles/
@gregor160300 Do you mean that:
sudo sh -c 'echo /usr/local/lib >>/etc/ld.so.conf'
sudo ldconfig
isn't enough for firefox (and apparently vlc) to use the library path correctly? I think this was a firefox bug looking at this.
@gregor160300 Do you mean that:
sudo sh -c 'echo /usr/local/lib >>/etc/ld.so.conf' sudo ldconfig
isn't enough for firefox (and apparently vlc) to use the library path correctly? I think this was a firefox bug looking at this.
Indeed this isn't enough for both vlc and firefox I will read through the bugreport on bugzilla to find a proper workaround as it seems firefox didn't fix it yet. Meanwhile, I am setting up a VM to check whether or not adding the export of LD_LIBRARY_PATH in /etc/environment fixes the codec loading in at least vlc
EDIT: Adding
if [[ $UID -ge 1000 && -d /opt/3rd-party/bundles/<my-3rd-party-repo>/usr/lib && -z $(echo $LD_LIBRARY_PATH | grep -o /opt/3rd-party/bundles/<my-3rd-party-repo>/usr/lib) ]]
then
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/3rd-party/bundles/<my-3rd-party-repo>/usr/lib"
fi
to /etc/environment also seems to do the trick (at least when bash is the default shell, haven't gotten it to work yet by setting the same in /etc/zsh/zprofile for zsh