From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6717496001358200832 X-Received: by 2002:a67:8081:: with SMTP id b123mr5620153vsd.117.1564659784034; Thu, 01 Aug 2019 04:43:04 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a67:8782:: with SMTP id j124ls9491237vsd.3.gmail; Thu, 01 Aug 2019 04:43:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyj43q/3HlJP58dXmljWkL7Rg2BADdEaLzX6DWhvo0fm6L0M6vegxQ0GrPuvWkk1qi43pvS X-Received: by 2002:a67:ab0d:: with SMTP id u13mr84447827vse.145.1564659783767; Thu, 01 Aug 2019 04:43:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564659783; cv=none; d=google.com; s=arc-20160816; b=EKSuwR6UPDOnohqiTSkKhpCCGsIIV5sIL2VVGYyV1QQtrmCrQCkJZwY1t9+VL5mF7j ZSojXyqDi6dBiSyZdZmZ4Hyi9j2GAYBGIpwaz3br2mlG4aaEweu+nqQS4Jeh5J8/78G9 ngAlEtNEqwQLptejVesNIjhpJPuHH3Sh6QgtzmLz+hQT4ApbGkWSQdx06ZVENEP97eDu gIydlPVr/wQ2G9y36fpdIF4K1vbukegjrsG8HMJ2b04GxB67GEoE+O6c5uSI6KpmmwnQ zv1u0i3fGBVurKjkeeoL8frRwgY1LP7KJaLSu60m1Ju+F9c5TaxX1SZs5+13JCv7cIFB C6VA== 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=cx57w8Eq2Wzp8KEG5MJ6uJ5pEzzOe6K6OfO3E1qupEQ=; b=cUiefkm9dxjyWJU7JzWiy90Uln2JBrXjR28+BssIXBninMaE/j9MxmEypB/Uhk3+tT H8gU/dLyROhqkfGPVmE/3g7nZ8KLUQnFk6K39X9Rpj+SG4rP/yB19Hn6ba9ZZemBOa6b 0sgXpC38XEeab5KjenX7V5YTeAf+iYMmkVF1knTzztORUWvZ24SqWv2hkXaEpeipMdu7 TuXaIxS1Vs9RMPYeWnU2alodsqm6kKM+SAyQCqLBeHICkem3564OF/DjhB5da52i1G8v 8LKl+e/KhFRhxEnRcznTTKXx9QXhSrN6FeqxrzwaBREAGEq0sgVwIJhyBfa4FV0QFjqj j6cw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o6MTcxjm; 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 e126si3850096vkg.5.2019.08.01.04.43.03 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 01 Aug 2019 04:43:03 -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=o6MTcxjm; 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 d17so69718919qtj.8 for ; Thu, 01 Aug 2019 04:43:03 -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=cx57w8Eq2Wzp8KEG5MJ6uJ5pEzzOe6K6OfO3E1qupEQ=; b=o6MTcxjmk2b2s10PmKjHsvtahTaAdW6kekpN/vbwnwqClqnlz9I2be5GjXk8k7jvKF J2XYkC5uu/vCzkU/6NSeRht09EUAmtLHdIRHbphJ2lqWMGJoY0m7nLM5HK7sX6lyiCUc /PApt+bHLFiJHeQVw7xDde1xtjN67z/K91v91Jr+EHxfFZayQ6MWwAv9tVYNaKNDtFRl LkEKtbAIRLWCi+0Trn9KYXjJzbcqIAm/QI6wmN9hn2xyPkHKYswWacma308F1b7GuZag ASgds7BM4HEKgqj+KS82p5K4OUi71NWIBXtmu6TnIFq5og6fPZo5TLXienUWJZ9vmJGZ ESYQ== 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=cx57w8Eq2Wzp8KEG5MJ6uJ5pEzzOe6K6OfO3E1qupEQ=; b=pYM/yuU9jEnECZIDpUp95h1rarQ+WCumEkdLHVPdoNPcrrl2fi+UxQl8kaempUIiH7 MD7AQGyKPZ4tx6zZcWFBwEbLShA5GUdymKTTPp3vEaHBdoCaEjlJhcuCOAVBotF0KVVc bsGdMWwthERspeE85rKR6ANxYhXPfaJ25tCFhaayDJnhz2nx86cTqKkuG4QGB7dF/Q90 9+5yc3bCcQcuhbAWUsAcFy5PfdyByJjDwXcceBW5Pq0foIzbhNOqguWlidk4pgyKnwP4 8F52Vk6OP8MqvN4j7/0OQzYIEhmAAitrpJ9QRBlo6e1mrTsDyCOUCAVw8tuvksFKGhvp wwng== X-Gm-Message-State: APjAAAUfVM/mhifQIRB7+8cYp/0g3uXHavWIJIHksRPjIrXdi7weQbQW 8Ns2RE9bzMcrgWCx+VJFUa1OsMCYGljOPY2HJRs= X-Received: by 2002:aed:3b9c:: with SMTP id r28mr87323482qte.74.1564659783383; Thu, 01 Aug 2019 04:43:03 -0700 (PDT) MIME-Version: 1.0 References: <20190725071504.24037-1-Vijaikumar_Kangarajan@mentor.com> <20190801131219.33274775@md1za8fc.ad001.siemens.net> <20190801133818.3915d525@md1za8fc.ad001.siemens.net> In-Reply-To: <20190801133818.3915d525@md1za8fc.ad001.siemens.net> From: vijai kumar Date: Thu, 1 Aug 2019 17:12:50 +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="000000000000953f33058f0cbe95" X-TUID: hBxI0RNb4dz0 --000000000000953f33058f0cbe95 Content-Type: text/plain; charset="UTF-8" On Thu 1 Aug, 2019, 5:08 PM Henning Schild, wrote: > 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. > Sure. > > > # 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 > Ok. > > > > export BB_ENV_EXTRAWHITE > > >> > > >> > > --000000000000953f33058f0cbe95 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu 1 Aug, 2019, 5:08 PM Henning Schild, <henning.schild@siemens.com> = wrote:
Am Thu, 1 Aug 2019 17:04:08 = +0530
schrieb vijai kumar <vijaikumar.kanagarajan@gmail.com&= gt;:

