tdm icon indicating copy to clipboard operation
tdm copied to clipboard

Debian Package

Open narc-Ontakac2 opened this issue 1 year ago • 34 comments

It was pretty easy to create a working Debian package. If you are interested I would do the details right (which is a bit of work) and create a release workflow that builds a Debian package.

narc-Ontakac2 avatar Jan 27 '24 17:01 narc-Ontakac2

Hi.

TBH I'm on the fence on this one. I'll have to maintain it later, and I think that at some point there will be "why there's no packages for fedora/arch/whatever".

I see little to no gain with distribution packaging when there is easily runnable source and pypi packages.

As a middle ground I can see about creating .appimage or something like that so it can be run standalone on any compatible distro.

jziolkowski avatar Jan 28 '24 12:01 jziolkowski

Hi.

... I think that at some point there will be "why there's no packages for fedora/arch/whatever".

The easy answer is "do it if if you want it".

I see little to no gain with distribution packaging when there is easily runnable source and pypi packages.

The point with package managers is that there are too many while there actually can be only one. Mine is apt.

As a middle ground I can see about creating .appimage or something like that so it can be run standalone on any compatible distro.

That is not for me. I was suggesting this because I could do it with moderate effort. I just packaged a "good enough for me" solution by installing dh-python and running dh-make followed by debuild.

The TDM application is really nice, I like it very much. Being able to access all Tasmota devices in parallel makes a big difference.

It might be doable to make this an official Debian package. If this is doable I'll go that way.

narc-Ontakac2 avatar Jan 28 '24 12:01 narc-Ontakac2

The point with package managers is that there are too many while there actually can be only one. Mine is apt.

For python there already is, pip :)

After long hiatus, I'm back to work on TDM. It will change rapidly. As for making an official package for debian might be detrimental for the user experience with how long it takes for debian to update packages. So maybe building .deb in CI might be a solution.

If you feel like it, make a PR against my current CI setup, I'll have a look.

jziolkowski avatar Jan 28 '24 13:01 jziolkowski

As for making an official package for debian might be detrimental for the user experience with how long it takes for debian to update packages.

This depends on the maintainer. If the package is following upstream closely the versions in Ubuntu interim releases (every 6 month) will be quite recent.

It is really good news that you'll be working on TDM.

narc-Ontakac2 avatar Jan 28 '24 14:01 narc-Ontakac2

6 months, yikes. That's a long time. OTOH nothing stops people from installing debs manually, as long as other requirements are met.

jziolkowski avatar Jan 28 '24 14:01 jziolkowski

pypi is not a good solution for users. It is for developers but it's hardly usable for users, especially with the move to prevent pip install outside of venv (venv is not usable for "users") AppImage is a good solution to have a read-to-run and up-to-date package for any user.

barbudor avatar Jan 28 '24 14:01 barbudor

(venv is not usable for "users")

couldn't disagree more. Yes, it's an extra step, but still doable. I used it long before I was a developer.

Either way, to not churn through this topic again, exploring other packaging options might not be a bad idea.

@narc-Ontakac2 I assume packaging as .deb makes the application rely on system-available dependencies. Doesn't that lock me out of freely bumping major dependencies, like PyQT (or PySide perhaps one day) or paho-mqtt?

jziolkowski avatar Jan 28 '24 15:01 jziolkowski

pypi is not a good solution for users.

Agreed (as expected :-) ). To me the point is that as a user you have to know one package manager for every language.

narc-Ontakac2 avatar Jan 28 '24 18:01 narc-Ontakac2

I assume packaging as .deb makes the application rely on system-available dependencies. Doesn't that lock me out of freely bumping major dependencies, like PyQT (or PySide perhaps one day) or paho-mqtt?

Yes, it does. But if you change dependencies that is the packagers problem. In my case the dependencies were automatically detected by dh-python and the resulting package just worked.

narc-Ontakac2 avatar Jan 28 '24 18:01 narc-Ontakac2

pypi is not a good solution for users.

Agreed (as expected :-) ). To me the point is that as a user you have to know one package manager for every language.

I'm so used to it everyday I don't even give it a second thought. That's the way it is. Trying to fight it or work against it is a lost battle.

jziolkowski avatar Jan 28 '24 18:01 jziolkowski

My 2 cents, which "normal" user does use Tasmota Device Manager? This users are so skilled to get Tasmota installed, set up a mqtt broker and get this all together running. This user should not be able to install TDM from PyPi? Really?

Jason2866 avatar Jan 28 '24 20:01 Jason2866

My 2 cents, which "normal" user does use Tasmota Device Manager? This users are so skilled to get Tasmota installed, set up a mqtt broker and get this all together running. This user should not be able to install TDM from PyPi? Really?

Apparently not 🤷‍♂️

