Skip to content

Commit

Permalink
Update to 0.3.101
Browse files Browse the repository at this point in the history
And update spec based on initial-setup-0.3.101-1.fc41. This brings split
for X11 and Wayland versions into separate subpackages. The X11
subpackage is not included in this build.

Update patches, and add also a patch that unbreaks addons.

QubesOS/qubes-issues#9402
  • Loading branch information
marmarek committed Aug 13, 2024
1 parent 5658c5e commit 73c29d7
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 52 deletions.
10 changes: 5 additions & 5 deletions 0001-Move-actual-setup-to-a-separate-task.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From 28e98dc0d02a045f6c922df686ae849a4e43607c Mon Sep 17 00:00:00 2001
From dab28b437af742aad6b6eb15759a00f6b7ee708b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<[email protected]>
Date: Tue, 31 Jan 2023 16:09:22 +0100
Subject: [PATCH 1/2] Move actual setup to a separate task
Subject: [PATCH] Move actual setup to a separate task

Move code to a separate task, so a subsequent commit can hook it up to a
progress-reporting spoke.
Expand All @@ -15,7 +15,7 @@ then call them all.
create mode 100644 initial_setup/task.py

diff --git a/initial_setup/__init__.py b/initial_setup/__init__.py
index f43f235..61bf5bd 100644
index bd864d7..2d0d1b1 100644
--- a/initial_setup/__init__.py
+++ b/initial_setup/__init__.py
@@ -11,16 +11,14 @@ import atexit
Expand All @@ -38,7 +38,7 @@ index f43f235..61bf5bd 100644
SERVICES, NETWORK
from pyanaconda.modules.common.structures.kickstart import KickstartReport

@@ -282,74 +280,12 @@ class InitialSetup(object):
@@ -292,74 +290,12 @@ class InitialSetup(object):
# Do not execute sections that were part of the original
# anaconda kickstart file (== have .seen flag set)

Expand Down Expand Up @@ -267,5 +267,5 @@ index 0000000..848dd11
+ # done
+ self.report_progress(_("Complete!"), step_number=self.steps)
--
2.37.3
2.45.2

16 changes: 8 additions & 8 deletions 0002-Add-ProgressSpoke.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From 94fb6f7f296486a1f19d648f00e1ff63f4db840a Mon Sep 17 00:00:00 2001
From 0b38997bbf7ad0832d589c10573ea4f66e1d1320 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<[email protected]>
Date: Tue, 31 Jan 2023 16:12:39 +0100
Subject: [PATCH 2/2] Add ProgressSpoke
Subject: [PATCH] Add ProgressSpoke

Add a standalone spoke that reports progress of configuration tasks.
This is heavily based on ProgressSpoke from anaconda itself, with few
Expand All @@ -21,10 +21,10 @@ minor differences:
create mode 100644 initial_setup/gui/spokes/setup_progress.py

diff --git a/initial_setup/__init__.py b/initial_setup/__init__.py
index 61bf5bd..30fa8b9 100644
index 2d0d1b1..76a1d78 100644
--- a/initial_setup/__init__.py
+++ b/initial_setup/__init__.py
@@ -280,12 +280,14 @@ class InitialSetup(object):
@@ -290,12 +290,14 @@ class InitialSetup(object):
# Do not execute sections that were part of the original
# anaconda kickstart file (== have .seen flag set)

