Project

General

Profile

Bug #12551

Set up a process to keep our fork of GNOME Shell's .desktop file and GDM's .session file up-to-date

Added by intrigeri about 2 years ago. Updated 6 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
05/16/2017
Due date:
% Done:

10%

Feature Branch:
bugfix/12551-keep-gdm-tails-files-up-to-date
Type of work:
Code
Blueprint:
Starter:
Affected tool:
Greeter

Description

As noticed on #12364#note-33, our own config/gdm-shell-tails.desktop (in Tails Greeter's Git repo) tends to be behind /usr/share/applications/org.gnome.Shell.desktop as shipped in Debian. This can potentially cause serious issues, so IMO we need a process to keep it more up-to-date than what we've done in the past. I don't know what's the best way to do that, but at least a ticket per Tails release based on the next version of Debian would be a good start; completing said ticket would require creating the next one. But there are probably better ways to do so, e.g. generate our own .desktop file dynamically at package build time from the upstream one.

Same for gdm-tails.session, see f5e00d2d1051991e29720c422337e8855ca17cb2.


Related issues

Related to Tails - Bug #16288: No accessibility support in the Greeter on Buster Resolved 01/05/2019
Blocks Tails - Feature #16209: Core work: Foundations Team Confirmed 03/22/2019

Associated revisions

Revision 378502fe (diff)
Added by intrigeri over 1 year ago

Update Greeter's gdm-tails.session for Buster (refs: #12551).

org.gnome.SettingsDaemon.A11yKeyboard does not exist anymore
which breaks the startup of gnome-session and thus the Greeter
was never displayed.

Revision b8a9438c (diff)
Added by intrigeri 6 months ago

