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

Unmerged commits

3df3361... 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
1diff --git a/debian/changelog b/debian/changelog
2index 62abe5b..de4f702 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,9 @@
6+ubiquity (24.04.5) noble; urgency=medium
7+
8+ * Add oem-config-prepare package (LP: #2038098)
9+
10+ -- Dave Jones <dave.jones@canonical.com> Tue, 09 Apr 2024 09:42:11 +0100
11+
12 ubiquity (24.04.4) noble; urgency=medium
13
14 * Bump webkit gir dependency to 4.1.
15diff --git a/debian/control b/debian/control
16index d21fa72..73a6cbd 100644
17--- a/debian/control
18+++ b/debian/control
19@@ -242,6 +242,20 @@ Description: KDE frontend for end-user post-OEM-install configuration
20 .
21 This is a KDE frontend to oem-config.
22
23+Package: oem-config-prepare
24+Architecture: all
25+Depends: oem-config (= ${source:Version}),
26+ ${misc:Depends}
27+Description: prepares an image for execution of oem-config on first boot
28+ The oem-config script re-asks a number of questions that are normally asked
29+ during installation, and reconfigures the system accordingly. This allows a
30+ vendor to install a skeleton system, clone it onto a large number of
31+ machines, and ship it to end users, while still allowing end users to set
32+ up their own username and password, language, timezone, and so on.
33+ .
34+ This package executes oem-config-prepare in its postinst, and is intended for
35+ use in preinstalled image builds to avoid resorting to hooks.
36+
37 Package: oem-config-debconf
38 Architecture: all
39 Depends: oem-config (= ${source:Version}),
40diff --git a/debian/oem-config-prepare.postinst b/debian/oem-config-prepare.postinst
41new file mode 100644
42index 0000000..46adcd2
43--- /dev/null
44+++ b/debian/oem-config-prepare.postinst
45@@ -0,0 +1,13 @@
46+#!/bin/sh
47+
48+set -e
49+
50+if [ "$1" = "configure" ]; then
51+ /usr/sbin/useradd -d /home/oem -G adm,sudo -m -N -u 29999 oem
52+ /usr/sbin/oem-config-prepare --quiet
53+ touch "/var/lib/oem-config/run"
54+fi
55+
56+#DEBHELPER#
57+
58+exit 0

Subscribers

People subscribed via source and target branches