> On Thu 1 Aug, 2019, 4:53 PM vijai kumar,
> <vijaikumar.kanagarajan@gmail.com> wrote:
>
> >
> >
> > On Thu 1 Aug, 2019, 4:42 PM Henning Schild,
> > <henning.schild@siemens.com> wrote:
> >=C2=A0
> >> Am Thu, 25 Jul 2019 12:45:04 +0530
> >> schrieb <vijaikumar.kanagarajan@gmail.com>:
> >>=C2=A0
> >> > From: Vijai Kumar K <
Vijaikumar_Kanaga= rajan@mentor.com>
> >> >
> >> > reprepro doesnot know about GNUPGHOME. If you trigger pa= ckage
> >> > feed creation in a machine that has GNUPGHOME set, repre= pro
> >> > would not know that it should use the new location and m= ight use
> >> > the keys it find in the default ~/.gnupg directory.
> >> >
> >> > Make GNUPGHOME available for reprepro.
> >> >
> >> > Signed-off-by: Vijai Kumar K <Vijaikum= ar_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..a8= f2a41
> >> > 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 "$package" "$isar_package" &&
> >> > continue fi
> >> >
> >> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 if [ ! -z ${GNUPGHOME} ]; t= hen
> >> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 export GNUPGH= OME=3D${GNUPGHOME}
> >> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 fi
> >> > +=C2=A0
> >>=C2=A0
> >=C2=A0
> Also, This one could be moved of the loop.

Ok, please do that for v2.

Sure.



> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Check if this package is alre= ady in base-apt=C2=A0
> >> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 isar_package=3D$(find = ${REPO_BASE_DIR}/${BASE_DISTRO}
> >> > -name $base_name) if [ -n "$isar_package" ]; t= hen
> >> > 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 # 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${GNUPGH= OME}
> >> > +=C2=A0 =C2=A0 fi
> >> >=C2=A0 =C2=A0 =C2=A0 repo_clean
> >> >=C2=A0 =C2=A0 =C2=A0 reprepro -b ${REPO_ISAR_DIR}/${DISTR= O} \
> >> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--= 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 ind= ex
> >> > 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=3D"${REPO_BASE_DB_DIR}/${BASE_DIST= RO}"
> >> >
> >> >=C2=A0 =C2=A0 =C2=A0 if [ ! -d "${path_databases}&qu= ot; ]; then
> >> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 if [ ! -z ${GNUPGHOME} ]; t= hen
> >> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 export GNUPGH= OME=3D${GNUPGHOME}
> >> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 fi
> >> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 reprepro -b ${path_cac= he} \
> >> >=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=A0export ${BASE_DISTRO_CODENAME}
> >> > diff --git a/meta/recipes-devtools/isar-apt/isar-apt= .bb
> >> > b/meta/recipes-devtools/isar-apt/isar-apt.bb ind= ex
> >> > 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=3D"${REPO_ISAR_DB_DIR}/${DISTRO}&q= uot;
> >> >
> >> >=C2=A0 =C2=A0 =C2=A0 if [ ! -d "${path_databases}&qu= ot; ]; then
> >> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 if [ ! -z ${GNUPGHOME} ]; t= hen
> >> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 export GNUPGH= OME=3D${GNUPGHOME}
> >> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 fi
> >> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 reprepro -b ${path_cac= he} \
> >> >=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=A0export ${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 BB_ENV_EXTRAWHITE=3D"BUILDDIR ISARROOT http_p= roxy https_proxy
> >> > ftp_proxy no_proxy" +if [ ! -z ${GNUPGHOME} ]; then=
> >> > +=C2=A0 =C2=A0 =C2=A0BB_ENV_EXTRAWHITE=3D"${BB_ENV_= EXTRAWHITE} GNUPGHOME"
> >> > +fi=C2=A0
> >>
> >> Why did you go for conditional append for that one, while the=
> >> others are unconditional?
> >>
> >> Henning
> >>=C2=A0
> >
> > GNUPGHOME might not be set in the host and hence went for the
> > condition. BTW, I don't think having always would cause issue= s.

If there is no reason for the condition please drop it.

Henning

Ok.


> > >=C2=A0 export BB_ENV_EXTRAWHITE
> >>
> >>=C2=A0

--000000000000953f33058f0cbe95--