From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6717496001358200832 X-Received: by 2002:a5d:54c7:: with SMTP id x7mr63331477wrv.39.1564040120220; Thu, 25 Jul 2019 00:35:20 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:f78b:: with SMTP id q11ls5425553wrp.10.gmail; Thu, 25 Jul 2019 00:35:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6tSNTonH/AxgdPIb+uWgiDDUYS+v90BdnMpP0L9rqCLSs+KjHRRB8/hgN41c9bfsYw5ck X-Received: by 2002:adf:fa42:: with SMTP id y2mr11183303wrr.170.1564040119778; Thu, 25 Jul 2019 00:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564040119; cv=none; d=google.com; s=arc-20160816; b=iaOxAH3RvpjfJSSclKkj3lMzA7XAAAwtenVrguW2sW4wnfxazqqVxjfp6WruURguYQ jenNKZkWiA5VMGjzAV2RrkSzMUlD11ayCtT+pxAHjFxIsDJfKn1rzZaehVrDc2b0jCIE dyLn4ZrRA6ncACJHFX4+kh4mwhYnimX3R+JDi5NczSTrFb/+FRq/qbn5SKmtVfvXaV2B y7UwRWS+DyzO0uNM4pxkWf9Pl0nm7aAFgv0HRo/FtXosb7B/VRHmYyrzwZogPjJFMKQ+ U2VrAeNHIhM3iFXgbIz7JGBa5Ab9qqE8SD/MH05yHxCGqO2xuad0CrU06BUdEnlnAwNc TAwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:mime-version:user-agent:date:message-id:openpgp:from :references:cc:to:subject; bh=nXMcAq2lzPVncP+ZapLlCwceeZSP4fpiOiylusAhDEQ=; b=FgZLcV3tXYhgWiog9jHIEyw8kRFPXxqirHPYd40v1wD1BD2DbSgJ6hHcmJ7+KkijNz cxGl39KHvK68ZRgTEe3fJ4cxU6l+uUNMJ6M7LYnyufsRUzOuVopXKL0c3piUkLEaaG7c +cas2HUErWD8WkG9c0W+5ePVhBaM44Ck2m4YOmzHhTzn9XQTPtVdrv8vTfhc/o4ilwkl TIwfvjnuoUOntJGm9pTshRp3AmaSQfTF2ya3vYmyKy3XZIEN3KW+hjE+Ro2B0i+f6ncz u5CaJplopXXV6LT0057Zd2FpbUIWB9cw/1l6Pmq91AFqVWDotn5xjYM4EvaD1pXZXZFd VMNA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of ch@denx.de) smtp.mailfrom=ch@denx.de Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.10]) by gmr-mx.google.com with ESMTPS id u18si2597348wri.5.2019.07.25.00.35.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2019 00:35:19 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of ch@denx.de) client-ip=212.18.0.10; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of ch@denx.de) smtp.mailfrom=ch@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 45vPBb37w6z1rGSW; Thu, 25 Jul 2019 09:35:19 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 45vPBb2CPDz1qqkP; Thu, 25 Jul 2019 09:35:19 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id tMmb-sZGunFk; Thu, 25 Jul 2019 09:35:18 +0200 (CEST) X-Auth-Info: BLYGzv3SUJFVjh3NKPAmtdjYCHzN6DFyfRPifwLsutY= Received: from deneb.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 25 Jul 2019 09:35:17 +0200 (CEST) Subject: Re: [PATCH] export GNUGPHOME for reprepro To: vijaikumar.kanagarajan@gmail.com, isar-users@googlegroups.com, henning.schild@siemens.com, claudius.heine.ext@siemens.com Cc: jan.kiszka@siemens.com, Vijai Kumar K References: <20190725071504.24037-1-Vijaikumar_Kangarajan@mentor.com> From: Claudius Heine Openpgp: id=6FF2E59F00C6BC2831D864C11173CB199808B153; url=http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x1173CB199808B153 Message-ID: <6fc7018b-f58d-99e7-a384-2925ffd86772@denx.de> Date: Thu, 25 Jul 2019 09:35:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190725071504.24037-1-Vijaikumar_Kangarajan@mentor.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="elnQGpdEO6KxDtKQ64xhJTlbKYHAxOJoK" X-TUID: e3tjwE/djY8e This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --elnQGpdEO6KxDtKQ64xhJTlbKYHAxOJoK Content-Type: multipart/mixed; boundary="RI1SorvDulGxnUY7MY2JXDFJJbAGyD79Y"; protected-headers="v1" From: Claudius Heine To: vijaikumar.kanagarajan@gmail.com, isar-users@googlegroups.com, henning.schild@siemens.com, claudius.heine.ext@siemens.com Cc: jan.kiszka@siemens.com, Vijai Kumar K Message-ID: <6fc7018b-f58d-99e7-a384-2925ffd86772@denx.de> Subject: Re: [PATCH] export GNUGPHOME for reprepro References: <20190725071504.24037-1-Vijaikumar_Kangarajan@mentor.com> In-Reply-To: <20190725071504.24037-1-Vijaikumar_Kangarajan@mentor.com> --RI1SorvDulGxnUY7MY2JXDFJJbAGyD79Y Content-Type: text/plain; charset=utf-8 Content-Language: en-MW Content-Transfer-Encoding: quoted-printable Hi, On 25/07/2019 09.15, vijaikumar.kanagarajan@gmail.com wrote: > From: Vijai Kumar K >=20 > 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. >=20 > Make GNUPGHOME available for reprepro. >=20 > 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(+) >=20 > diff --git a/meta/classes/base-apt-helper.bbclass b/meta/classes/base-a= pt-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 > =20 > + if [ ! -z ${GNUPGHOME} ]; then > + export GNUPGHOME=3D${GNUPGHOME} I would rather write: if [ -n '${GNUPGHOME}' ]; then export GNUPGHOME=3D'${GNUPGHOME}' That does avoid the extra negation and makes it explicit that this is a bitbake variable that gets set to an environment variable. Quoting also allows spaces in the path. (which we are probably very far away from supporting.) regards, Claudius > + fi > + > # Check if this package is already in base-apt > isar_package=3D$(find ${REPO_BASE_DIR}/${BASE_DISTRO} -name $b= ase_name) > if [ -n "$isar_package" ]; then > diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bb= class > index 3e6ba8c..da13f86 100644 > --- a/meta/classes/dpkg-base.bbclass > +++ b/meta/classes/dpkg-base.bbclass > @@ -120,6 +120,9 @@ repo_clean() { > =20 > # Install package to Isar-apt > do_deploy_deb() { > + if [ ! -z ${GNUPGHOME} ]; then > + export GNUPGHOME=3D${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=3D"${REPO_BASE_DB_DIR}/${BASE_DISTRO}" > =20 > if [ ! -d "${path_databases}" ]; then > + if [ ! -z ${GNUPGHOME} ]; then > + export GNUPGHOME=3D${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=3D"${REPO_ISAR_DB_DIR}/${DISTRO}" > =20 > if [ ! -d "${path_databases}" ]; then > + if [ ! -z ${GNUPGHOME} ]; then > + export GNUPGHOME=3D${GNUPGHOME} > + fi > reprepro -b ${path_cache} \ > --dbdir ${path_databases} \ > export ${DEBDISTRONAME} > diff --git a/scripts/isar-buildenv-internal b/scripts/isar-buildenv-int= ernal > index 2476d90..7637d41 100755 > --- a/scripts/isar-buildenv-internal > +++ b/scripts/isar-buildenv-internal > @@ -67,4 +67,7 @@ BBPATH=3D"${BUILDDIR}" > export BBPATH > =20 > BB_ENV_EXTRAWHITE=3D"BUILDDIR ISARROOT http_proxy https_proxy ftp_prox= y no_proxy" > +if [ ! -z ${GNUPGHOME} ]; then > + BB_ENV_EXTRAWHITE=3D"${BB_ENV_EXTRAWHITE} GNUPGHOME" > +fi > export BB_ENV_EXTRAWHITE >=20 --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de PGP key: 6FF2 E59F 00C6 BC28 31D8 64C1 1173 CB19 9808 B153 Keyserver: hkp://pool.sks-keyservers.net --RI1SorvDulGxnUY7MY2JXDFJJbAGyD79Y-- --elnQGpdEO6KxDtKQ64xhJTlbKYHAxOJoK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEb/LlnwDGvCgx2GTBEXPLGZgIsVMFAl05W7EACgkQEXPLGZgI sVPemxAAo15xjU/ZnUch7mbeX68OqF78sRoKfLp35hSfuX6g7M/ZFeulbHxQCiD5 cLbPJlrkfQjJw2ebK9LR2xu271SVdmj8TWBg4pSJMz+GCyMJdTDqmenaKFKKO1qr iBk/DTZXJUuXdSWYf1lGRL875gf7QvcGHjfroKdS0IuzYX+TeZW+rjaTvGnzVyTP R/qivAr0tKt3TgjmH3xbF18wbHrffwQLkv93NvN09UkohEHLpqz+zyWDT4rFBOS3 5eUnSVrFEBJlOj+XC95FO2ITLsXNb/grP/Zot2KglEoPWA8Zf8VnUVcE58cTrpOI f+RP4+yL8G1APOhJrq9YyuaJCkt3HFcmxrsRAOWJxlRJDrGAr7RKQRVm1xBoYbrR FT3ew3vt3uow0/e6D5plufE5Ga96OuFfbpvYuSardOJucPIyZt+gUU/okcMsEbLQ 7ds2ndsDpaWvb/MjrPUZ8pyXvMGRFeK6dbBveswEYD901ygBp6hn8qo1FV4/eNjD Ob+DwMKuxst3f3XVxC6VD2fszyBJD7Gigti0RJ3o6i2N1qAKj0//j977pDKu9DIE nwVnz1xMtBP8g3xE1mLJHoodqvygZntmHKIFg7TlcLR4SpAECx9J9jEDhuR0adFr M+PEXZodqGeQ3z+9LTpBlu6cxS6S6o8RSuR3D7jxu55KRQmiQ64= =VOHc -----END PGP SIGNATURE----- --elnQGpdEO6KxDtKQ64xhJTlbKYHAxOJoK--