You are not logged in.

#1 2018-03-24 14:18:50

damjan
Member
Registered: 2006-05-30
Posts: 416

custom download support in a PKGBUILD

I have a package [1] in AUR that downloads a zip file from Google drive. While GDrive uses http, they don't have a normal url that one can just download. So I use a custom python script for that[2], and download the source archive in the `build()` function. Which also means I have to check the sha256 checksum of the archive manually.

Is there any way I could use a custom download script with the normal `source=` and `sha256sums=` PKGBUILD variables?
PKGBUILD docs don't mention much more than http and ftp.

[1]
https://aur.archlinux.org/cgit/aur.git/ … wallpapers
[2]
https://aur.archlinux.org/cgit/aur.git/ … wallpapers

Offline

#2 2018-03-24 14:53:26

progandy
Member
Registered: 2012-05-17
Posts: 3,395

Re: custom download support in a PKGBUILD

If you need to download something, that should be done in prepare(), not build().

Is this allowed by google? You could offer a downloader similar to hib-dlagent as a package that you could use as an (optional) dependency in your PKGBUILD. I'd suggest you also add the url as a comment so users can decide to do the download manually instead of relying on the downloader.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#3 2018-03-24 14:59:04

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 3,333

Re: custom download support in a PKGBUILD

The obvious solution would be to host the files somewhere else smile


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2018-03-25 05:33:53

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 2,853

Re: custom download support in a PKGBUILD

1) Use source=() as G-d intended, and use DLAGENTS from makepkg.conf(5) -- which can be overridden in the PKGBUILD -- to use your custom downloader.
2) Don't use google drive, it sucks. If this is not your uploaded file, consider re-hosting it -- I mean, it's not like a google drive link was very trustworthy to begin with.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#5 2018-03-25 09:38:45

damjan
Member
Registered: 2006-05-30
Posts: 416

Re: custom download support in a PKGBUILD

It's not my content, and I don't have where to host it

Offline

#6 2018-03-25 19:31:35

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 7,035

Re: custom download support in a PKGBUILD

By following the google drive prompts, I found a direct link :

https://drive.google.com/uc?export=down … HdWa0M0aXM


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#7 2018-03-25 19:37:27

progandy
Member
Registered: 2012-05-17
Posts: 3,395

Re: custom download support in a PKGBUILD

@Lone_Wolf: That is the direct link the downloader generates. It is only valid for a limited time / a specific user, since it contains a token ("confirm") that is generated on the first access. That link would work for smaller files up to 25MB or so which google scans for viruses and doesn't show the warning.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#8 2018-03-25 19:45:31

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 7,035

Re: custom download support in a PKGBUILD

So that link is not very useful.

The upstream downloads page also shows a .torrent link, no idea how suitable that is for a custom download agent.


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#9 2018-03-25 19:51:00

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 3,333

Re: custom download support in a PKGBUILD

You could also try contacting upstream to see if they would be willing to host it in a more accessible location.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#10 2018-03-25 19:57:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 21,659
Website

Re: custom download support in a PKGBUILD

damjan wrote:

It's not my content, and I don't have where to host it

There are ample free places to share it if the license would allow it.  But this made me check the license ... there isn't one.  This really shouldn't be packaged without a license.

This made me look closer at upstream, and it seems even there the images were taken from another source without permission.  The upstream source has a note that they will remove any image on request from the copyright owner.  But this is bass akwards: it is not ok to violate copyright just as long as the copyright holder doesn't notice and request you to stop.  Sharing these images without permission of the owner is illegal - so definitely do not rehost them somewhere else, and please reconsider trying to share them via the AUR.

Sharing a PKGBUILD to retrieve the images isn't strictly illegal, but as there is no legal way to use them the PKGBUILD can serve no purpose other than to facilitate and implicitly condone illegal actions.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#11 2018-03-26 14:31:37

damjan
Member
Registered: 2006-05-30
Posts: 416

Re: custom download support in a PKGBUILD

But this is bass akwards: it is not ok to violate copyright just as long as the copyright holder doesn't notice and request you to stop.

so one shouldn't sing a song under the shower? cause noone is retracting from any ones other usages of the said images by having a PKGBUILD to put images in his own wallpapers folder.

Offline

#12 2018-03-26 15:00:42

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 2,853

Re: custom download support in a PKGBUILD

damjan wrote:

But this is bass akwards: it is not ok to violate copyright just as long as the copyright holder doesn't notice and request you to stop.

so one shouldn't sing a song under the shower? cause noone is retracting from any ones other usages of the said images by having a PKGBUILD to put images in his own wallpapers folder.

I don't understand a word you just said.

Your musical capability to sing songs under the shower is not something which falls under the domain of copyright. Photography of specific pictures is.
Even your ability to sing a specific song is not a copyrightable concept (though a public performance or retail recording is).

Copyright has never had to do with "retracting from any ones other usages". It's not about "well, I'm not hurting anyone", it is about "you cannot gain benefit from someone else's work unless you thank them by giving them money".

(More generally that the creator has dictatorial rights to dictate when and how their work is used and who is allowed to enjoy it.)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#13 2018-03-26 16:01:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 21,659
Website

Re: custom download support in a PKGBUILD

And the reason it is backwards is that it may be possible that the copyright owners of these photos would be more than happy for them to be shared ... they may be.  But no one has checked with them to ask their permission.  Instead the upstream source of this package admits that the pictures were taken without permission and places the onus on the copyright owners to detect this misuse and request that he stops using their images.

With copyright protected material, you request permission to use it.  You do not use it first until the owner requests that you stop.

Last edited by Trilby (2018-03-26 16:47:52)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB