fetch2: Add checksum capability for crate fetcher
PATCH 1/1 fetch2: Add checksum capability for crate fetcher
From: Frederic Martinsons <[email protected]>
This change brings checksum verification of each crate in a recipe, e.g
| SRC_URI += " \ | crate://crates.io/aho-corasick/0.7.20 \ | crate://crates.io/atomic-waker/1.1.0 \ | crate://crates.io/cc/1.0.79 \ | " | | SRC_URI[aho-corasick.sha256sum] = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" | SRC_URI[atomic-waker.sha256sum] = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599" | SRC_URI[cc.sha256sum] = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
That will require to move the checksum initialization after the possible call to urldata_init method in order for the crate fetcher to parse the url.
Another way of doing could have been implementing a decodeurl method that would have been specific for each fetcher class.
--- lib/bb/fetch2/__init__.py | 12 ++++++------ lib/bb/tests/fetch.py | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 6 deletions(-)
lib/bb/fetch2/__init__.py +6 -6
@@ -1291,18 +1291,13 @@ class FetchData(object): if checksum_name in self.parm: checksum_expected = self.parm[checksum_name] - elif self.type not in ["http", "https", "ftp", "ftps", "sftp", "s3", "az"]: + elif self.type not in ["http", "https", "ftp", "ftps", "sftp", "s3", "az", "crate"]: checksum_expected = None else: checksum_expected = d.getVarFlag("SRC_URI", checksum_name) setattr(self, "%s_expected" % checksum_id, checksum_expected) - for checksum_id in CHECKSUM_LIST: - configure_checksum(checksum_id) - - self.ignore_checksums = False - self.names = self.parm.get("name",'default').split(',') self.method = None
@@ -1324,6 +1319,11 @@ class FetchData(object): if hasattr(self.method, "urldata_init"): self.method.urldata_init(self, d) + for checksum_id in CHECKSUM_LIST: + configure_checksum(checksum_id) + + self.ignore_checksums = False + if "localpath" in self.parm: # if user sets localpath for file, use it instead. self.localpath = self.parm["localpath"]
lib/bb/tests/fetch.py +32 -0
@@ -2377,6 +2377,13 @@ class CrateTest(FetcherTest): d = self.d fetcher = bb.fetch2.Fetch(uris, self.d) + ud = fetcher.ud[fetcher.urls[0]] + + self.assertIn("name", ud.parm) + self.assertEqual(ud.parm["name"], "glob") + self.assertIn("downloadfilename", ud.parm) + self.assertEqual(ud.parm["downloadfilename"], "glob-0.2.11.crate") + fetcher.download() fetcher.unpack(self.tempdir) self.assertEqual(sorted(os.listdir(self.tempdir)), ['cargo_home', 'download' , 'unpacked'])
@@ -2394,6 +2401,19 @@ class CrateTest(FetcherTest): d = self.d fetcher = bb.fetch2.Fetch(uris, self.d) + ud = fetcher.ud[fetcher.urls[0]] + + self.assertIn("name", ud.parm) + self.assertEqual(ud.parm["name"], "glob") + self.assertIn("downloadfilename", ud.parm) + self.assertEqual(ud.parm["downloadfilename"], "glob-0.2.11.crate") + + ud = fetcher.ud[fetcher.urls[1]] + self.assertIn("name", ud.parm) + self.assertEqual(ud.parm["name"], "time") + self.assertIn("downloadfilename", ud.parm) + self.assertEqual(ud.parm["downloadfilename"], "time-0.1.35.crate") + fetcher.download() fetcher.unpack(self.tempdir) self.assertEqual(sorted(os.listdir(self.tempdir)), ['cargo_home', 'download' , 'unpacked'])
@@ -2403,6 +2423,18 @@ class CrateTest(FetcherTest): self.assertTrue(os.path.exists(self.tempdir + "/cargo_home/bitbake/time-0.1.35/.cargo-checksum.json")) self.assertTrue(os.path.exists(self.tempdir + "/cargo_home/bitbake/time-0.1.35/src/lib.rs")) + @skipIfNoNetwork() + def test_crate_incorrect_cksum(self): + uri = "crate://crates.io/aho-corasick/0.7.20" + self.d.setVar('SRC_URI', uri) + self.d.setVarFlag("SRC_URI", "aho-corasick.sha256sum", hashlib.sha256("Invalid".encode("utf-8")).hexdigest()) + + uris = self.d.getVar('SRC_URI').split() + + fetcher = bb.fetch2.Fetch(uris, self.d) + with self.assertRaisesRegexp(bb.fetch2.FetchError, "Fetcher failure for URL"): + fetcher.download() + class NPMTest(FetcherTest): def skipIfNoNpm(): import shutil
Signature · 1 line
2.34.1
Quoted 16 lines · Frederic Martinsons
From: Frederic Martinsons <[email protected]>
This change brings checksum verification of each crate in a recipe, e.g
| SRC_URI += " \ | crate://crates.io/aho-corasick/0.7.20 \ | crate://crates.io/atomic-waker/1.1.0 \ | crate://crates.io/cc/1.0.79 \ | " | | SRC_URI[aho-corasick.sha256sum] = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" | SRC_URI[atomic-waker.sha256sum] = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599" | SRC_URI[cc.sha256sum] = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
Quoted 8 lines
That will require to move the checksum initialization after the possible call to
urldata_initmethod in order for the crate fetcher to parse the url.Another way of doing could have been implementing a decodeurl method that would have been specific for each fetcher class.
Signed-off-by Frederic Martinsons <[email protected]>
I really don't think this is the right direction, at least not by default. If a crate is your primary build artefact then this is useful:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15012
But doing this for all the dependency crates we're just repeating what's in the Cargo.lock which should always be part of the primary artefact.
Quoted 110 lines
--- lib/bb/fetch2/__init__.py | 12 ++++++------ lib/bb/tests/fetch.py | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 6 deletions(-)lib/bb/fetch2/__init__.py +6
-6@@ -1291,18 +1291,13 @@ class FetchData(object): if checksum_name in self.parm: checksum_expected = self.parm[checksum_name] - elif self.type not in ["http", "https", "ftp", "ftps", "sftp", "s3", "az"]: + elif self.type not in ["http", "https", "ftp", "ftps", "sftp", "s3", "az", "crate"]: checksum_expected = None else: checksum_expected = d.getVarFlag("SRC_URI", checksum_name) setattr(self, "%s_expected" % checksum_id, checksum_expected) - for checksum_id in CHECKSUM_LIST: - configure_checksum(checksum_id) - - self.ignore_checksums = False - self.names = self.parm.get("name",'default').split(',') self.method = None@@ -1324,6 +1319,11 @@ class FetchData(object): if hasattr(self.method, "urldata_init"): self.method.urldata_init(self, d) + for checksum_id in CHECKSUM_LIST: + configure_checksum(checksum_id) + + self.ignore_checksums = False + if "localpath" in self.parm: # if user sets localpath for file, use it instead. self.localpath = self.parm["localpath"]lib/bb/tests/fetch.py +32
-1@@ -2377,6 +2377,13 @@ class CrateTest(FetcherTest): d = self.d fetcher = bb.fetch2.Fetch(uris, self.d) + ud = fetcher.ud[fetcher.urls[0]] + + self.assertIn("name", ud.parm) + self.assertEqual(ud.parm["name"], "glob") + self.assertIn("downloadfilename", ud.parm) + self.assertEqual(ud.parm["downloadfilename"], "glob-0.2.11.crate") + fetcher.download() fetcher.unpack(self.tempdir) self.assertEqual(sorted(os.listdir(self.tempdir)), ['cargo_home', 'download' , 'unpacked'])@@ -2394,6 +2401,19 @@ class CrateTest(FetcherTest): d = self.d fetcher = bb.fetch2.Fetch(uris, self.d) + ud = fetcher.ud[fetcher.urls[0]] + + self.assertIn("name", ud.parm) + self.assertEqual(ud.parm["name"], "glob") + self.assertIn("downloadfilename", ud.parm) + self.assertEqual(ud.parm["downloadfilename"], "glob-0.2.11.crate") + + ud = fetcher.ud[fetcher.urls[1]] + self.assertIn("name", ud.parm) + self.assertEqual(ud.parm["name"], "time") + self.assertIn("downloadfilename", ud.parm) + self.assertEqual(ud.parm["downloadfilename"], "time-0.1.35.crate") + fetcher.download() fetcher.unpack(self.tempdir) self.assertEqual(sorted(os.listdir(self.tempdir)), ['cargo_home', 'download' , 'unpacked'])@@ -2403,6 +2423,18 @@ class CrateTest(FetcherTest): self.assertTrue(os.path.exists(self.tempdir + "/cargo_home/bitbake/time-0.1.35/.cargo-checksum.json")) self.assertTrue(os.path.exists(self.tempdir + "/cargo_home/bitbake/time-0.1.35/src/lib.rs")) + @skipIfNoNetwork() + def test_crate_incorrect_cksum(self): + uri = "crate://crates.io/aho-corasick/0.7.20" + self.d.setVar('SRC_URI', uri) + self.d.setVarFlag("SRC_URI", "aho-corasick.sha256sum", hashlib.sha256("Invalid".encode("utf-8")).hexdigest()) + + uris = self.d.getVar('SRC_URI').split() + + fetcher = bb.fetch2.Fetch(uris, self.d) + with self.assertRaisesRegexp(bb.fetch2.FetchError, "Fetcher failure for URL"): + fetcher.download() + class NPMTest(FetcherTest): def skipIfNoNpm(): import shutil --2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14563): https://lists.openembedded.org/g/bitbake-devel/message/14563
Mute This Topic: https://lists.openembedded.org/mt/97626961/3618097
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 1 line
Alex Kiernan
Quoted 35 lines · Alex Kiernan
Quoted 6 lines · Frederic Martinsons
From: Frederic Martinsons <[email protected]>
This change brings checksum verification of each crate in a recipe, e.g
Quoted 7 lines
| SRC_URI += " \ | crate://crates.io/aho-corasick/0.7.20 \ | crate://crates.io/atomic-waker/1.1.0 \ | crate://crates.io/cc/1.0.79 \ | " | | SRC_URI[aho-corasick.sha256sum] ="
cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"Quoted 1 line
| SRC_URI[atomic-waker.sha256sum] =
"
debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599"Quoted 1 line
| SRC_URI[cc.sha256sum] =
"
50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"Quoted 9 lines
That will require to move the checksum initialization after the possible call to
urldata_initmethod in order for the crate fetcher to parse the url.Another way of doing could have been implementing a decodeurl method that would have been specific for each fetcher class.
Signed-off-by Frederic Martinsons <[email protected]>I really don't think this is the right direction, at least not by default. If a crate is your primary build artefact then this is useful:
Quoted 6 lines
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15012
But doing this for all the dependency crates we're just repeating what's in the Cargo.lock which should always be part of the primary artefact.
I see what you mean, but will not be useful for library crate which doesn't have a Cargo.lock ? As you said in another thread, this use case should not be very current though (except maybe to run test on it ...).
Another thing I see is that the checkum verification by cargo happen late (build step) comparing to other fetcher which do this during the fetch.
Anyway, it's your call, I don't mind not having this merged... the dev I lead today allow me to better understand bitbake fetcher and unit tests.
Quoted 9 lines · Alex Kiernan
I really don't think this is the right direction, at least not by default. If a crate is your primary build artefact then this is useful:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15012
But doing this for all the dependency crates we're just repeating what's in the Cargo.lock which should always be part of the primary artefact.
Maybe cargo will verify (some) items against Cargo.lock. Maybe it won't. Upstream cargo isn't something we develop, and it may add and remove various exceptions and special cases.
Anyway, we cannot actually trust cargo (unlike, say, git), and we need to do our own checks, and keep the checksums in files external to the source tree. This will free us from worrying about whether cargo protects us from supply chain attacks properly or not.
Alex
Quoted 11 lines · Alexander Kanavin
Quoted 9 lines · Alex Kiernan
I really don't think this is the right direction, at least not by default. If a crate is your primary build artefact then this is useful:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15012
But doing this for all the dependency crates we're just repeating what's in the Cargo.lock which should always be part of the primary artefact.
Quoted 9 lines
Maybe cargo will verify (some) items against Cargo.lock. Maybe it won't. Upstream cargo isn't something we develop, and it may add and remove various exceptions and special cases.
Anyway, we cannot actually trust cargo (unlike, say, git), and we need to do our own checks, and keep the checksums in files external to the source tree. This will free us from worrying about whether cargo protects us from supply chain attacks properly or not.
Also if bitbake fetcher detects unexpected checksum it can easily rename the file in DL_DIR and try fetching it again, because that's what fetcher does for other downloads and fetcher "owns" DL_DIR.
If cargo complains about unexpected checksum, than cargo fails and user will have to make sure that wrongly fetched crate is removed from DL_DIR.
Regards,
Quoted 24 lines · Martin Jansa
Quoted 12 lines · Alexander Kanavin
Quoted 9 lines · Alex Kiernan
I really don't think this is the right direction, at least not by default. If a crate is your primary build artefact then this is useful:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15012
But doing this for all the dependency crates we're just repeating what's in the Cargo.lock which should always be part of the primary artefact.
Quoted 8 lines
Maybe cargo will verify (some) items against Cargo.lock. Maybe it won't. Upstream cargo isn't something we develop, and it may add and remove various exceptions and special cases.
Anyway, we cannot actually trust cargo (unlike, say, git), and we need to do our own checks, and keep the checksums in files external to the source tree. This will free us from worrying about whether cargo protects us from supply chain attacks properly or not.
Quoted 5 lines
Also if bitbake fetcher detects unexpected checksum it can easily rename the file in
DL_DIRand try fetching it again, because that's what fetcher does for other downloads and fetcher "owns"DL_DIR.If cargo complains about unexpected checksum, than cargo fails and user will have to make sure that wrongly fetched crate is removed from
DL_DIR.Regards,
Okay, you're convincing me :) I've definitely tripped over that!
I guess we need to update the cargo crate updater class and librsvg too.
Signature · 1 line
Alex Kiernan
Just to tell that my concern was about making this checksum verification not mandatory, if the recipe didn't specify any checksum for crates, my modification will let it trough.
If we want to make it mandatory, we just have to make the method "recommends_checksum" in crate.py return True instead of False.
Alex, when you talk about updating librsvg and cargo crate updater, do you mind elaborate?
If there is some things to rework/add in my patches I'll be glad to do so (if you tell me what is expected)
Quoted 44 lines · Alex Kiernan
Quoted 2 lines · Martin Jansa
On Wed, Mar 15, 2023 at 4:50 PM Alexander Kanavin <
Quoted 2 lines · [email protected]> wrote:
Quoted 2 lines
On Wed, 15 Mar 2023 at 16:03, Alex Kiernan <[email protected]>
Quoted 14 lines · wrote:
Quoted 14 lines
Quoted 9 lines
I really don't think this is the right direction, at least not by default. If a crate is your primary build artefact then this is useful:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15012
But doing this for all the dependency crates we're just repeating what's in the Cargo.lock which should always be part of the primary artefact.
Maybe cargo will verify (some) items against Cargo.lock. Maybe it won't. Upstream cargo isn't something we develop, and it may add and remove various exceptions and special cases.
Quoted 7 lines
Quoted 4 lines
Anyway, we cannot actually trust cargo (unlike, say, git), and we need to do our own checks, and keep the checksums in files external to the source tree. This will free us from worrying about whether cargo protects us from supply chain attacks properly or not.
Also if bitbake fetcher detects unexpected checksum it can easily rename
the file in
DL_DIRand try fetching it again, because that's what fetcher does for other downloads and fetcher "owns"DL_DIR.Quoted 2 lines
If cargo complains about unexpected checksum, than cargo fails and user
will have to make sure that wrongly fetched crate is removed from
DL_DIR.Quoted 2 lines
Regards,
Okay, you're convincing me :) I've definitely tripped over that!
I guess we need to update the cargo crate updater class and librsvg too.
--
Alex Kiernan
Quoted 1 line · Frédéric Martinsons
Alex, when you talk about updating librsvg and cargo crate updater, do you mind elaborate?
classes-recipe/cargo-update-recipe-crates.bbclass should be updated to write out not just the crate list into SRC_URI, but also their checksums (this is not hard because it works from Cargo.lock, and that already provides the checksums).
Then the class should be used to update all recipes (e.g. python3-bcrypt, python3-cryptography) that use the crate:// fetcher.
Alex
Alright, I will add another patch for that in the coming days.
But I still need some answers to go further:
- Should checksum verification for crate fetcher be mandatory ?
- What about librsvg ? It doesn't include any crate:// but needs to
inherit cargo_common, what should I do for this recipe ?
Le mer. 15 mars 2023, 19:09, Alexander Kanavin <[email protected]> a écrit :
Quoted 15 lines
Quoted 1 line · Frédéric Martinsons
Alex, when you talk about updating librsvg and cargo crate updater, do
you mind elaborate?
classes-recipe/cargo-update-recipe-crates.bbclass should be updated to write out not just the crate list into
SRC_URI, but also their checksums (this is not hard because it works from Cargo.lock, and that already provides the checksums).Then the class should be used to update all recipes (e.g. python3-bcrypt, python3-cryptography) that use the crate:// fetcher.
Alex
Quoted 7 lines · Frédéric Martinsons
Alright, I will add another patch for that in the coming days.
But I still need some answers to go further:
- Should checksum verification for crate fetcher be mandatory ?
- What about librsvg ? It doesn't include any crate:// but needs to inheritcargo_common, what should I do for this recipe ?
Sorry that was from the top of my head as a rust recipe - it doesn't obviously need changes as it's not a cargo build.
Quoted 7 lines · Alexander Kanavin
Quoted 5 lines
Quoted 1 line · Frédéric Martinsons
Alex, when you talk about updating librsvg and cargo crate updater, do you mind elaborate?
Quoted 8 lines
Quoted 8 lines
classes-recipe/cargo-update-recipe-crates.bbclass should be updated to write out not just the crate list into
SRC_URI, but also their checksums (this is not hard because it works from Cargo.lock, and that already provides the checksums).Then the class should be used to update all recipes (e.g. python3-bcrypt, python3-cryptography) that use the crate:// fetcher.
These ones are the ones which will need work!
Signature · 1 line
Alex Kiernan
Quoted 2 lines · Frédéric Martinsons
But I still need some answers to go further:
- Should checksum verification for crate fetcher be mandatory ?
Yes.
Quoted 1 line
- What about librsvg ? It doesn't include any crate:// but needs to inherit
cargo_common, what should I do for this recipe ?
I think this was mentioned by mistake. You might want to check if meta-oe recipes would need fixing though.
Alex
Ok great, I have everything I need go further on this. Thank you all
Le mer. 15 mars 2023, 19:47, Alexander Kanavin <[email protected]> a écrit :
Quoted 15 lines
Quoted 2 lines · Frédéric Martinsons
But I still need some answers to go further:
- Should checksum verification for crate fetcher be mandatory ?Yes.
Quoted 1 line
- What about librsvg ? It doesn't include any crate:// but needs to
inherit
cargo_common, what should I do for this recipe ?I think this was mentioned by mistake. You might want to check if meta-oe recipes would need fixing though.
Alex
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello Alexander,
I almost finished the patch and I checked in meta-oe for recipes to be updated,
I see two : python3-pyruvate and uutils-coreutils
But those recipes don't inherit cargo-update-crates, python3-pyruvate inheritpython_setuptools3_rust and seems to have been written manually. And uutils-coreutils has been generated by cargo bitbake.
Should I modify them to use the update class or should I put the checksum "by hand"?
Moreover, since this dev will be cross dependent (impact on meta-oe, oe-core and bitbake)
how do we proceed for the different patches to be merged at the same time?
Quoted 32 lines · Frederic Martinsons via lists.openembedded.org
Ok great, I have everything I need go further on this. Thank you all
Le mer. 15 mars 2023, 19:47, Alexander Kanavin <[email protected]> a écrit :
Quoted 7 lines
Quoted 2 lines · Frédéric Martinsons
But I still need some answers to go further:
- Should checksum verification for crate fetcher be mandatory ?Yes.
Quoted 8 lines
Quoted 1 line
- What about librsvg ? It doesn't include any crate:// but needs to
inherit
cargo_common, what should I do for this recipe ?I think this was mentioned by mistake. You might want to check if meta-oe recipes would need fixing though.
Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#14575):
https://lists.openembedded.org/g/bitbake-devel/message/14575
Mute This Topic: https://lists.openembedded.org/mt/97626961/6213388
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 7 lines · Frédéric Martinsons
I almost finished the patch and I checked in meta-oe for recipes to be updated, I see two : python3-pyruvate and uutils-coreutils
But those recipes don't inherit cargo-update-crates, python3-pyruvate inherit
python_setuptools3_rustand seems to have been written manually.
And uutils-coreutils has been generated by cargo bitbake.
Should I modify them to use the update class or should I put the checksum "by hand"?
You should convert them to use the official class. Maintaining long lists of checksums by hand does not scale.
Quoted 2 lines
Moreover, since this dev will be cross dependent (impact on meta-oe, oe-core and bitbake) how do we proceed for the different patches to be merged at the same time?
You should submit all needed patches at the same time to respective mailing lists. Cross-reference them in commit messages (e.g. mention where the other patches are), and integrators will be able to minimize the window of breakage.
Alex
Quoted 4 lines · Alexander Kanavin
Quoted 1 line · Frédéric Martinsons
I almost finished the patch and I checked in meta-oe for recipes to be
updated,
Quoted 3 lines
Quoted 3 lines
I see two : python3-pyruvate and uutils-coreutils
But those recipes don't inherit cargo-update-crates, python3-pyruvate
inherit
Quoted 3 lines
Quoted 3 lines
python_setuptools3_rustand seems to have been written manually. And uutils-coreutils has been generated by cargo bitbake. Should I modify them to use the update class or should I put the
checksum "by hand"?
Quoted 4 lines
You should convert them to use the official class. Maintaining long lists of checksums by hand does not scale.
I managed easily to update uutils-coreutils
<https://github.com/openembedded/meta-openembedded/tree/master/meta-oe/recipes-core/uutils-coreutils>
(I
removed its README.txt by the way) but
I cannot do it for python3-pyruvate
<https://github.com/openembedded/meta-openembedded/blob/master/meta-python/recipes-devtools/python/python3-pyruvate_1.1.2.bb>
because
I cannot find a Cargo.lock file, the git
repository had once though (see the tag under gitlab
<https://gitlab.com/tschorr/pyruvate/-/tree/1.1.2>) so it seems that it is related
to the fetch by pypi which doesn't embed the Cargo.lock (or a bug in the packaging
of the project). I don't know what to do with this one.
Quoted 1 line
Quoted 1 line
Moreover, since this dev will be cross dependent (impact on meta-oe,
oe-core and bitbake)
Quoted 1 line
Quoted 1 line
how do we proceed for the different patches to be merged at the same
time?
Quoted 7 lines
You should submit all needed patches at the same time to respective mailing lists. Cross-reference them in commit messages (e.g. mention where the other patches are), and integrators will be able to minimize the window of breakage.
Alex
Understood
Quoted 5 lines · Frédéric Martinsons
I managed easily to update uutils-coreutils (I removed its README.txt by the way) but I cannot do it for python3-pyruvate because I cannot find a Cargo.lock file, the git repository had once though (see the tag under gitlab) so it seems that it is related to the fetch by pypi which doesn't embed the Cargo.lock (or a bug in the packaging of the project). I don't know what to do with this one.
It does seem like a bug, how can it build without Cargo.lock? You can inject the Cargo.lock from the git repo into the tree, and generate checksums with that.
Alex
A rust/cargo project can perfectly be built without Cargo.lock since cargo will generate
it on the fly.
I'll provide the Cargo.lock from git along with the recipe then.
Quoted 18 lines · Alexander Kanavin
Quoted 1 line · Frédéric Martinsons
I managed easily to update uutils-coreutils (I removed its README.txt by
the way) but
Quoted 1 line
I cannot do it for python3-pyruvate because I cannot find a Cargo.lock
file, the git
Quoted 1 line
repository had once though (see the tag under gitlab) so it seems that
it is related
Quoted 1 line
to the fetch by pypi which doesn't embed the Cargo.lock (or a bug in the
packaging
Quoted 1 line
of the project). I don't know what to do with this one.
It does seem like a bug, how can it build without Cargo.lock? You can inject the Cargo.lock from the git repo into the tree, and generate checksums with that.
Alex
Quoted 4 lines · Frédéric Martinsons
A
rust/cargoproject can perfectly be built without Cargo.lock since cargo will generate it on the fly.
But what you build is undefined as you'll get the latest non-yanked crate that satisfies the dependency solver.
Quoted 19 lines
I'll provide the Cargo.lock from git along with the recipe then.
Quoted 14 lines · Alexander Kanavin
Quoted 5 lines · Frédéric Martinsons
I managed easily to update uutils-coreutils (I removed its README.txt by the way) but I cannot do it for python3-pyruvate because I cannot find a Cargo.lock file, the git repository had once though (see the tag under gitlab) so it seems that it is related to the fetch by pypi which doesn't embed the Cargo.lock (or a bug in the packaging of the project). I don't know what to do with this one.
It does seem like a bug, how can it build without Cargo.lock? You can inject the Cargo.lock from the git repo into the tree, and generate checksums with that.
Alex
Signature · 1 line
Alex Kiernan
True.
Quoted 41 lines · Alex Kiernan
Quoted 2 lines · Frédéric Martinsons
A
rust/cargoproject can perfectly be built without Cargo.lock sincecargo will generate
Quoted 2 lines
it on the fly.
But what you build is undefined as you'll get the latest non-yanked crate that satisfies the dependency solver.
Quoted 5 lines
I'll provide the Cargo.lock from git along with the recipe then.
On Thu, 16 Mar 2023 at 11:42, Alexander Kanavin <[email protected]>
Quoted 4 lines · wrote:
Quoted 4 lines
Quoted 1 line · Frédéric Martinsons
I managed easily to update uutils-coreutils (I removed its README.txt
by the way) but
Quoted 1 line
Quoted 1 line
Quoted 1 line
I cannot do it for python3-pyruvate because I cannot find a
Cargo.lock file, the git
Quoted 1 line
Quoted 1 line
Quoted 1 line
repository had once though (see the tag under gitlab) so it seems
that it is related
Quoted 1 line
Quoted 1 line
Quoted 1 line
to the fetch by pypi which doesn't embed the Cargo.lock (or a bug in
the packaging
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
of the project). I don't know what to do with this one.
It does seem like a bug, how can it build without Cargo.lock? You can inject the Cargo.lock from the git repo into the tree, and generate checksums with that.
Alex
--
Alex Kiernan