Skip to content

Comments

ostree: Fix usage of ostree-prepare-root for initramfs#132

Merged
ricardosalveti merged 1 commit intouptane:masterfrom
albard00:master
May 27, 2025
Merged

ostree: Fix usage of ostree-prepare-root for initramfs#132
ricardosalveti merged 1 commit intouptane:masterfrom
albard00:master

Conversation

@albard00
Copy link

@albard00 albard00 commented May 5, 2025

Hi,

Since ostree v2023.5 and specifically commit
ostreedev/ostree@d6799ec

Building with static linking forces the usage of
ostree-prepare-root-static which is checking that it is executed as PID1.

This is incompatible with the usage of an initramfs.


I changed and tested this on scarthgap branch.
Unlike in #106, I did not need to bring the whole ostree to make it work, but as said, I only tested it on scarthgap.

Since ostree v2023.5 and specifically commit
ostreedev/ostree@d6799ec

Building with static linking forces the usage of
ostree-prepare-root-static which is checking that it is executed as
PID1.

This is incompatible with the usage of an initramfs.

Signed-off-by: Alexandre Bard <alexandre.bard@belden.com>
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, we're using without static in meta-lmp as well.

While the initrd is now larger, it is the only way to have it working since static checks for pid 1.

Please submit a backport to the scarthgap branch.

@ricardosalveti ricardosalveti merged commit abd60ec into uptane:master May 27, 2025
1 check passed
ricardosalveti added a commit to ricardosalveti/meta-updater-1 that referenced this pull request Oct 1, 2025
Recipe changes:
- Set CMAKE_POLICY_VERSION_MINIMUM to make it build with cmake 4.x
- Remove asn1 references to TMPDIR (package warning)

Relevant code changes:
- 242eb426e Merge pull request uptane#136 from ricardosalveti/oe
- 39ed4e6e6 Fix compatibility with boost 1.89
- 353cef363 ostree_object: add missing list include
- 44acc2e0f Merge pull request uptane#133 from rborn-tx/drop-root-rotations-limit
- c80de13e5 Merge pull request uptane#134 from uptane/fix/expires
- b842192dd Bump 'expires' in test code to the future
- d93b7949c Revert "Set an upper bound of allowed root rotations to 1000."
- c036f089d Merge pull request uptane#132 from uptane/fix/boost1.87-upstream
- 2a1b06b91 Replace Ubuntu Bionic tests with Debian Stable
- 9d65964e7 Support Boost v1.87
- b323701c4 Merge pull request uptane#131 from uptane/fix/use-after-free-fp
- 32e1c9540 Bump GitHub @actions/cache
- f1d91a059 Fix gcc use-after-free false warning
- b7aaf84da Merge pull request uptane#129 from rborn-tx/push-commitmeta
- f5f0a1263 Modify test to cover pushing commitmeta objects to TreeHub
- fc285cc80 Add support for pushing commitmeta objects via garage-push
- 079f94433 Fix check_not_expired_targets test
- 119c3ca43 Solve CMake warning related to SQLite
- 154f4f2b8 Merge pull request uptane#128 from uptane/fix-test
- 3135e2060 Bump Timestamp on failing test
- 753818bc2 Merge pull request uptane#127 from uptane/tidy/repository-type-upstream
- 9a666d455 Tidy up RepositoryType
- 6e90a8d0c Merge pull request uptane#125 from uptane/tidy/no-build-deb
- 8e658266c Merge pull request uptane#126 from uptane/tidy/gitignore
- fee962911 Merge pull request uptane#119 from uptane/tidy/httpclienttest
- 5993f267c Add clangd's .cache directory to .gitignore
- 09c0b0d37 Remove BUILD_DEB option
- e8ef86af1 Merge pull request uptane#118 from uptane/docs/secondary-root-rotation
- db9c365ad Tidy up HttpClient tests
- 3d58e75b7 Merge pull request uptane#124 from uptane/tidy/crypto
- d1d7c3eba Tidy up crypto_test.cc and PKCS#11
- ada682bac Merge pull request uptane#114 from uptane/chore/bump-docker
- e29c73774 Add more documentation to RepositoryCommon::checkMetaOffline
- 80a777dda Merge pull request uptane#115 from uptane/fix/secondary-root-rotation
- 43a55173d Merge pull request uptane#116 from uptane/chore/bump-cpp-compiler
- 52bbaaa68 Fix compiler warnings now that we are using C++17
- 80d3af777 Enable OSTree and sota-tools in CI tests
- edc4b1b02 Upgrade the minimum compiler C++17
- aacf20be0 Move definitiion of P11Engine dtor out of header
- bda057374 Tidy up root rotation logic
- f476f2160 Remove default ctor for Uptane::Root
- ac7a7610e Add documentation for checkMetaOffline
- d4f91ffc5 Fix for TOR-3452
- a674dd009 Reproducer for TOR-3452
- 625c541ed Add missing includes and reduce test flake
- 1213d2911 Add missing includes and reduce test flake
- b55f7822e Move CI from old Ubuntu images to Debian

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
ricardosalveti added a commit that referenced this pull request Oct 14, 2025
Recipe changes:
- Set CMAKE_POLICY_VERSION_MINIMUM to make it build with cmake 4.x
- Remove asn1 references to TMPDIR (package warning)

