diff --git a/0001-data-Always-install-.wants-symlinks.patch b/0001-data-Always-install-.wants-symlinks.patch new file mode 100644 index 0000000..fdc133a --- /dev/null +++ b/0001-data-Always-install-.wants-symlinks.patch @@ -0,0 +1,137 @@ +From bb0b9a3763f5648ab69a7c417f8e83021539580c Mon Sep 17 00:00:00 2001 +From: Benjamin Berg +Date: Wed, 4 Sep 2019 13:24:58 +0200 +Subject: [PATCH 1/2] data: Always install .wants symlinks + +The services should always be enabled after installation. Install the +.wants symlinks rather than relying on them being enabled by the package +post installation script or system administrator. +--- + ...gnome-initial-setup-copy-worker.service.in | 3 -- + ...gnome-initial-setup-first-login.service.in | 3 -- + data/gnome-initial-setup.service.in | 3 -- + data/gnome-welcome-tour.service.in | 3 -- + data/meson-add-wants.sh | 30 +++++++++++++++++++ + data/meson.build | 18 ++++++----- + 6 files changed, 41 insertions(+), 19 deletions(-) + create mode 100755 data/meson-add-wants.sh + +diff --git a/data/gnome-initial-setup-copy-worker.service.in b/data/gnome-initial-setup-copy-worker.service.in +index df43c39..9b411d0 100644 +--- a/data/gnome-initial-setup-copy-worker.service.in ++++ b/data/gnome-initial-setup-copy-worker.service.in +@@ -10,6 +10,3 @@ ConditionPathExists=!%E/gnome-initial-setup-done + Type=simple + ExecStart=@libexecdir@/gnome-initial-setup-copy-worker + Restart=no +- +-[Install] +-WantedBy=gnome-session.target +diff --git a/data/gnome-initial-setup-first-login.service.in b/data/gnome-initial-setup-first-login.service.in +index 7c7f50d..302753b 100644 +--- a/data/gnome-initial-setup-first-login.service.in ++++ b/data/gnome-initial-setup-first-login.service.in +@@ -14,6 +14,3 @@ ConditionPathExists=!%E/gnome-initial-setup-done + Type=oneshot + ExecStart=@libexecdir@/gnome-initial-setup --existing-user + Restart=no +- +-[Install] +-WantedBy=gnome-session.target +diff --git a/data/gnome-initial-setup.service.in b/data/gnome-initial-setup.service.in +index ea91d69..bb0af2e 100644 +--- a/data/gnome-initial-setup.service.in ++++ b/data/gnome-initial-setup.service.in +@@ -11,6 +11,3 @@ Type=simple + ExecStart=@libexecdir@/gnome-initial-setup + ExecStopPost=-@libexecdir@/gnome-session-ctl --shutdown + Restart=no +- +-[Install] +-WantedBy=gnome-session@gnome-initial-setup.target +diff --git a/data/gnome-welcome-tour.service.in b/data/gnome-welcome-tour.service.in +index 2315540..d958630 100644 +--- a/data/gnome-welcome-tour.service.in ++++ b/data/gnome-welcome-tour.service.in +@@ -10,6 +10,3 @@ ConditionPathExists=%E/run-welcome-tour + Type=simple + ExecStart=@libexecdir@/gnome-welcome-tour + Restart=no +- +-[Install] +-WantedBy=gnome-session.target +diff --git a/data/meson-add-wants.sh b/data/meson-add-wants.sh +new file mode 100755 +index 0000000..c33d1b4 +--- /dev/null ++++ b/data/meson-add-wants.sh +@@ -0,0 +1,30 @@ ++#!/bin/sh ++set -eu ++ ++# Script copied from systemd ++ ++unitdir="$1" ++target="$2" ++unit="$3" ++ ++case "$target" in ++ */?*) # a path, but not just a slash at the end ++ dir="${DESTDIR:-}${target}" ++ ;; ++ *) ++ dir="${DESTDIR:-}${unitdir}/${target}" ++ ;; ++esac ++ ++unitpath="${DESTDIR:-}${unitdir}/${unit}" ++ ++case "$target" in ++ */) ++ mkdir -vp -m 0755 "$dir" ++ ;; ++ *) ++ mkdir -vp -m 0755 "$(dirname "$dir")" ++ ;; ++esac ++ ++ln -vfs --relative "$unitpath" "$dir" +diff --git a/data/meson.build b/data/meson.build +index 9aa79bf..19e3643 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -42,20 +42,24 @@ if enable_systemd + unitconf = configuration_data() + unitconf.set('libexecdir', libexec_dir) + +- unit_files = [ +- 'gnome-initial-setup.service', +- 'gnome-initial-setup-first-login.service', +- 'gnome-initial-setup-copy-worker.service', +- 'gnome-welcome-tour.service' +- ] ++ unit_files = { ++ 'gnome-initial-setup.service' : [ 'gnome-session@gnome-initial-setup.target.wants/' ], ++ 'gnome-initial-setup-first-login.service' : [ 'gnome-session.target.wants/' ], ++ 'gnome-initial-setup-copy-worker.service' : [ 'gnome-session.target.wants/' ], ++ 'gnome-welcome-tour.service' : [ 'gnome-session.target.wants/' ], ++ } + +- foreach unit: unit_files ++ foreach unit, wants: unit_files + configure_file( + input: unit + '.in', + output: unit, + configuration: unitconf, + install_dir: systemd_userunitdir + ) ++ ++ foreach target: wants ++ meson.add_install_script('meson-add-wants.sh', systemd_userunitdir, target, unit) ++ endforeach + endforeach + endif + +-- +2.21.0 + diff --git a/0002-data-Flag-gnome-initial-setup.desktop-as-being-syste.patch b/0002-data-Flag-gnome-initial-setup.desktop-as-being-syste.patch new file mode 100644 index 0000000..828621c --- /dev/null +++ b/0002-data-Flag-gnome-initial-setup.desktop-as-being-syste.patch @@ -0,0 +1,25 @@ +From a1308201e22578d0522d77caa3dbe4043b6e2952 Mon Sep 17 00:00:00 2001 +From: Benjamin Berg +Date: Wed, 4 Sep 2019 11:50:56 +0200 +Subject: [PATCH 2/2] data: Flag gnome-initial-setup.desktop as being systemd + managed + +When using systemd to manage the gnome-session, gnome-initial-setup will +be launched that way. So set the appropriate flag so that gnome-session +will not try to launch the service itself. +--- + data/gnome-initial-setup.desktop.in.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/data/gnome-initial-setup.desktop.in.in b/data/gnome-initial-setup.desktop.in.in +index 6db7765..cad2fe7 100644 +--- a/data/gnome-initial-setup.desktop.in.in ++++ b/data/gnome-initial-setup.desktop.in.in +@@ -13,3 +13,4 @@ X-GNOME-Bugzilla-Bugzilla=GNOME + X-GNOME-Bugzilla-Product=gnome-initial-setup + X-GNOME-Bugzilla-Component=general + X-GNOME-Bugzilla-Version=unknown ++X-GNOME-HiddenUnderSystemd=@systemd_hidden@ +-- +2.21.0 + diff --git a/gnome-initial-setup.spec b/gnome-initial-setup.spec index 59d7c42..63e30e1 100644 --- a/gnome-initial-setup.spec +++ b/gnome-initial-setup.spec @@ -6,7 +6,7 @@ Name: gnome-initial-setup Version: 3.33.92 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Bootstrapping your OS License: GPLv2+ @@ -15,6 +15,9 @@ Source0: https://download.gnome.org/sources/%{name}/3.30/%{name}-%{versio Source1: vendor.conf Patch0: honor-firstboot-disabled.patch +Patch10: 0001-data-Always-install-.wants-symlinks.patch +Patch11: 0002-data-Flag-gnome-initial-setup.desktop-as-being-syste.patch + BuildRequires: meson BuildRequires: gcc BuildRequires: git @@ -103,15 +106,17 @@ useradd -rM -d /run/gnome-initial-setup/ -s /sbin/nologin %{name} &>/dev/null || %{_datadir}/gnome-session/sessions/gnome-initial-setup.session %{_datadir}/gnome-shell/modes/initial-setup.json %{_datadir}/polkit-1/rules.d/20-gnome-initial-setup.rules -%{_userunitdir}/gnome-initial-setup-copy-worker.service -%{_userunitdir}/gnome-initial-setup-first-login.service -%{_userunitdir}/gnome-initial-setup.service -%{_userunitdir}/gnome-welcome-tour.service +%{_userunitdir}/* %dir %{_datadir}/gnome-initial-setup %{_datadir}/gnome-initial-setup/vendor.conf %changelog +* Wed Sep 04 2019 Benjamin Berg - 3.33.92-2 +- Include upstream patches to fix systemd support + https://gitlab.gnome.org/GNOME/gnome-initial-setup/merge_requests/58 +- Resolves: 1746563 + * Tue Sep 03 2019 Kalev Lember - 3.33.92-1 - Update to 3.33.92