diff mbox series

cargo-c: add UPSTREAM_CHECK

Message ID 20240418155558.3399658-1-jdmason@kudzu.us
State New
Headers show
Series cargo-c: add UPSTREAM_CHECK | expand

Commit Message

Jon Mason April 18, 2024, 3:55 p.m. UTC
Add logic to check the upstream version of cargo-c from the github
account the crate is based on.  Unfortunately, this is an inexact match
of the versioning, as the crate expects the cargo version as part of the
version.  For example, the current version is "0.9.30+cargo-0.77.0",
whereas the latest tagged version is "0.9.31".  So, even if the versions
matched exactly, the `devtool check-upgrade-status cargo-c-native` will
show a mismatch.  I think this is better than disabling the check or
having devtool return broken.  So, leaving this idiosyncrasy as-is.

NOTE: https://crates.io/crates/cargo-c/versions would be a better place
to get the latest version (and would match the expected cargo
versioning), but creates.io seems to require javascript and any attempt
to wget that webpage returns 404.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
---
 .../rust/cargo-c-native_0.9.30+cargo-0.77.0.bb                 | 3 +++
 1 file changed, 3 insertions(+)

Comments

Alexander Kanavin April 18, 2024, 5:17 p.m. UTC | #1
I have a patch for bitbake that solves the general problem of checking
latest crate versions from crate:// URIs (and fixes cargo-c check as a
result):

https://git.yoctoproject.org/poky-contrib/commit/?h=akanavin/package-version-updates&id=6afcb9100b8d99fabcad70afb4f37628a2f62cc6

So this patch is unneeded.

Alex


On Thu, 18 Apr 2024 at 17:56, Jon Mason via lists.openembedded.org
<jdmason=kudzu.us@lists.openembedded.org> wrote:
>
> Add logic to check the upstream version of cargo-c from the github
> account the crate is based on.  Unfortunately, this is an inexact match
> of the versioning, as the crate expects the cargo version as part of the
> version.  For example, the current version is "0.9.30+cargo-0.77.0",
> whereas the latest tagged version is "0.9.31".  So, even if the versions
> matched exactly, the `devtool check-upgrade-status cargo-c-native` will
> show a mismatch.  I think this is better than disabling the check or
> having devtool return broken.  So, leaving this idiosyncrasy as-is.
>
> NOTE: https://crates.io/crates/cargo-c/versions would be a better place
> to get the latest version (and would match the expected cargo
> versioning), but creates.io seems to require javascript and any attempt
> to wget that webpage returns 404.
>
> Signed-off-by: Jon Mason <jdmason@kudzu.us>
> ---
>  .../rust/cargo-c-native_0.9.30+cargo-0.77.0.bb                 | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/meta/recipes-devtools/rust/cargo-c-native_0.9.30+cargo-0.77.0.bb b/meta/recipes-devtools/rust/cargo-c-native_0.9.30+cargo-0.77.0.bb
> index 8e17606b73dd..eaa51a8d2565 100644
> --- a/meta/recipes-devtools/rust/cargo-c-native_0.9.30+cargo-0.77.0.bb
> +++ b/meta/recipes-devtools/rust/cargo-c-native_0.9.30+cargo-0.77.0.bb
> @@ -9,6 +9,9 @@ SRC_URI = "crate://crates.io/cargo-c/${PV};name=cargo-c"
>  SRC_URI[cargo-c.sha256sum] = "ec77e3635cdb0d211f88f22d0460eef0ba031eb616ded57f2ffb98a90365c445"
>  S = "${CARGO_VENDORING_DIRECTORY}/cargo-c-${PV}"
>
> +UPSTREAM_CHECK_URI = "https://github.com/lu-zero/cargo-c/releases/"
> +UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)"
> +
>  inherit cargo cargo-update-recipe-crates pkgconfig native
>
>  DEPENDS = "openssl curl"
> --
> 2.30.2
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#198520): https://lists.openembedded.org/g/openembedded-core/message/198520
> Mute This Topic: https://lists.openembedded.org/mt/105600795/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Jon Mason April 18, 2024, 6:48 p.m. UTC | #2
On Thu, Apr 18, 2024 at 1:17 PM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> I have a patch for bitbake that solves the general problem of checking
> latest crate versions from crate:// URIs (and fixes cargo-c check as a
> result):
>
> https://git.yoctoproject.org/poky-contrib/commit/?h=akanavin/package-version-updates&id=6afcb9100b8d99fabcad70afb4f37628a2f62cc6
>
> So this patch is unneeded.
>
> Alex

Push it already :)

With those changes, I think all of the UNKOWN_BROKEN stuff is out of OE Core.

Thanks,
Jon

> On Thu, 18 Apr 2024 at 17:56, Jon Mason via lists.openembedded.org
> <jdmason=kudzu.us@lists.openembedded.org> wrote:
> >
> > Add logic to check the upstream version of cargo-c from the github
> > account the crate is based on.  Unfortunately, this is an inexact match
> > of the versioning, as the crate expects the cargo version as part of the
> > version.  For example, the current version is "0.9.30+cargo-0.77.0",
> > whereas the latest tagged version is "0.9.31".  So, even if the versions
> > matched exactly, the `devtool check-upgrade-status cargo-c-native` will
> > show a mismatch.  I think this is better than disabling the check or
> > having devtool return broken.  So, leaving this idiosyncrasy as-is.
> >
> > NOTE: https://crates.io/crates/cargo-c/versions would be a better place
> > to get the latest version (and would match the expected cargo
> > versioning), but creates.io seems to require javascript and any attempt
> > to wget that webpage returns 404.
> >
> > Signed-off-by: Jon Mason <jdmason@kudzu.us>
> > ---
> >  .../rust/cargo-c-native_0.9.30+cargo-0.77.0.bb                 | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/meta/recipes-devtools/rust/cargo-c-native_0.9.30+cargo-0.77.0.bb b/meta/recipes-devtools/rust/cargo-c-native_0.9.30+cargo-0.77.0.bb
> > index 8e17606b73dd..eaa51a8d2565 100644
> > --- a/meta/recipes-devtools/rust/cargo-c-native_0.9.30+cargo-0.77.0.bb
> > +++ b/meta/recipes-devtools/rust/cargo-c-native_0.9.30+cargo-0.77.0.bb
> > @@ -9,6 +9,9 @@ SRC_URI = "crate://crates.io/cargo-c/${PV};name=cargo-c"
> >  SRC_URI[cargo-c.sha256sum] = "ec77e3635cdb0d211f88f22d0460eef0ba031eb616ded57f2ffb98a90365c445"
> >  S = "${CARGO_VENDORING_DIRECTORY}/cargo-c-${PV}"
> >
> > +UPSTREAM_CHECK_URI = "https://github.com/lu-zero/cargo-c/releases/"
> > +UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)"
> > +
> >  inherit cargo cargo-update-recipe-crates pkgconfig native
> >
> >  DEPENDS = "openssl curl"
> > --
> > 2.30.2
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#198520): https://lists.openembedded.org/g/openembedded-core/message/198520
> > Mute This Topic: https://lists.openembedded.org/mt/105600795/1686489
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
Alexander Kanavin April 18, 2024, 7:10 p.m. UTC | #3
On Thu, 18 Apr 2024 at 20:48, Jon Mason <jdmason@kudzu.us> wrote:
>
> On Thu, Apr 18, 2024 at 1:17 PM Alexander Kanavin
> <alex.kanavin@gmail.com> wrote:
> >
> > I have a patch for bitbake that solves the general problem of checking
> > latest crate versions from crate:// URIs (and fixes cargo-c check as a
> > result):
> >
> > https://git.yoctoproject.org/poky-contrib/commit/?h=akanavin/package-version-updates&id=6afcb9100b8d99fabcad70afb4f37628a2f62cc6
> >
> > So this patch is unneeded.
> >
> > Alex
>
> Push it already :)
>
> With those changes, I think all of the UNKOWN_BROKEN stuff is out of OE Core.

Of course. I have a whole bunch of things that piled up while
scarthgap was being prepared. I'll rebase and send those tomorrow.

There's also the bitbake-setup prototype which is basically ready, but
needs a patch in oe-core master-next ("scripts/oe-setup-build: write a
build environment initialization one-liner into the build directory").

Alex
diff mbox series

Patch

diff --git a/meta/recipes-devtools/rust/cargo-c-native_0.9.30+cargo-0.77.0.bb b/meta/recipes-devtools/rust/cargo-c-native_0.9.30+cargo-0.77.0.bb
index 8e17606b73dd..eaa51a8d2565 100644
--- a/meta/recipes-devtools/rust/cargo-c-native_0.9.30+cargo-0.77.0.bb
+++ b/meta/recipes-devtools/rust/cargo-c-native_0.9.30+cargo-0.77.0.bb
@@ -9,6 +9,9 @@  SRC_URI = "crate://crates.io/cargo-c/${PV};name=cargo-c"
 SRC_URI[cargo-c.sha256sum] = "ec77e3635cdb0d211f88f22d0460eef0ba031eb616ded57f2ffb98a90365c445"
 S = "${CARGO_VENDORING_DIRECTORY}/cargo-c-${PV}"
 
+UPSTREAM_CHECK_URI = "https://github.com/lu-zero/cargo-c/releases/"
+UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)"
+
 inherit cargo cargo-update-recipe-crates pkgconfig native
 
 DEPENDS = "openssl curl"