-
Notifications
You must be signed in to change notification settings - Fork 486
Debian packaging #431
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
Comments
For anyone interested in this, I build a |
Also, for future reference, you can build If you don't have a Debian environment around to check if things are working, you can use Docker, e.g.
To poke around with the |
I guess the next step could be providing a ppa? Don't know how much of a hassle it is though |
If someone wants to submit a RFP or ITP refer to the guide here: https://www.debian.org/devel/wnpp/ |
I'm working on this. But if the branch cargo-deb is not being used - it should just be removed to avoid confusion. Packaging this is being painful because there's plenty of dependencies that just don't exist yet in Debian. So in order to successfully package i3status-rust I need to first package all of this:
Hopefully once this is done future updates will be easier. |
Wow, you mean in Debian you have to package every rust dependency? And they are dynamically linked? Like Haskell on Arch? |
There's binary packages in debian of course, but the distribution needs to have source packages and those can only depend on other source packages, etc. So current status is:
So first - those dependencies need to be solved (by creating the required source packages). |
On the fun topic of Debian packaging: For regolith-linux we -for now, anyway- absolutely require Debian source packages (i.e. no cargo-deb). Getting this upstreamed into Debian is going to take months because each dependency (recursive) needs to be uploaded individually and there's a lot of steps to get that done, merged, approved (not the same thing, and not by the same team!), plus they don't like having several versions of the same crate around unless it's really popular, so for example our usage of nl80211 which depends on a very old version of neli is a problem (suggested solution is that we refactor nl80211 so it uses the newest neli, upstream that, and finally contribute... you get the idea). Anyway, while I'm doing all of that, there's no way this is going to stop the actual work I cared about which is getting i3status-rs into regolith, so I just prepared a package that vendors all the stuff. Really tentative: Note that I created a Makefile which I think can be avoided by just running cargo from debian/rules, but this was just an attempt to get it to work ASAP. Debian files are pretty much the bare minimum to get stuff to build. Probably incorrect, and definitely incomplete (specifically, the copyright one). Anyway it's a starting point. I will get it to a point in which it can be added to regolith's PPA, and then I'm done :-) Comments welcome. Maybe part of it (not the debian directory though) could be added to the main repo so it doesn't need to be part of the Debian package patches. |
Already did that :) Although it has a few breaking changes and the owner of the crate hasn't been around for more than a year, so I haven't opened a PR. |
Nice, I was going to do it myself :-) |
By the way @cfsmp3, what's the point of https://crates.io/crates/i3status-rs? Users still can't just |
It was required for cargo-deb (it depends on a crates.io crate). Dead end. |
I'm working on a docker based Debian packager. Current version here: https://github.com/cfsmp3/regolith-i3status-rust-deb-packager Note that "regolith" appears in the name there as in my fork if i3status-rust to avoid name collisions (in case there's an official package different to the one regolith will use, even though there's no reason for that at this point). As you can see that packager is quick and dirty, but it gets us to the goal. I will clean up once 0.20.8 it's released. |
V2 : https://github.com/cfsmp3/i3status-rust-docker-from-scratch This one is stand alone - no need to have any pre-existing file. |
Status report today on the official Debian repos. Still missing
Merged
Note that since there's already a valid solution to generate source (and therefore binaries) packages that are stand-alone (by vendoring all dependencies, of course) and can be added to a PPA (which we need to have for regolith, anyway) this is less urgent for me personally, but I'll complete this work anyway so we have an official Debian package. |
@MaxVerevkin On the issue of neli and nl80211 - this is a blocker for official Debian packages, they won't accept an old neli version: https://salsa.debian.org/rust-team/debcargo-conf/-/merge_requests/250#note_292962 If the original developer of nl80211 is MIA which seems to be the case (last github activity was on 2020) maybe it's time to release your fork on crates.io and package that one? |
|
Great, merged. https://salsa.debian.org/rust-team/debcargo-conf/-/merge_requests/250 Slowly chipping the tree so we get all our dependencies (recursively) in place. Jesus. |
If you want to use (mostly) the same PKGBUILD found on the AUR, makedeb should provide a great way to do that. It uses the same file format, and still gives you a .deb that any user can install on their system. P.s. makedeb is a personal project of mine. |
@hwittenborn we do have that, the problem is not creating a binary debian package, it's creating a source package (which in turn must depend on other source packages). It's taking forever because Debian approach is to have just version of each package, and that's totally the opposite of rust in which it's totally OK, and normal, for each crate to depend on specific versions of other crates without having a shit if they're the last or not. So pretty much the only way to get this into Debian is to submit the whole dependency tree updating stuff as needed. And then, each thing requires an approval, and actual upload (which someone who is very busy needs to do manually), etc. So well, it's taking forever, but it is what it is. |
Understood @cfsmp3, that's my bad for the confusion. The Debian packaging process isn't too fun for me either, thus why I made makedeb. I didn't see the stuff about binary Debs already existing, thus why I chimed in. Thanks for the quick response regardless! :) |
Status today. Missing packages upstream:
|
The constraints of Debian packaging policy and the nature of i3status-rs seem to naturally compete: i3statusrs will continue wanting to provide more system information, which will require more dependencies. One approach to resolving this would be to adopt a plugin model into i3status-rs. Blocks with problematic dependencies from a distro perspective could be held back without preventing the core project and blocks with more modest dependencies from being available via pacakge. I have not implemented this in rust myself, but from some reading it seems that ABI stable plugins can be implemented in Rust today. In addition to a plugin model, the other piece required for i3status-rs to be packaging friendly is to allow for "conf.d" style config partials, as i3 and Sway already support. This constraint stems from the policy that only one package may provide a single file on a target system. Monolithic config files prevent package managers from integration. I wonder if a plugin abstraction and conf.d style configuration has come up before in the project? I can certainly see cons to this...adding abstraction adds additional complexity. The plugin loading would likely incur additional startup performance overhead. For users that have no need/desire for some distro packaging support in i3status-rs, there would be no upside. The upside would be in greater availability of i3status-rs for those that desire to consume it from their OS package manager. |
Can we just make the "problematic" blocks optional? Users that wish to use them would build from source, just as they would have to build plugins from source.
I'm not sure which integration they need. Provide a default config? Change defaults? |
Sure, but the goldielocks set of dependencies for Distro A is sure to vary with Distro B. This might lead to confusion about what specific features are "built in" for some specific distro. But I think the packaging story can offer a better experience; w/ a suitable plugin mechanism, plugins could be packaged just as the core project is. So, I could install and configure, say a battery block entirely by installing a package which provides the plugin shared library and a default configuration partial (or none if 100% defaults are available).
Yes, this gets to my idea above. If a plugin is provided by a package, it cannot be that a single file (owned by another package) is mutatable. The integration with package managers require that the i3status-rs configuration can be expressed without requiring a single file w/ shared ownership (across packages in this case). As it stands, I believe i3status-rs's |
At the moment we basically encourage users to compile from source, although I'm aware of packages in the AUR, in Void Linux, and in NixOS.
One way to broaden the reach of this project considerably would be to make a Debian package (
.deb
) available, since many distributions can use them either directly or as the basis of their own packages. A Debian package could also provide a partial solution to #401, and there appears to be a popularcargo deb
subcommand to make this process easier, too.I'm also willing to attempt to get i3status-rust included in Debian itself, if that's appealing to others (although I am not a Debian user myself).
The text was updated successfully, but these errors were encountered: