From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6717496001358200832 X-Received: by 2002:ab0:49b0:: with SMTP id e45mr19704991uad.120.1564659261090; Thu, 01 Aug 2019 04:34:21 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a67:8782:: with SMTP id j124ls9488998vsd.3.gmail; Thu, 01 Aug 2019 04:34:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzpQjngbK9QHbwfqb/crnE5tz1INpEq/eGxZoDlgz1HPLXasQLOPYMxpYLiUmeK93uYdZKE X-Received: by 2002:a05:6102:10da:: with SMTP id t26mr38787540vsr.101.1564659260718; Thu, 01 Aug 2019 04:34:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564659260; cv=none; d=google.com; s=arc-20160816; b=tj/0BbrN+WAO8/P9YS1jAESYmcDLr9Qxg0MA6P6OyOlX3ldvaJLfaJ/BZaxVNzcQbp XNBEpjC9QD7pSx2qBbOy1TLfzqEVhMNbY2MF5VfoMIGy6mQXmLW/AbdWrtdfNIoWSr5Q RPWH68Xd/2IE+uUD6cueig8y/HlomhGxr6otqsy4/H/Dt38NHVfk1ssiH3Qs1x+a+p35 Bn9b93gj4n+dLmENATQUJPk1mIj7jGB8TH0vFQoF6oDV5+ubmKzmHIXyN0eU944cokd/ icaouHHS9FXTtTXuD9WfDnADZXM7BVLZQh3w7EwrpoN3W0PcIi3OQXNPHxaELyp7KHYt b7bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=BFNJY0GyT5K5CdmC5vbSV/EjzhlsL2c2oLR+NycDfng=; b=ZgwOMCSXEIYVp6rcRP/bJfj+FcxP5HEDAzKR+/exagZLk8HFXJ/7zMv4ECBHVWxgh+ k0oReTFK1UC3846TbA2SB/eBhBDAilIVNHcSadzjt1duw0q1pEONbyh0atUEjPuSrF2v iJaYf7XBBk+WtLbnewstGGr+Tv94lO03Ma03svCuupeIbXZvXto8yRCd0411Gr8n8Ntk pgd5NyZo0u5RIzPP/aGxGYMPZ1OwoHbvgAduBu7PwmPhtnqrEtCbNHIrDpXASoY+p0Fr hWNAMx9GW16ReZaqg2Jc3+vsIC032Ol384RQU8V7pdWigeGUt96VpHWr0GN1LeGv2ZVU feMg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uNEDwmGS; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::844 as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com. [2607:f8b0:4864:20::844]) by gmr-mx.google.com with ESMTPS id s72si3345571vkd.3.2019.08.01.04.34.20 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 01 Aug 2019 04:34:20 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::844 as permitted sender) client-ip=2607:f8b0:4864:20::844; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uNEDwmGS; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::844 as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-qt1-x844.google.com with SMTP id a15so69783637qtn.7 for ; Thu, 01 Aug 2019 04:34:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BFNJY0GyT5K5CdmC5vbSV/EjzhlsL2c2oLR+NycDfng=; b=uNEDwmGSkk8m6cPYG1ZIfSE+wSpgYW1EXwRujmnO4lbI70AO32oLzEHOueEgcB3aYT Uk1AdO0B2ZQywGxatXEeok2uJLmJILLvNQfb95o04zvPgqlcySM1u9GOieAxrlQuPvMa 2Uiypy0EJtfBKr4gQdwbzrUZUSiZAliA7XH52s4m7es7LLNZ81LKCdzS9waVb3pBmJtk yYCmzuvyFVhoiL2KEfzWpF3rgbygS9QqFTT+u+9MSms4oWysgWBCKYFbBOkJQ099L7Wa VLQm5EJj+04hlz7WYbiV/4m0vsxp9lmZbIP+RORFOiGv5s0QVtl9iAhXFP9awbhYl2kD nnvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BFNJY0GyT5K5CdmC5vbSV/EjzhlsL2c2oLR+NycDfng=; b=Qu1ZaPDzHxumFE6ra9nATI1Hwfl/g09HskP0uLDRdPskYaAbSIgPdja4XUZVO5spZc 2MHNL1eg8DrA1vV3JSbtUPVvYhOiQI2dQNwPAwoyA7jm7kFfK6VBsvg+NolaFrjcTt8L MM6G4HLmMU3yCewmu92hAnUu1wkcuPYGMv7axvzISUn4T4LyYpMPQFDYKFVei31+/mn2 1udz3vqQOAk2A8b6SUCzwxGBNXC25cmYQr6LucdZWZBjfwhCG3BMd+vMItyZgY6mD71x 6uOBPo62zjfvJDOVdw6U0XY1dU/rQqQcuSjKRwWoF1iReqaAbEvY3zPtKlVoTAZ+rsSd Z3HQ== X-Gm-Message-State: APjAAAVkfqfn3ucIgYXjJ4tOPZb1dzjrD7pu/2jqv0tc0fHtLUClZDLl iDkum/DXtD44fZCHjZSyQzuCc6SZpEt8as5kwBg= X-Received: by 2002:aed:2b01:: with SMTP id p1mr91281285qtd.33.1564659260306; Thu, 01 Aug 2019 04:34:20 -0700 (PDT) MIME-Version: 1.0 References: <20190725071504.24037-1-Vijaikumar_Kangarajan@mentor.com> <20190801131219.33274775@md1za8fc.ad001.siemens.net> In-Reply-To: From: vijai kumar Date: Thu, 1 Aug 2019 17:04:08 +0530 Message-ID: Subject: Re: [PATCH] export GNUGPHOME for reprepro To: Henning Schild Cc: isar-users , Claudius Heine , jan.kiszka@siemens.com, Vijai Kumar K Content-Type: multipart/alternative; boundary="00000000000067b9eb058f0c9f93" X-TUID: q35x55iwQT5t --00000000000067b9eb058f0c9f93 Content-Type: text/plain; charset="UTF-8" On Thu 1 Aug, 2019, 4:53 PM vijai kumar, wrote: > > > On Thu 1 Aug, 2019, 4:42 PM Henning Schild, > wrote: > >> Am Thu, 25 Jul 2019 12:45:04 +0530 >> schrieb : >> >> > From: Vijai Kumar K >> > >> > reprepro doesnot know about GNUPGHOME. If you trigger package feed >> > creation in a machine that has GNUPGHOME set, reprepro would not >> > know that it should use the new location and might use the keys it >> > find in the default ~/.gnupg directory. >> > >> > Make GNUPGHOME available for reprepro. >> > >> > Signed-off-by: Vijai Kumar K >> > --- >> > meta/classes/base-apt-helper.bbclass | 4 ++++ >> > meta/classes/dpkg-base.bbclass | 3 +++ >> > meta/recipes-devtools/base-apt/base-apt.bb | 3 +++ >> > meta/recipes-devtools/isar-apt/isar-apt.bb | 3 +++ >> > scripts/isar-buildenv-internal | 3 +++ >> > 5 files changed, 16 insertions(+) >> > >> > diff --git a/meta/classes/base-apt-helper.bbclass >> > b/meta/classes/base-apt-helper.bbclass index ba768da..a8f2a41 100644 >> > --- a/meta/classes/base-apt-helper.bbclass >> > +++ b/meta/classes/base-apt-helper.bbclass >> > @@ -30,6 +30,10 @@ populate_base_apt() { >> > compare_pkg_md5sums "$package" "$isar_package" && >> > continue fi >> > >> > + if [ ! -z ${GNUPGHOME} ]; then >> > + export GNUPGHOME=${GNUPGHOME} >> > + fi >> > + >> > Also, This one could be moved of the loop. > # Check if this package is already in base-apt >> > isar_package=$(find ${REPO_BASE_DIR}/${BASE_DISTRO} -name >> > $base_name) if [ -n "$isar_package" ]; then >> > diff --git a/meta/classes/dpkg-base.bbclass >> > b/meta/classes/dpkg-base.bbclass index 3e6ba8c..da13f86 100644 >> > --- a/meta/classes/dpkg-base.bbclass >> > +++ b/meta/classes/dpkg-base.bbclass >> > @@ -120,6 +120,9 @@ repo_clean() { >> > >> > # Install package to Isar-apt >> > do_deploy_deb() { >> > + if [ ! -z ${GNUPGHOME} ]; then >> > + export GNUPGHOME=${GNUPGHOME} >> > + fi >> > repo_clean >> > reprepro -b ${REPO_ISAR_DIR}/${DISTRO} \ >> > --dbdir ${REPO_ISAR_DB_DIR}/${DISTRO} \ >> > diff --git a/meta/recipes-devtools/base-apt/base-apt.bb >> > b/meta/recipes-devtools/base-apt/base-apt.bb index 1c0b4c6..ca40b6c >> > 100644 --- a/meta/recipes-devtools/base-apt/base-apt.bb >> > +++ b/meta/recipes-devtools/base-apt/base-apt.bb >> > @@ -28,6 +28,9 @@ do_cache_config() { >> > path_databases="${REPO_BASE_DB_DIR}/${BASE_DISTRO}" >> > >> > if [ ! -d "${path_databases}" ]; then >> > + if [ ! -z ${GNUPGHOME} ]; then >> > + export GNUPGHOME=${GNUPGHOME} >> > + fi >> > reprepro -b ${path_cache} \ >> > --dbdir ${path_databases} \ >> > export ${BASE_DISTRO_CODENAME} >> > diff --git a/meta/recipes-devtools/isar-apt/isar-apt.bb >> > b/meta/recipes-devtools/isar-apt/isar-apt.bb index a959691..8f517fe >> > 100644 --- a/meta/recipes-devtools/isar-apt/isar-apt.bb >> > +++ b/meta/recipes-devtools/isar-apt/isar-apt.bb >> > @@ -20,6 +20,9 @@ do_cache_config() { >> > path_databases="${REPO_ISAR_DB_DIR}/${DISTRO}" >> > >> > if [ ! -d "${path_databases}" ]; then >> > + if [ ! -z ${GNUPGHOME} ]; then >> > + export GNUPGHOME=${GNUPGHOME} >> > + fi >> > reprepro -b ${path_cache} \ >> > --dbdir ${path_databases} \ >> > export ${DEBDISTRONAME} >> > diff --git a/scripts/isar-buildenv-internal >> > b/scripts/isar-buildenv-internal index 2476d90..7637d41 100755 >> > --- a/scripts/isar-buildenv-internal >> > +++ b/scripts/isar-buildenv-internal >> > @@ -67,4 +67,7 @@ BBPATH="${BUILDDIR}" >> > export BBPATH >> > >> > BB_ENV_EXTRAWHITE="BUILDDIR ISARROOT http_proxy https_proxy >> > ftp_proxy no_proxy" +if [ ! -z ${GNUPGHOME} ]; then >> > + BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE} GNUPGHOME" >> > +fi >> >> Why did you go for conditional append for that one, while the others >> are unconditional? >> >> Henning >> > > GNUPGHOME might not be set in the host and hence went for the condition. > BTW, I don't think having always would cause issues. > > > export BB_ENV_EXTRAWHITE >> >> --00000000000067b9eb058f0c9f93 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu 1 Aug, 2019, 4:53 PM vijai kumar, <vijaikumar.kanagarajan@gmail.c= om> wrote:


On Thu 1 Aug, 2019, 4:42 PM Henning Schild, <henning.schild@= siemens.com> wrote:
Am Thu, = 25 Jul 2019 12:45:04 +0530
schrieb <vijaikumar.kanagarajan@gmail.com&g= t;:

> From: Vijai Kumar K <Vijaikumar_Kanagaraj= an@mentor.com>
>
> reprepro doesnot know about GNUPGHOME. If you trigger package feed
> creation in a machine that has GNUPGHOME set, reprepro would not
> know that it should use the new location and might use the keys it
> find in the default ~/.gnupg directory.
>
> Make GNUPGHOME available for reprepro.
>
> Signed-off-by: Vijai Kumar K <Vijaikumar_= Kanagarajan@mentor.com>
> ---
>=C2=A0 meta/classes/base-apt-helper.bbclass=C2=A0 =C2=A0 =C2=A0 =C2=A0|= 4 ++++
>=C2=A0 meta/classes/dpkg-base.bbclass=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0| 3 +++
>=C2=A0 meta/recipes-devtools/base-apt/base-apt.bb | = 3 +++
>=C2=A0 meta/recipes-devtools/isar-apt/isar-apt.bb | = 3 +++
>=C2=A0 scripts/isar-buildenv-internal=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0| 3 +++
>=C2=A0 5 files changed, 16 insertions(+)
>
> diff --git a/meta/classes/base-apt-helper.bbclass
> b/meta/classes/base-apt-helper.bbclass index ba768da..a8f2a41 100644 > --- a/meta/classes/base-apt-helper.bbclass
> +++ b/meta/classes/base-apt-helper.bbclass
> @@ -30,6 +30,10 @@ populate_base_apt() {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 compare_pkg_md5sums &q= uot;$package" "$isar_package" &&
> continue fi
>=C2=A0
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 if [ ! -z ${GNUPGHOME} ]; then
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 export GNUPGHOME=3D${GNUPGH= OME}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 fi
> +

Also, This one could be moved of the = loop.


>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Check if this package is already i= n base-apt
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 isar_package=3D$(find ${REPO_BASE_DI= R}/${BASE_DISTRO} -name
> $base_name) if [ -n "$isar_package" ]; then
> diff --git a/meta/classes/dpkg-base.bbclass
> b/meta/classes/dpkg-base.bbclass index 3e6ba8c..da13f86 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -120,6 +120,9 @@ repo_clean() {
>=C2=A0
>=C2=A0 # Install package to Isar-apt
>=C2=A0 do_deploy_deb() {
> +=C2=A0 =C2=A0 if [ ! -z ${GNUPGHOME} ]; then
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 export GNUPGHOME=3D${GNUPGHOME}
> +=C2=A0 =C2=A0 fi
>=C2=A0 =C2=A0 =C2=A0 repo_clean
>=C2=A0 =C2=A0 =C2=A0 reprepro -b ${REPO_ISAR_DIR}/${DISTRO} \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--dbdir ${REPO_I= SAR_DB_DIR}/${DISTRO} \
> diff --git a/meta/recipes-devtools/base-apt/base-apt.bb=
> b/meta/recipes-devtools/base-apt/base-apt.bb index = 1c0b4c6..ca40b6c
> 100644 --- a/meta/recipes-devtools/base-apt/base-apt.bb=
> +++ b/meta/recipes-devtools/base-apt/base-apt.bb > @@ -28,6 +28,9 @@ do_cache_config() {
>=C2=A0 =C2=A0 =C2=A0 path_databases=3D"${REPO_BASE_DB_DIR}/${BASE_= DISTRO}"
>=C2=A0
>=C2=A0 =C2=A0 =C2=A0 if [ ! -d "${path_databases}" ]; then > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 if [ ! -z ${GNUPGHOME} ]; then
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 export GNUPGHOME=3D${GNUPGH= OME}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 fi
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 reprepro -b ${path_cache} \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--= dbdir ${path_databases} \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ex= port ${BASE_DISTRO_CODENAME}
> diff --git a/meta/recipes-devtools/isar-apt/isar-apt.bb=
> b/meta/recipes-devtools/isar-apt/isar-apt.bb index = a959691..8f517fe
> 100644 --- a/meta/recipes-devtools/isar-apt/isar-apt.bb=
> +++ b/meta/recipes-devtools/isar-apt/isar-apt.bb > @@ -20,6 +20,9 @@ do_cache_config() {
>=C2=A0 =C2=A0 =C2=A0 path_databases=3D"${REPO_ISAR_DB_DIR}/${DISTR= O}"
>=C2=A0
>=C2=A0 =C2=A0 =C2=A0 if [ ! -d "${path_databases}" ]; then > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 if [ ! -z ${GNUPGHOME} ]; then
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 export GNUPGHOME=3D${GNUPGH= OME}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 fi
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 reprepro -b ${path_cache} \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--= dbdir ${path_databases} \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ex= port ${DEBDISTRONAME}
> diff --git a/scripts/isar-buildenv-internal
> b/scripts/isar-buildenv-internal index 2476d90..7637d41 100755
> --- a/scripts/isar-buildenv-internal
> +++ b/scripts/isar-buildenv-internal
> @@ -67,4 +67,7 @@ BBPATH=3D"${BUILDDIR}"
>=C2=A0 export BBPATH
>=C2=A0
>=C2=A0 BB_ENV_EXTRAWHITE=3D"BUILDDIR ISARROOT http_proxy https_pro= xy
> ftp_proxy no_proxy" +if [ ! -z ${GNUPGHOME} ]; then
> +=C2=A0 =C2=A0 =C2=A0BB_ENV_EXTRAWHITE=3D"${BB_ENV_EXTRAWHITE} GN= UPGHOME"
> +fi

Why did you go for conditional append for that one, while the others
are unconditional?

Henning

GNUPGHOME might not be set in the host and hence went for the condit= ion. BTW, I don't think having always would cause issues.

>=C2=A0 export BB_ENV_EXTRAWHITE

--00000000000067b9eb058f0c9f93--