From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6717496001358200832 X-Received: by 2002:a50:fd10:: with SMTP id i16mr111656804eds.97.1564659500202; Thu, 01 Aug 2019 04:38:20 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:8efb:: with SMTP id x56ls17407329edx.9.gmail; Thu, 01 Aug 2019 04:38:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzOQWcmT2Kt0b8oMJ+x1KBFl+VYGezHl8EukZMtEBxnksliiitCmilNr61revBUFCnlQ7gB X-Received: by 2002:a50:acc6:: with SMTP id x64mr115462522edc.100.1564659499808; Thu, 01 Aug 2019 04:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564659499; cv=none; d=google.com; s=arc-20160816; b=MW6+6gHimcHRd04ap1MbYtNG87UqKdbbM2g8IFPeooP3lkJsNe3fUOLy45qRyuaRng PzFtI1ZVAyYpvNpC/fIJ6t5UrI+7TTJbjhZ0vBLDRS6qYkSnJjjNhZv3SbkEZ4TTkv/v ji8iYGiUdp3yj2jvEo0RAp0Qm+PZNPF2unnxlHt+bBHCI7EAA+xE1P9vaeRnAD4UIod6 ULAqYJ4sRhhrCBWKeOIgwns1ZAgOt7jbj74Z7cMG9bIcGY46Hiq+8EyRWFGJMHWdCbfK tSbD4mC40dHz5tVMV08c1xrzb8alslOT5BYpzQAtQtmSYnJ5DOslnLjKKh3t4KHs99dd k/Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=E4hwBlVbCY9H1kU5gF7vOUVLHDySqVrykFJsM/9bTw4=; b=Q94hZsJoAFxZ1c9lsT5I7fwdEFiYNjtGbIoNoNd8NQfgt/BV3P7r9Rk/5Jo9MHkcFQ 3zvJboLMpRDOcDFBpYW6/Th0Xc5poNHgFVtD0NEappQ7MqJASh6kcLcyuCR6+HjNRUC7 EWvdokFP+QjcQ5sjybklKkUSm109f3TWb+6IIzqID6cPtw6qU4dM7e1aSsQ9YAQAQHVi pKboon5uFzxgwV4zY4nbOHGe1VgeFqW1Gn9tzJbM3hKdBg73iJ8rkQP56Jhx5//GABSf Nj/oXXswpD6fFQCCqIWNwnaW2tNCuq66163lAeGDWcDoOQL2U4eexm4p3L9P/wGCah83 1Tng== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id jz14si3400549ejb.0.2019.08.01.04.38.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Aug 2019 04:38:19 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id x71BcI2v014856 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Aug 2019 13:38:19 +0200 Received: from md1za8fc.ad001.siemens.net ([139.25.0.71]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x71BcIjg017086; Thu, 1 Aug 2019 13:38:18 +0200 Date: Thu, 1 Aug 2019 13:38:18 +0200 From: Henning Schild To: vijai kumar Cc: isar-users , Claudius Heine , , Vijai Kumar K Subject: Re: [PATCH] export GNUGPHOME for reprepro Message-ID: <20190801133818.3915d525@md1za8fc.ad001.siemens.net> In-Reply-To: References: <20190725071504.24037-1-Vijaikumar_Kangarajan@mentor.com> <20190801131219.33274775@md1za8fc.ad001.siemens.net> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: iFLjcpcw4VBJ Am Thu, 1 Aug 2019 17:04:08 +0530 schrieb vijai kumar : > 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. Ok, please do that for v2. > > # 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. If there is no reason for the condition please drop it. Henning > > > export BB_ENV_EXTRAWHITE > >> > >>