Merge ~waveform/ubiquity:prepare-package into ubiquity:main

Proposed by Dave Jones
Status: Needs review
Proposed branch: ~waveform/ubiquity:prepare-package
Merge into: ubiquity:main
Diff against target: 58 lines (+33/-0)
3 files modified
debian/changelog (+6/-0)
debian/control (+14/-0)
debian/oem-config-prepare.postinst (+13/-0)
Reviewer Review Type Date Requested Status
Steve Langasek Needs Information
Review via email: mp+452559@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

given that the intention is to drop ubiquity out of main entirely for 24.04 (either leaving it for community flavors to maintain in universe if they continue to rely on it, or dropping it from the archive), I'm uncomfortable with the introduction of new code here related to oem-config, the bit of ubiquity that we don't yet have replaced in main. What is the larger plan for superseding this bit of code in 24.04, and can we accelerate that instead?

review: Needs Information
Revision history for this message
Dave Jones (waveform) wrote :

I'm told the plan is for subiquity to grow this functionality, but I've no details on delivery (which makes me at least want a backup plan in place). Incidentally, this isn't new code as such: it's code from livecd-rootfs that should've been in oem-config all along. One of the merges in the associated ticket [1] removes that code from livecd-rootfs, this merge places it in an extra package here, and then the final merge from the ticket [2] uses this package in the image definition yaml (which is currently missing all the user setup stuff).

[1]: https://code.launchpad.net/~waveform/livecd-rootfs/+git/livecd-rootfs/+merge/456463

[2]: https://code.launchpad.net/~waveform/ubuntu-images/+git/ubuntu-images/+merge/456465

Revision history for this message
Julian Andres Klode (juliank) wrote :

Frankly I do prefer keeping that in livecd-rootfs until we have dropped ubiquity and a final solution rather than add a binary here for a couple of weeks.

Revision history for this message
Dave Jones (waveform) wrote :

Re: keeping it in livecd-rootfs: we don't use livecd-rootfs for building the Pi images anymore, so if I wind up needing this as a fallback for the desktop images, it's not going to do any good there.

Having now trawled the desktop engineering Jira, it appears the plan is to deliver this via the Ubuntu Welcome application in 24.04, and things appear to be progressing well (I'll see if I can find some time to play with it in the new year). Still, I like having a plan B to fall back on, just in case (having needed them in the past!). If Ubuntu Welcome lands in time, all well and good, everyone can ignore this extra package and/or remove ubiquity entirely from the archive -- it won't make any difference. If Ubuntu Welcome *doesn't* land in time, this will be required for the Pi desktop images to work at all.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

On Fri, 15 Dec 2023 at 05:56, Dave Jones <email address hidden>
wrote:

> Having now trawled the desktop engineering Jira, it appears the plan is to
> deliver this via the Ubuntu Welcome application in 24.04, and things appear
> to be progressing well (I'll see if I can find some time to play with it in
> the new year).

Please do this uh, conversationally :-) (i.e. talk to the desktop people
about your needs!)

> Still, I like having a plan B to fall back on, just in case (having needed
> them in the past!). If Ubuntu Welcome lands in time, all well and good,
> everyone can ignore this extra package and/or remove ubiquity entirely from
> the archive -- it won't make any difference. If Ubuntu Welcome *doesn't*
> land in time, this will be required for the Pi desktop images to work at
> all.
>

I think plan B on the desktop side is to use gnome-initial-setup. Can that
be made to work for the pi desktop image?

Cheers,
mwh

Revision history for this message
Dave Jones (waveform) wrote :

Circling back to this; my understanding was the gnome-initial-setup was considered at some stage but rejected in favour of modifying the new installer to fit the pre-installed use-case. Obviously this didn't happen in noble, and we wound up sticking with oem-config there for the initial release.

I'm still not entirely clear on how those image builds even work because without this patch, the oem user *shouldn't* exist in the images for oem-config-prepare to run successfully (to be clear: the image *doesn't* build successfully in ubuntu-image locally without this patch). Probably something buried in livefs somewhere.

Revision history for this message
Sebastien Bacher (seb128) wrote :

I don't have enough context to know what part of the oem config mode the pi image needs but on a standard desktop installation if there is no user created gnome-initial-setup will start in initial-user mode which allows creating the account and setting up language/keyboard/timezone for the system

Revision history for this message
Dave Jones (waveform) wrote :

The pi images use (and have always used) oem-config for the initial user setup (and language, timezone, keyboard, etc). The only bit that gnome-initial-setup takes care of is the greeter after the (freshly created) user first logs in.

Incidentally, I've now discussed the requirements of the pi desktop with the installer team; while support for pre-installed images is planned this cycle, it is unlikely that the specific pi case will be supported this cycle (it'd be "nice to have", but I take that as "unlikely"). So, given we'll likely have oem-config again this cycle, I'd really like to get this merged so I can build test images cleanly.

Unmerged commits

7af8f68... by Dave Jones

Add oem-config-prepare package

As the package description states, this is intended for use in image
builds to avoid resorting to hooks to execute oem-config-prepare. The
script is executed in this package's postinst instead (and the
oem-config package subsequently removes itself, and thus this package
which depends on it, after run on first boot)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 5da3681..67f8ba9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
1ubiquity (24.04.6) UNRELEASED; urgency=medium
2
3 * Add oem-config-prepare package (LP: #2038098)
4
5 -- Dave Jones <dave.jones@canonical.com> Fri, 19 Apr 2024 10:31:04 +0100
6
1ubiquity (24.04.5) noble; urgency=medium7ubiquity (24.04.5) noble; urgency=medium
28
3 [ Dave Jones ]9 [ Dave Jones ]
diff --git a/debian/control b/debian/control
index d21fa72..73a6cbd 100644
--- a/debian/control
+++ b/debian/control
@@ -242,6 +242,20 @@ Description: KDE frontend for end-user post-OEM-install configuration
242 .242 .
243 This is a KDE frontend to oem-config.243 This is a KDE frontend to oem-config.
244244
245Package: oem-config-prepare
246Architecture: all
247Depends: oem-config (= ${source:Version}),
248 ${misc:Depends}
249Description: prepares an image for execution of oem-config on first boot
250 The oem-config script re-asks a number of questions that are normally asked
251 during installation, and reconfigures the system accordingly. This allows a
252 vendor to install a skeleton system, clone it onto a large number of
253 machines, and ship it to end users, while still allowing end users to set
254 up their own username and password, language, timezone, and so on.
255 .
256 This package executes oem-config-prepare in its postinst, and is intended for
257 use in preinstalled image builds to avoid resorting to hooks.
258
245Package: oem-config-debconf259Package: oem-config-debconf
246Architecture: all260Architecture: all
247Depends: oem-config (= ${source:Version}),261Depends: oem-config (= ${source:Version}),
diff --git a/debian/oem-config-prepare.postinst b/debian/oem-config-prepare.postinst
248new file mode 100644262new file mode 100644
index 0000000..46adcd2
--- /dev/null
+++ b/debian/oem-config-prepare.postinst
@@ -0,0 +1,13 @@
1#!/bin/sh
2
3set -e
4
5if [ "$1" = "configure" ]; then
6 /usr/sbin/useradd -d /home/oem -G adm,sudo -m -N -u 29999 oem
7 /usr/sbin/oem-config-prepare --quiet
8 touch "/var/lib/oem-config/run"
9fi
10
11#DEBHELPER#
12
13exit 0

Subscribers

People subscribed via source and target branches