Relevant code changes:
- 242eb426e Merge pull request #136 from ricardosalveti/oe
- 39ed4e6e6 Fix compatibility with boost 1.89
- 353cef363 ostree_object: add missing list include
- 44acc2e0f Merge pull request #133 from rborn-tx/drop-root-rotations-limit
- c80de13e5 Merge pull request #134 from uptane/fix/expires
- b842192dd Bump 'expires' in test code to the future
- d93b7949c Revert "Set an upper bound of allowed root rotations to 1000."
- c036f089d Merge pull request #132 from uptane/fix/boost1.87-upstream
- 2a1b06b91 Replace Ubuntu Bionic tests with Debian Stable
- 9d65964e7 Support Boost v1.87
- b323701c4 Merge pull request #131 from uptane/fix/use-after-free-fp
- 32e1c9540 Bump GitHub @actions/cache
- f1d91a059 Fix gcc use-after-free false warning
- b7aaf84da Merge pull request #129 from rborn-tx/push-commitmeta
- f5f0a1263 Modify test to cover pushing commitmeta objects to TreeHub
- fc285cc80 Add support for pushing commitmeta objects via garage-push
- 079f94433 Fix check_not_expired_targets test
- 119c3ca43 Solve CMake warning related to SQLite
- 154f4f2b8 Merge pull request #128 from uptane/fix-test
- 3135e2060 Bump Timestamp on failing test
- 753818bc2 Merge pull request #127 from uptane/tidy/repository-type-upstream
- 9a666d455 Tidy up RepositoryType
- 6e90a8d0c Merge pull request #125 from uptane/tidy/no-build-deb
- 8e658266c Merge pull request #126 from uptane/tidy/gitignore
- fee962911 Merge pull request #119 from uptane/tidy/httpclienttest
- 5993f267c Add clangd's .cache directory to .gitignore
- 09c0b0d37 Remove BUILD_DEB option
- e8ef86af1 Merge pull request #118 from uptane/docs/secondary-root-rotation
- db9c365ad Tidy up HttpClient tests
- 3d58e75b7 Merge pull request #124 from uptane/tidy/crypto
- d1d7c3eba Tidy up crypto_test.cc and PKCS#11
- ada682bac Merge pull request #114 from uptane/chore/bump-docker
- e29c73774 Add more documentation to RepositoryCommon::checkMetaOffline
- 80a777dda Merge pull request #115 from uptane/fix/secondary-root-rotation
- 43a55173d Merge pull request #116 from uptane/chore/bump-cpp-compiler
- 52bbaaa68 Fix compiler warnings now that we are using C++17
- 80d3af777 Enable OSTree and sota-tools in CI tests
- edc4b1b02 Upgrade the minimum compiler C++17
- aacf20be0 Move definitiion of P11Engine dtor out of header
- bda057374 Tidy up root rotation logic
- f476f2160 Remove default ctor for Uptane::Root
- ac7a7610e Add documentation for checkMetaOffline
- d4f91ffc5 Fix for TOR-3452
- a674dd009 Reproducer for TOR-3452
- 625c541ed Add missing includes and reduce test flake
- 1213d2911 Add missing includes and reduce test flake
- b55f7822e Move CI from old Ubuntu images to Debian

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
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.

2 participants