7 Commits

Author SHA1 Message Date
Dostoievski Batista
ca1f22108e Pull only the latest ostree commit to pre-patched ISO
This commit change the patch-iso-debian script to pull only the latest
ostree commit from the repository used to create it. This make the iso
not increase in size exponentially.

Test plan:
PASS: Create ISO using the script.
PASS: Check if ostree_repo/ contains only the latest commit.
PASS: Install AIO-SX system.

Closes-Bug: 2046811

Change-Id: I96ef803e3b93535cdd2b9e077ab94df98164cdfa
Signed-off-by: Dostoievski Batista <dostoievski.albinobatista@windriver.com>
2023-12-18 11:11:30 -03:00
Luis Sampaio
7df6ee2987 Create patches dir if does not exist
Due to USM updates the patches dir may be
created during iso creation time so this commit
updates our current prepatch iso to add -p to
the mkdir command.

https://review.opendev.org/c/starlingx/tools/+/892623

Story: 2010676
Task: 48791
Signed-off-by: Luis Sampaio <luis.sampaio@windriver.com>
Change-Id: I4395ae5776df818f8c8c9466d82cb879fb39011a
2023-09-19 15:14:21 -07:00
Dostoievski Batista
4a95931aeb Add more than one metadata to prepatched iso
This change add the possibility to accept more than one patch
as argument when creating the Debian pre-patched ISO.

Test-Plan:
    Pass: Create prepatched ISO with 1 patch, e.g.:
        patch-iso-debian -i ./starlingx-intel-x86-64-cd.iso \
        -o prepatched.iso -p rebootrequired1.patch
    Pass: Create prepatched ISO with 2 patchs, e.g.:
        patch-iso-debian -i ./starlingx-intel-x86-64-cd.iso \
        -o prepatched.iso -p rebootrequired1.patch
        \ -p rebootrequired2.patch

Story: 2009969
Task: 48421

Change-Id: If1d8745f9c452472ccb2733d609ab4fb593af48d
Signed-off-by: Dostoievski Batista <dostoievski.albinobatista@windriver.com>
2023-07-19 14:23:32 +00:00
Luis Sampaio
e1c55d8e24 Patched iso fix permission for ostree_repo
When we try to generate a prepatched iso as non-root
the ostree pull command fails with permission denied,
this commit sets the +w to the temporary working dir.

Test Plan:
Pass: Create patched iso as root/sudo
Pass: patch patched iso as non-root user

Story: 2009969
Task: 46467
Signed-off-by: Luis Sampaio <luis.sampaio@windriver.com>
Change-Id: Ifd52ef57e4ee77fa3280ad7bfacc831b327bf4dc
2023-01-24 13:01:19 -08:00
Luis Sampaio
e2c1cd3c78 Add ISO_LABEL to patched iso
Adds ISO_LABEL to avoid boot loop if the
iso is not removed after the install.

This commit also verifies if prereq tools are
installed.

Test Plan:
Pass: build patched iso and install

Story: 2009969
Task: 46467
Signed-off-by: Luis Sampaio <luis.sampaio@windriver.com>
Change-Id: I642528dd5858d50b8cb8abfc2ff4976696775a8d
2022-12-14 15:28:42 -08:00
Luis Sampaio
219f75099a Debian pre-patch-iso ostree sha update
This commit updates the ostree_repo inside the
iso to execute a pull-local to update the iso
ostree_repo with the patch commit, this is required
because whenever we reuse the initramfs the top
commit on the build ostree_repo changes so the
pull-local fixes it. If we have a new initramfs the
pull-local won't do any changes.

Test Plan:
Pass: Patch an iso and install it
Pass: check sw-patch query output
Pass: check ostree log starlingx history
Pass: compare build ostree with iso ostree

Story: 2009969
Task: 46467
Signed-off-by: Luis Sampaio <luis.sampaio@windriver.com>
Change-Id: I1e992ce2e3ba54013a043b776981e7994d7fc9db
2022-12-06 18:21:37 -08:00
Luis Sampaio
ddd59e4d7b patch-iso script for Debian
Utility for adding patch metadata to the iso.

Debian patches are sequential and uses ostree
so any patch will produce an updated iso, this
utility injects the patch metadata into the iso.

During install the kickstart will copy the metadata
into the right location and the sw-patch query
command will output the correct patch level.

Test:
Pass: build iso and patch
Pass: patch iso
Pass: install iso (with modified kickstart)
Pass: sw-patch query returns metadata information

Story: 2009969
Task: 46467
Signed-off-by: Luis Sampaio <luis.sampaio@windriver.com>
Change-Id: I455a72c4c2140ec3a7426ba78976123c601984f3
2022-10-06 15:06:07 -07:00