summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBuildbot system user <buildbot@medusa>2018-07-05 14:01:45 +0000
committerBuildbot system user <buildbot@medusa>2018-07-05 18:50:52 +0000
commit02dedabb8fd23460c91ea00abbd193d7c324f578 (patch)
tree947bb1fb93def5821672856ac62c2e95dad73ba6
parenta41f27f404400b45891c2daeee2431c8a8d2e07a (diff)
glob list of patches, rather than manually maintaining it
-rwxr-xr-xmodulesetparser.py26
-rw-r--r--patches/xserver-meson/0001-meson-Require-libdrm-for-dri1-2-3-when-configured-au.patch62
-rw-r--r--patches/xserver/0001-RRCreateLease-cannot-succeed-if-XTRANS_SEND_FDS-is-n.patch37
3 files changed, 7 insertions, 118 deletions
diff --git a/modulesetparser.py b/modulesetparser.py
index 43c3f61..2edd4a0 100755
--- a/modulesetparser.py
+++ b/modulesetparser.py
@@ -3,6 +3,7 @@
# this reads a jhbuild moduleset file called 'xorg.modules' and generates a buildbot configuration
#
+import glob
import os
import random
@@ -357,25 +358,12 @@ def BuilderList(slaves):
print("error: repo type %s unhandled" % repo.get('type'))
# some repos need patches (which are not yet upstreamable) applied
- patches = { 'mesa-mesa' : [ '0001-gallium-targets-dri-explicitly-link-against-glapi-us.patch',
- '0002-megadriver-explicitly-link-against-glapi-link-with-n.patch',
- '0003-Fix-vma-test-compilation-if-limits.h-defines-PAGE_SI.patch' ],
- 'mesa-glut' : [ '0001-Fix-build-when-GL-or-libX11-are-in-non-standard-loca.patch' ],
- 'app-sessreg' : [ '0001-Don-t-try-to-use-utmpx-functions-if-WTMPX_FILE-isn-t.patch' ],
- 'app-xdm' : [ '0001-Workaround-Cygwin-s-failure-to-prototype-initgroups.patch' ],
- 'khronos-opengl-registry' : [ 'Makefile.patch' ],
- 'xserver': [ '0001-RRCreateLease-cannot-succeed-if-XTRANS_SEND_FDS-is-n.patch' ],
- 'xserver-meson' : [ '0001-meson-Require-libdrm-for-dri1-2-3-when-configured-au.patch',
- '0002-Bodge-GL-include-path.patch',
- '0003-Use-spawnl-rather-than-pipe-fork-to-invoke-xkbcomp.patch',
- '0004-Investigate-ignore-weirdness-with-request-length-tes.patch' ],
- }
-
- if name in patches:
- for p in patches[name]:
- factory.addStep(FileDownload(mastersrc='patches/' + name + '/' + p, slavedest=p, hideStepIf=lambda r,s: r == SUCCESS))
- factory.addStep(ShellCommand(command=['sh', '-c', 'patch -p1 <' + p], name='patch', description='patching', descriptionDone='patch', logEnviron=logEnviron, haltOnFailure=False, flunkOnFailure=False))
- factory.addStep(ShellCommand(command=['sh', '-c', 'rm ' + p], name='tidy', description='tidying', descriptionDone='tidy', hideStepIf=lambda r,s: r == SUCCESS, haltOnFailure=False, flunkOnFailure=False))
+ patches = sorted(glob.glob('patches/' + name + '/*.patch'))
+ for fn in patches:
+ p = os.path.basename(fn)
+ factory.addStep(FileDownload(mastersrc=fn, slavedest=p, hideStepIf=lambda r,s: r == SUCCESS))
+ factory.addStep(ShellCommand(command=['sh', '-c', 'patch -p1 <' + p], name='patch', description='patching', descriptionDone='patch', logEnviron=logEnviron, haltOnFailure=False, flunkOnFailure=False))
+ factory.addStep(ShellCommand(command=['sh', '-c', 'rm ' + p], name='tidy', description='tidying', descriptionDone='tidy', hideStepIf=lambda r,s: r == SUCCESS, haltOnFailure=False, flunkOnFailure=False))
if m.tag == 'autotools':
diff --git a/patches/xserver-meson/0001-meson-Require-libdrm-for-dri1-2-3-when-configured-au.patch b/patches/xserver-meson/0001-meson-Require-libdrm-for-dri1-2-3-when-configured-au.patch
deleted file mode 100644
index f48ec78..0000000
--- a/patches/xserver-meson/0001-meson-Require-libdrm-for-dri1-2-3-when-configured-au.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 3a36386e634d75041a2d151bbb9f8f19de7ae233 Mon Sep 17 00:00:00 2001
-From: Jon Turney <jon.turney@dronecode.org.uk>
-Date: Wed, 28 Feb 2018 14:21:14 +0000
-Subject: [PATCH xserver] meson: Require libdrm for dri1/2/3 when configured
- 'auto' as well as 'true'
-
-If dri1/2/3 are configured for auto-detection, libdrm is required, as well
-as the corresponding proto. (Practically we will always have the
-corresponding protos now, as they are part of xorgproto).
-
-Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
----
- meson.build | 15 ++++++++++-----
- 1 file changed, 10 insertions(+), 5 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index 77d3c9def..b87cb9be5 100644
---- a/meson.build
-+++ b/meson.build
-@@ -277,20 +277,22 @@ endif
-
- build_glx = get_option('glx')
-
-+libdrm_dep = dependency('libdrm', version: '>= 2.3.1', required: false)
-+
- if get_option('dri1') == 'auto'
-- build_dri1 = xf86driproto_dep.found()
-+ build_dri1 = xf86driproto_dep.found() and libdrm_dep.found()
- else
- build_dri1 = get_option('dri1') == 'true'
- endif
-
- if get_option('dri2') == 'auto'
-- build_dri2 = dri2proto_dep.found()
-+ build_dri2 = dri2proto_dep.found() and libdrm_dep.found()
- else
- build_dri2 = get_option('dri2') == 'true'
- endif
-
- if get_option('dri3') == 'auto'
-- build_dri3 = dri3proto_dep.found() and xshmfence_dep.found()
-+ build_dri3 = dri3proto_dep.found() and xshmfence_dep.found() and libdrm_dep.found()
- else
- build_dri3 = get_option('dri3') == 'true'
- if build_dri3
-@@ -300,8 +302,11 @@ else
- endif
- endif
-
--libdrm_required = (get_option('dri1') == 'true') or (get_option('dri2') == 'true') or (get_option('dri3') == 'true')
--libdrm_dep = dependency('libdrm', version: '>= 2.3.1', required: libdrm_required)
-+libdrm_required = build_dri1 or build_dri2 or build_dri3
-+if not libdrm_dep.found() and libdrm_required
-+ error('DRI requested, but LIBDRM not found')
-+endif
-+
- build_modesetting = false
- if libdrm_dep.found()
- if build_dri2
---
-2.16.2
-
diff --git a/patches/xserver/0001-RRCreateLease-cannot-succeed-if-XTRANS_SEND_FDS-is-n.patch b/patches/xserver/0001-RRCreateLease-cannot-succeed-if-XTRANS_SEND_FDS-is-n.patch
deleted file mode 100644
index 52cc0d5..0000000
--- a/patches/xserver/0001-RRCreateLease-cannot-succeed-if-XTRANS_SEND_FDS-is-n.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 5132c1f5c83e2960cdc75d9a4ed3abf11f70431f Mon Sep 17 00:00:00 2001
-From: Jon Turney <jon.turney@dronecode.org.uk>
-Date: Wed, 28 Feb 2018 14:54:02 +0000
-Subject: [PATCH xserver] RRCreateLease cannot succeed if XTRANS_SEND_FDS is
- not enabled
-
-XXX: note XTRANS_SEND_FDS is hardwired on in meson build at the moment
----
- randr/rrlease.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/randr/rrlease.c b/randr/rrlease.c
-index b4a8827cc..2584aa04f 100644
---- a/randr/rrlease.c
-+++ b/randr/rrlease.c
-@@ -242,6 +242,10 @@ ProcRRCreateLease(ClientPtr client)
- if (!scr_priv->rrCreateLease)
- return BadMatch;
-
-+#ifndef XTRANS_SEND_FDS
-+ return BadRequest;
-+#else
-+
- /* Allocate a structure to hold all of the lease information */
-
- lease = RRLeaseAlloc(screen, stuff->lid, stuff->nCrtcs, stuff->nOutputs);
-@@ -329,6 +333,7 @@ ProcRRCreateLease(ClientPtr client)
- bail_lease:
- free(lease);
- return rc;
-+#endif
- }
-
- int
---
-2.16.2
-