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

source tars #13400

Closed
bothie opened this issue Jun 16, 2017 · 6 comments
Closed

source tars #13400

bothie opened this issue Jun 16, 2017 · 6 comments

Comments

@bothie
Copy link

@bothie bothie commented Jun 16, 2017

The downloads on http://rg3.github.io/youtube-dl/download.html don't contain source downloads. Only mixed downloads. I'd like to see a source only file on the downloads page.

Anyone downloading the source doesn't need the binary anyway, so no point in including it, but here are one million 4 hundred thirty one thousand and four hundred reasons for a source only download:

# wget -nv https://yt-dl.org/downloads/2017.06.12/youtube-dl-2017.06.12.tar.gz && gzip -cd youtube-dl-2017.06.12.tar.gz | tar x && rm youtube-dl/youtube-dl && tar c youtube-dl | gzip -c6 > youtube-dl-2017.06.12.src.tar.gz && gzip -cd youtube-dl-2017.06.12.tar.gz | gzip -c6 >youtube-dl-2017.06.12.bin.tar.gz && ls -l
2017-06-16 09:47:00 URL:https://github-production-release-asset-2e65be.s3.amazonaws.com/1039520/495761be-4f16-11e7-8c38-4efeffc58f2e?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20170616%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170616T074646Z&X-Amz-Expires=300&X-Amz-Signature=ba4d32fba3cc651495ba85ad1fe9a621a6f2b8d1440ad39640d5bc2fb6a6166a&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dyoutube-dl-2017.06.12.tar.gz&response-content-type=application%2Foctet-stream [2727978/2727978] -> "youtube-dl-2017.06.12.tar.gz.1" [1]
insgesamt 9272
drwxr-xr-x 7 root root    2048 16. Jun 09:47 youtube-dl
-rw-r--r-- 1 root root 2727978 16. Jun 09:47 youtube-dl-2017.06.12.bin.tar.gz
-rw-r--r-- 1 root root 1296578 16. Jun 09:47 youtube-dl-2017.06.12.src.tar.gz
-rw-r--r-- 1 root root 2727978 11. Jun 21:24 youtube-dl-2017.06.12.tar.gz

Oh, and a tip: lzma is much better (and widely used by now), and -9 also:

 # gzip -cd youtube-dl-2017.06.12.src.tar.gz | lzma -c9 >youtube-dl-2017.06.12.src.tar.lzma
-rw-r--r-- 1 root root  902691 16. Jun 09:47 youtube-dl-2017.06.12.src.tar.lzma
@gfabiano
Copy link
Contributor

@gfabiano gfabiano commented Jun 16, 2017

@bothie
Copy link
Author

@bothie bothie commented Jun 16, 2017

Ok. How do I get version 2017.06.12 from there?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 16, 2017

Ok. How do I get version 2017.06.12 from there?

https://github.com/rg3/youtube-dl/archive/2017.06.12.tar.gz

For lzma - I think a 1.2MB tarball is not a problem for machines used to download videos and audios :) Of course pull requests are welcome.

@yan12125 yan12125 closed this Jun 16, 2017
@bothie
Copy link
Author

@bothie bothie commented Jun 16, 2017

Ok, thank you very much.

About the "pull requests are welcome" part: I investigated the Makefile but only found the code to generate https://yt-dl.org/downloads/2017.06.12/youtube-dl-2017.06.12.tar.gz. How is the other file https://github.com/rg3/youtube-dl/archive/2017.06.12.tar.gz generated?

Also, the exclude list of that make target names __pycache but the directories are called __pycache__ (maybe they were called __pycache in the past?). So the archive ends up with 5 (luckily empty) directories:

# find -name __pycache__ -exec ls -lA {} +
./youtube-dl/test/__pycache__:
insgesamt 0

./youtube-dl/youtube_dl/downloader/__pycache__:
insgesamt 0

./youtube-dl/youtube_dl/extractor/__pycache__:
insgesamt 0

./youtube-dl/youtube_dl/postprocessor/__pycache__:
insgesamt 0

./youtube-dl/youtube_dl/__pycache__:
insgesamt 0

And about the "1.2 MB is not much" thing. Please remember, stuff adds up:

# du -sh /var/cache/portage/distfiles
60G     /var/cache/portage/distfiles

So, if all packages there could be shrunk by 50%, you can calculate for yourself how many more videos I could download. Also, there are people, who only download videos temporarily to not needing to watch them in browser. (Or even piping videos to mplayer directly without storing them on disk at all.)

yan12125 added a commit that referenced this issue Jun 17, 2017
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 17, 2017

How is the other file https://github.com/rg3/youtube-dl/archive/2017.06.12.tar.gz generated?

It's automatically created by Github.

To create xz tarballs for each release, I guess the possible way is: Add a new target in Makefile and modify devscripts/release.sh

Also, the exclude list of that make target names __pycache but the directories are called __pycache__

That's a real bug! Thanks for finding this; I've fixed it in 4f90d2a

And about the "1.2 MB is not much" thing. Please remember, stuff adds up:

I bet 60G contains something other than youtube-dl tarballs. There are < 1000 releases since 2008, so the total won't be more than 3G :)

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.