Add initial-setup-launcher package
A simple package to workaround bug in initial-setup-0.3.37: https://fedoraproject.org/wiki/Common_F23_bugs#Initial_setup_sometimes_starts_in_text_mode_instead_of_in_graphics_mode This is based on work done by M. Vefa Bicakci <m.v.b@runbox.com>. This package can be removed when initial-setup-0.3.40 will be used. QubesOS/qubes-issues#1807
This commit is contained in:
parent
40b3ab5ba9
commit
19ff42ed5f
@ -3,6 +3,7 @@ RPM_SPEC_FILES.dom0 := \
|
||||
lorax-templates-qubes/lorax-templates-qubes.spec \
|
||||
pungi/pungi.spec \
|
||||
anaconda/anaconda.spec \
|
||||
initial-setup-launcher/initial-setup-launcher.spec \
|
||||
qubes-anaconda-addon/qubes-anaconda-addon.spec \
|
||||
qubes-release/qubes-release.spec \
|
||||
qubes-release/qubes-dom0-dist-upgrade.spec \
|
||||
|
@ -1009,6 +1009,7 @@
|
||||
<packagelist>
|
||||
<packagereq type="mandatory">desktop-backgrounds-basic</packagereq>
|
||||
<packagereq type="mandatory">initial-setup</packagereq>
|
||||
<packagereq type="mandatory">initial-setup-launcher</packagereq>
|
||||
<packagereq type="mandatory">glx-utils</packagereq>
|
||||
<packagereq type="mandatory">gnome-packagekit</packagereq>
|
||||
<packagereq type="mandatory">mesa-dri-drivers</packagereq>
|
||||
|
2
initial-setup-launcher/initial-setup-graphical.service.d
Normal file
2
initial-setup-launcher/initial-setup-graphical.service.d
Normal file
@ -0,0 +1,2 @@
|
||||
[Unit]
|
||||
ConditionPathExists=/overloaded/by/initial-setup.service
|
46
initial-setup-launcher/initial-setup-launcher.spec
Normal file
46
initial-setup-launcher/initial-setup-launcher.spec
Normal file
@ -0,0 +1,46 @@
|
||||
Name: initial-setup-launcher
|
||||
Version: 1.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Initial system configuration utility launcher
|
||||
|
||||
Group: System Environment/Base
|
||||
License: GPLv2+
|
||||
URL: https://fedoraproject.org/wiki/InitialSetup
|
||||
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
|
||||
Requires: initial-setup
|
||||
|
||||
%if 0%{?qubes_builder}
|
||||
%define _builddir %(pwd)/initial-setup-launcher
|
||||
%endif
|
||||
|
||||
%description
|
||||
Launcher for initial-setup utility. Used to avoid race condition described here:
|
||||
https://fedoraproject.org/wiki/Common_F23_bugs#Initial_setup_sometimes_starts_in_text_mode_instead_of_in_graphics_mode
|
||||
|
||||
%prep
|
||||
%if ! 0%{?qubes_builder}
|
||||
%setup -q
|
||||
%endif
|
||||
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
install -D run-initial-setup $RPM_BUILD_ROOT/usr/bin/run-initial-setup
|
||||
install -m 0644 -D initial-setup-graphical.service.d \
|
||||
$RPM_BUILD_ROOT%{_unitdir}/initial-setup-graphical.service.d/30-initial-setup-launcher.conf
|
||||
install -m 0644 -D initial-setup-text.service.d \
|
||||
$RPM_BUILD_ROOT%{_unitdir}/initial-setup-text.service.d/30-initial-setup-launcher.conf
|
||||
install -m 0644 -D initial-setup.service \
|
||||
$RPM_BUILD_ROOT%{_unitdir}/initial-setup.service
|
||||
|
||||
%files
|
||||
/usr/bin/run-initial-setup
|
||||
%{_unitdir}/initial-setup-graphical.service.d/30-initial-setup-launcher.conf
|
||||
%{_unitdir}/initial-setup-text.service.d/30-initial-setup-launcher.conf
|
||||
%{_unitdir}/initial-setup.service
|
||||
|
||||
%changelog
|
||||
|
2
initial-setup-launcher/initial-setup-text.service.d
Normal file
2
initial-setup-launcher/initial-setup-text.service.d
Normal file
@ -0,0 +1,2 @@
|
||||
[Unit]
|
||||
ConditionPathExists=/overloaded/by/initial-setup.service
|
24
initial-setup-launcher/initial-setup.service
Normal file
24
initial-setup-launcher/initial-setup.service
Normal file
@ -0,0 +1,24 @@
|
||||
[Unit]
|
||||
Description=Initial Setup configuration program
|
||||
After=livesys.service plymouth-quit-wait.service
|
||||
After=systemd-vconsole-setup.service
|
||||
Before=display-manager.service getty@tty1.service getty@ttyUSB0.service
|
||||
Before=serial-getty@ttyS0.service serial-getty@ttyO0.service serial-getty@ttyO2.service
|
||||
Before=serial-getty@ttyAMA0.service serial-getty@ttymxc0.service serial-getty@ttymxc3.service serial-getty@hvc0.service
|
||||
Conflicts=plymouth-quit-wait.service initial-setup-text.service initial-setup-graphical.service
|
||||
ConditionKernelCommandLine=!rd.live.image
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
TimeoutSec=0
|
||||
StandardInput=tty
|
||||
StandardOutput=tty
|
||||
RemainAfterExit=no
|
||||
ExecStartPre=/bin/kill -55 1
|
||||
ExecStartPre=-/bin/plymouth quit
|
||||
ExecStart=/usr/bin/run-initial-setup
|
||||
ExecStartPost=/bin/kill -54 1
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical.target
|
||||
WantedBy=multi-user.target
|
23
initial-setup-launcher/run-initial-setup
Executable file
23
initial-setup-launcher/run-initial-setup
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
IS_GRAPHICAL="$(rpm -q initial-setup-gui >/dev/null 2>&1 && echo "yes" || echo "no")"
|
||||
WINDOWMANAGER_SCRIPT="/usr/bin/firstboot-windowmanager"
|
||||
INITIAL_SETUP_SCRIPT="/usr/bin/initial-setup"
|
||||
|
||||
# check if graphical Initial Setup is installed
|
||||
if test "x${IS_GRAPHICAL}" = "xyes"; then
|
||||
printf "MESSAGE=starting Initial Setup GUI\nPRIORITY=6" | logger --journald
|
||||
/bin/xinit ${WINDOWMANAGER_SCRIPT} ${INITIAL_SETUP_SCRIPT} -- /bin/Xorg :9 -ac -nolisten tcp
|
||||
else
|
||||
printf "MESSAGE=starting Initial Setup TUI\nPRIORITY=6" | logger --journald
|
||||
${INITIAL_SETUP_SCRIPT}
|
||||
fi
|
||||
|
||||
# check if the Initial Setup run was successful by looking at the return code
|
||||
if [ $? -eq 0 ]; then
|
||||
printf "MESSAGE=Initial Setup finished successfully, disabling\nPRIORITY=6" | logger --journald
|
||||
/bin/systemctl disable initial-setup.service &>/dev/null
|
||||
printf "MESSAGE=Initial Setup has been disabled\nPRIORITY=6" | logger --journald
|
||||
else
|
||||
printf "MESSAGE=Initial Setup failed, keeping enabled\nPRIORITY=3" | logger --journald
|
||||
fi
|
Loading…
Reference in New Issue
Block a user