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
Non-reproducible GUID in compressed XML files #110
Comments
|
If libxmlb allowed me to reset the guid, appstream could also compute its own guid (possibly based on the files that went into the xmlb creation and their ctimes). At the moment, AS only adds its version number to the guid. |
|
I'm pretty sure libxmlb always uses the file mtime when building the silo, but if libappstream is using |
|
@rclobus -- if you did a PR to remove the %p action for _add_node I'd merge it. |
You could mix in a random GUID once, once a n XbBuilderNode has been added manually. The data AppStream adds doesn't really have a canonical origin XML file anymore, as it has been preprocessed (and some cruft has been removed, icons resolved, XML normalized to the latest specification version, etc.).
That would be fine with me, I can vouch for AppStream doing the right thing - but it may make the API less foolproof. |
Instead of using the address of a pointer, use a deterministic hash value based on the content of the node. Fixes hughsie#110
|
I've prepared a pull request. By using |
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.
|
Maybe we let the caller make that decision? That seems simplest to me: #112 |
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.
Hello Richard Hughes,
While working on the “reproducible builds” effort 1, I have noticed that the content of the GUID field of the converted, compressed XML files cannot be recreated in any way.
The function
xb_builder_import_node(which is called byas_cache_components_to_internal_xbin appstream) uses the address of a pointer for the creation of the GUID field 2.See the currents tests 3 for Debian, and the investigations I previously did 4.
Steps to reproduce:
appstreamcli refresh-cache/var/cache/app-info/cache/C-os-catalog.xbchanges only in the GUID field (usingxb-tool)C-local-metainfo.xbis deleted before runningappstreamcli refresh-cache, it will also differ only in the GUID field.The tool
xb-tooldoes not callxb_builder_import_node, so I cannot give an example that only uses libxmlb.My goal:
Proposal:
uuid_generate_randomfrom libuuid (which I can de-randomize using my LD_PRELOAD-hack)With kind regards,
Roland Clobus
The text was updated successfully, but these errors were encountered: