From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B2ADC433F5 for ; Thu, 11 Nov 2021 11:00:29 +0000 (UTC) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by mx.groups.io with SMTP id smtpd.web10.9087.1636628427584891429 for ; Thu, 11 Nov 2021 03:00:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SjAuqQI6; spf=pass (domain: gmail.com, ip: 209.85.167.46, mailfrom: quaresma.jose@gmail.com) Received: by mail-lf1-f46.google.com with SMTP id br15so9472888lfb.9; Thu, 11 Nov 2021 03:00:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ldP9RaTl2VU6lA/B6nNm7zjHyGCs4mAXKhdbs5ko7EY=; b=SjAuqQI6pq1iQm2POYTErpndXp60E0s5bBeySCAg4pnhw47lD5zmiCkn2oYh0+/oKi taqwLh+Rry40PNvOZiPmdX86NK8x9MQRA101HqvfRHg+gJPzAjmi9ySR/rgC8hx7dFOO HI6W/6MgfuGEIZ9a9G553XPPY9nKrqvUkcOA586EJtnzH1OfNpI0p8STZm8LeZEwGbaR +Bqv8jtJtO3CIWm8p1fy+RmghuEDEx+w0sWYdZT0xv1Dkz4TfMV5Jv0mLbxPT22RfpM6 iKw5rXkyDTCWyNFmVKElaDqFwYSKQCG6Kpv0TmixsOHD5jGExeK0YULdDUtrPFghFACr 6Q1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ldP9RaTl2VU6lA/B6nNm7zjHyGCs4mAXKhdbs5ko7EY=; b=DqI2rm8cpUKM/9FMpjXJZSSyZN1loGL19cJRXImlA3wN3b48Oz3QZCHTO745V6RSdO bw9iG4+t2KT0ifyhZHTwKwjzwHu311WXQB/fyU10wdzFoYw4m7P14Jzel7IgGT1vVgSa KDlNc0X6EYorCgzfWS6CR7jYRXYcNPw6TMnnR7jkgZu/ihgYTOOaJD+NQMrUHSUbr/wj ztXUua2oVZQaCyRDscAGkhYIF/7iuRIwkzNT2HZGVUWNE9qhBdD7EvBuRRFn+UD1ecGk VZrnIPZH1tINMud1wuh1S8zACIDQI1bAgbGZdBQE1GsvWaj2ZcE9evs+10e5fsnMP6qo eM5g== X-Gm-Message-State: AOAM531QcUphkYX5QGM5p2efQiAg9TeJfoqTCaYnh3AwqUMYWbc4ZveO GiEdlNac6CNlRuYJrmsBnhO90cTqYYnPpEyw9Cyidyaj28c= X-Google-Smtp-Source: ABdhPJxBo7DR31uUAcxkA6zrT6xI8NzB4CB+IBGcOAuomHJCXbTQ/UWmpXDKqWt019gZS2wUbyorsa9RgdWawujIZuc= X-Received: by 2002:a05:6512:b21:: with SMTP id w33mr5811702lfu.447.1636628425708; Thu, 11 Nov 2021 03:00:25 -0800 (PST) MIME-Version: 1.0 References: <20211111102124.7661-1-jasper@fancydomain.eu> In-Reply-To: <20211111102124.7661-1-jasper@fancydomain.eu> From: Jose Quaresma Date: Thu, 11 Nov 2021 11:00:03 +0000 Message-ID: Subject: Re: [bitbake-devel] [oe-core][PATCH v5 1/2] repo: Add recipe for 2.17.3 To: jasper@fancydomain.eu Cc: OE-core , martin@mko.dev, Daniel.Baumgart@iris-sensing.com, bitbake-devel@lists.openembedded.org, Jasper Orschulko Content-Type: multipart/alternative; boundary="000000000000f1993d05d0813fc4" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 11 Nov 2021 11:00:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/13007 --000000000000f1993d05d0813fc4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Jasper Orschulko via lists.openembedded.org escreveu no dia quinta, 11/11/2021 =C3=A0(s) 10:21: > From: Jasper Orschulko > > Add a recipe for repo 2.17.3, prerequisite for the repo fetcher. > > Signed-off-by: Jasper Orschulko > --- > meta/conf/distro/include/maintainers.inc | 1 + > .../0001-Set-REPO_REV-to-v2.17.3.patch | 35 +++++++++++++++++++ > .../repo/repo/0001-python3-shebang.patch | 26 ++++++++++++++ > meta/recipes-devtools/repo/repo_2.17.3.bb | 28 +++++++++++++++ > 4 files changed, 90 insertions(+) > create mode 100644 > meta/recipes-devtools/repo/repo-2.17.3/0001-Set-REPO_REV-to-v2.17.3.patch > create mode 100644 > meta/recipes-devtools/repo/repo/0001-python3-shebang.patch > create mode 100644 meta/recipes-devtools/repo/repo_2.17.3.bb > > diff --git a/meta/conf/distro/include/maintainers.inc > b/meta/conf/distro/include/maintainers.inc > index f3e0a75d56..58a0a9615f 100644 > --- a/meta/conf/distro/include/maintainers.inc > +++ b/meta/conf/distro/include/maintainers.inc > @@ -652,6 +652,7 @@ RECIPE_MAINTAINER:pn-quilt-native =3D "Robert Yang < > liezhi.yang@windriver.com>" > RECIPE_MAINTAINER:pn-quota =3D "Anuj Mittal " > RECIPE_MAINTAINER:pn-re2c =3D "Khem Raj " > RECIPE_MAINTAINER:pn-readline =3D "Hongxu Jia = " > +RECIPE_MAINTAINER:pn-repo =3D "Jasper Orschulko < > Jasper.Orschulko@iris-sensing.com>" > RECIPE_MAINTAINER:pn-resolvconf =3D "Chen Qi " > RECIPE_MAINTAINER:pn-rgb =3D "Unassigned " > RECIPE_MAINTAINER:pn-rpcbind =3D "Hongxu Jia " > diff --git > a/meta/recipes-devtools/repo/repo-2.17.3/0001-Set-REPO_REV-to-v2.17.3.pat= ch > b/meta/recipes-devtools/repo/repo-2.17.3/0001-Set-REPO_REV-to-v2.17.3.pat= ch > new file mode 100644 > index 0000000000..285b1d3129 > --- /dev/null > +++ > b/meta/recipes-devtools/repo/repo-2.17.3/0001-Set-REPO_REV-to-v2.17.3.pat= ch > @@ -0,0 +1,35 @@ > +From bdd2a528da59c28db8ae2986834926de7cebf3ab Mon Sep 17 00:00:00 2001 > +From: Jasper Orschulko > +Date: Thu, 4 Nov 2021 16:55:12 +0100 > +Subject: [PATCH] Set REPO_REV to v2.17.3 > + > +repo is an unusual tool because it downloads all of its own Python modul= es > +using GPG-signed git tags, and stores those files as part of the project > +that it is working with. > + > +So in order to have a reproducible repo installation within the project > +folders, we hardcode the default REPO_REV to a SHA1 that corresponds to > +the version of the recipe. REPO_REV can still be overwriten by the user, > +by specifying the REPO_REV environment variable. > + > +Upstream-Status: Inappropriate [configuration] > +Signed-off-by: Jasper Orschulko > +--- > + repo | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/repo b/repo > +index b13e34c..31130e9 100755 > +--- a/repo > ++++ b/repo > +@@ -130,7 +130,7 @@ if not REPO_URL: > + REPO_URL =3D 'https://gerrit.googlesource.com/git-repo' > + REPO_REV =3D os.environ.get('REPO_REV') > + if not REPO_REV: > +- REPO_REV =3D 'stable' > ++ REPO_REV =3D '11b30b91df1f0e03b53da970ec2588e85817bacc' > + > + # increment this whenever we make important changes to this script > + VERSION =3D (2, 8) > +-- > +2.33.1 > diff --git a/meta/recipes-devtools/repo/repo/0001-python3-shebang.patch > b/meta/recipes-devtools/repo/repo/0001-python3-shebang.patch > new file mode 100644 > index 0000000000..d3888c8bb2 > --- /dev/null > +++ b/meta/recipes-devtools/repo/repo/0001-python3-shebang.patch > @@ -0,0 +1,26 @@ > +From b8e84b202cd302a7c99288d3835dc9c63071f8f2 Mon Sep 17 00:00:00 2001 > +From: Jasper Orschulko > +Date: Tue, 14 Sep 2021 16:46:51 +0200 > +Subject: [PATCH] python3 shebang > + > +Yocto does not symlink from python to python3, thus change the shebang > from > +python to python3. > + > +Upstream-Status: Inappropriate [configuration] > +Signed-off-by: Jasper Orschulko > +--- > + repo | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/repo b/repo > +index b13e34c..205e0e5 100755 > +--- a/repo > ++++ b/repo > +@@ -1,4 +1,4 @@ > +-#!/usr/bin/env python > ++#!/usr/bin/env python3 > + # -*- coding:utf-8 -*- > + # > + # Copyright (C) 2008 The Android Open Source Project > +-- > +2.33.0 > diff --git a/meta/recipes-devtools/repo/repo_2.17.3.bb > b/meta/recipes-devtools/repo/repo_2.17.3.bb > new file mode 100644 > index 0000000000..cb0af89c09 > --- /dev/null > +++ b/meta/recipes-devtools/repo/repo_2.17.3.bb > @@ -0,0 +1,28 @@ > +# SPDX-License-Identifier: MIT > +# Copyright (C) 2021 iris-GmbH infrared & intelligent sensors > + > +SUMMARY =3D "Tool for managing many Git repositories" > +DESCRIPTION =3D "Repo is a tool built on top of Git. Repo helps manage m= any > Git repositories, does the uploads to revision control systems, and > automates parts of the development workflow." > +HOMEPAGE =3D "https://android.googlesource.com/tools/repo" > +SECTION =3D "console/utils" > + > +LICENSE =3D "Apache-2.0" > +LIC_FILES_CHKSUM =3D "file://LICENSE;md5=3D3b83ef96387f14655fc854ddc3c6b= d57" > + > +SRC_URI =3D "git:// > gerrit.googlesource.com/git-repo.git;protocol=3Dhttps;branch=3Dmain" > +SRCREV =3D "11b30b91df1f0e03b53da970ec2588e85817bacc" > + > +SRC_URI +=3D "file://0001-python3-shebang.patch \ > + file://0001-Set-REPO_REV-to-v2.17.3.patch" > I think we can replace the patch 0001-Set-REPO_REV-to-v2.17.3.patch with a post function and with it we can reuse the SRCREV of the recipe. Something like: do_fix_rev(){ sed -i "s/REPO_REV =3D 'stable'/REPO_REV =3D '${SRCREV}'" ${S}/repo } do_patch[postfuncs] +=3D "do_fix_rev" > + > +MIRRORS +=3D "git://gerrit.googlesource.com/git-repo.git git:// > github.com/GerritCodeReview/git-repo.git \n" > + > +S =3D "${WORKDIR}/git" > + > +do_install() { > + install -Dm 0755 ${WORKDIR}/git/repo ${D}${bindir}/repo > +} > + > +RDEPENDS:${PN} =3D "python3" > repo uses git internally, so add it RDEPENDS:${PN} =3D "python3 git" > + > +BBCLASSEXTEND =3D "native nativesdk" > -- > 2.33.1 > > > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- > Links: You receive all messages sent to this group. > View/Reply Online (#13003): > https://lists.openembedded.org/g/bitbake-devel/message/13003 > Mute This Topic: https://lists.openembedded.org/mt/86978419/5052612 > Group Owner: bitbake-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [ > quaresma.jose@gmail.com] > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- > > --=20 Best regards, Jos=C3=A9 Quaresma --000000000000f1993d05d0813fc4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Jasper Orschulko via lists.openembedded.org <= ;jasper=3Dfancydomain.eu@lists.openembedded.org> escreveu no dia q= uinta, 11/11/2021 =C3=A0(s) 10:21:
From: Jasper Orschulko <Jasper.Orschulko@iris-sensing.com= >

