From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6717496001358200832 X-Received: by 2002:ac8:25c2:: with SMTP id f2mr90603719qtf.164.1564658839601; Thu, 01 Aug 2019 04:27:19 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a37:f511:: with SMTP id l17ls269294qkk.6.gmail; Thu, 01 Aug 2019 04:27:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuar51SsvBlklSz5LiAkeEJmAU9YVP+tFXh2U5u4ClnPwNU/58BNy0g+0dNxtTxRfFUEl7 X-Received: by 2002:a37:464a:: with SMTP id t71mr85557877qka.436.1564658835122; Thu, 01 Aug 2019 04:27:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564658835; cv=none; d=google.com; s=arc-20160816; b=D8wXb1GFTQ1QUSjLM1p9SpItRvWgEf1EangbrqEV2DM4H/9GHI9Zq9I06nI74HUSap s4PAVWtix3GBpr3eQQRW0ha4TMIIaQxEod6J0OQ08Rdho55PKxyztI1GS8yD5+a3VmBD Q3v1yKVBywlXf7Symi34ufBcYvQlS5CG0Q7Z3KeMizzxB5dR5HxDgy/fFTDkljyOI2qO p4mPr7PWY7JpJ9L505YDnn0iG1aO94f3nFT/WacG34sckxG+pk8v7tZg5FCV7O6VSK+Y pHGOEFfFJzFjrCajqhgBoW/Cr5qgRpVmjly0R3yOtLazwaTjKaBQwrH40CoLapnmvnzp hP3A== 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=SHsZJbxgztS4rouXuOUGsvSu9tyIOuOOx8zd9GpPXlE=; b=d9H5YcsQZMK/Vxk2cgZW3G49a9aHgAk/uN0D6bjqbtvo/4p2kUtqJSAktbZKQgVu8v qVj+Cb7XlAuiod7pQRMnLlDpGGocdv5zYHEJjD7N1JlcnS8cEd/MZJus3i5tIw7oeTi0 YlPGwiBtTBnL3Io5v/8AL4JKDZDmTubqdFOTVp9EVbTGnQb3Urh0FgrOG+l3d+G/f8R4 ES5mtPxe0pNiq9Ws+IzMaTEoDNWDxoMcuALQq+r/ZMOlXDjmj8UhDQCPZOczuOcocsW6 14i1PKyp/ORfHRpKIQBxWMso4oGEF7BVz2KSrGGVzbg/C55LGwMOewPjgyrNY+VRQhBS SHKA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CCfVJBXg; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::841 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-x841.google.com (mail-qt1-x841.google.com. [2607:f8b0:4864:20::841]) by gmr-mx.google.com with ESMTPS id v19si1869151qth.1.2019.08.01.04.27.15 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 01 Aug 2019 04:27:15 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::841 as permitted sender) client-ip=2607:f8b0:4864:20::841; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CCfVJBXg; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::841 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-x841.google.com with SMTP id w17so25474214qto.10 for ; Thu, 01 Aug 2019 04:27:15 -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=SHsZJbxgztS4rouXuOUGsvSu9tyIOuOOx8zd9GpPXlE=; b=CCfVJBXgV8B2/jpgmMxbBhkLg3I5tC//FdUB6DhvMMIRUcxu1gtGSh871Vf/l2W5ye GYV29CDtVP8jIm1mS3HZfUq5RAEVuGsJFBzqUjaIUDEQ9puZ0N+Uq8NAO5/0ZMWpK5vT Q3xCmJIdGD7dtJoawe2N/Kc+QfUO3mStKKCkl+crK0eFGPQL5E9iF6qo+b97Jqz01PLJ mEeNNUyTQ4Es3RF1GetFO/VjznUZUWI/MFgcvB19fgkDGAQNJz993ZDHB1NWUWnlrXBN 1Mkmq3JKKy0zjjolOuwarhTzqA2NbNWpS9CYS8vMIZ/UJxF4vspfiaeSi/Ughv6MjBKM Ln7w== 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=SHsZJbxgztS4rouXuOUGsvSu9tyIOuOOx8zd9GpPXlE=; b=oiqMbTFQ88dZs4NjzVmGx1LkC7x8zPTyLuNSCndiFiOgyrTmYGGsgInB0CrrLPssn0 +hGh9ZM+xT8bs1H6Q8/Ah/qAi3xMidHU7x2ESwxBZz8byxUZsZ1HlZJ1wOeQCzJnDztc No8zY9ZqixMGYpAAFlUB6UcuDE8/JKXshOQL3rufFRIkgLGL+Mkqx1kHaz8Gj5eUUE4Q VCFp2XtISn66ILzZSkhQQOAPnrgYIC8knOdJFsJygilDMWmQowiElLKwSc/phHDteuKJ owgiqdk7hfRdMKj7NfqPjYUk6h3wMyAZ95HQfJzrXkZhC9NJeVyyRZw3qhQe7Ccx0aER ORjQ== X-Gm-Message-State: APjAAAUyu7j4lbFp/SOwdypDjpbH1n95s403UDYAP9JCP8/B0gVE7jJu I290f/UvfhHiwRVsINXHv7LBxmV2jxfxgaand28= X-Received: by 2002:a0c:e508:: with SMTP id l8mr94035537qvm.198.1564658834836; Thu, 01 Aug 2019 04:27:14 -0700 (PDT) MIME-Version: 1.0 References: <20190725071504.24037-1-Vijaikumar_Kangarajan@mentor.com> <20190801131219.33274775@md1za8fc.ad001.siemens.net> In-Reply-To: <20190801131219.33274775@md1za8fc.ad001.siemens.net> From: vijai kumar Date: Thu, 1 Aug 2019 16:53:28 +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="0000000000000b91d3058f0c86fb" X-TUID: LASIycNtTyNV --0000000000000b91d3058f0c86fb Content-Type: text/plain; charset="UTF-8" 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 > > + > > # 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 > > --0000000000000b91d3058f0c86fb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


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>:

> From: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.c= om>
>
> 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
> +
>=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..ca= 40b6c
> 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..8f= 517fe
> 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

--0000000000000b91d3058f0c86fb--