diff --git a/ocaml/xapi/repository.ml b/ocaml/xapi/repository.ml index 8e43d72ecb..8d62a27a84 100644 --- a/ocaml/xapi/repository.ml +++ b/ocaml/xapi/repository.ml @@ -155,13 +155,19 @@ let sync ~__context ~self ~token ~token_id ~username ~password = remove_repo_conf_file repo_name ; let origin = Db.Repository.get_origin ~__context ~self in - let binary_url, source_url, use_proxy, client_auth, server_auth = + let ( binary_url + , source_url + , repo_gpgcheck + , use_proxy + , client_auth + , server_auth ) = match origin with | `remote -> let plugin = "accesstoken" in ( Db.Repository.get_binary_url ~__context ~self , Some (Db.Repository.get_source_url ~__context ~self) , true + , true , CdnTokenAuth {token_id; token; plugin} , DefaultAuth ) @@ -169,7 +175,7 @@ let sync ~__context ~self ~token ~token_id ~username ~password = let uri = Uri.make ~scheme:"file" ~path:!Xapi_globs.bundle_repository_dir () in - (Uri.to_string uri, None, false, NoAuth, NoAuth) + (Uri.to_string uri, None, true, false, NoAuth, NoAuth) | `remote_pool -> let cert = Db.Repository.get_certificate ~__context ~self in let repo_binary_url = Db.Repository.get_binary_url ~__context ~self in @@ -209,6 +215,7 @@ let sync ~__context ~self ~token ~token_id ~username ~password = let plugin = "xapitoken" in ( repo_binary_url , None + , false , true , PoolExtHostAuth {xapi_token; plugin} , StunnelClientProxyAuth @@ -223,7 +230,7 @@ let sync ~__context ~self ~token ~token_id ~username ~password = s in let write_initial_yum_config ~binary_url = - write_yum_config ~source_url ~binary_url ~repo_gpgcheck:true ~gpgkey_path + write_yum_config ~source_url ~binary_url ~repo_gpgcheck ~gpgkey_path ~repo_name in Xapi_stdext_pervasives.Pervasiveext.finally