Add a recipe for repo 2.17.3, prerequisite for the repo fetcher.

Signed-off-by: Jasper Orschulko <Jasper.Orschulko@iris-sensing.com> ---
=C2=A0meta/conf/distro/include/maintainers.inc=C2=A0 =C2=A0 =C2=A0 |=C2=A0 = 1 +
=C2=A0.../0001-Set-REPO_REV-to-v2.17.3.patch=C2=A0 =C2=A0 =C2=A0 =C2=A0 | 3= 5 +++++++++++++++++++
=C2=A0.../repo/repo/0001-python3-shebang.patch=C2=A0 =C2=A0 =C2=A0 | 26 +++= +++++++++++
=C2=A0meta/recipes-devtools/repo/repo_2.17.3.bb=C2=A0 =C2=A0 =C2=A0| 28 +++= ++++++++++++
=C2=A04 files changed, 90 insertions(+)
=C2=A0create mode 100644 meta/recipes-devtools/repo/repo-2.17.3/0001-Set-RE= PO_REV-to-v2.17.3.patch
=C2=A0create mode 100644 meta/recipes-devtools/repo/repo/0001-python3-sheba= ng.patch
=C2=A0create mode 100644 meta/recipes-devtools/repo/repo_2.17.3.bb

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/in= clude/maintainers.inc
index f3e0a75d56..58a0a9615f 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -652,6 +652,7 @@ RECIPE_MAINTAINER:pn-quilt-native =3D "Robert Yang= <liezhi.= yang@windriver.com>"
=C2=A0RECIPE_MAINTAINER:pn-quota =3D "Anuj Mittal <anuj.mittal@intel.com>&qu= ot;
=C2=A0RECIPE_MAINTAINER:pn-re2c =3D "Khem Raj <raj.khem@gmail.com>"
=C2=A0RECIPE_MAINTAINER:pn-readline =3D "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER:pn-repo =3D "Jasper Orschulko <
Jasper.Orschulko@iris= -sensing.com>"
=C2=A0RECIPE_MAINTAINER:pn-resolvconf =3D "Chen Qi <Qi.Chen@windriver.com>&q= uot;
=C2=A0RECIPE_MAINTAINER:pn-rgb =3D "Unassigned <unassigned@yoctoproject.org>"
=C2=A0RECIPE_MAINTAINER:pn-rpcbind =3D "Hongxu Jia <
hongxu.jia@windriver.com= >"
diff --git a/meta/recipes-devtools/repo/repo-2.17.3/0001-Set-REPO_REV-to-v2= .17.3.patch b/meta/recipes-devtools/repo/repo-2.17.3/0001-Set-REPO_REV-to-v= 2.17.3.patch
new file mode 100644
index 0000000000..285b1d3129
--- /dev/null
+++ b/meta/recipes-devtools/repo/repo-2.17.3/0001-Set-REPO_REV-to-v2.17.3.p= atch
@@ -0,0 +1,35 @@
+From bdd2a528da59c28db8ae2986834926de7cebf3ab Mon Sep 17 00:00:00 2001
+From: Jasper Orschulko <Jasper.Orschulko@iris-sensing.com>
+Date: Thu, 4 Nov 2021 16:55:12 +0100
+Subject: [PATCH] Set REPO_REV to v2.17.3
+
+repo is an unusual tool because it downloads all of its own Python modules=
+using GPG-signed git tags, and stores those files as part of the project +that it is working with.
+
+So in order to have a reproducible repo installation within the project +folders, we hardcode the default REPO_REV to a SHA1 that corresponds to +the version of the recipe. REPO_REV can still be overwriten by the user, +by specifying the REPO_REV environment variable.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Jasper Orschulko <Jasper.Orschulko@iris-sensing.com><= br> +---
+ repo | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/repo b/repo
+index b13e34c..31130e9 100755
+--- a/repo
++++ b/repo
+@@ -130,7 +130,7 @@ if not REPO_URL:
+=C2=A0 =C2=A0REPO_URL =3D 'https://gerrit.googlesource.= com/git-repo'
+ REPO_REV =3D os.environ.get('REPO_REV')
+ if not REPO_REV:
+-=C2=A0 REPO_REV =3D 'stable'
++=C2=A0 REPO_REV =3D '11b30b91df1f0e03b53da970ec2588e85817bacc' +
+ # increment this whenever we make important changes to this script
+ VERSION =3D (2, 8)
+--
+2.33.1
diff --git a/meta/recipes-devtools/repo/repo/0001-python3-shebang.patch b/m= eta/recipes-devtools/repo/repo/0001-python3-shebang.patch
new file mode 100644
index 0000000000..d3888c8bb2
--- /dev/null
+++ b/meta/recipes-devtools/repo/repo/0001-python3-shebang.patch
@@ -0,0 +1,26 @@
+From b8e84b202cd302a7c99288d3835dc9c63071f8f2 Mon Sep 17 00:00:00 2001
+From: Jasper Orschulko <Jasper.Orschulko@iris-sensing.com>
+Date: Tue, 14 Sep 2021 16:46:51 +0200
+Subject: [PATCH] python3 shebang
+
+Yocto does not symlink from python to python3, thus change the shebang fro= m
+python to python3.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Jasper Orschulko <Jasper.Orschulko@iris-sensing.com><= br> +---
+ repo | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/repo b/repo
+index b13e34c..205e0e5 100755
+--- a/repo
++++ b/repo
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding:utf-8 -*-
+ #
+ # Copyright (C) 2008 The Android Open Source Project
+--
+2.33.0
diff --git a/meta/recipes-devtools/repo/repo_2.17.3.bb b/meta/recipes-devto= ols/repo/repo_2.17.3.bb
new file mode 100644
index 0000000000..cb0af89c09
--- /dev/null
+++ b/meta/recipes-devtools/repo/repo_2.17.3.bb
@@ -0,0 +1,28 @@
+# SPDX-License-Identifier: MIT
+# Copyright (C) 2021 iris-GmbH infrared & intelligent sensors
+
+SUMMARY =3D "Tool for managing many Git repositories"
+DESCRIPTION =3D "Repo is a tool built on top of Git. Repo helps manag= e many Git repositories, does the uploads to revision control systems, and = automates parts of the development workflow."
+HOMEPAGE =3D "https://android.googlesource.com/tool= s/repo"
+SECTION =3D "console/utils"
+
+LICENSE =3D "Apache-2.0"
+LIC_FILES_CHKSUM =3D "file://LICENSE;md5=3D3b83ef96387f14655fc854ddc3= c6bd57"
+
+SRC_URI =3D "git://g= errit.googlesource.com/git-repo.git;protocol=3Dhttps;branch=3Dmain"= ;
+SRCREV =3D "11b30b91df1f0e03b53da970ec2588e85817bacc"
+
+SRC_URI +=3D "file://0001-python3-shebang.patch \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 file://0001-Set-REPO_REV-to-v2.1= 7.3.patch"