Expand Down Expand Up @@ -221,7 +221,7 @@ index 0000000..b7547dd
+</interface>
diff --git a/initial_setup/gui/spokes/setup_progress.py b/initial_setup/gui/spokes/setup_progress.py
new file mode 100644
index 0000000..ef8faa9
index 0000000..eec3154
--- /dev/null
+++ b/initial_setup/gui/spokes/setup_progress.py
@@ -0,0 +1,179 @@
Expand Down Expand Up @@ -251,7 +251,7 @@ index 0000000..ef8faa9
+from initial_setup.gui.hubs import InitialSetupMainHub
+from pyanaconda.core.i18n import _, C_
+from pyanaconda.modules.common.constants.services import USERS
+from pyanaconda.product import productName
+from pyanaconda.core.product import get_product_name
+from pyanaconda.core import util
+from pyanaconda.core.configuration.anaconda import conf
+from pyanaconda.core.constants import IPMI_FINISHED
Expand Down Expand Up @@ -355,7 +355,7 @@ index 0000000..ef8faa9
+ continue_text = _(
+ "%s is now successfully installed and ready for you to use!\n"
+ "Go ahead and quit the application to start using it!"
+ ) % productName
+ ) % get_product_name()
+
+ label = self.builder.get_object("rebootLabel")
+ label.set_text(continue_text)
Expand Down Expand Up @@ -405,5 +405,5 @@ index 0000000..ef8faa9
+ if self._task.steps > 0:
+ gtk_call_once(self._progressBar.set_fraction, step/self._task.steps)
--
2.37.3
2.45.2

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 038eb30fe73c82e4c4c12179f847edeff85569dd Mon Sep 17 00:00:00 2001
From fc754d175b66ef61a69604c31d2642278e99b54e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<[email protected]>
Date: Thu, 30 Nov 2023 05:05:32 +0100
Expand All @@ -14,7 +14,7 @@ re-configuring users, check for their existence directly.
1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/initial_setup/gui/spokes/setup_progress.py b/initial_setup/gui/spokes/setup_progress.py
index ef8faa9..d16ba0e 100644
index eec3154..deb41f7 100644
--- a/initial_setup/gui/spokes/setup_progress.py
+++ b/initial_setup/gui/spokes/setup_progress.py
@@ -16,6 +16,9 @@
Expand Down Expand Up @@ -56,5 +56,5 @@ index ef8faa9..d16ba0e 100644

@property
--
2.41.0
2.45.2

31 changes: 31 additions & 0 deletions 0004-Enable-addons.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From cc1884f776c4d552bedc899b45742fc6bd78c90a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<[email protected]>
Date: Tue, 13 Aug 2024 17:39:53 +0200
Subject: [PATCH] Enable addons

The 5e3c55d "Fix Anaconda module startup" commit unintentionally(?)
prevented all addon modules from startging. Re-add them to the
activatable_modules list, while keeping forbidden_modules list
unchanged.

Fixes: 5e3c55d "Fix Anaconda module startup"
---
data/10-initial-setup.conf | 1 +
1 file changed, 1 insertion(+)

diff --git a/data/10-initial-setup.conf b/data/10-initial-setup.conf
index 715c518..9d92a7b 100644
--- a/data/10-initial-setup.conf
+++ b/data/10-initial-setup.conf
@@ -11,6 +11,7 @@ activatable_modules =
org.fedoraproject.Anaconda.Modules.Security
org.fedoraproject.Anaconda.Modules.Users
org.fedoraproject.Anaconda.Modules.Services
+ org.fedoraproject.Anaconda.Addons.*

# Make sure modules that are not supported on installed
# system are not run.
--
2.45.2

1 change: 1 addition & 0 deletions initial-setup-0.3.101.tar.gz.sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0114874aa13bda4600a18033c37d3d5095799335179e1a776565507e16a7e5a96a803be00d6a7401775f9c1f529ad503c266670f30dd359ce570c706a36611f5
1 change: 0 additions & 1 deletion initial-setup-0.3.95.tar.gz.sha512

This file was deleted.

121 changes: 87 additions & 34 deletions initial-setup.spec.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Summary: Initial system configuration utility
# Enable X11 for RHEL 9 and older only
%bcond x11 %[0%{?rhel} && 0%{?rhel} < 10]

Name: initial-setup
Summary: Initial system configuration utility
URL: https://fedoraproject.org/wiki/InitialSetup
License: GPL-2.0-or-later
Version: @VERSION@
Release: @REL@%{?dist}

Expand All @@ -15,11 +19,11 @@ Source0: %{name}-%{version}.tar.gz
Patch1: 0001-Move-actual-setup-to-a-separate-task.patch
Patch2: 0002-Add-ProgressSpoke.patch
Patch3: 0003-Fix-checking-if-users-groups-are-already-configured-.patch
Patch4: 0004-Enable-addons.patch

%define debug_package %{nil}
%define anacondaver 37.8-1

License: GPLv2+
BuildRequires: gettext
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Expand All @@ -31,6 +35,7 @@ BuildRequires: make

