tartube
tartube copied to clipboard
Debian packaging
I started packaging tartube for Debian. Here is the repo (WIP) https://salsa.debian.org/felix-guest/tartube
I would need at least #14 to be fixed before submitting the package. #16 also seems pretty important and #15 would be nice.
@legrostdg, is there anything else you need? I'm going to release v1.2 this weekend and, after that, I'll be away from my desk for a few weeks.
Sorry, I lost interest and never finished the packaging. I guess I'd like something simpler than tartube: just a youtube-dl frontend, that gets an url, some options (codec, quality, sound only, ...) and a local directory or filename. The packaging repo is still there if someone wants to finish it.
I am interested in picking up the packaging work. I maintain Debian packages for personal use but I wish we could make tartube packages suited to official Debian repos for the next release. ping @axcore feel free to reopen this.
ping anyone interested in co-maintaining the Debian package
@legrostdg By the way, "just dump everything into a single directory" is now available. The procedure would be...
Edit > System preferences > Operations > URL flexibility > Download multiple videos into the containing folder Create a folder with the 'Add a new folder' button Click the 'Add new video(s)' button Copy and paste as many URLs as you like - videos, channels, playlists Click the 'Download all' button All videos are downloaded into the single folder
I am interested in picking up the packaging work
@nodisc, if you mean, "produce a .DEB package that works", I can handle that, but if you mean "produce a .DEB package and then persuade the debian maintainers to add it to their repos" then I know nothing about how that's done.
A package for the repos would have to use ../tartube/tartube_debian as the executable, because we've already removed some stuff that is definitely unacceptable for the repos.
@nodiscc you can clone https://salsa.debian.org/felix-guest/tartube/ The packaging is almost done. I think there just was something with the icon path configuration.
@axcore Thanks, I won't use it myself, as I'm more cli-oriented :-). But I would like to have a very simple youtube-dl gui for other users in Debian. It means having this kind of configuration by default, as these users won't change it by themselves.
@legrostdg Doesn't youtube-dl-gui do exactly what you want?
Exactly, and I first started the packaging https://github.com/MrS0m30n3/youtube-dl-gui/issues/21 Unfortunately, not supporting python3 is now a blocker to enter Debian https://github.com/MrS0m30n3/youtube-dl-gui/issues/289
If that's the only stumbling block, it would not be a lot of work to update youtube-dl-gui for python3. A lot of the code was re-used in Tartube, so most of the work is already done.
Probably... But it seems like upstream abandoned the project :(.
@legrostdg I'm going to do it myself, in a few days.
I have created DEB and RPM packages for Tartube. They seem to be working properly. They can be downloaded from here
I have changed the environment variables used to create these packages.
Use TARTUBE_PKG=1 to create an ordinary DEB/RPM package.
Use TARTUBE_PKG_STRICT=1 to create a DEB/RPM package, in which youtube-dl updates are disabled. (This replaces the old TARTUBE_DEBIAN environment variable).
I think you could attach the packages to https://github.com/axcore/tartube/releases if you don't want to split hosting of files to sourceforge.
I just ran lintian on your packages and they almost check all the boxes:
$ lintian python3-tartube_2.0.0.deb
W: python3-tartube: new-package-should-close-itp-bug
E: python3-tartube: no-copyright-file
W: python3-tartube: description-starts-with-leading-spaces
W: python3-tartube: extended-description-contains-empty-paragraph
W: python3-tartube: binary-without-manpage usr/bin/tartube
python3-tartube: no-copyright-file
Upload to PyPI fails if any licence or README.rst file are included. This bug has not been fixed during the last five years, so I don't have a great expectation that it will be fixed soon.
@nodiscc v2.0.006 removes all of the lintian errors, except for new-package-should-close-itp-bug.
By running TARTUBE_PKG_STRICT=1 python3 setup.py build, you get a set of files in build/lib/tartube/:
build/lib/tartube/__init__.py
build/lib/tartube/config.py
build/lib/tartube/dialogue.py
build/lib/tartube/downloads.py
build/lib/tartube/files.py
build/lib/tartube/formats.py
build/lib/tartube/info.py
build/lib/tartube/mainapp.py
build/lib/tartube/mainwin.py
build/lib/tartube/media.py
build/lib/tartube/options.py
build/lib/tartube/refresh.py
build/lib/tartube/testing.py
build/lib/tartube/tidy.py
build/lib/tartube/updates.py
build/lib/tartube/utils.py
build/lib/tartube/xdg_tartube.py
I guess the next step is to automate creation of binary deb/rpm packages. Until now I guess you were doing it manually with dpkg-deb or similar before uploading? Or is there some step I'm missing to build a deb package?
The procedure I used to create the python3-tartube_2.0.0-STRICT.deb file, on a fresh install of Debian, was this:
su
apt install git build-essential python3-setuptools python3-pip python3-all dh-python
apt-get install python3-stdeb fakeroot python-all
exit
pip3 install requests
[extract the .tar.gz] [move stdeb.cfg from ../tartube/pack into the directory above]
cd tartube
TARTUBE_PKG_STRICT=1 python3 setup.py sdist
su
TARTUBE_PKG_STRICT=1 python3 setup.py --command-packages=stdeb.command bdist_deb
exit
lintian deb_dist/python3-tartube*deb
The dependencies in the package are not enough. (I downloaded the package by the link in the "main page" - meaning, README.rst).
- Install the package, do
apt-get install -f, and try running it:
ModuleNotFoundError: No module named 'gi'
- Install python3-gi (apparently, it's a runtime dependency, not a build-dep as specified in the package)
File "/usr/bin/tartube", line 40, in <module>
import mainapp
File "/usr/lib/python3/dist-packages/tartube/mainapp.py", line 25, in <module>
gi.require_version('Gtk', '3.0')
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 129, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gtk not available
Now I don't know what else to install. apt-cache search python3 gtk returns very little, and nothing about GTK3.
(I'm on Debian Buster with MATE. To check for dependencies, try running it in a container with nothing installed. If it does not run, then you've missed something. I'm not running anything on my system until I try it in Docker first.)
I've confirmed this on a Debian LiveCD (Debian Buster MATE amd64).
Traceback (most recent call last):
File "/usr/bin/tartube", line 40, in <module>
import mainapp
File "/usr/lib/python3/dist-packages/tartube/mainapp.py", line 61, in <module>
import config
File "/usr/lib/python3/dist-packages/tartube/config.py", line 37, in <module>
import mainwin
File "/usr/lib/python3/dist-packages/tartube/mainwin.py", line 40, in <module>
gi.require_version('Notify', '0.7')
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 129, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Notify not available
Some other dependency missing? I remember it working on an Ubuntu LiveCD (Eoan, I think, but maybe Focal), but not on Debian Buster.
UPDATE: Tried on Debian Buster with Gnome - it works! So it's installed by default on Gnome, but not in MATE. So, tried on Ubuntu MATE Focal - it works! Just in case it is something commonly forgotten in MATE. And on Kubuntu Focal it works too.
@dark-penguin, I'll look into this as soon as I have finished other things.
@dark-penguin, I was not able to reproduce your errors on Debian. (In fact, I was not even able to get the package managers working on Debian, but that's another story).
I released v2.1.0 today. It explicitly names gi as a dependency; this might resolve your problem when installing from PyPI, or when using the DEB and RPM packages.
The easiest way to reproduce it would be a Debian LiveCD (debian-live-10.3.0-amd64-mate.iso). Specifically MATE! If you download the DEB and install it, it gives this error.
If you use Docker, then it's even easier (and it reproduces on anything, because the default Docker images have very little stuff preinstalled - that's why I test dependencies this way).
I've tried installing everything I could think of, including something-gi, but it didn't help. Which package exactly is "gi" ?
By the way, I don't see anything like this in the latest DEB. Here is its debian/control:
Package: python3-tartube
Source: tartube
Version: 2.1.0-1
Architecture: all
Maintainer: A S Lewis <[email protected]>
Installed-Size: 3957
Depends: python3-feedparser, python3-requests, python3:any
Section: python
Priority: optional
Homepage: https://tartube.sourceforge.io
Description: GUI front-end for youtube-dl
.
Tartube is a GUI front-end for youtube-dl, partly based on youtube-dl-gui
and written in Python 3 / Gtk 3.
Then I don't know what to suggest. The Python setup.py file contains this line:
install_requires=['feedparser', 'gi', 'playsound', 'requests'],
As we can see, the DEB packager picks up the need for feedparser and requests, but not gi or playsound.
Depends: python3-feedparser, python3-requests, python3:any
OK, so the problem is that some Debian packaging tools don't automatically pick up all dependencies.
Debian packaging and Python packaging are topics I'm particularly interested in. I might look into this if I have the time.
OK, so the problem is that some Debian packaging tools don't automatically pick up all dependencies.
Yes, this must be the case. This is what I do to produce the Tartube DEB package, on a clean install of Debian (with Cinnamon):
su
apt install git build-essential python3-setuptools python3-pip python3-all dh-python
apt-get install python3-stdeb fakeroot python-all
exit
pip3 install feedparser playsound requests
cd Downloads/tartube
TARTUBE_PKG=1 python3 setup.py sdist
su
TARTUBE_PKG=1 python3 setup.py --command-packages=stdeb.command bdist_deb
exit
lintian deb_dist/python3-tartube*deb
The Request for Packaging to get Tartube included in official Debian repositories can be found here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=934681.
That request was added by the same person who opened this issue.