You are not logged in.

#1 2015-07-06 19:02:36

severach
Member
Registered: 2015-05-23
Posts: 192

PKGBUILD with large source files that cannot be included

I have a PKGBUILD with several megabytes of source files. They are not, cannot, and will never be accessible by any public link. The files must be downloaded separately by the user.

source=("foo.tgz::")

I was able to trick AUR 3.5 by adding two colons after the name. It looked like git would make the solution easy by letting me decide what goes in. Turns out this isn't a feature, it's a bug. Not only does git require me to explicit add files, AUR rejects the push if I don't add the right ones. Make up your mind. If I'm given a choice, I should be able to choose. If I have no choice then I shouldn't be allowed one.

At this point the only way I can see is to avoid source() completely and do all my own source and hash management.

Total 5 (delta 0), reused 0 (delta 0)
remote: error: The following error occurred when parsing commit
remote: error: AAAAABBBBBCCCCCDDDDD:
remote: error: missing source file: foo.tgz::
remote: error: hook declined to update refs/heads/master
To ssh://aur@aur4.archlinux.org/foo.git
 ! [remote rejected] master -> master (hook declined)

How do I tell git (or AUR) that I want the file missing? Better yet, reject the push if the file is submitted by accident.

Offline

#2 2015-07-06 19:14:44

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: PKGBUILD with large source files that cannot be included

try "file://foo.tgz"

Offline

#3 2015-07-06 19:46:11

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: PKGBUILD with large source files that cannot be included

If those files are available in some sort of repository where the login is shared with other packages, you might consider using a custom scheme so that you can provide a DLAGENT similar to hib-dlagent. for hib://

Edit: If you want to prevent an accidental "git add", then add the file name in .gitignore. The AUR also limits the filesize for each file to 250kB (source).

Last edited by progandy (2015-07-06 19:52:03)


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

Offline

#4 2015-07-07 05:05:33

severach
Member
Registered: 2015-05-23
Posts: 192

Re: PKGBUILD with large source files that cannot be included

source=('foo.tgz::file://foo.tgz')

It worked. I used this method for one PKGBUILD and for another I made my own arrays and did all the file management myself. Since the files are all user supplied and might be different, skipping the hashes was a benefit.

Offline

#5 2015-07-07 05:07:32

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: PKGBUILD with large source files that cannot be included

you can put 'SKIP' in place of the checksum to skip checking that file.

Offline

#6 2015-07-07 18:42:34

severach
Member
Registered: 2015-05-23
Posts: 192

Re: PKGBUILD with large source files that cannot be included

updpkgsums takes out any SKIP it can find a source for so SKIP is only useful for CVS where updpkgsums won't mess with it.

Offline

Board footer

Powered by FluxBB