I think we can replace = the patch 0001-Set-REPO_REV-to-v2.17.3.patch with a post function
and with it we can reuse the SRCREV of the recipe. Something like:

do_fix_rev(){
=C2=A0 =C2=A0 se= d -i "s/REPO_REV =3D 'stable'/REPO_REV =3D '${SRCREV}'= " ${S}/repo
}

do_patch[postfuncs] +=3D "do_fix_rev"= ;
=C2=A0
+
+MIRRORS +=3D "git://gerrit.googlesource.com/git-rep= o.git git://github.com/GerritCodeReview/git-repo.= git \n"
+
+S =3D "${WORKDIR}/git"
+
+do_install() {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0install -Dm 0755 ${WORKDIR}/git/repo ${D}${bind= ir}/repo
+}
+
+RDEPENDS:${PN} =3D "python3"

repo uses git internally, so add it

RDEPENDS:${PN= } =3D "python3 git"
=C2=A0
+
+BBCLASSEXTEND =3D "native nativesdk"
--
2.33.1


-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
Links: You receive all messages sent to this group.
View/Reply Online (#13003): https://list= s.openembedded.org/g/bitbake-devel/message/13003
Mute This Topic: https://lists.openembedded.org/mt= /86978419/5052612
Group Owner: bitbake-devel+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/bi= tbake-devel/unsub [quaresma.jose@gmail.com]
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-



--
Best regards,

Jos=C3=A9 Quaresma
--000000000000f1993d05d0813fc4--