Skip to content

Commit

Permalink
Merge pull request #44 from canonical/gnome_45_mantic_backports
Browse files Browse the repository at this point in the history
Update to support GNOME 45
  • Loading branch information
kenvandine authored Oct 20, 2023
2 parents 3725ef2 + 47cd938 commit aa8db11
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 8 deletions.
File renamed without changes.
4 changes: 4 additions & 0 deletions hooks/000-provide-uids-gids.chroot
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ colord:x:113:123:colord colour management daemon:/var/lib/colord:/usr/sbin/nolog
gnome-initial-setup:x:114:65534::/run/gnome-initial-setup/:/bin/false
rtkit:x:115:124:RealtimeKit,,,:/proc:/usr/sbin/nologin
pipewire:x:116:125:Pipewire,,,:/proc:/usr/sbin/nologin
polkitd:x:999:999:polkit:/nonexistent:/usr/sbin/nologin
EOF
cp /etc/passwd /etc/passwd.orig # We make a copy for a later sanity-compare

Expand Down Expand Up @@ -163,6 +164,7 @@ gdm:*:18459:0:99999:7:::
colord:*:18495:0:99999:7:::
gnome-initial-setup:*:18495:0:99999:7:::
rtkit:*:19390:0:99999:7:::
polkitd:!*:19635:::::
EOF
cp /etc/shadow /etc/shadow.orig # We make a copy for a later sanity-compare

Expand Down Expand Up @@ -231,6 +233,7 @@ scanner:x:122:
colord:x:123:
rtkit:x:124:
pipewire:x:125:
polkitd:x:999:
EOF
cp /etc/group /etc/group.orig # We make a copy for a later sanity-compare

Expand Down Expand Up @@ -299,5 +302,6 @@ scanner:!::
colord:!::
pipewire:!::
rtkit:!::
polkitd:!*::
EOF
cp /etc/gshadow /etc/gshadow.orig # We make a copy for a later sanity-compare
7 changes: 6 additions & 1 deletion hooks/001-extra-packages.chroot
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,16 @@ EOF
cat <<EOF >/etc/apt/preferences
Package: *
Pin: origin ""
Pin-Priority: 1002
Pin-Priority: 1005
Package: *
Pin: release o=LP-PPA-desktop-snappers-core-desktop
Pin-Priority: 1001
Package: *
Pin: release o=LP-PPA-desktop-snappers-core-desktop-backports
Pin-Priority: 1002
EOF

# enable desktop-snappers PPA
Expand Down Expand Up @@ -109,6 +113,7 @@ jXjiWv0P2PA0Vg==
-----END PGP PUBLIC KEY BLOCK-----
EOF
echo "deb http://ppa.launchpad.net/desktop-snappers/core-desktop/ubuntu jammy main" > /etc/apt/sources.list.d/desktop-snappers.list
echo "deb http://ppa.launchpad.net/desktop-snappers/core-desktop-backports/ubuntu jammy main" >> /etc/apt/sources.list.d/desktop-snappers.list

# install some packages we need
apt update
Expand Down
18 changes: 12 additions & 6 deletions hooks/006-add-gdm.chroot
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,37 @@ apt install --no-install-recommends -y \
apt install --no-install-recommends -y \
ubuntu-session \
gkbd-capplet \
gnome-menus \
gnome-terminal \
gnome-settings-daemon \
gnome-shell-extension-appindicator \
gnome-shell-extension-desktop-icons-ng \
gnome-shell-extension-ubuntu-dock \
gnome-shell-extension-ubuntu-tiling-assistant \
gnome-control-center \
gnome-keyring \
fprintd \
opensc \
bolt \
libpam-gnome-keyring \
spice-vdagent \
xdg-desktop-portal \
xdg-desktop-portal-gnome \
xdg-desktop-portal-gtk \
xdg-user-dirs-gtk
xdg-user-dirs-gtk \
inotify-tools

# Remove setuid from some executables we're not using
chmod u-s,g-s /usr/bin/pkexec
chmod u-s,g-s /usr/libexec/camel-lock-helper-1.2

# Remove Ubuntu X11 session
rm /usr/share/xsessions/ubuntu.desktop

# Move D-Bus policy out of /etc
mv /etc/dbus-1/system.d/gdm.conf /usr/share/dbus-1/system.d/

# Move display-manager.service symlink out of /etc
rm /etc/systemd/system/display-manager.service
ln -s gdm.service /lib/systemd/system/display-manager.service
# Delay gdm until snapd.seeded and cloud-config are complete
sed -i '/^Description=/ a # delay until snapd finishes seeding\nAfter=snapd.seeded.service cloud-config.service' /lib/systemd/system/gdm.service
sed -i '/^Description=/ a # delay until snapd finishes seeding\nAfter=snapd.seeded.service' /lib/systemd/system/gdm.service

# Remove D-Bus service activation files provided by
# ubuntu-desktop-session snap.
Expand All @@ -77,6 +80,9 @@ rm -f /usr/share/dbus-1/services/org.freedesktop.IBus.service
rm -f /usr/share/dbus-1/services/org.freedesktop.portal.IBus.service
rm -f /usr/share/dbus-1/services/org.freedesktop.ColorHelper.service

# Remove un-needed D-Bus service activation files
rm -f /usr/share/dbus-1/services/org.gnome.evolution.dataserver.*

# Remove systemd activation in services managed by
# ubuntu-desktop-session snap
rm -f /usr/lib/systemd/user/pipewire*
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions static/etc/system-image/writable-paths
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@
/var/lib/gdm3 auto persistent transition none
/usr/share/wayland-sessions auto persistent transition none
/usr/share/polkit-1 auto persistent transition none
/var/lib/colord auto persistent transition none
/var/lib/fprint auto persistent transition none
2 changes: 1 addition & 1 deletion static/usr/bin/core-desktop-session-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dbus-update-activation-environment --systemd --all

# Don't set this in our own environment, since it will make
# gnome-session believe it is running in X mode
dbus-update-activation-environment --systemd DISPLAY=:0 WAYLAND_DISPLAY=wayland-0
dbus-update-activation-environment --systemd DISPLAY=:0 WAYLAND_DISPLAY=wayland-0 XAUTHORITY=$XDG_RUNTIME_DIR/.Xauthority

# Set up a background task to wait for gnome-session to create its
# Xauthority file, and copy it to a location snaps will be able to
Expand Down

0 comments on commit aa8db11

Please sign in to comment.