]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
centos and debian support for local_mirror
authorAlfredo Deza <alfredo.deza@inktank.com>
Thu, 5 Dec 2013 16:58:53 +0000 (11:58 -0500)
committerAlfredo Deza <alfredo.deza@inktank.com>
Thu, 17 Apr 2014 13:36:10 +0000 (09:36 -0400)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/hosts/centos/install.py
ceph_deploy/hosts/debian/install.py

index 723b3285c66f57a9d0d358cba91c6dab6660b5cb..0f336c3a301099549afaf6367a1aee39a247b7e7 100644 (file)
@@ -99,6 +99,7 @@ def install_epel(distro):
 
 def mirror_install(distro, repo_url, gpg_url, adjust_repos):
     repo_url = repo_url.strip('/')  # Remove trailing slashes
+    gpg_url_path = gpg_url.split('file://')[-1]  # Remove file if present
 
     pkg_managers.yum_clean(distro.conn)
 
@@ -108,7 +109,7 @@ def mirror_install(distro, repo_url, gpg_url, adjust_repos):
             [
                 'rpm',
                 '--import',
-                gpg_url,
+                gpg_url_path,
             ]
         )
 
index 63210a9950c7980454e77a0dfcd7faf505b4b483..eb8a0d789ec9ea5a41c54cfeda8cae9a0f298460 100644 (file)
@@ -95,25 +95,28 @@ def install(distro, version_kind, version, adjust_repos):
 
 def mirror_install(distro, repo_url, gpg_url, adjust_repos):
     repo_url = repo_url.strip('/')  # Remove trailing slashes
+    gpg_path = gpg_url.split('file://')[-1]
 
     if adjust_repos:
-        process.run(
-            distro.conn,
-            [
-                'wget',
-                '-O',
-                'release.asc',
-                gpg_url,
-            ],
-            stop_on_nonzero=False,
-        )
-
+        if not gpg_url.startswith('file://'):
+            process.run(
+                distro.conn,
+                [
+                    'wget',
+                    '-O',
+                    'release.asc',
+                    gpg_url,
+                ],
+                stop_on_nonzero=False,
+            )
+
+        gpg_file = 'release.asc' if not gpg_url.startswith('file://') else gpg_path
         process.run(
             distro.conn,
             [
                 'apt-key',
                 'add',
-                'release.asc'
+                gpg_file,
             ]
         )