Update forked gdm-tails.json for Buster (refs: #12551, #16288).

Revision 25673681 (diff)
Added by segfault 27 days ago

Create gdm-tails related files from the original GNOME files (refs: #12551)

We used to ship pathed files in the Greeter, which tend to be behind the
original files shipped in Debian. This can potentially cause serious
issues.

This copies the GNOME files as shipped in Debian and applies our patches
on top.

Revision a4195b31 (diff)
Added by segfault 25 days ago

31-gdm-tails fixup (refs: #12551)

Escape dots in regex and use extended regex.

History

#1 Updated by intrigeri about 2 years ago

  • Target version set to Tails_3.5
  • Parent task changed from #8230 to #11643

I'd like this to be done before the time we might switch to tracking Buster, hence this target version early 2018. Sounds doable? Otherwise please reassign to me.

#2 Updated by alant almost 2 years ago

Yes, it looks doable for me before the end of the year.

#3 Updated by intrigeri almost 2 years ago

  • Subject changed from Set up a process to keep our fork of GNOME Shell's .desktop file up-to-date to Set up a process to keep our fork of GNOME Shell's .desktop file and GDM's .session file up-to-date
  • Description updated (diff)

#4 Updated by u over 1 year ago

  • Target version changed from Tails_3.5 to Tails_3.6

Postponing.

#5 Updated by bertagaz over 1 year ago

  • Target version changed from Tails_3.6 to Tails_3.7

#6 Updated by intrigeri over 1 year ago

  • Status changed from Confirmed to In Progress

#7 Updated by bertagaz about 1 year ago

  • Target version changed from Tails_3.7 to Tails_3.8

#8 Updated by intrigeri about 1 year ago

  • Target version changed from Tails_3.8 to Tails_3.9

#9 Updated by intrigeri 11 months ago

  • Target version changed from Tails_3.9 to Tails_3.10.1

#10 Updated by intrigeri 9 months ago

  • Target version changed from Tails_3.10.1 to Tails_3.11

#11 Updated by CyrilBrulebois 7 months ago

  • Target version changed from Tails_3.11 to Tails_3.12

#12 Updated by intrigeri 6 months ago

alant wrote:

Yes, it looks doable for me before the end of the year.

A while later: we've started working seriously on the port to Buster. Can you please give me a more realistic ETA? Thanks in advance!

#13 Updated by intrigeri 6 months ago

  • Related to Bug #16288: No accessibility support in the Greeter on Buster added

#14 Updated by sajolida 6 months ago

  • Parent task deleted (#11643)

#15 Updated by anonym 6 months ago

  • Target version changed from Tails_3.12 to Tails_3.13

#16 Updated by CyrilBrulebois 4 months ago

  • Target version changed from Tails_3.13 to Tails_3.14

#17 Updated by CyrilBrulebois about 2 months ago

  • Target version changed from Tails_3.14 to Tails_3.15

#18 Updated by intrigeri about 2 months ago

  • Assignee deleted (alant)
  • Target version changed from Tails_3.15 to Tails_4.0

This ticket was filed 2 years ago, Alan gave an ETA that's now 5 months in the past and did not reply to my request for an updated ETA ⇒ let's have FT (quite possibly me) do this as part of the 4.0 work. This being said, @alant, if you do join one of the Buster sprints, this could be a good task for you there :)

#19 Updated by intrigeri about 2 months ago

#20 Updated by intrigeri 30 days ago

  • Status changed from In Progress to Confirmed

#21 Updated by segfault 27 days ago

  • Status changed from Confirmed to In Progress

#22 Updated by segfault 27 days ago

  • Status changed from In Progress to Needs Validation
  • % Done changed from 0 to 10

I wrote a build hook in the Tails repo to copy the original file as shipped in Debian and apply our changes on top. I think doing this during the Tails build is much easier than during Greeter build. If this makes sense, I can prepare another commit in the greeter repo to stop shipping the affected files there.

#23 Updated by intrigeri 26 days ago

  • Feature Branch set to bugfix/12551-keep-gdm-tails-files-up-to-date

#24 Updated by intrigeri 26 days ago

  • Status changed from Needs Validation to In Progress
  • Assignee set to segfault

I like it a lot!

Code review passes except:

  • You need to escape regexp special chars, e.g. the dots in "org.gnome.Shell"
  • Please consistently use extended regexps so we don't have to remember the subtle (or not so subtle) differences between N>1 regexp languages.

Also, what about /usr/share/gnome-shell/modes/gdm-tails.json? It's not explicitly listed on this ticket but it has exactly the same problem: see 8d4b0d95c2ccf06df9cd2fe8b2dee9d4427c2626 in greeter.git.

Just to avoid wasting your time: the corresponding changes in greeter.git shall be based on the feature/buster branch there.

#25 Updated by segfault 24 days ago

intrigeri wrote:

I like it a lot!

Code review passes except:

  • You need to escape regexp special chars, e.g. the dots in "org.gnome.Shell"
  • Please consistently use extended regexps so we don't have to remember the subtle (or not so subtle) differences between N>1 regexp languages.

I pushed a commit to fix that. I hope I didn't miss any other unescaped special chars.

Also, what about /usr/share/gnome-shell/modes/gdm-tails.json? It's not explicitly listed on this ticket but it has exactly the same problem: see 8d4b0d95c2ccf06df9cd2fe8b2dee9d4427c2626 in greeter.git.

It's not clear to me which of the differences between gdm-tails.json and classic.json are on purpose and which caused by updates of classic.json. Here is the complete diff of the classic.json from buster and gdm-tails.json from the feature/buster branch of greeter.git:

diff -Naur /usr/share/gnome-shell/modes/classic.json config/gdm-tails.json 
--- /usr/share/gnome-shell/modes/classic.json    2018-11-02 09:26:47.000000000 +0000
+++ config/gdm-tails.json    2019-06-23 17:52:05.676737605 +0000
@@ -1,9 +1,16 @@
 {
-    "parentMode": "user",
-    "stylesheetName": "gnome-classic.css",
-    "enabledExtensions": ["apps-menu@gnome-shell-extensions.gcampax.github.com", "places-menu@gnome-shell-extensions.gcampax.github.com", "launch-new-instance@gnome-shell-extensions.gcampax.github.com", "window-list@gnome-shell-extensions.gcampax.github.com"],
-    "panel": { "left": ["activities", "appMenu"],
-               "center": [],
-               "right": ["a11y", "keyboard", "dateMenu", "aggregateMenu"]
-             }
+    "hasNotifications": true,
+    "isGreeter": false,
+    "isPrimary": true,
+    "unlockDialog": null,
+    "isLocked": true,
+    "hasWindows": true,
+    "components": ["polkitAgent"],
+    "panel": {
+        "left": [],
+        "center": ["dateMenu"],
+        "right": ["a11y", "keyboard", "aggregateMenu"]
+    },
+    "panelStyle": "loginScreen",
+    "stylesheetName": "gnome-classic.css" 
 }

Just to avoid wasting your time: the corresponding changes in greeter.git shall be based on the feature/buster branch there.

Ack

#26 Updated by segfault 24 days ago

gdm-tails.json was created in 2016, for Tails based on Jessie I assume. Jessie had gnome-shell-extensions 3.14.2, which includes data/classic.json.in. That file wasn't updated since then, so I suspect all the differences are on purpose.

#27 Updated by intrigeri 24 days ago

FWIW it looks like our gdm-tails.json is a kind of hybrid between classic.json (meant for a regular GNOME Classic user session) and the gdm mode in js/ui/sessionMode.js (from GNOME Shell's source tree). And in passing, our panelStyle is loginScreen while GNOME's is login-screen — no idea if loginScreen actually does/means anything relevant.

gdm-tails.json was created in 2016, for Tails based on Jessie I assume. Jessie had gnome-shell-extensions 3.14.2, which includes data/classic.json.in. That file wasn't updated since then, so I suspect all the differences are on purpose.

Yep.

I'm not sure how we should handle this file. Forking the gdm mode at build time would make some sense: the only part we've ever had to update since 2016 is the "panel" bits, and we're using exactly the same config there as the gdm mode. But I don't know if/how we can access this config at Tails build time without downloading the GNOME Shell source package. I'm not sure it's worth the effort.

I propose we:

  • add a comment in this file to sum up what we've reverse-engineered here, so it's easier to find out where the 2 upstream components our file is derived from live
  • create a ticket with target version = Tails_5.0 that will be about:
    • sync'ing this file with Bullseye's
    • creating a similar ticket for 6.0
    • rationale: we need to bother only when we switch to a new Debian release

What do you think?

#28 Updated by segfault 6 days ago

intrigeri wrote:

FWIW it looks like our gdm-tails.json is a kind of hybrid between classic.json (meant for a regular GNOME Classic user session) and the gdm mode in js/ui/sessionMode.js (from GNOME Shell's source tree). And in passing, our panelStyle is loginScreen while GNOME's is login-screen — no idea if loginScreen actually does/means anything relevant.

Good catch. I don't think that setting the style to loginScreen has any effect. login-screen is defined in gnome-shell's CSS, loginScreen is not. We could either change that line to actually use the login-screen style or delete it to keep using the default panel style.

gdm-tails.json was created in 2016, for Tails based on Jessie I assume. Jessie had gnome-shell-extensions 3.14.2, which includes data/classic.json.in. That file wasn't updated since then, so I suspect all the differences are on purpose.

Yep.

I'm not sure how we should handle this file. Forking the gdm mode at build time would make some sense: the only part we've ever had to update since 2016 is the "panel" bits, and we're using exactly the same config there as the gdm mode. But I don't know if/how we can access this config at Tails build time without downloading the GNOME Shell source package. I'm not sure it's worth the effort.

I propose we:

  • add a comment in this file to sum up what we've reverse-engineered here, so it's easier to find out where the 2 upstream components our file is derived from live
  • create a ticket with target version = Tails_5.0 that will be about:
    • sync'ing this file with Bullseye's
    • creating a similar ticket for 6.0
    • rationale: we need to bother only when we switch to a new Debian release

Sounds good, but unfortunately JSON doesn't support comments. We could add the information to the Tails 5.0 ticket instead.

Also available in: Atom PDF