digitaltrails / ddcutil-service

A Dbus ddcutil server for control of DDC Monitors/VDUs
GNU General Public License v2.0
11 stars 1 forks source link

Package for Ubuntu/Debian #25

Closed w8jcik closed 3 months ago

w8jcik commented 3 months ago

It would be great to be able to install the service with

sudo apt install ./ddcutil-service-1.0.7.deb
w8jcik commented 3 months ago

I created a simple project that builds ddcutil-service packages for Ubuntu 24.04, 23.10, 22.04 and Debian 12 and trixie.

Generated .deb files ddcutil-service_1.0.7.zip.

Of course adding it to software.opensuse.org would be better like ddcutil does https://software.opensuse.org/download.html?project=home%3Arockowitz&package=ddcutil.

digitaltrails commented 3 months ago

Thanks, very helpful. I will refer to this project from the readme.

I'm not that familiar with the deb based distros and I've never used ubuntu, so it's better if someone else does the packaging for them.

digitaltrails commented 3 months ago

Of course adding it to software.opensuse.org would be better like ddcutil does https://software.opensuse.org/download.html?project=home%3Arockowitz&package=ddcutil.

I started down that path, but I ran into dependency issues I couldn't figure out. I suspect I need to install OBS locally rather than use it from the web. In the end, supporting multiple distos just seems like too much effort, building is one issue, testing is another, then there's each distro's treatment of security around the i2c devices. A distro port is best done by someone who is actually going to use it.

w8jcik commented 3 months ago

Thanks, very helpful. I will refer to this project from the readme.

Feel free to do so.

I have added additional set of packages in the meantime, based on the latest ddcutil.

https://gitlab.com/w8jcik/ddcutil-service.deb#latest

Unfortunatelly ddcutil-service doesn't build against libddcutil from https://software.opensuse.org/download.html?project=home%3Arockowitz&package=ddcutil at the moment.

Opened issue for this https://github.com/rockowitz/ddcutil/issues/425.

I suspect I need to install OBS locally rather than use it from the web.

Never used OBS, so can't advice anything.

In the end, supporting multiple distos just seems like too much effort, building is one issue, testing is another

Maybe we could just copy what author of ddcutil did to publish his software. People can test and create issues. Your package seems less complicated to package. I might look into it later.

I tested the package for Ubuntu 24.04. I assume that other versions and Debian will work since they are made in exactly same way.

Part of testing is done by automated building.

then there's each distro's treatment of security around the i2c devices

A simple solution is to pull ddcutil as dependency, which is maintaining rules for Udev. Alternatively keep copying solution used there.

digitaltrails commented 3 months ago

Maybe we could just copy what author of ddcutil did to publish his software. People can test and create issues. Your package seems less complicated to package. I might look into it later.

I went down that route. The problem is I depend on libddcutil, which is declared in the spec, but the OBS build machine for Fedora did not install the dependencies. I could not see a way to achieve that with a web client. I was going to install OBS proper in a virtual machine and experiment further, but never got around to it.

then there's each distro's treatment of security around the i2c devices

A simple solution is to pull ddcutil as dependency, which is maintaining rules for Udev. Alternatively keep copying solution used there.

Actually, I do depend on that. The further complication I was thinking of is that the service had to setup /usr/lib/modules-load.d/ddcutil-service.con to pull in the i2c module (something the ddcutil package doesn't do). When attempting to get the package accepted into OpenSUSE, it was stressed that merely installing libddcutil should not do anything to pull in the module because installing the library does not definitely mean it's going to be used. It was also suggested it would be unacceptable to just have the service fail if the module wasn't present. However, other disto's may be less stringent (plus I didn't propose any counter arguments, I just accepted I had to do the work).

Perhaps installing ddcutil should also install a modules-load.d file. The packaging for ddcutil has only recently begun to add a separate package for udev rules, perhaps this is something else that it should do - I should suggest it.

w8jcik commented 3 months ago

Perhaps installing ddcutil should also install a modules-load.d file. The packaging for ddcutil has only recently begun to add a separate package for udev rules, perhaps this is something else that it should do - I should suggest it.

I checked Ubuntu and Debian. On Ubuntu, at least down to 18.04 i2c-dev is built-in, so no loading is necessary.

On Debian it is a module and it is most likely an issue. My package should be loading i2c-dev as well. For now I added a line in the README.md, that module needs to be loaded, because I have no Debian system to try it.

Since ddcutil already handles Udev, it would be consistent to also load i2c-dev module. But of course it is more work for the author.

digitaltrails commented 3 months ago

Thanks for putting in the work to do this, I've updated the README.md to reference your efforts.