[gnome-build-meta/valentindavid/eos-installer: 10/13] Add configuration for eos-installer



commit 85a8148aca4c7b0eb8f14cfd6d58d563a47cf089
Author: Valentin David <valentin david codethink co uk>
Date:   Wed Feb 26 12:57:50 2020 +0100

    Add configuration for eos-installer

 elements/iso/eos-installer-extra.bst               | 76 ++++++++++++++++++++++
 files/eos-installer-extra/eos-images-loop.service  | 13 ++++
 .../eos-installer-extra/eos-installer-session.pam  |  8 +++
 .../eos-installer-session.service                  | 38 +++++++++++
 files/eos-installer-extra/eos-installer.json       |  9 +++
 files/eos-installer-extra/eos-installer.preset     |  6 ++
 files/eos-installer-extra/eos-installer.service    | 12 ++++
 files/eos-installer-extra/eos-installer.session    |  3 +
 files/eos-installer-extra/installer-user-dir.conf  |  1 +
 files/eos-installer-extra/installer-user.conf      |  3 +
 .../run-mount-installercd.mount                    |  9 +++
 11 files changed, 178 insertions(+)
---
diff --git a/elements/iso/eos-installer-extra.bst b/elements/iso/eos-installer-extra.bst
new file mode 100644
index 00000000..a1e1d97f
--- /dev/null
+++ b/elements/iso/eos-installer-extra.bst
@@ -0,0 +1,76 @@
+kind: manual
+
+depends:
+- freedesktop-sdk.bst:bootstrap-import.bst
+- freedesktop-sdk.bst:components/systemd.bst
+
+runtime-depends:
+- iso/eos-installer.bst
+
+build-depends:
+- freedesktop-sdk.bst:components/pkg-config.bst
+
+sources:
+- kind: local
+  path: files/eos-installer-extra/eos-images-loop.service
+- kind: local
+  path: files/eos-installer-extra/eos-installer.preset
+- kind: local
+  path: files/eos-installer-extra/run-mount-installercd.mount
+- kind: local
+  path: files/eos-installer-extra/eos-installer.session
+- kind: local
+  path: files/eos-installer-extra/eos-installer.service
+- kind: local
+  path: files/eos-installer-extra/eos-installer-session.service
+- kind: local
+  path: files/eos-installer-extra/installer-user.conf
+- kind: local
+  path: files/eos-installer-extra/installer-user-dir.conf
+- kind: local
+  path: files/eos-installer-extra/eos-installer-session.pam
+- kind: local
+  path: files/eos-installer-extra/eos-installer.json
+config:
+  install-commands:
+  - |
+    dir="$(pkg-config --variable=systemdsystemunitdir systemd)"
+    install -Dm644 -t "%{install-root}${dir}" \
+      eos-images-loop.service \
+      run-mount-installercd.mount \
+      eos-installer-session.service
+
+  - |
+    dir="$(pkg-config --variable=systemduserunitdir systemd)"
+    install -Dm644 -t "%{install-root}${dir}" \
+      eos-installer.service
+  - |
+    dir="$(pkg-config --variable=systemdsystempresetdir systemd)"
+    install -Dm644 -t "%{install-root}${dir}" \
+      eos-installer.preset
+  - |
+    dir="$(pkg-config --variable=sysusersdir systemd)"
+    install -Dm644 -t "%{install-root}${dir}" \
+      installer-user.conf
+
+  - |
+    dir="$(pkg-config --variable=tmpfilesdir systemd)"
+    install -Dm644 -t "%{install-root}${dir}" \
+      installer-user-dir.conf
+
+  - |
+    install -Dm644 -t "%{install-root}%{datadir}/gnome-session/sessions/" \
+      eos-installer.session
+  - |
+    install -Dm644 eos-installer-session.pam \
+      "%{install-root}%{sysconfdir}/pam.d/eos-installer-session"
+  - |
+    install -Dm644 -t "%{install-root}%{datadir}/gnome-shell/modes/" \
+      eos-installer.json
+
+public:
+  bst:
+    integration-commands:
+      - |
+        sed -i "s/gnome-initial-setup/gnome-install-user/g" \
+          "%{datadir}/polkit-1/rules.d/90-eos-installer.rules"
diff --git a/files/eos-installer-extra/eos-images-loop.service 
b/files/eos-installer-extra/eos-images-loop.service
new file mode 100644
index 00000000..18e0b66e
--- /dev/null
+++ b/files/eos-installer-extra/eos-images-loop.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Add eosimages image as device
+Requires=run-mount-installercd.mount
+Before=run-mount-eosimages.mount
+
+[Service]
+Type=oneshot
+ExecStart=losetup -f -P /run/mount/installercd/eosimages.gpt.img
+RemainAfterExit=yes
+ExecStop=bash -c 'losetup -d $(losetup -j /run/mount/installercd/eosimages.gpt.img -O name -n)'
+
+[Install]
+RequiredBy=run-mount-eosimages.mount
diff --git a/files/eos-installer-extra/eos-installer-session.pam 
b/files/eos-installer-extra/eos-installer-session.pam
new file mode 100644
index 00000000..93f12361
--- /dev/null
+++ b/files/eos-installer-extra/eos-installer-session.pam
@@ -0,0 +1,8 @@
+auth required pam_env.so
+auth required pam_permit.so
+auth include postlogin
+account required pam_permit.so
+password required pam_permit.so
+session optional pam_keyinit.so force revoke
+session include system-auth
+session include postlogin
diff --git a/files/eos-installer-extra/eos-installer-session.service 
b/files/eos-installer-extra/eos-installer-session.service
new file mode 100644
index 00000000..8ee46c12
--- /dev/null
+++ b/files/eos-installer-extra/eos-installer-session.service
@@ -0,0 +1,38 @@
+[Unit]
+Description=GNOME Installer Session
+After=systemd-user-sessions.service
+Wants=dbus.socket
+After=dbus.socket
+After=session-c1.scope
+After=run-mount-eosimages.service
+Before=graphical.target
+Conflicts=getty@tty1.service
+After=getty@tty1.service
+Conflicts=plymouth-quit.service
+After=plymouth-start.service
+OnFailure=plymouth-quit.service
+Conflicts=gdm.service
+After=systemd-logind.service
+#After=plymouth-quit-wait.service
+
+[Service]
+ExecStartPre=!-/usr/bin/plymouth deactivate
+ExecStart=/usr/bin/gnome-session --session=eos-installer
+ExecStartPost=!-/usr/bin/plymouth quit --retain-splash
+#TimeoutStartSec=60
+#WatchdogSec=20
+User=gnome-install-user
+PAMName=eos-installer-session
+TTYPath=/dev/tty1
+#TTYReset=yes
+#TTYVHangup=yes
+#TTYVTDisallocate=yes
+StandardInput=tty-fail
+#UtmpIdentifier=tty1
+#UtmpMode=user
+Environment=XDG_SESSION_TYPE=wayland GNOME_SHELL_SESSION_MODE=eos-installer
+KeyringMode=shared
+
+[Install]
+WantedBy=graphical.target
+Alias=display-manager.service
diff --git a/files/eos-installer-extra/eos-installer.json b/files/eos-installer-extra/eos-installer.json
new file mode 100644
index 00000000..626873d5
--- /dev/null
+++ b/files/eos-installer-extra/eos-installer.json
@@ -0,0 +1,9 @@
+{
+    "hasWindows": true,
+    "components": ["polkitAgent", "networkAgent"],
+    "panel": {
+        "left": [],
+        "center": [],
+        "right": ["a11y", "keyboard", "aggregateMenu"]
+    }
+}
diff --git a/files/eos-installer-extra/eos-installer.preset b/files/eos-installer-extra/eos-installer.preset
new file mode 100644
index 00000000..2902a6c0
--- /dev/null
+++ b/files/eos-installer-extra/eos-installer.preset
@@ -0,0 +1,6 @@
+enable eos-images-loop.service
+enable eos-installer-session.service
+enable colord.service
+enable accounts-daemon.service
+enable avahi-daemon.*
+enable NetworkManager.service
diff --git a/files/eos-installer-extra/eos-installer.service b/files/eos-installer-extra/eos-installer.service
new file mode 100644
index 00000000..9ed92626
--- /dev/null
+++ b/files/eos-installer-extra/eos-installer.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=GNOME Installer
+RefuseManualStart=true
+RefuseManualStop=true
+
+BindsTo=gnome-session.target
+After=gnome-session.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/eos-installer
+Restart=no
diff --git a/files/eos-installer-extra/eos-installer.session b/files/eos-installer-extra/eos-installer.session
new file mode 100644
index 00000000..9fc30116
--- /dev/null
+++ b/files/eos-installer-extra/eos-installer.session
@@ -0,0 +1,3 @@
+[GNOME Session]
+Name=GNOME Installer
+RequiredComponents=org.gnome.Shell;com.endlessm.Installer;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;
diff --git a/files/eos-installer-extra/installer-user-dir.conf 
b/files/eos-installer-extra/installer-user-dir.conf
new file mode 100644
index 00000000..6bd5608b
--- /dev/null
+++ b/files/eos-installer-extra/installer-user-dir.conf
@@ -0,0 +1 @@
+d /run/gnome-install-user 0755 gnome-install-user gnome-install-user - -
diff --git a/files/eos-installer-extra/installer-user.conf b/files/eos-installer-extra/installer-user.conf
new file mode 100644
index 00000000..515d60d7
--- /dev/null
+++ b/files/eos-installer-extra/installer-user.conf
@@ -0,0 +1,3 @@
+# sysusers.d file to ensure the existence of the GNOME Initial Setup user
+#
+u      gnome-install-user      -       "GNOME install user"    /run/gnome-install-user
diff --git a/files/eos-installer-extra/run-mount-installercd.mount 
b/files/eos-installer-extra/run-mount-installercd.mount
new file mode 100644
index 00000000..2cebf68b
--- /dev/null
+++ b/files/eos-installer-extra/run-mount-installercd.mount
@@ -0,0 +1,9 @@
+[Unit]
+Description=Mount installer CD
+
+[Mount]
+What=LABEL=GNOME-OS-INSTALLER
+Where=/run/mount/installercd
+Type=iso9660
+Options=ro,nodev,nosuid,noexec,nofail,allow_other
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]