Merge ~binli/ubuntu/+source/gdm3:ubuntu/bionic into ~ubuntu-desktop/ubuntu/+source/gdm3:ubuntu/bionic

Proposed by Bin Li
Status: Merged
Merged at revision: f7f4af3dcee2d88f60c12eb3221636013d018648
Proposed branch: ~binli/ubuntu/+source/gdm3:ubuntu/bionic
Merge into: ~ubuntu-desktop/ubuntu/+source/gdm3:ubuntu/bionic
Diff against target: 152 lines (+127/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/series (+1/-0)
debian/patches/utils-add-new-gdm-disable-wayland-binary.patch (+118/-0)
Reviewer Review Type Date Requested Status
Iain Lane Approve
Review via email: mp+356297@code.launchpad.net

Commit message

  * Add utils-add-new-gdm-disable-wayland-binary.patch, cherry-picked
    from cosmic. (LP: #1780076)

To post a comment you must log in.
Revision history for this message
Bin Li (binli) wrote :

@Iain,

 I just found in bionic we also missed the gdm-disable-wayland binary file, I just cherry-picked from cosmic. Sorry about it. Thanks!

Revision history for this message
Iain Lane (laney) wrote :

thank you!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 4420ff4..a68a92b 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+gdm3 (3.28.3-0ubuntu18.04.3) UNRELEASED; urgency=medium
7+
8+ [Bin Li]
9+ * Add utils-add-new-gdm-disable-wayland-binary.patch, cherry-picked
10+ from cosmic. (LP: #1780076)
11+
12+ -- Bin Li <bin.li@canonical.com> Tue, 09 Oct 2018 15:26:26 +0800
13+
14 gdm3 (3.28.3-0ubuntu18.04.2) bionic; urgency=medium
15
16 [ Bin Li ]
17diff --git a/debian/patches/series b/debian/patches/series
18index 60f3aeb..cc0a11d 100644
19--- a/debian/patches/series
20+++ b/debian/patches/series
21@@ -1,6 +1,7 @@
22 # Upstream backports
23 data-Makefile.am.patch
24 data-61-gdm.rules.in.patch
25+utils-add-new-gdm-disable-wayland-binary.patch
26
27 16_xserver_path.patch
28 90_config_comments.patch
29diff --git a/debian/patches/utils-add-new-gdm-disable-wayland-binary.patch b/debian/patches/utils-add-new-gdm-disable-wayland-binary.patch
30new file mode 100644
31index 0000000..5940e88
32--- /dev/null
33+++ b/debian/patches/utils-add-new-gdm-disable-wayland-binary.patch
34@@ -0,0 +1,118 @@
35+From: Ray Strode <rstrode@redhat.com>
36+Date: Mon, 21 May 2018 11:03:29 -0400
37+Subject: utils: add new gdm-disable-wayland binary
38+
39+We currently disable wayland for cirrus by calling printf
40+from a udev rule. This works, but it's a little too open
41+coded to easily write SELinux policy for.
42+
43+This commit introduces a new program, gdm-disable-wayland,
44+that does the same thing, but in a dedicated binary.
45+
46+A future commit will change the udev rule to use the binary.
47+
48+https://bugzilla.gnome.org/show_bug.cgi?id=796315
49+---
50+ utils/Makefile.am | 14 ++++++++++++
51+ utils/gdm-disable-wayland.c | 53 +++++++++++++++++++++++++++++++++++++++++++++
52+ 2 files changed, 67 insertions(+)
53+ create mode 100644 utils/gdm-disable-wayland.c
54+
55+diff --git a/utils/Makefile.am b/utils/Makefile.am
56+index ae3cc01..babe890 100644
57+--- a/utils/Makefile.am
58++++ b/utils/Makefile.am
59+@@ -10,6 +10,8 @@ AM_CPPFLAGS = \
60+ -DDATADIR=\"$(datadir)\" \
61+ -DGDMCONFDIR=\"$(gdmconfdir)\" \
62+ -DLOCALSTATEDIR=\""$(localstatedir)"\" \
63++ -DGDM_RUN_DIR=\"$(GDM_RUN_DIR)\" \
64++ -DGDM_RUNTIME_CONF=\"$(GDM_RUNTIME_CONF)\" \
65+ -DGDM_SCREENSHOT_DIR=\""$(GDM_SCREENSHOT_DIR)"\"\
66+ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
67+ $(UTILS_CFLAGS) \
68+@@ -31,6 +33,10 @@ bin_PROGRAMS = \
69+ gdm-screenshot \
70+ $(NULL)
71+
72++libexec_PROGRAMS = \
73++ gdm-disable-wayland \
74++ $(NULL)
75++
76+ gdmflexiserver_LDADD = \
77+ $(top_builddir)/common/libgdmcommon.la \
78+ $(GTK_LIBS) \
79+@@ -49,6 +55,14 @@ gdm_screenshot_LDADD = \
80+ $(COMMON_LIBS) \
81+ $(NULL)
82+
83++gdm_disable_wayland_LDADD = \
84++ $(COMMON_LIBS) \
85++ $(NULL)
86++
87++gdm_disable_wayland_SOURCES = \
88++ gdm-disable-wayland.c \
89++ $(NULL)
90++
91+ CLEANFILES = \
92+ $(NULL)
93+
94+diff --git a/utils/gdm-disable-wayland.c b/utils/gdm-disable-wayland.c
95+new file mode 100644
96+index 0000000..be61c4d
97+--- /dev/null
98++++ b/utils/gdm-disable-wayland.c
99+@@ -0,0 +1,53 @@
100++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
101++ *
102++ * Copyright (C) 2018 Red Hat, Inc.
103++ *
104++ * This program is free software; you can redistribute it and/or modify
105++ * it under the terms of the GNU General Public License as published by
106++ * the Free Software Foundation; either version 2 of the License, or
107++ * (at your option) any later version.
108++ *
109++ * This program is distributed in the hope that it will be useful,
110++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
111++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
112++ * GNU General Public License for more details.
113++ *
114++ * You should have received a copy of the GNU General Public License
115++ * along with this program; if not, write to the Free Software
116++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
117++ *
118++ */
119++
120++#include "config.h"
121++
122++#include <locale.h>
123++#include <stdlib.h>
124++#include <sysexits.h>
125++
126++#include <glib.h>
127++
128++int
129++main (int argc, char *argv[])
130++{
131++ g_autoptr(GKeyFile) key_file = NULL;
132++ g_autoptr(GError) error = NULL;
133++ gboolean saved_okay;
134++
135++ setlocale (LC_ALL, "");
136++
137++ key_file = g_key_file_new ();
138++
139++ g_key_file_set_boolean (key_file, "daemon", "WaylandEnable", FALSE);
140++
141++ g_mkdir_with_parents (GDM_RUN_DIR, 0711);
142++
143++ saved_okay = g_key_file_save_to_file (key_file, GDM_RUNTIME_CONF, &error);
144++
145++ if (!saved_okay) {
146++ g_printerr ("gdm-disable-wayland: unable to disable wayland: %s",
147++ error->message);
148++ return EX_CANTCREAT;
149++ }
150++
151++ return EX_OK;
152++}

Subscribers

People subscribed via source and target branches

to all changes: