AUR web interface

Tasklist

FS#45261 - AUR4 push validation too strict

Attached to Project: AUR web interface
Opened by Mathieu Jobin (somekool) - Monday, 08 June 2015, 12:03 GMT
Last edited by Lukas Fleischer (lfleischer) - Friday, 12 June 2015, 14:10 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description: I am trying to push my new package to the new AUR4
and the validation also occurs on commits that precede HEAD.
as if all commits from the ref logs must be valid.
which means I can't keep history of my changes, I have to squash them into one fully working commit.
and whenever AUR4 refuse my latest commit, I gotta rollback one commit, recreate my branch, reapply my change, fix the new problem and try again (rinse and repeat)

here, on the push, it says commit 50b...950 is missing the .SRCINFO
fine but the commit right after adds. it. see the git log after.

[mathieu@hz550 netvirt-agent-git]$ git push origin master
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (13/13), 2.58 KiB | 0 bytes/s, done.
Total 13 (delta 2), reused 0 (delta 0)
remote: error: The following error occurred when parsing commit
remote: error: 50b9f9862df849af2feb213fd8e5d39912979950:
remote: error: missing .SRCINFO
remote: error: hook declined to update refs/heads/master
To aur@aur4.archlinux.org:/netvirt-agent-git.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'aur@aur4.archlinux.org:/netvirt-agent-git.git'
[mathieu@hz550 netvirt-agent-git]$ git checkout
Your branch is up-to-date with 'source/master'.
[mathieu@hz550 netvirt-agent-git]$ git log
commit b93516dfeb2935f40ed04eb6e3a874a2140b6522
Author: Mathieu Jobin <mathieu@justbudget.com>
Date: Mon Jun 8 20:14:37 2015 +0900

add .SRCINFO file

commit 50b9f9862df849af2feb213fd8e5d39912979950
Author: Mathieu Jobin <mathieu@justbudget.com>
Date: Mon Jun 8 20:14:02 2015 +0900

PKGBUILD update

commit 2e153c1e4fb640753bf34de7a26ec8b9597490e6
Author: Mathieu Jobin <mathieu@justbudget.com>
Date: Thu Jun 4 16:22:23 2015 +0900

remove unnecessary lines, setup git source

commit 807f9bdec93930c86c12545de08ac93a58dd9ba6
Author: Mathieu Jobin <mathieu@justbudget.com>
Date: Thu Jun 4 16:16:46 2015 +0900

First Working PKGBUILD

I am symlinking the source for now, as I dont have internet.
[mathieu@hz550 netvirt-agent-git]$

-----

then I killed that branch, started over doing cherry-pick to have the .SRCINFO present from the first commit.
but my first commit is missing a source= attribute, so I can't push anything from that tree.

so I started over again, clean repo, took the latest files with no history

this is the new error I get

[mathieu@hz550 netvirt-agent-git]$ git add .SRCINFO PKGBUILD
[mathieu@hz550 netvirt-agent-git]$ git commit -m 'netvirt-agent ready for AUR4'
[master (root-commit) f151b0f] netvirt-agent ready for AUR4
2 files changed, 90 insertions(+)
create mode 100644 .SRCINFO
create mode 100644 PKGBUILD
[mathieu@hz550 netvirt-agent-git]$ git push
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 1.49 KiB | 0 bytes/s, done.
Total 4 (delta 0), reused 0 (delta 0)
remote: Traceback (most recent call last):
remote: File "hooks/update", line 253, in <module>
remote: if not fname in commit.tree:
remote: TypeError: unexpected dict
remote: error: hook declined to update refs/heads/master
To aur@aur4.archlinux.org:/netvirt-agent-git.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'aur@aur4.archlinux.org:/netvirt-agent-git.git'
[mathieu@hz550 netvirt-agent-git]$
[mathieu@hz550 netvirt-agent-git]$
[mathieu@hz550 netvirt-agent-git]$
[mathieu@hz550 netvirt-agent-git]$ git log
commit f151b0fc0a6805711c1879e6fa73879c288c4af0
Author: Mathieu Jobin <mathieu@justbudget.com>
Date: Mon Jun 8 20:50:40 2015 +0900

netvirt-agent ready for AUR4
[mathieu@hz550 netvirt-agent-git]$

not sure what that error means.

thanks

copy of the repo can be found on github
git@github.com:mathieujobin/netvirt-archlinux.git
This task depends upon

Closed by  Lukas Fleischer (lfleischer)
Friday, 12 June 2015, 14:10 GMT
Reason for closing:  Deferred
Additional comments about closing:  As requested.
Comment by Lukas Fleischer (lfleischer) - Monday, 08 June 2015, 19:26 GMT
There was a bug in aurweb that should be fixed now. Please try again.
Comment by Mathieu Jobin (somekool) - Tuesday, 09 June 2015, 02:57 GMT
that last error I got `remote: TypeError: unexpected dict` seems fixed.
I could push my last repo.

but that ticket is valid for the original problem I mentioned.
Whether each commits should be validated.
Comment by Doug Newgard (Scimmia) - Tuesday, 09 June 2015, 03:07 GMT
adding a .SRCINFO file to each commit is easy with git filter-branch --tree-filter
Comment by Lukas Fleischer (lfleischer) - Tuesday, 09 June 2015, 06:27 GMT
Yes, each commit should be checked. The server should not accept/reject the same set of commits depending on whether you push after each commit or just once after making a lot of commits.
Comment by Alex (nylocx) - Tuesday, 09 June 2015, 09:56 GMT
I beg to differ. But that is because I like to see the new git based aur as a possibility to get rid of an external version control instance like Github. So the process of creating a new/better aur package might involve steps that are not valid packages but a worth documenting with individual commits. If I now have to rebase and squash every commit in my feature branch to add it to the aur this documentation is partly lost. So this will again lead to having two git repositories one that you really work on and the other one just to push "release" of your package. If that was the design goal of the git based our it's fine but it cuts a lot of potential from the equasion.
It would be nice to have two branches one for development and one for release or even better require the user to add signed tags that are released through the aur webinterface. This way you could play around with your aur package a lot and if you get to a stage that is worth releasing tag it and publish it.
Comment by Lukas Fleischer (lfleischer) - Tuesday, 09 June 2015, 10:09 GMT
Git is a decentralized version control system. As you said, one of its advantages is that you can do work in a local copy and squash/rebase changes when everything is ready to be published. Users of your AUR package don't care about how you prepared a new version. They care about working package revisions. They might want to go back to some commit and build an old version. Downgrading is much easier if you don't need to figure out which commits are part of your preparation process and might not work as expected. AUR 4.0.0 was never designed to be a replacement for hosting services like GitHub. If you think that intermediate (not yet ready) versions of a package might be interesting for somebody, upload them somewhere else.

Thinking about it, there is another way we could have taken: Users need to tag commits that are working revisions (e.g. with an annotated tag v1.2.3-4 for pkgver 1.2.3, pkgrel 4). Only tagged commits are checked. This means that it will be even easier for users to rollback but it also means more work for package maintainers.

Loading...