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

image_types_ostree: ostree_rmdir_helper: fix regression in removing /var symbolic links #69

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

quaresmajose
Copy link
Contributor

@quaresmajose quaresmajose commented Apr 21, 2023

Before the introduction of the ostree_rmdir_helper the '/var' content is removed uncondictional
but new they are removed if they are directories and not symbolic link.

To make it consistent we will remove everything in '/var' with the exception of 'var/local'.
This will also warn about all content deleted from '/var' that has been silent until now
so running bitbake in verbose mode will produce:

WARNING: lmp-base-console-image-1.0-r0 do_image_ostree: Data in 'var' directory is not preserved by OSTree. Consider moving it under '/usr'
var/volatile
var/lib
var/log
var/tmp
var/cache

+ rm -vrf var

removed directory 'var/volatile'
removed directory 'var/lib'
removed 'var/log'
removed 'var/tmp'
removed directory 'var/cache'
removed directory 'var'

+ mkdir var

Copy link
Collaborator

@pattivacek pattivacek left a comment

Choose a reason for hiding this comment

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

LGTM but for some minor things.

@quaresmajose quaresmajose changed the title image_types_ostree: ostree_rmdir_helper: fix the symbolic link removal regression image_types_ostree: ostree_rmdir_helper: fix regression in removing /var symbolic links Apr 24, 2023
Copy link
Collaborator

@ricardosalveti ricardosalveti left a comment

Choose a reason for hiding this comment

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

LGTM

…var symbolic links

Before the introduction of the ostree_rmdir_helper the '/var' content is removed uncondictional
but new they are removed if they are directories and not symbolic link.

To make it consistent we will remove everything in '/var' with the exception of 'var/local'.
This will also warn about all content deleted from '/var' that has been silent until now
so running bitbake in verbose mode will produce:

WARNING: lmp-base-console-image-1.0-r0 do_image_ostree: Data in 'var' directory is not preserved by OSTree. Consider moving it under '/usr'
var/volatile
var/lib
var/log
var/tmp
var/cache

+ rm -vrf var

removed directory 'var/volatile'
removed directory 'var/lib'
removed 'var/log'
removed 'var/tmp'
removed directory 'var/cache'
removed directory 'var'

+ mkdir var

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Copy link
Collaborator

@pattivacek pattivacek left a comment

Choose a reason for hiding this comment

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

Okay, LGTM too!

@pattivacek pattivacek merged commit 63fee1a into uptane:master Apr 25, 2023
@quaresmajose quaresmajose deleted the image_types_ostree branch April 25, 2023 08:01
@quaresmajose
Copy link
Contributor Author

Okay, LGTM too!

Thanks.

ricardosalveti pushed a commit to ricardosalveti/meta-updater-1 that referenced this pull request Apr 26, 2023
git log --oneline bf0494df6382dd26e3daa89d57a393c0ff77f7d8..eced3900754b51273733c66588ca44c44ba03b2c
eced39007 Merge pull request uptane#76 from shr-project/jansa/gcc-12
567b12b43 Fix build with gcc-12
a57b25061 Merge pull request uptane#69 from uptane/add-tuf-test-same-metadata-version
9d9142e3e Merge pull request uptane#65 from uptane/cmake-shellcheck
b5706acb1 Merge pull request uptane#75 from uptane/ats-doc-update
07937a704 tuf-test-vectors: Test update if metadata version is the same
3da96e69e deleted not relevant url
ef323b045 Append '.sh' to shell scripts used for testing.
bcde05ddd Add CMake command to run shellcheck.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants