-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mega: Resolve conflicting Debian packages #15
Comments
@jdeanwallace @jotaen4tinypilot - Can you review and let me know your thoughts? I thought this would be small enough for me to handle on my own, but I'm realizing it's larger in scope than I realized, and it's something we need to figure out before we release H.264. |
Nice write up. Here are some of my thoughts:
|
Oh, I hadn't really understood what the backports repo was, but from reading about them a little more, they seem like a good option. If we could install Janus (and possibly other dependencies) from backports, that would be much better than having to maintain our own Debian package, which has been eating up a lot of our dev time. @jdeanwallace - Can you look into tiny-pilot/ansible-role-ustreamer#77 once you've got the gatekeeper stuff wrapped up? |
Are we certain that
I haven’t checked the full (non-lite) install, though, so it might be pre-installed there. All three packages are available and installable through the default apt repositories. I suppose it’s still better to have that sorted out in any event, just to avoid nasty problems down the line. Unfortunately, I’m not that deeply into this topic currently, so in order to contribute, I would need to invest some upfront time to learn more about the problem. I’m happy to do that, I just wanted to check beforehand whether that’s worthwhile, given that @jdeanwallace seems to have a good clue already? |
Yeah, I'm not sure how it gets installed, but I've definitely had conflicts with libnice10 when I test on Bullseye Lite. Maybe something earlier in the install process installs libnice10 as a side effect? I think the best option at the moment is to explore whether we can just install using the official packages in the backports repo. Because if that's possible, then we save ourselves a lot of work now and a lot of ongoing maintenance work. |
Overview
TinyPilot's Janus Debian package conflicts with three other packages in a way that might create problems for us in the future.
Details
Janus' package conflicts
Our Janus package currently conflicts with (at least) three other Debian packages:
libnice10 is the most troublesome because there is a libnice10 package available from standard Raspbian apt repos, whereas I don't think the others are available. Worse, I believe libnice10 is installed by default in Raspbian Bullseye.
The conflict is that in order to function, Janus needs shared libraries from the other packages to be in their expected location. For example, the Janus package places a file at
/usr/lib/arm-linux-gnueabihf/libnice.so.10
. But then the real libnice10 package also wants to place a file there. If both packages are trying to place a file in the same location, there's a conflict.The proper thing to do is to declare the conflict in the package metadata. I didn't understand this before, so I removed the conflict line, but it turned out that just pushed the failure later in the install process when apt realizes that another package already owns a file that the Janus package is trying to install.
Why this is a problem
In the short term, this prevents Bullseye users from installing TinyPilot or running the uStreamer Ansible role.
In the long term, a poor strategy choice here could create headaches for us later.
Our custom debian package for
janus=1.0.1
conflicts withlibnice10
. A naive solution to resolve this would be:For users who installed Janus while H264 was in beta, they'll fail the above sequence. They won't be able to install our new
libnice10
package because it will conflict with their existingjanus
package. And they won't be able to install our newjanus
package because it will have a dependency on our custom build oflibnice10
, which apt won't know how to find.Maybe we have special logic to remove old versions of janus before installing libnice10, but that's a bit ugly. And then if we ever have to unbundle libsrtp2-1 or libwebsockets16, we're back to the same problem.
Potential solutions
A. Host our own apt repo
I think (but don't know for sure) that if we host our own apt repo, we can tell
apt
to install sets of packages rather than having them install one-by-one, as we're currently doing.That should solve the circular dependency problem because if we have
janus=1.0.1
that conflicts withlibnice10
, what I expect will happen is:apt
task of our Ansbile role to install something likejanus=1.04
janus=1.0.4
in TinyPilot's apt repojanus=1.0.4
depends onlibnice10=0.1.18
libnice10=0.1.18
in TinyPilot's apt repojanus=1.0.1
in anticipation of upgrading tojanus=1.0.4
(I think this is apt's behavior but I'm not 100% sure)janus=1.0.4
andlibnice=0.1.18
Advantages
Disadvantages
B. Install multiple Debian packages at once
It's possible that we can install sets of Debian packages without an apt repo.
dpkg
accepts multiple packages, so maybe we can just do something like:It doesn't seem like we can do it from Ansible's apt module because that module supports only a single
path
at a time, so we'd have to useshell
andcommand
and take care of downloading the.deb
files in separate Ansible plays.Advantages
Disadvantages
apt
module in Ansibleshell
orcommand
instead of the standardapt
to install multiple packages in a singledpkg
installC. Install debian packages one by one
The other possibility is that we just keep installing
.deb
packages one by one like we're currently doing.Advantages
apt
Ansible moduleDisadvantages
janus=1.0.1
D. Find a trustworthy apt repo for Janus
I don't think one exists, but it might be worth doing another quick check to avoid duplicating effort.
Advantages
Disadvantages
Subtickets
The text was updated successfully, but these errors were encountered: