* [PATCH] export GNUGPHOME for reprepro @ 2019-07-25 7:15 vijaikumar.kanagarajan 2019-07-25 7:25 ` Henning Schild ` (2 more replies) 0 siblings, 3 replies; 17+ messages in thread From: vijaikumar.kanagarajan @ 2019-07-25 7:15 UTC (permalink / raw) To: isar-users, henning.schild, claudius.heine.ext; +Cc: jan.kiszka, Vijai Kumar K From: Vijai Kumar K <Vijaikumar_Kanagarajan@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> --- 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 export BB_ENV_EXTRAWHITE -- 2.17.1 ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] export GNUGPHOME for reprepro 2019-07-25 7:15 [PATCH] export GNUGPHOME for reprepro vijaikumar.kanagarajan @ 2019-07-25 7:25 ` Henning Schild 2019-07-25 8:59 ` Vijai Kumar K 2019-07-25 7:35 ` Claudius Heine 2019-08-01 11:12 ` [PATCH] " Henning Schild 2 siblings, 1 reply; 17+ messages in thread From: Henning Schild @ 2019-07-25 7:25 UTC (permalink / raw) To: vijaikumar.kanagarajan; +Cc: isar-users, Vijai Kumar K, Maxim Yu. Osipov Hi Vijai Kumar, this patch looks good on its own. But again the context is missing. A series that enables proper GPG signing would be more helpful than tiny steps that might not be going in the right direction. That said you already did a lot of research on the topic and did send several good proposals and the full thing might be still far away. This one combined with the one from Maxim would make a step that is very likely going in the right direction. And could be merged if we are in a hurry to merge intermediate steps. Henning Am Thu, 25 Jul 2019 12:45:04 +0530 schrieb <vijaikumar.kanagarajan@gmail.com>: > From: Vijai Kumar K <Vijaikumar_Kanagarajan@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> > --- > 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 > export BB_ENV_EXTRAWHITE ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] export GNUGPHOME for reprepro 2019-07-25 7:25 ` Henning Schild @ 2019-07-25 8:59 ` Vijai Kumar K 0 siblings, 0 replies; 17+ messages in thread From: Vijai Kumar K @ 2019-07-25 8:59 UTC (permalink / raw) To: Henning Schild; +Cc: vijaikumar.kanagarajan, isar-users, Maxim Yu. Osipov On Thu, Jul 25, 2019 at 09:25:43AM +0200, Henning Schild wrote: > Hi Vijai Kumar, > > this patch looks good on its own. But again the context is missing. A > series that enables proper GPG signing would be more helpful than tiny > steps that might not be going in the right direction. > > That said you already did a lot of research on the topic and did send > several good proposals and the full thing might be still far away. This > one combined with the one from Maxim would make a step that is very > likely going in the right direction. And could be merged if we are in a > hurry to merge intermediate steps. > Hi Henning, Thank you for the feedback. Yes, I agree that it would be more helpful to have the complete patchset. However, adding support for passphrase protected keys might take some time and might involve some significant changes to the code. Hence I would like to break it into the below steps 1. Making GNUPGHOME available to reprepro 2. Providing mechansim to choose a key for signing 3. Handle password protected keys. I am planning to address and propose patchsets for points 1 & 2, so that atleast passwordless keys will have support for situations described in my previous thread. Addressing these would inturn ease the CI & docker use cases which we currently need now. I will start work on password protected keys in parallel and start an RFC for that. Thanks, Vijai Kumar K > Henning > > Am Thu, 25 Jul 2019 12:45:04 +0530 > schrieb <vijaikumar.kanagarajan@gmail.com>: > > > From: Vijai Kumar K <Vijaikumar_Kanagarajan@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> > > --- > > 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 > > export BB_ENV_EXTRAWHITE > ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] export GNUGPHOME for reprepro 2019-07-25 7:15 [PATCH] export GNUGPHOME for reprepro vijaikumar.kanagarajan 2019-07-25 7:25 ` Henning Schild @ 2019-07-25 7:35 ` Claudius Heine 2019-07-25 9:08 ` [PATCH v2] " vijaikumar.kanagarajan 2019-08-01 11:12 ` [PATCH] " Henning Schild 2 siblings, 1 reply; 17+ messages in thread From: Claudius Heine @ 2019-07-25 7:35 UTC (permalink / raw) To: vijaikumar.kanagarajan, isar-users, henning.schild, claudius.heine.ext Cc: jan.kiszka, Vijai Kumar K [-- Attachment #1.1: Type: text/plain, Size: 4439 bytes --] Hi, On 25/07/2019 09.15, vijaikumar.kanagarajan@gmail.com wrote: > From: Vijai Kumar K <Vijaikumar_Kanagarajan@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> > --- > 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} I would rather write: if [ -n '${GNUPGHOME}' ]; then export GNUPGHOME='${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=$(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 > export BB_ENV_EXTRAWHITE > -- 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 [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2] export GNUGPHOME for reprepro 2019-07-25 7:35 ` Claudius Heine @ 2019-07-25 9:08 ` vijaikumar.kanagarajan 2019-07-25 9:10 ` Jan Kiszka 0 siblings, 1 reply; 17+ messages in thread From: vijaikumar.kanagarajan @ 2019-07-25 9:08 UTC (permalink / raw) To: isar-users, henning.schild, claudius.heine.ext; +Cc: jan.kiszka, Vijai Kumar K From: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com> Changes in v2 (address comments from Claudius) - use -n instead of ! -z >8------------------------------------------------------8< 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> --- 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..ee43216 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 [ -n "${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..e03f1d0 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 [ -n "${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..488a44d 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 [ -n "${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..e6f1753 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 [ -n "${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..cc9ebcf 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 [ -n "${GNUPGHOME}" ]; then + BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE} GNUPGHOME" +fi export BB_ENV_EXTRAWHITE -- 2.17.1 ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2] export GNUGPHOME for reprepro 2019-07-25 9:08 ` [PATCH v2] " vijaikumar.kanagarajan @ 2019-07-25 9:10 ` Jan Kiszka 2019-07-25 9:15 ` Vijai Kumar K 0 siblings, 1 reply; 17+ messages in thread From: Jan Kiszka @ 2019-07-25 9:10 UTC (permalink / raw) To: vijaikumar.kanagarajan, isar-users, henning.schild, claudius.heine.ext Cc: Vijai Kumar K On 25.07.19 11:08, vijaikumar.kanagarajan@gmail.com wrote: > From: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com> > > Changes in v2 (address comments from Claudius) > - use -n instead of ! -z > >> 8------------------------------------------------------8< Comments have to go below the "---" separator. The above is too easy to get merged as-is on "git am". Jan > 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> > --- > 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..ee43216 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 [ -n "${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..e03f1d0 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 [ -n "${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..488a44d 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 [ -n "${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..e6f1753 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 [ -n "${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..cc9ebcf 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 [ -n "${GNUPGHOME}" ]; then > + BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE} GNUPGHOME" > +fi > export BB_ENV_EXTRAWHITE > -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2] export GNUGPHOME for reprepro 2019-07-25 9:10 ` Jan Kiszka @ 2019-07-25 9:15 ` Vijai Kumar K 0 siblings, 0 replies; 17+ messages in thread From: Vijai Kumar K @ 2019-07-25 9:15 UTC (permalink / raw) To: Jan Kiszka Cc: vijaikumar.kanagarajan, isar-users, henning.schild, claudius.heine.ext On Thu, Jul 25, 2019 at 11:10:25AM +0200, Jan Kiszka wrote: > On 25.07.19 11:08, vijaikumar.kanagarajan@gmail.com wrote: > > From: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com> > > > > Changes in v2 (address comments from Claudius) > > - use -n instead of ! -z > > > >> 8------------------------------------------------------8< > > Comments have to go below the "---" separator. The above is too easy to get > merged as-is on "git am". > > Jan Sure Jan. Noted. Will follow that. Thanks, 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 <Vijaikumar_Kanagarajan@mentor.com> > > --- > > 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..ee43216 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 [ -n "${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..e03f1d0 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 [ -n "${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..488a44d 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 [ -n "${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..e6f1753 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 [ -n "${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..cc9ebcf 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 [ -n "${GNUPGHOME}" ]; then > > + BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE} GNUPGHOME" > > +fi > > export BB_ENV_EXTRAWHITE > > > > -- > Siemens AG, Corporate Technology, CT RDA IOT SES-DE > Corporate Competence Center Embedded Linux ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] export GNUGPHOME for reprepro 2019-07-25 7:15 [PATCH] export GNUGPHOME for reprepro vijaikumar.kanagarajan 2019-07-25 7:25 ` Henning Schild 2019-07-25 7:35 ` Claudius Heine @ 2019-08-01 11:12 ` Henning Schild 2019-08-01 11:23 ` vijai kumar 2 siblings, 1 reply; 17+ messages in thread From: Henning Schild @ 2019-08-01 11:12 UTC (permalink / raw) To: vijaikumar.kanagarajan Cc: isar-users, claudius.heine.ext, jan.kiszka, Vijai Kumar K Am Thu, 25 Jul 2019 12:45:04 +0530 schrieb <vijaikumar.kanagarajan@gmail.com>: > From: Vijai Kumar K <Vijaikumar_Kanagarajan@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> > --- > 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 > export BB_ENV_EXTRAWHITE ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] export GNUGPHOME for reprepro 2019-08-01 11:12 ` [PATCH] " Henning Schild @ 2019-08-01 11:23 ` vijai kumar 2019-08-01 11:34 ` vijai kumar 0 siblings, 1 reply; 17+ messages in thread From: vijai kumar @ 2019-08-01 11:23 UTC (permalink / raw) To: Henning Schild; +Cc: isar-users, Claudius Heine, jan.kiszka, Vijai Kumar K [-- Attachment #1: Type: text/plain, Size: 4112 bytes --] 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.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> > > --- > > 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 > > [-- Attachment #2: Type: text/html, Size: 6544 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] export GNUGPHOME for reprepro 2019-08-01 11:23 ` vijai kumar @ 2019-08-01 11:34 ` vijai kumar 2019-08-01 11:38 ` Henning Schild 0 siblings, 1 reply; 17+ messages in thread From: vijai kumar @ 2019-08-01 11:34 UTC (permalink / raw) To: Henning Schild; +Cc: isar-users, Claudius Heine, jan.kiszka, Vijai Kumar K [-- Attachment #1: Type: text/plain, Size: 4357 bytes --] 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: > >> Am Thu, 25 Jul 2019 12:45:04 +0530 >> schrieb <vijaikumar.kanagarajan@gmail.com>: >> >> > From: Vijai Kumar K <Vijaikumar_Kanagarajan@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> >> > --- >> > 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 >> >> [-- Attachment #2: Type: text/html, Size: 7584 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] export GNUGPHOME for reprepro 2019-08-01 11:34 ` vijai kumar @ 2019-08-01 11:38 ` Henning Schild 2019-08-01 11:42 ` vijai kumar ` (2 more replies) 0 siblings, 3 replies; 17+ messages in thread From: Henning Schild @ 2019-08-01 11:38 UTC (permalink / raw) To: vijai kumar; +Cc: isar-users, Claudius Heine, jan.kiszka, Vijai Kumar K Am Thu, 1 Aug 2019 17:04:08 +0530 schrieb vijai kumar <vijaikumar.kanagarajan@gmail.com>: > 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: > > > >> Am Thu, 25 Jul 2019 12:45:04 +0530 > >> schrieb <vijaikumar.kanagarajan@gmail.com>: > >> > >> > From: Vijai Kumar K <Vijaikumar_Kanagarajan@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> > >> > --- > >> > 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 > >> > >> ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] export GNUGPHOME for reprepro 2019-08-01 11:38 ` Henning Schild @ 2019-08-01 11:42 ` vijai kumar 2019-08-01 11:48 ` Baurzhan Ismagulov 2019-08-05 10:58 ` [PATCH v2] " vijaikumar.kanagarajan 2 siblings, 0 replies; 17+ messages in thread From: vijai kumar @ 2019-08-01 11:42 UTC (permalink / raw) To: Henning Schild; +Cc: isar-users, Claudius Heine, jan.kiszka, Vijai Kumar K [-- Attachment #1: Type: text/plain, Size: 5114 bytes --] 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>: > > > 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: > > > > > >> Am Thu, 25 Jul 2019 12:45:04 +0530 > > >> schrieb <vijaikumar.kanagarajan@gmail.com>: > > >> > > >> > From: Vijai Kumar K <Vijaikumar_Kanagarajan@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> > > >> > --- > > >> > 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 > > >> > > >> > > [-- Attachment #2: Type: text/html, Size: 9174 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] export GNUGPHOME for reprepro 2019-08-01 11:38 ` Henning Schild 2019-08-01 11:42 ` vijai kumar @ 2019-08-01 11:48 ` Baurzhan Ismagulov 2019-08-01 11:52 ` Henning Schild 2019-08-05 10:58 ` [PATCH v2] " vijaikumar.kanagarajan 2 siblings, 1 reply; 17+ messages in thread From: Baurzhan Ismagulov @ 2019-08-01 11:48 UTC (permalink / raw) To: isar-users On Thu, Aug 01, 2019 at 01:38:18PM +0200, Henning Schild wrote: > > >> Why did you go for conditional append for that one, while the > > >> others are unconditional? > > > > > > 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. If I read the patch correctly, all uses of GNUPGHOME are conditional. IIUC, we need conditions everywhere, because if it is not set in the host environment, we'd end up setting it to an empty string, which I assume we shouldn't do. Or have I overlooked anything? With kind regards, Baurzhan. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] export GNUGPHOME for reprepro 2019-08-01 11:48 ` Baurzhan Ismagulov @ 2019-08-01 11:52 ` Henning Schild 2019-08-01 12:09 ` Baurzhan Ismagulov 0 siblings, 1 reply; 17+ messages in thread From: Henning Schild @ 2019-08-01 11:52 UTC (permalink / raw) To: Baurzhan Ismagulov; +Cc: isar-users Am Thu, 1 Aug 2019 13:48:34 +0200 schrieb Baurzhan Ismagulov <ibr@radix50.net>: > On Thu, Aug 01, 2019 at 01:38:18PM +0200, Henning Schild wrote: > > > >> Why did you go for conditional append for that one, while the > > > >> others are unconditional? > > > > > > > > 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. > > If I read the patch correctly, all uses of GNUPGHOME are conditional. > IIUC, we need conditions everywhere, because if it is not set in the > host environment, we'd end up setting it to an empty string, which I > assume we shouldn't do. Or have I overlooked anything? That variable that is appended has conditional built in, read the bitbake manual. Henning > With kind regards, > Baurzhan. > ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] export GNUGPHOME for reprepro 2019-08-01 11:52 ` Henning Schild @ 2019-08-01 12:09 ` Baurzhan Ismagulov 0 siblings, 0 replies; 17+ messages in thread From: Baurzhan Ismagulov @ 2019-08-01 12:09 UTC (permalink / raw) To: isar-users On Thu, Aug 01, 2019 at 01:52:17PM +0200, Henning Schild wrote: > > > > >> Why did you go for conditional append for that one, while the > > > > >> others are unconditional? ... > > If I read the patch correctly, all uses of GNUPGHOME are conditional. > > IIUC, we need conditions everywhere, because if it is not set in the > > host environment, we'd end up setting it to an empty string, which I > > assume we shouldn't do. Or have I overlooked anything? > > That variable that is appended has conditional built in, read the > bitbake manual. Ok, got it now. "The others" are "BUILDDIR ISARROOT http_proxy https_proxy ftp_proxy no_proxy" and not "the other assignments referencing ${GNUPGHOME}". With kind regards, Baurzhan. ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2] export GNUGPHOME for reprepro 2019-08-01 11:38 ` Henning Schild 2019-08-01 11:42 ` vijai kumar 2019-08-01 11:48 ` Baurzhan Ismagulov @ 2019-08-05 10:58 ` vijaikumar.kanagarajan 2019-08-06 8:35 ` [PATCH v2] export GNUPGHOME " Baurzhan Ismagulov 2 siblings, 1 reply; 17+ messages in thread From: vijaikumar.kanagarajan @ 2019-08-05 10:58 UTC (permalink / raw) To: isar-users, henning.schild, claudius.heine.ext; +Cc: jan.kiszka, Vijai Kumar K From: Vijai Kumar K <Vijaikumar_Kanagarajan@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> --- Changes in v2: - Implemented review comments from Henning. 1. Moved export out of loop in base-apt-helper 2. Removed condition check before adding to BB_ENV_EXTRAWHITE 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 | 2 +- 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/meta/classes/base-apt-helper.bbclass b/meta/classes/base-apt-helper.bbclass index ba768da..81df45a 100644 --- a/meta/classes/base-apt-helper.bbclass +++ b/meta/classes/base-apt-helper.bbclass @@ -14,6 +14,10 @@ compare_pkg_md5sums() { populate_base_apt() { search_dir=$1 + if [ -n "${GNUPGHOME}" ]; then + export GNUPGHOME="${GNUPGHOME}" + fi + find $search_dir -name '*.deb' | while read package; do # NOTE: due to packages stored by reprepro are not modified, we can # use search by filename to check if package is already in repo. In diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass index 3e6ba8c..e03f1d0 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 [ -n "${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..488a44d 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 [ -n "${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..e6f1753 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 [ -n "${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..2186e40 100755 --- a/scripts/isar-buildenv-internal +++ b/scripts/isar-buildenv-internal @@ -66,5 +66,5 @@ export PATH BBPATH="${BUILDDIR}" export BBPATH -BB_ENV_EXTRAWHITE="BUILDDIR ISARROOT http_proxy https_proxy ftp_proxy no_proxy" +BB_ENV_EXTRAWHITE="BUILDDIR ISARROOT http_proxy https_proxy ftp_proxy no_proxy GNUPGHOME" export BB_ENV_EXTRAWHITE -- 2.17.1 ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2] export GNUPGHOME for reprepro 2019-08-05 10:58 ` [PATCH v2] " vijaikumar.kanagarajan @ 2019-08-06 8:35 ` Baurzhan Ismagulov 0 siblings, 0 replies; 17+ messages in thread From: Baurzhan Ismagulov @ 2019-08-06 8:35 UTC (permalink / raw) To: isar-users On Mon, Aug 05, 2019 at 04:28:43PM +0530, vijaikumar.kanagarajan@gmail.com wrote: > reprepro does not 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. Applied to next with minor title and comment changes, thanks. With kind regards, Baurzhan. ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2019-08-06 8:35 UTC | newest] Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-07-25 7:15 [PATCH] export GNUGPHOME for reprepro vijaikumar.kanagarajan 2019-07-25 7:25 ` Henning Schild 2019-07-25 8:59 ` Vijai Kumar K 2019-07-25 7:35 ` Claudius Heine 2019-07-25 9:08 ` [PATCH v2] " vijaikumar.kanagarajan 2019-07-25 9:10 ` Jan Kiszka 2019-07-25 9:15 ` Vijai Kumar K 2019-08-01 11:12 ` [PATCH] " Henning Schild 2019-08-01 11:23 ` vijai kumar 2019-08-01 11:34 ` vijai kumar 2019-08-01 11:38 ` Henning Schild 2019-08-01 11:42 ` vijai kumar 2019-08-01 11:48 ` Baurzhan Ismagulov 2019-08-01 11:52 ` Henning Schild 2019-08-01 12:09 ` Baurzhan Ismagulov 2019-08-05 10:58 ` [PATCH v2] " vijaikumar.kanagarajan 2019-08-06 8:35 ` [PATCH v2] export GNUPGHOME " Baurzhan Ismagulov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox