Patchwork Need help setting up Patchwork

login
register
mail settings
Submitter Deen Sethanandha
Date July 2, 2010, 3:09 p.m.
Message ID <AANLkTilgniYLo6Yu44mXgA-2uubz8ginFo38wH5q9tYY@mail.gmail.com>
Download mbox | patch
Permalink /patch/57669/
State Not Applicable
Headers show

Comments

Deen Sethanandha - July 2, 2010, 3:09 p.m.
Hi Jeremy,

  Thanks for your reply.  I ran patchwork on Virtualbox Ubuntu guest.  I
don't know why I got the error "unable to execute
/srv/patchwork/apps/patchwork/bin/parsemail.sh: No such file or directory".

  I can execute the parsemail.sh if I boot into Ubuntu.  However, when I run
it against the email archived it retured "no project found".  I notice that
that it doesn't contain mailinglist (List-ID) value.  Does this mean that
the parsemail.sh only work on the mbox format?

  Does parsemail.sh assume one email per file?  I create a file and manually
copy mbox text from an email account that I subscribe to a mailing list.
 Parsemail.sh works on the first email only.  Would it be useful if I try to
add code so that it support multiple email one file?

  Without modifying the code how can I process multiple email at once?

  I saw the parsemail-batch.sh, but it seems to require one email per file
because it uses the parsemail.py.

Thank you very much
Deen

----- Example of a email archived  --------
From krh at bitplanet.net  Sat May  1 10:31:58 2010
From: krh at bitplanet.net (=?UTF-8?q?Kristian=20H=C3=B8gsberg?=)
Date: Sat,  1 May 2010 13:31:58 -0400
Subject: [PATCH 2/4] glxdri2: Hard-code the extension version we need
In-Reply-To: <1272735120-10941-1-git-send-email-krh@bitplanet.net>
References: <1272735120-10941-1-git-send-email-krh@bitplanet.net>
Message-ID: <1272735120-10941-2-git-send-email-krh@bitplanet.net>

If we use the #define'd version from dri_interface.h, the server will
require at least that version of the extension.  If we're compiling against
a dri_interface.h with a newer version we don't really require, glxdri2
will require a too high version of the extension.

The right approach is to just hard-code the version we need instead of
using the #defines.

Signed-off-by: Kristian H?gsberg <krh at bitplanet.net>
---
 glx/glxdri2.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Jeremy Kerr - July 5, 2010, 12:22 a.m.
Hi Deen,

> Hi Jeremy,
> 
>   Thanks for your reply.  I ran patchwork on Virtualbox Ubuntu guest.  I
> 
> don't know why I got the error "unable to execute
> /srv/patchwork/apps/patchwork/bin/parsemail.sh: No such file or
> directory".
> 
>   I can execute the parsemail.sh if I boot into Ubuntu.

So it works if you boot directly to Ubuntu, but not if you boot Ubuntu as a 
virtual machine?

> However, when I run it against the email archived it retured "no project
> found".  I notice that that it doesn't contain mailinglist (List-ID) value. 

Yes, patchwork needs a List-Id (or X-Mailing-List) header to determine which 
project an email is for. If the mbox you have is from a mailing list, it 
should have one of these headers. You will need to check that the settings for 
the project (in the patchwork /admin/ interface) have the matching list-id 
setting.

For example, the List-Id headers on the patchwork mailing list are:

 List-Id: Patchwork development <patchwork.lists.ozlabs.org>

So the setting for this project in the admin interface is:

 patchwork.lists.ozlabs.org

If your file does not have List-Id headers, you can use formail to add them:

 formail -i 'List-Id: My project <bar.foo.com>' < old.mbox > new.mbox

> Does this mean that the parsemail.sh only work on the mbox format?
> Does parsemail.sh assume one email per file?  I create a file and
> manually copy mbox text from an email account that I subscribe to a mailing
> list.
> 
> Parsemail.sh works on the first email only.  Would it be useful if I try
> to add code so that it support multiple email one file?

parsemail.py expects one email on its input.

However, you can use formail to execute the parser on each mail of a multiple-
mail mbox file:

 formail -s /srv/patchwork/apps/patchwork/bin/parsemail.sh < your-file.mbox

>   I saw the parsemail-batch.sh, but it seems to require one email per
>   file because it uses the parsemail.py.

This is for importing a maildir-style directory of single-mail files

Cheers,


Jeremy
Deen Sethanandha - July 6, 2010, 3:43 a.m.
Thank you very much for your reply!


> So it works if you boot directly to Ubuntu, but not if you boot Ubuntu as a
> virtual machine?
>
>
Yes that's what happened.  I didn't know why either. The /bin/sh worked
fine.
I didn't try to trouble shoot it since it worked on Ubuntu host.


> Yes, patchwork needs a List-Id (or X-Mailing-List) header to determine
> which
> project an email is for. If the mbox you have is from a mailing list, it
> should have one of these headers. You will need to check that the settings
> for
> the project (in the patchwork /admin/ interface) have the matching list-id
> setting.
>

When I am taking about mailinglist, I meant the archive from this page.
http://lists.ozlabs.org/pipermail/patchwork/.  When I unzip the archive
it didn't have the List-ID information.


>  formail -i 'List-Id: My project <bar.foo.com>' < old.mbox > new.mbox
>

Thank you very much.  I modified it a bit so that it works with multiple
email per file.

parsemail.py expects one email on its input.
>
> However, you can use formail to execute the parser on each mail of a
> multiple-
> mail mbox file:
>
>  formail -s /srv/patchwork/apps/patchwork/bin/parsemail.sh < your-file.mbox
>

This works fine.  Thanks!

>
> >   I saw the parsemail-batch.sh, but it seems to require one email per
> >   file because it uses the parsemail.py.
>
> This is for importing a maildir-style directory of single-mail files
>
> Cheers,
>
>
> Jeremy
>

Patch

diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 74d6ebc..c34e29a 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -653,7 +653,7 @@  initializeExtensions(__GLXDRIscreen *screen)

 #ifdef __DRI2_FLUSH
  if (strcmp(extensions[i]->name, __DRI2_FLUSH) == 0 &&
-    extensions[i]->version >= __DRI2_FLUSH_VERSION) {
+    extensions[i]->version >= 3) {
  screen->flush = (__DRI2flushExtension *) extensions[i];
  }
 #endif
@@ -713,11 +713,11 @@  __glXDRIscreenProbe(ScreenPtr pScreen)

     for (i = 0; extensions[i]; i++) {
         if (strcmp(extensions[i]->name, __DRI_CORE) == 0 &&
-    extensions[i]->version >= __DRI_CORE_VERSION) {
+    extensions[i]->version >= 1) {
  screen->core = (const __DRIcoreExtension *) extensions[i];
  }
         if (strcmp(extensions[i]->name, __DRI_DRI2) == 0 &&
-    extensions[i]->version >= __DRI_DRI2_VERSION) {
+    extensions[i]->version >= 1) {
  screen->dri2 = (const __DRIdri2Extension *) extensions[i];
  }
     }