jziolkowski avatar Jan 28 '24 20:01 jziolkowski

I have started packaging TDM. See

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1062335 https://salsa.debian.org/debian-iot-team/tasmota-device-manager

I would however prefer to package a release that already has the configuration files in the new location. Unfortunately the commit that introduced this is a refactoring that does too much for a patch. Will there be new release within the next weeks?

narc-Ontakac2 avatar Feb 03 '24 15:02 narc-Ontakac2

I still have a few open topics for 0.3, but it will happen eventually, yes. Can't say any definite date as I'm a bit sick right now.

jziolkowski avatar Feb 03 '24 15:02 jziolkowski

Get well soon.

narc-Ontakac2 avatar Feb 03 '24 15:02 narc-Ontakac2

Unfortunately the icons are not under a free license and can not be included in Debian .

narc-Ontakac2 avatar Feb 08 '24 11:02 narc-Ontakac2

Unfortunately the icons are not under a free license and can not be included in Debian

Icons will not be changed.

Jason2866 avatar Feb 08 '24 11:02 Jason2866

Wait, icons8 are not free?

jziolkowski avatar Feb 08 '24 12:02 jziolkowski

Not in the sense of a free license.

narc-Ontakac2 avatar Feb 08 '24 12:02 narc-Ontakac2

https://intercom.help/icons8-7fb7577e8170/en/articles/5534926-universal-multimedia-license-agreement-for-icons8 https://wiki.debian.org/DebianFreeSoftwareGuidelines

This means the icons can not be distributed as part of Debian. So I think I have 3 options:

  1. Build and maintain a package that is not distributed by Debian.
  2. Build the Debian package with a different icon set (its only about 20 icons).
  3. Give up.

narc-Ontakac2 avatar Feb 08 '24 12:02 narc-Ontakac2

Given these circumstances at the moment the sane option would be to provide a .deb from CI releases i guess.

I'm not saying that icons could not be changed ever ever. Just not something I want to do right now.

jziolkowski avatar Feb 08 '24 12:02 jziolkowski

There is an installable deb package now: https://www.heute-morgen.de/debian/repo/unstable/main/binary-all/net/tasmota-device-manager_0.2.13-1_all.deb It installs on bookworm and trixie and adds a menu entry in the network section.

It does have the disadvantages of the 0.2.13 version, which are:

  1. It still uses the old location for its config files (~/TDM).
  2. It installs its modules directly into /usr/lib/python3/dist-packages/. This comes in my understanding from the use of setup.py, which is removed in the development branch.

narc-Ontakac2 avatar Feb 10 '24 11:02 narc-Ontakac2

The download of the deb package does require a username and password. Wasn't able to get the AppImage to work under Linux Mint Debian Edition so far. I'm relatively new to Linux.

DeusAbsconditus avatar Feb 26 '24 21:02 DeusAbsconditus

The download of the deb package does require a username and password.

Sorry, it is http://www.heute-morgen.de/debian/repo/unstable/main/binary-all/net/tasmota-device-manager_0.2.13-1_all.deb.

My website currently follows the simple concept that all https requires authentication.

narc-Ontakac2 avatar Feb 27 '24 04:02 narc-Ontakac2

I'm relatively new to Linux.

A local package file should be installable with apt:

sudo apt install <pathname of deb file>

narc-Ontakac2 avatar Feb 27 '24 05:02 narc-Ontakac2

One possibility that a number of projects do is have your own apt source. Simple way is https://askubuntu.com/questions/170348/how-to-create-a-local-apt-repository @narc-Ontakac2 the package is useful thanks but you should remove the .py from tdmgr.py

beren12 avatar Mar 22 '24 14:03 beren12

Thanks, I a maware of that option. I am maintaining the vzlogger Debian packages. We are using a cloudsmith repository for that. Doing that is however a bit of an effort. Having an official Debian package is easier (provided I succeed with that). Currently the Debian package is however blocked by the icons because they have a license that Debian classifies as non-free.

I am aware that the .py is against Debian policy. But since the name of the executable will change anyway (according to the dev branch) I kept it for now.

narc-Ontakac2 avatar Mar 22 '24 16:03 narc-Ontakac2

@narc-Ontakac2 Thanks for the .deb file. I used it to install TDM on Ubuntu 24.04 and is working great. Please see post #265 under discussions.

NsinghP avatar Jul 16 '24 11:07 NsinghP

@jziolkowski Could you send me the icons and the associated GRC file? If so I could check if I can get a free (in the Debian sense) alternative.

narc-Ontakac2 avatar Jul 16 '24 15:07 narc-Ontakac2

I'm away from home for a few days, I don't have the source PNGs at hand. Also what GRC file?

jziolkowski avatar Jul 16 '24 16:07 jziolkowski