From 325e243364279fa4ddbbdbbb4d1565584a5582c6 Mon Sep 17 00:00:00 2001 From: Gang Ji Date: Thu, 26 Dec 2024 10:27:43 +0800 Subject: [PATCH] Revert "CP-52245: Temp disable repo_gpgcheck when syncing from remote_pool repo" This reverts commit c710e8fe13ce9ef55eb53e53cedc5440463aa98f. Signed-off-by: Gang Ji --- ocaml/xapi/repository.ml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/ocaml/xapi/repository.ml b/ocaml/xapi/repository.ml index 8d62a27a84..8e43d72ecb 100644 --- a/ocaml/xapi/repository.ml +++ b/ocaml/xapi/repository.ml @@ -155,19 +155,13 @@ 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 - , repo_gpgcheck - , use_proxy - , client_auth - , server_auth ) = + let binary_url, source_url, 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 ) @@ -175,7 +169,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, true, false, NoAuth, NoAuth) + (Uri.to_string uri, None, 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 @@ -215,7 +209,6 @@ let sync ~__context ~self ~token ~token_id ~username ~password = let plugin = "xapitoken" in ( repo_binary_url , None - , false , true , PoolExtHostAuth {xapi_token; plugin} , StunnelClientProxyAuth @@ -230,7 +223,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 ~gpgkey_path + write_yum_config ~source_url ~binary_url ~repo_gpgcheck:true ~gpgkey_path ~repo_name in Xapi_stdext_pervasives.Pervasiveext.finally