Skip to content
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

Package youtube-dl-gui for Debian #21

Closed
nodiscc opened this issue Nov 22, 2014 · 24 comments
Closed

Package youtube-dl-gui for Debian #21

nodiscc opened this issue Nov 22, 2014 · 24 comments

Comments

@nodiscc
Copy link
Collaborator

nodiscc commented Nov 22, 2014

It would be really nice to be able to install youtube-dl-gui through distributions package managers.
Packaging it for Debian may be a good first step, as it will also make it available for a large number of derivative distros.

I've filed a Request For Packaging at http://bugs.debian.org/753350

Leaving this as a reminder for myself. I need to get better at python packaging and will start working on this after the current code refactoring is done. Help is also welcome (if the packaging process can be documented in another debian-packaging branch, this would be helpful)

@mbnoimi
Copy link

mbnoimi commented Jan 13, 2015

+1

@MrS0m30n3
Copy link
Owner

@nodiscc

You can now package youtube-dl-gui for debian.
Feel free to ask any questions.

@MrS0m30n3
Copy link
Owner

@nodiscc any news on this?

@nodiscc
Copy link
Collaborator Author

nodiscc commented Jun 15, 2017

@MrS0m30n3 Sorry I totally forgot about this, but I plan to dive in Debian packaging more seriously soon (need to get some other stuff done first, but I should be able to start in the coming weeks).

In the meantime you or I can also contact Félix Sipma felix.sipma@no-log.org or Joel Pickett jpickett@ubuntu.com who expressed interest in packaging youtube-dl-gui in the Debian bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=753350

I think it would be nice to get the packaging done directly in this repo (maybe in a separate branch) as seeing the actual process/commits would be very instructive.

@nodiscc
Copy link
Collaborator Author

nodiscc commented Jul 12, 2017

Packaging ready at #189

@erwinfeser
Copy link

+1

@nodiscc
Copy link
Collaborator Author

nodiscc commented Nov 22, 2017

I'd like to note that downloading the .deb package directly from the link provided in the README is potentially insecure against MitM attacks because the package is downloaded over plaintext HTTP and no cryptographically secure authentication check is performed. Ubuntu users should import the PPA GPG key and add the PPA to their sources.list as explained here. Note that PPAs come with their own set of problems.

Packaging still in progress at MrS0m30n3/twodict#1 and #189. Once this is done we can at least provide downloads over HTTPS and signed package checksums, then try to address the Debian RFP.

@legrostdg
Copy link

I just noticed that youtube-dl-gui downloads youtube-dl, which is not allowed in Debian. I can add a local patch to disable this, but it may be cumbersome to update in the long term... @MrS0m30n3 do you think you could add a flag in setup.py to disable the functionality?

@nodiscc
Copy link
Collaborator Author

nodiscc commented Jan 9, 2018

I'v been searching for this restriction in https://www.debian.org/doc/debian-policy/ but could not find it :/ @legrostdg could you point me to the debian policy part that forbids downloading binaries? (I believe you, and I can totally understand why this restriction would exist)

This is the closest I could find in https://www.debian.org/social_contract#guidelines

The program must include source code, and must allow distribution in source code as well as compiled form.

  • If that's the case would downloading the youtube-dl source tarball alongside the binary solve this problem? Or is it simply not allowed?
  • If not, is there an acceptable workaround to keep youtube-dl up-to-date eg on Debian Stable (without adding a 3rd-party APT repo which would bring us back to square one)?

Asking because this is one of the main benefits of youtube-dl-gui for me.
As I said in #189, many thanks and I'm fine with any solution.

PS: I can think of Firefox/Thunderbird that allow downloading software directly from their addon system, but yeah I can't think of another package that does this. Maybe there's an exception for them.

@legrostdg
Copy link

@nodiscc I think you want to look at https://www.debian.org/doc/debian-policy/#archive-areas

None of the packages in the main archive area require software outside of that area to function.

Having to download youtube-dl would put youtube-dl-gui in contrib, and not main.

