Bug 43153 - patchwork -> Git intergration
Summary: patchwork -> Git intergration
Status: RESOLVED INVALID
Alias: None
Product: freedesktop.org
Classification: Unclassified
Component: Website (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: fd.o Admin Massive
QA Contact:
URL:
Whiteboard:
Keywords:
: 41050 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-21 19:47 UTC by Benjamin Close
Modified: 2011-12-26 09:57 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Benjamin Close 2011-11-21 19:47:07 UTC
This bug documents current status of patchwork/git integration
Comment 1 Benjamin Close 2011-11-21 19:48:52 UTC
Hmm, this actually looks a little more complicated than I thought.
For commits, people use git.freedesktop.org, this equates to be kemper. Patchwork doesn't exist on kemper as /srv lives on anarchy. Hence I'm guessing Keith you get a command not found error. 

To prevent annoying errors, i've now removed the git hook and have filed this email as a https://bugs.freedesktop.org/show_bug.cgi?id=43153
so there's some history and connecting things together doesn't get forgotten.

Cheers,
    Benjamin

On 22/11/2011 1:38 PM, Benjamin Close wrote:
> Hi All,
>
> Looking into this a little more, it appears to be due to the way the hook script works.
> The script calls pwclient to update the patch status. pwclient relies on a .pwclientrc file for authentication. Since the hook runs as the user doing the push, this relies on the user having a .pwclientrc.
>
> Not every user who has push access will have a .pwclientrc file. My suggestion is create a dummy user in patchwork and put their authentication details in /var/www (www-data user). Then:
>
> chown www-data /srv/patchwork/tools/post-receive-hook
> chmod u+s /srv/patchwork/tooks/post-receive-hook
>
> That way it shouldn't matter what repo, what user the change will get recorded.
>
> Cheers,
>     Benjamin
>
> On 22/11/2011 12:48 PM, Benjamin Close wrote:
>> Howdy,
>>
>> On the 10th there appears to have been some patches that were accepted, but nothing since.
>> This might be because the patches are still filtering through the various repos back to master.
>>
>> Cheers,
>>     Benjamin
>>
>> On 10/11/2011 8:01 AM, Tollef Fog Heen wrote:
>>> Hiya,
>>>
>>> I've just enabled the patchwork git repo hook for xserver.git, which
>>> should hopefully automatically twiddle the status of patches on
>>> patchwork.fdo automatically.  If you can test this and tell me if it
>>> works or not, that'd be great, and I can add it to the 339 other git
>>> repos that Xorg has.
>>>
>>> Cheers,
Comment 2 Tollef Fog Heen 2011-11-21 21:41:24 UTC
Seems to exist plenty fine to me:

: root@kemper ~ # ls /srv/patchwork 
apps/  docs/  HOME/  htdocs/  lib/  templates/  tools/
Comment 3 Daniel Stone 2011-12-06 04:28:27 UTC
It definitely exists on kemper, but the authentication thing is a problem.  I'm guessing that creating one master user as benjsc suggested is the best way to go, because else we're going to have to have every git committer create a patchwork user, get their details into ~/.pwclientrc on kemper somehow, and also give them permission to update patches.  Even after creating a new user and a ~/.pwclientrc, I get:
daniels@kemper:/srv/patchwork/apps/patchwork/bin% ./pwclient update -s Accepted 8146
Error updating patch: <type 'exceptions.Exception'>:No permissions to edit this patch
Patch not updated

Tollef, I don't suppose you could do this?
Comment 4 Tollef Fog Heen 2011-12-06 08:21:27 UTC
There should be no need for the special user with the following setup:


: root@kemper /srv/patchwork/HOME # cat /git/xorg/xserver.git/hooks/post-receive
#! /bin/sh

export HOME=/srv/patchwork/HOME 
# See bug: https://bugs.freedesktop.org/show_bug.cgi?id=43153
#exec /srv/patchwork/tools/post-receive.hook "$@"
: root@kemper /srv/patchwork/HOME # ls -ld . .pwclientrc
drwxr-xr-x 2 root root 4096 2011-11-09 21:47 ./
-rw-r--r-- 1 root root  107 2011-11-09 21:34 .pwclientrc
: root@kemper /srv/patchwork/HOME # 

The # in front of exec was added by benjsc.  It would have been really useful if somebody who actually saw the error could have told me what it is rather than leaving me guessing.

I'd be happy to try to debug this if somebody can catch me on IRC before they're about to push to an xorg repo.  I'll then enable the hook and we can find out what is happening.
Comment 5 Tollef Fog Heen 2011-12-26 09:43:27 UTC
No response from submitter, there is apparently no interest in getting patchwork working for xorg.
Comment 6 Tollef Fog Heen 2011-12-26 09:57:31 UTC
*** Bug 41050 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.