Skip to content

machine id: Added cmdline argument to use VM behaviour on bare metal - #32086

Merged
YHNdnzj merged 1 commit into
systemd:mainfrom
FML128:machine_id_smbios
Jul 13, 2024
Merged

YHNdnzj merged 1 commit into
systemd:mainfrom
FML128:machine_id_smbios

Conversation

@FML128

@FML128 FML128 commented Apr 3, 2024 •

Copy link
Copy Markdown
Contributor

Should fix #30707.

@FML128
FML128 marked this pull request as ready for review April 4, 2024 08:00
@FML128
FML128 force-pushed the machine_id_smbios branch from 2ed8971 to 96c73da Compare April 4, 2024 08:00
@github-actions github-actions Bot added the please-review PR is ready for (re-)review by a maintainer label Apr 4, 2024
@FML128
FML128 force-pushed the machine_id_smbios branch from 96c73da to b8e8667 Compare April 4, 2024 16:16
@poettering

Copy link
Copy Markdown
Member

Hmm, I think adding this would be OK. but I think we should overload the existing systemd.machine_id= setting for this. i.e. if systemd.machine_id=smbios would mean: read the uuid from smbios.

and similar.

We just need to make sure that whatever special strings we introduce here they are under no circumstances something one could mistake for a proper machine ID. i.e. contain at least one character outside the [0-9a-f-] charset, and maybe are not 32ch long...

@poettering

Copy link
Copy Markdown
Member

actually, it should be called systemd.machine_id=firmware I guess. After all we already support both smbios and devicetree for this, hence a more generic name sounds better

Comment thread man/machine-id.xml Outdated
@poettering

Copy link
Copy Markdown
Member

looks conceptually ok, but please don#t call this "the vm logic", see above, and please add this to the existing systemd.machine_id= param just as a new special case.

@poettering poettering added reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks and removed please-review PR is ready for (re-)review by a maintainer labels Apr 4, 2024
@FML128

FML128 commented Apr 4, 2024

Copy link
Copy Markdown
Contributor Author

Sure, makes sense. I will change it to systemd.machine_id=firmware.

@FML128
FML128 force-pushed the machine_id_smbios branch from b8e8667 to 3a01c44 Compare April 4, 2024 16:58
@github-actions github-actions Bot added please-review PR is ready for (re-)review by a maintainer and removed reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks labels Apr 4, 2024
@FML128
FML128 force-pushed the machine_id_smbios branch from 3a01c44 to fe3fa3d Compare April 4, 2024 18:15
Comment thread src/shared/machine-id-setup.c Outdated
Comment thread man/machine-id.xml Outdated
Comment thread src/shared/machine-id-setup.c Outdated
@bluca bluca added reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks and removed please-review PR is ready for (re-)review by a maintainer labels Apr 4, 2024
@FML128
FML128 force-pushed the machine_id_smbios branch from fe3fa3d to 3ca51e6 Compare April 4, 2024 22:25
@github-actions github-actions Bot added please-review PR is ready for (re-)review by a maintainer and removed reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks labels Apr 4, 2024
@FML128
FML128 force-pushed the machine_id_smbios branch 2 times, most recently from 9046946 to 54d1484 Compare April 5, 2024 07:11
@FML128
FML128 requested review from bluca and poettering April 5, 2024 07:11
Comment thread src/core/main.c Outdated
@FML128
FML128 force-pushed the machine_id_smbios branch from 21004b3 to 1f45619 Compare June 21, 2024 14:44
@github-actions github-actions Bot added please-review PR is ready for (re-)review by a maintainer and removed reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks labels Jun 21, 2024
@FML128
FML128 requested a review from poettering July 9, 2024 07:34
Comment thread src/shared/machine-id-setup.c Outdated
Comment thread src/shared/machine-id-setup.c Outdated
Comment thread src/shared/machine-id-setup.c Outdated
@poettering poettering added reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks and removed please-review PR is ready for (re-)review by a maintainer labels Jul 9, 2024
@github-actions github-actions Bot added please-review PR is ready for (re-)review by a maintainer and removed reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks labels Jul 9, 2024
@FML128
FML128 force-pushed the machine_id_smbios branch 2 times, most recently from 56355da to 32a929b Compare July 9, 2024 11:56
@FML128
FML128 requested a review from poettering July 9, 2024 11:56
@FML128
FML128 force-pushed the machine_id_smbios branch from 32a929b to d63783e Compare July 9, 2024 11:57
@poettering

Copy link
Copy Markdown
Member

Now I am happy! thank you!

@poettering poettering added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed please-review PR is ready for (re-)review by a maintainer labels Jul 9, 2024
Comment thread src/core/main.c Outdated
Comment thread src/shared/machine-id-setup.c
Comment thread src/shared/machine-id-setup.c
@FML128
FML128 force-pushed the machine_id_smbios branch from d63783e to f5c48db Compare July 9, 2024 13:27
@FML128
FML128 requested a review from YHNdnzj July 9, 2024 13:30
Comment thread src/shared/machine-id-setup.c Outdated
@FML128
FML128 force-pushed the machine_id_smbios branch from f5c48db to 8692ede Compare July 9, 2024 13:34
@FML128
FML128 requested a review from YHNdnzj July 9, 2024 13:35

@YHNdnzj YHNdnzj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, except for one problem

Comment thread src/shared/machine-id-setup.c
@YHNdnzj YHNdnzj added good-to-merge/with-minor-suggestions and removed good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed labels Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Obtain machine-id from SMBIOS, DT, or TPM (on bare metal)

5 participants