| |
@@ -0,0 +1,137 @@
|
| |
+ From bb0b9a3763f5648ab69a7c417f8e83021539580c Mon Sep 17 00:00:00 2001
|
| |
+ From: Benjamin Berg <bberg@redhat.com>
|
| |
+ 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
|
| |
+
|
| |
https://gitlab.gnome.org/GNOME/gnome-initial-setup/merge_requests/58
Resolves: 1746563