Requires: %{__python3}
Requires: anaconda-tui >= %{anacondaver}
Requires: libxkbcommon
Requires: python3-simpleline >= 1.4
Requires: systemd >= 235
Requires(post): systemd
Expand All @@ -43,37 +48,6 @@ Conflicts: firstboot < 19.2
The initial-setup utility runs after installation. It guides the user through
a series of steps that allows for easier configuration of the machine.

%package gui
Summary: Graphical user interface for the initial-setup utility
Requires: gtk3
Requires: anaconda-gui >= %{anacondaver}
Requires: firstboot(windowmanager)
Requires: xorg-x11-xinit
Requires: xorg-x11-server-Xorg
Requires: %{name} = %{version}-%{release}

%description gui
The initial-setup-gui package contains a graphical user interface for the
initial-setup utility.

%prep
%autosetup -p 1

# remove upstream egg-info
rm -rf *.egg-info

%build
make

%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install

%find_lang %{name}

%clean
rm -rf %{buildroot}

%post
%systemd_post initial-setup.service

Expand All @@ -89,23 +63,102 @@ rm -rf %{buildroot}
%{python3_sitelib}/initial_setup*
%exclude %{python3_sitelib}/initial_setup/gui
%{_libexecdir}/%{name}/run-initial-setup
%{_libexecdir}/%{name}/firstboot-windowmanager
%{_libexecdir}/%{name}/initial-setup-text
%{_libexecdir}/%{name}/reconfiguration-mode-enabled
%{_unitdir}/initial-setup.service
%{_unitdir}/initial-setup-reconfiguration.service
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/conf.d
%config %{_sysconfdir}/%{name}/conf.d/*
%{_sysconfdir}/pam.d/initial-setup

%ifarch s390 s390x
%{_sysconfdir}/profile.d/initial-setup.sh
%{_sysconfdir}/profile.d/initial-setup.csh
%endif

# --------------------------------------------------------------------------

%package gui
Summary: Graphical user interface for the initial-setup utility
Requires: gtk3
Requires: anaconda-gui >= %{anacondaver}
Requires: firstboot(gui-backend)
Requires: %{name} = %{version}-%{release}
Suggests: %{name}-gui-wayland-generic

%description gui
The initial-setup-gui package contains a graphical user interface for the
initial-setup utility.

%files gui
%{_libexecdir}/%{name}/initial-setup-graphical
%{python3_sitelib}/initial_setup/gui/

# --------------------------------------------------------------------------

%package gui-wayland-generic
Summary: Run the initial-setup GUI in Wayland
Requires: %{name}-gui = %{version}-%{release}
Requires: weston
Requires: xorg-x11-server-Xwayland

Provides: firstboot(gui-backend)
Conflicts: firstboot(gui-backend)
RemovePathPostfixes: .guiweston

%description gui-wayland-generic
%{summary}.

%files gui-wayland-generic
%{_libexecdir}/%{name}/run-gui-backend.guiweston

# --------------------------------------------------------------------------

%if %{with x11}
%package gui-xorg
Summary: Run the initial-setup GUI in Xorg
Requires: %{name}-gui = %{version}-%{release}
Requires: xorg-x11-xinit
Requires: xorg-x11-server-Xorg
Requires: firstboot(windowmanager)

Provides: firstboot(gui-backend)
Conflicts: firstboot(gui-backend)
RemovePathPostfixes: .guixorg

%description gui-xorg
%{summary}.

%files gui-xorg
%{_libexecdir}/%{name}/run-gui-backend.guixorg
%{_libexecdir}/%{name}/firstboot-windowmanager
%endif

# --------------------------------------------------------------------------

%prep
%autosetup -p 1

# remove upstream egg-info
rm -rf *.egg-info

%build
%make_build

%install
%make_install

# Remove the default link, provide subpackages for alternatives
rm %{buildroot}%{_libexecdir}/%{name}/run-gui-backend

%if ! %{with x11}
# We do not want to ship X11 support anymore
rm -v %{buildroot}%{_libexecdir}/%{name}/run-gui-backend.guixorg
rm -v %{buildroot}%{_libexecdir}/%{name}/firstboot-windowmanager
%endif

%find_lang %{name}

%changelog
@CHANGELOG@
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.95
0.3.101

0 comments on commit 73c29d7

Please sign in to comment.