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

Ensure reproducible results when importing a node #112

Merged
merged 1 commit into from
Dec 20, 2021

Conversation

hughsie
Copy link
Owner

@hughsie hughsie commented Dec 20, 2021

Do not use the address of a pointer as this breaks reproducible builds.

Fixes #110

Based on a patch by Roland Clobus rclobus@rclobus.nl, many thanks.

Do not use the address of a pointer as this breaks reproducible builds.

Fixes #110

Based on a patch by Roland Clobus <rclobus@rclobus.nl>, many thanks.
@hughsie
Copy link
Owner Author

hughsie commented Dec 20, 2021

@rclobus

@ximion
Copy link
Collaborator

ximion commented Dec 20, 2021

This would work for me - and would also actually work with the existing code in AppStream :-)
Not sure though if there is any other code out there that would have a problem with it (but I doubt that).

@hughsie hughsie merged commit 0652ec0 into main Dec 20, 2021
@hughsie hughsie deleted the wip/hughsie/xb_builder_import_node-reproducible branch December 20, 2021 13:37
@rclobus
Copy link

rclobus commented Dec 20, 2021

Now that a call to xb_builder_append_guid is a MUST to ensure a proper unique identifier, could you take a look at the 2 callers of xb_builder_import_node that I found in the Debian source code repository at https://codesearch.debian.net/search?q=xb_builder_import_node

@ximion appstream 0.15.0
https://github.com/ximion/appstream/blob/master/src/as-cache.c
@hughsie fwupd 1.5.7
https://github.com/fwupd/fwupd/blob/main/src/fu-engine.c

@hughsie
Copy link
Owner Author

hughsie commented Dec 20, 2021

fwupd 1.5.7

Yes, I checked this before merging. the tl;dr: is that fwupd does xb_builder_compile() unconditionally rather than xb_builder_ensure() and so the GUID isn't so important.

@ximion
Copy link
Collaborator

ximion commented Dec 20, 2021

Same for AppStream, which has its own logic in front to rebuild the cache only if needed, so it isn't dependent on the GUID either.

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.

Non-reproducible GUID in compressed XML files
3 participants