[xorg-x11-server] xserver-1.12-Xext-fix-selinux-build-failure.patch: fix build error triggered by Red Hat-specific pat
Peter Hutterer
whot at fedoraproject.org
Tue Jan 3 23:50:50 UTC 2012
commit afc2c6e76608ff6bcb56b422509c996094c72168
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Wed Jan 4 09:37:54 2012 +1000
xserver-1.12-Xext-fix-selinux-build-failure.patch: fix build error
triggered by Red Hat-specific patch to libselinux
xorg-x11-server.spec | 10 ++++-
xserver-1.12-Xext-fix-selinux-build-failure.patch | 52 +++++++++++++++++++++
2 files changed, 61 insertions(+), 1 deletions(-)
---
diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec
index a650056..f1ae363 100644
--- a/xorg-x11-server.spec
+++ b/xorg-x11-server.spec
@@ -48,7 +48,7 @@
Summary: X.Org X11 X server
Name: xorg-x11-server
Version: 1.11.99.901
-Release: 1%{?gitdate:.%{gitdate}}%{dist}
+Release: 2%{?gitdate:.%{gitdate}}%{dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X
@@ -101,6 +101,10 @@ Patch7007: xserver-1.10.99.1-test.patch
# always install xaa headers even though we don't build the module
Patch7012: xserver-1.12-xaa-sdk-headers.patch
+# Fix libselinux-triggered build error
+# RedHat/Fedora-specific patch
+Patch7013: xserver-1.12-Xext-fix-selinux-build-failure.patch
+
%define moduledir %{_libdir}/xorg/modules
%define drimoduledir %{_libdir}/dri
%define sdkdir %{_includedir}/xorg
@@ -556,6 +560,10 @@ rm -rf $RPM_BUILD_ROOT
%{xserver_source_dir}
%changelog
+* Wed Jan 04 2012 Peter Hutterer <peter.hutterer at redhat.com> 1.11.99.901-2.20120103
+- xserver-1.12-Xext-fix-selinux-build-failure.patch: fix build error
+ triggered by Red Hat-specific patch to libselinux
+
* Tue Jan 03 2012 Peter Hutterer <peter.hutterer at redhat.com> 1.11.99.901-1.20120103
- Git snapshot 98cde254acb9b98337ddecf64c138d38c14ec2bf
- xserver-1.11.99-optionstr.patch: drop
diff --git a/xserver-1.12-Xext-fix-selinux-build-failure.patch b/xserver-1.12-Xext-fix-selinux-build-failure.patch
new file mode 100644
index 0000000..e92a462
--- /dev/null
+++ b/xserver-1.12-Xext-fix-selinux-build-failure.patch
@@ -0,0 +1,52 @@
+From 080b3903ee57a682ac67306d7ff855bbf1dccda3 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Wed, 4 Jan 2012 09:31:51 +1000
+Subject: [PATCH] Xext: fix selinux build failure
+
+The server builds with -Werror=missing-braces, causing
+
+xselinux_hooks.c: In function 'SELinuxFlaskInit':
+xselinux_hooks.c:851:12: error: missing braces around initializer
+[-Werror=missing-braces]
+xselinux_hooks.c:851:12: error: (near initialization for
+'avc_option.<anonymous>') [-Werror=missing-braces]
+cc1: some warnings being treated as errors
+
+Source is libselinux' libselinux-rhat.patch which changes struct selinux_opt
+from { int, char * } to { int, union { char*, char** }}.
+
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+---
+ Xext/xselinux_hooks.c | 2 +-
+ Xext/xselinux_label.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c
+index 0d4c9ab..943e5cc 100644
+--- a/Xext/xselinux_hooks.c
++++ b/Xext/xselinux_hooks.c
+@@ -848,7 +848,7 @@ SELinuxFlaskReset(void)
+ void
+ SELinuxFlaskInit(void)
+ {
+- struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *)0 };
++ struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, { (char *)0 } };
+ security_context_t ctx;
+ int ret = TRUE;
+
+diff --git a/Xext/xselinux_label.c b/Xext/xselinux_label.c
+index e5929fa..de49f83 100644
+--- a/Xext/xselinux_label.c
++++ b/Xext/xselinux_label.c
+@@ -354,7 +354,7 @@ SELinuxDefaultClientLabel(void)
+ void
+ SELinuxLabelInit(void)
+ {
+- struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, (char *)1 };
++ struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, { (char *)1 } };
+
+ label_hnd = selabel_open(SELABEL_CTX_X, &selabel_option, 1);
+ if (!label_hnd)
+--
+1.7.7.4
+
More information about the scm-commits
mailing list