I you want latest youtube-dl on stable, you probably want a to use a backport. I just checked https://packages.qa.debian.org/y/youtube-dl.html and there is no stable-bpo version of youtube-dl yet. You can try to report a wishlist bug to youtube-dl asking for a backport.

@legrostdg
Copy link

legrostdg commented Jan 10, 2018

If that's the case would downloading the youtube-dl source tarball alongside the binary solve this problem? Or is it simply not allowed?

there should be no duplication of code, youtube-dl exist in the archive, so youtube-dl-gui has to use it. Like this, the archive state is consistent, and all users benefit from an update to youtube-dl, not just youtube-dl-gui users.

@MrS0m30n3
Copy link
Owner

I will try to add a flag in setup.py in the next few days. It will:

  • Disable the automatic check for youtube-dl before the download phase
  • Use the youtube-dl binary under /usr/bin/
  • Show a popup when a user tries to use the Update functionality from the options menu.
  • Inform the user if youtube-dl-gui was not able to locate the youtube-dl package.

I will ping you here when it's done.

@legrostdg
Copy link

I added a patch to remove the functionality in the meantime, but I'll update the package as soon as possible. The package is waiting sponsors to be uploaded to the NEW queue.

@MrS0m30n3
Copy link
Owner

I took a look on your files (on salsa) and you have some errors-mistakes:

  • patches/0001-prevent-youtube-dl-updating.patch: On line 30 you remove the initiation of self._time_it_took, which results in calculating the total download time incorrectly.
  • copyright: Wrong Upstream-Name value and you also forgot the icons under the data/pixmaps dir (see icons-license).
  • You could include some of the doc files like AUTHORS, TODO, README.md

@legrostdg
Copy link

Thanks for you careful review. I fixed all of these.

@MrS0m30n3
Copy link
Owner

In the copyright file, at the creative commons license section there is a g at the end of each line.
Is this normal?

@legrostdg
Copy link

Woops... Should be fixed now.

@MrS0m30n3
Copy link
Owner

@legrostdg

Flag is ready.

You can now build with python setup.py build --no-updates, which will disable updates and switch to the system's youtube-dl copy under the /usr/bin directory.

To use it with pybuild you can add the line below to your debian/rules file:

export PYBUILD_BUILD_ARGS=--no-updates

Not sure if this the right way to do it though.

Also, it's a wise choice to remove all files under the youtube-dlg's configuration path (youtube-dl binary, old settings and log) during the installation, but the patch should work either way.

Give it a test and if you spot anything post here.

@nodiscc you can still use the old behaviour if you edit your settings file after the installation.
More specifically you should edit the disable_updates & youtubedl_path options.

@legrostdg
Copy link

Here is the last update concerning Debian packaging. Unfortunately, the youtube-dl package in Debian is python3 only. So, we need to get youtube-dlg python3-compatible before it can enter Debian...

https://lists.debian.org/debian-mentors/2018/03/msg00306.html

@MrS0m30n3
Copy link
Owner

Why do we even care what version of youtube-dl & python Debian provides?

youtube-dl-gui should be able to work with any version of youtube-dl & python as long as the "interface" to communicate with youtube-dl stays the same.

@legrostdg
Copy link

From the message I mentioned https://lists.debian.org/debian-mentors/2018/03/msg00306.html, I get the impression that youtube-dl-gui tries to use youtube-dl-the-python-package, and not youtube-dl-the-command-line-program. youtube-dl-the-python-package is python3-only in Debian. Maybe I'm just missing something...

@legrostdg
Copy link

Also note that there is a middle-term goal of getting rid of python2 in Debian, so it would be good to be sure you plan to convert youtube-dl-gui to python3 before it enters Debian (no need to do it right now, of course 😄).

@legrostdg
Copy link

legrostdg commented Jul 22, 2018

I just looked one more time at the issue. It's probably my ugly patch applied to the latest release which does not work as expected. Could you push a new release, so that I can use the build flag to disable updates?

@nodiscc nodiscc removed their assignment Jan 8, 2019
@nodiscc
Copy link
Collaborator Author

nodiscc commented Feb 1, 2020

Unmaintained project, use https://github.com/axcore/tartube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants