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

Support Conan lockfiles v0.5 #2050

Closed
kzantow opened this issue Aug 22, 2023 · 0 comments
Closed

Support Conan lockfiles v0.5 #2050

kzantow opened this issue Aug 22, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@kzantow
Copy link
Contributor

kzantow commented Aug 22, 2023

What would you like to be added:
It seems the Conan lockfile format may have changed significantly between v0.4 and v0.5. We should support both versions.

There is a report that generating a Conan lockfile recently using:

conan lock create conanfile.txt --lockfile-out=conan.lock

... results in:

{
    "version": "0.5",
    "requires": [
        "zlib/1.2.13#e377bee636333ae348d51ca90874e353%1682597484.674",
        "openssl/1.0.2u#3049deead466fa2a399aa941e99e2ced%1679427310.657",
        "libcurl/7.85.0#119acfd0fe5cdc29916a348daf813428%1689844599.198",
        "json-c/0.17#f863bad3e5c80dc90679092f67bbd680%1692230941.393"
    ],
    "build_requires": [
        "pkgconf/1.9.3#5da3944c3226f5764374e4b8b4e1d055%1688570267.668",
        "ninja/1.11.1#77587f8c8318662ac8e5a7867eb4be21%1684431244.21",
        "meson/1.0.0#15586c0ac6f682805875ef903dbe7ee2%1673885561.647",
        "m4/1.4.19#c1c4b1ee919e34630bb9b50046253d3c%1676610086.39",
        "libtool/2.4.7#d55a3c2435c19e830fa77aa5c6c19350%1677509454.216",
        "gnu-config/cci.20210814#15c3bf7dfdb743977b84d0321534ad90%1681250000.747",
        "automake/1.16.5#058bda3e21c36c9aa8425daf3c1faf50%1688481772.751",
        "autoconf/2.71#ce232afdcd21d1269419c355375731e6%1688493320.427"
    ],
    "python_requires": []
}

... whereas Syft is expecting a lockfile in a format more in line with this (from the test fixtures):

{
 "graph_lock": {
  "nodes": {
   "0": {
    "ref": "zlib/1.2.12",
    "options": "fPIC=True\nshared=False",
    "requires": [],
    "path": "all/conanfile.py",
    "context": "host"
   }
  },
  "revisions_enabled": false
 },
 "version": "0.4",
 "profile_host": "[settings]\narch=x86_64\narch_build=x86_64\nbuild_type=Release\ncompiler=gcc\ncompiler.libcxx=libstdc++\ncompiler.version=9\nos=Linux\nos_build=Linux\n[options]\n[build_requires]\n[env]\n"
}

Why is this needed:
To support newer Conan lockfiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

2 participants