Projet

Général

Profil

Tâche #27147

Scénario #26618: Traitement express MEN (10-12)

Le téléchargement des clefs GPG des dépôts tiers n’est pas possible en HTTP

Ajouté par Emmanuel GARETTE il y a environ 5 ans. Mis à jour il y a presque 5 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Début:
07/03/2019
Echéance:
% réalisé:

100%

Temps estimé:
2.00 h
Restant à faire (heures):
0.0

Description

Dans pyeole/pkg.py on a :

                         env = {'http_proxy': '{}:{}'.format(proxy[0], proxy[1])}
                         env = {'https_proxy': '{}:{}'.format(proxy[0], proxy[1])}

Le proxy n'est donc pas mis pour http. Il faudrait corrigé de la manière suivante :

                        env = {'http_proxy': '{}:{}'.format(proxy[0], proxy[1]),
                               'https_proxy': '{}:{}'.format(proxy[0], proxy[1])}

Révisions associées

Révision 6d143e6e (diff)
Ajouté par Daniel Dehennin il y a environ 5 ans

Additionnal repository key can not be download by HTTP with a proxy

The “env” variable is overridden with the “https_proxy” resulting in
the loss of “http_proxy” environnment variable.

  • pyeole/pkg.py (_configure_sources_mirror): set “env” variable as a
    python dictionnary.

Ref: #21147

Révision 5a9a53cf (diff)
Ajouté par Daniel Dehennin il y a environ 5 ans

GPG keyserver download require a special option for proxy

Exporting the proxy to the environnment does not work GPG. GPG
requires a dedicated “--keyserver-options”.

  • pyeole/pkg.py (_configure_sources_mirror): pass the proper
    “http-proxy” option to GPG instead of using an environment variable.

Ref: #21147

Historique

#1 Mis à jour par Daniel Dehennin il y a environ 5 ans

  • Temps estimé mis à 2.00 h
  • Tâche parente mis à #26911

#2 Mis à jour par Daniel Dehennin il y a environ 5 ans

  • Assigné à mis à Daniel Dehennin
  • Restant à faire (heures) mis à 2.0

#3 Mis à jour par Daniel Dehennin il y a environ 5 ans

Le problème est présent depuis 2.6.1.

#4 Mis à jour par Daniel Dehennin il y a environ 5 ans

  • Statut changé de Nouveau à En cours
  • % réalisé changé de 0 à 100

#5 Mis à jour par Daniel Dehennin il y a environ 5 ans

  • Sujet changé de Le proxy http n'est pas mis en place pour les dépôts tiers à Le téléchargement des clefs GPG des dépôts tiers n’est pas possible en HTTP

#6 Mis à jour par Emmanuel GARETTE il y a environ 5 ans

Il y un problème avec le proxy et GPG ...

Chez moi ca corrige :

--- a/pyeole/pkg.py
+++ b/pyeole/pkg.py
@@ -1914,22 +1914,20 @@ def _configure_sources_mirror(pkgmgr, ubuntu=None, eole=None, envole=None,
                         raise AptProxyError(_('cannot retrieve the URL {}, more information in {}').format(url, logfile))
                 else:
                     proxy = EolePkgApt._get_proxy()
-                    if proxy is None:
-                        env = None
-                    else:
-                        env = {'http_proxy': '{}:{}'.format(proxy[0], proxy[1]),
-                               'https_proxy': '{}:{}'.format(proxy[0], proxy[1])}
                     keyserver = additional_repository_key_signserver[idx]
                     signing_key_fingerprint = additional_repository_key_fingerprint[idx]
                     secret_keyring = os.path.join(keyring_dir, "secring.gpg")
                     export_keyring = os.path.join(keyring_dir, "export-keyring.gpg")
                     cmd = ['gpg', '--no-default-keyring', '--no-options',
-                           '--homedir', keyring_dir,
-                           '--secret-keyring', secret_keyring,
-                           '--keyring', export_keyring,
-                           '--keyserver', keyserver,
-                           '--recv', signing_key_fingerprint]
-
+                           '--homedir', keyring_dir]
+
+                    if proxy is not None:
+                        cmd.append('--keyserver-options')
+                        cmd.append('http-proxy=http://{}:{}'.format(proxy[0], proxy[1]))
+                    cmd.extend(['--secret-keyring', secret_keyring,
+                                '--keyring', export_keyring,
+                                '--keyserver', keyserver,
+                                '--recv', signing_key_fingerprint])
                     code, stdout, stderr = system_out(cmd)
                     if code != 0:
                         if os.path.isfile(keyring):

#7 Mis à jour par Daniel Dehennin il y a environ 5 ans

  • Tâche parente changé de #26911 à #26618

#8 Mis à jour par Daniel Dehennin il y a environ 5 ans

  • Restant à faire (heures) changé de 2.0 à 0.5

#9 Mis à jour par Scrum Master il y a environ 5 ans

  • Projet changé de python-pyeole à Distribution EOLE
  • Statut changé de En cours à Résolu

#10 Mis à jour par Joël Cuissinat il y a presque 5 ans

Non testé mais on a confiance :)

#11 Mis à jour par Joël Cuissinat il y a presque 5 ans

  • Statut changé de Résolu à Fermé
  • Restant à faire (heures) changé de 0.5 à 0.0

#12 Mis à jour par Emmanuel GARETTE il y a presque 5 ans

Ca fonctionne sur 24 machines :)

Formats disponibles : Atom PDF