Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cloud-init paths of the new root in 'after-*' hooks #2192

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

davidcassany
Copy link
Contributor

@davidcassany davidcassany commented Sep 23, 2024

This commit enables to run the non chrooted 'after-*' hooks included in the newly deployed image root. This specially applies to the install, reset, upgrade and build-disk commands.

Moreover, 'after-disk' command now includes static reference paths to the new root and working directory, so that those can be used within the hooks regardless of the chosen output directory.

Part of rancher/elemental#1516

@davidcassany davidcassany requested a review from a team as a code owner September 23, 2024 14:00
@davidcassany davidcassany marked this pull request as draft September 23, 2024 14:00
@davidcassany davidcassany force-pushed the set_workdir_to_output branch 4 times, most recently from 9621cdd to 2132cf5 Compare September 24, 2024 12:59
@davidcassany davidcassany marked this pull request as ready for review September 24, 2024 13:03
@davidcassany davidcassany changed the title Set working directory for non chrooted build hooks Add cloud-init paths of the new root in 'after-*' hooks Sep 24, 2024
@davidcassany davidcassany force-pushed the set_workdir_to_output branch 2 times, most recently from f109eb1 to b9f6dea Compare September 24, 2024 16:50
This commit enables to run the non chrooted 'after-*' hooks
included in the newly deployed image root. This specially applies to the
install, reset, upgrade and build-disk commands.

Moreover, 'after-disk' command now includes static reference paths to
the new root and working directory, so that those can be used within
the hooks regardless of the choosen output directory.

Signed-off-by: David Cassany <dcassany@suse.com>
This commit introduces an arm-firmware feature adding
the required after-* hooks to ensure the RPi firmware is
copied to the EFI partition.

It could be, eventually, extended to support other boards
and it does not harm systems which are not including RPi
firmware.

Signed-off-by: David Cassany <dcassany@suse.com>
Signed-off-by: David Cassany <dcassany@suse.com>
Copy link
Contributor

@frelon frelon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@davidcassany davidcassany merged commit 30a64d7 into rancher:main Sep 25, 2024
28 checks passed
@davidcassany davidcassany deleted the set_workdir_to_output branch September 25, 2024 07:47
@kkaempf kkaempf added the kind/enhancement New feature or request label Oct 1, 2024
@kkaempf kkaempf added this to the Micro6.1 milestone Oct 1, 2024
davidcassany added a commit to davidcassany/elemental-toolkit that referenced this pull request Oct 1, 2024
* Add cloud-init paths of the new root in 'after-*' hooks

This commit enables to run the non chrooted 'after-*' hooks
included in the newly deployed image root. This specially applies to the
install, reset, upgrade and build-disk commands.

Moreover, 'after-disk' command now includes static reference paths to
the new root and working directory, so that those can be used within
the hooks regardless of the choosen output directory.

* Include arm-firwmare feature

This commit introduces an arm-firmware feature adding
the required after-* hooks to ensure the RPi firmware is
copied to the EFI partition.

It could be, eventually, extended to support other boards
and it does not harm systems which are not including RPi
firmware.

* Allow features to be passed as arguments

Signed-off-by: David Cassany <dcassany@suse.com>
(cherry picked from commit 30a64d7)
davidcassany added a commit that referenced this pull request Oct 2, 2024
* Add cloud-init paths of the new root in 'after-*' hooks

This commit enables to run the non chrooted 'after-*' hooks
included in the newly deployed image root. This specially applies to the
install, reset, upgrade and build-disk commands.

Moreover, 'after-disk' command now includes static reference paths to
the new root and working directory, so that those can be used within
the hooks regardless of the choosen output directory.

* Include arm-firwmare feature

This commit introduces an arm-firmware feature adding
the required after-* hooks to ensure the RPi firmware is
copied to the EFI partition.

It could be, eventually, extended to support other boards
and it does not harm systems which are not including RPi
firmware.

* Allow features to be passed as arguments

Signed-off-by: David Cassany <dcassany@suse.com>
(cherry picked from commit 30a64d7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants