FS#46359 - Cannot omit source files

Attached to Project: AUR web interface
Opened by David Manouchehri (Manouchehri) - Sunday, 20 September 2015, 02:40 GMT
Last edited by Lukas Fleischer (lfleischer) - Sunday, 20 September 2015, 08:59 GMT
Task Type Bug Report
Category PKGBUILD Parser
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version 4.0.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

In a few of my AUR packages, I cannot include the source files because they're paid proprietary software.

In the AUR3 I would just submit the package without the source files included, but now with the AUR4, the post-hook declines it.

~/tmp/labview-2010 > git push
Counting objects: 2, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 239 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: error: The following error occurred when parsing commit
remote: error: b081c1ca56db0ccc61910d86c7165e8c1fc17947:
remote: error: missing source file: labview-2010-appbuild-10.0.0-1.i386.rpm
remote: error: hook declined to update refs/heads/master
To ssh+git://aur@aur.archlinux.org/labview-2010.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'ssh+git://aur@aur.archlinux.org/labview-2010.git'

My current "fix" is to include a 0 byte file for each missing source. The issue with this approach is that one of two things happens:

#1. The end-user gets confused as to why all the source files are the incorrect hash. It also breaks all AUR helpers.

#2. If I opt to put 'SKIP' for all my checksums, then I can show the end-user a warning message with prepare() if the sources are still 0 byte files. (Example at https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=labview-2010-rte#n44) The issue with this is that I have to re-implement makepkg's hash checking if I want to verify that the user actually did copy the right source files over.
This task depends upon

Closed by  Lukas Fleischer (lfleischer)
Sunday, 20 September 2015, 08:59 GMT
Reason for closing:  Won't fix
Additional comments about closing:  Using file:// solves the issue.
Comment by Doug Newgard (Scimmia) - Sunday, 20 September 2015, 03:46 GMT
Just use file:// on the source file.
Comment by David Manouchehri (Manouchehri) - Sunday, 20 September 2015, 03:49 GMT
==> ERROR: Unknown download protocol: file

file:// isn't a default in makepkg, is it..?
Comment by Doug Newgard (Scimmia) - Sunday, 20 September 2015, 03:56 GMT
No, it only works when the file is already present, which is kind of the point.
Comment by David Manouchehri (Manouchehri) - Sunday, 20 September 2015, 04:01 GMT
Oops, you're right about file. My bad, I forgot that I had removed them.

Doesn't seem to help though, my commits are still being declined by the hook even with file://.
Comment by Doug Newgard (Scimmia) - Sunday, 20 September 2015, 04:05 GMT
Probably because you have a previous commit that's wrong. The git hooks validate each commit, not just HEAD.
Comment by David Manouchehri (Manouchehri) - Sunday, 20 September 2015, 04:08 GMT
Doesn't look like it. Here's a copy of my attempted commit. https://gist.github.com/Manouchehri/9575cbba24afaf12c900

The last commit is 60c77deb, which currently has no problem being pushed to the AUR. https://aur.archlinux.org/cgit/aur.git/commit/?h=labview-2010
Comment by David Manouchehri (Manouchehri) - Sunday, 20 September 2015, 04:10 GMT
Here's a mirror on GitHub as well, should be easier to spot any issues.

https://github.com/Manouchehri/AUR-labview-2010/commits/master
Comment by Doug Newgard (Scimmia) - Sunday, 20 September 2015, 04:13 GMT
That is exactly the problem. See commit 4eb8f08 for example, the source array entries don't have file://.
Comment by David Manouchehri (Manouchehri) - Sunday, 20 September 2015, 04:14 GMT
Huh? How was I able to push 60c77deb in the first place then?
Comment by David Manouchehri (Manouchehri) - Sunday, 20 September 2015, 04:16 GMT
Since I've already pushed 4eb8f08d9 and that validates fine (because of the dummy files), why would 31d450d0 be affected by it?
Comment by David Manouchehri (Manouchehri) - Sunday, 20 September 2015, 04:20 GMT
Also, I can't change 4eb8f08 even if I wanted to, since force pushes are rejected too.
Comment by Doug Newgard (Scimmia) - Sunday, 20 September 2015, 04:21 GMT
Ah, I didn't notice the dummy files.

Are you still getting exactly the same error?
Comment by David Manouchehri (Manouchehri) - Sunday, 20 September 2015, 04:23 GMT
Yep. I just added you as a co-maintainer if you want to try pushing 31d450d0.
Comment by Doug Newgard (Scimmia) - Sunday, 20 September 2015, 04:41 GMT
Done. You didn't update the .SRCINFO file. :)
Comment by David Manouchehri (Manouchehri) - Sunday, 20 September 2015, 04:47 GMT
Oops, that was it. Thanks!

So the tl;dr version of this is that with the AUR4 you now need to include file:// for non-included local files.

Loading...