From ebb463aaa43fe5ed165e1993242b3e42d95c8ff8 Mon Sep 17 00:00:00 2001 From: Gang Ji Date: Tue, 5 Nov 2024 10:46:55 +0800 Subject: [PATCH] CP-52245: Temp disable repo_gpgcheck when syncing from remote_pool repo Will re-enable repo_gpgcheck after CP-51429 is done by reverting this commit. Signed-off-by: Gang Ji --- ocaml/xapi/repository.ml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ocaml/xapi/repository.ml b/ocaml/xapi/repository.ml index 6a91803b21..469fdc2671 100644 --- a/ocaml/xapi/repository.ml +++ b/ocaml/xapi/repository.ml @@ -159,24 +159,25 @@ let sync ~__context ~self ~token ~token_id ~remote_addr ~username ~password = try let repo_name = get_remote_repository_name ~__context ~self in remove_repo_conf_file repo_name ; - let binary_url, source_url = + let binary_url, source_url, repo_gpgcheck = match Db.Repository.get_origin ~__context ~self with | `remote -> ( Db.Repository.get_binary_url ~__context ~self , Some (Db.Repository.get_source_url ~__context ~self) + , true ) | `bundle -> let uri = Uri.make ~scheme:"file" ~path:!Xapi_globs.bundle_repository_dir () in - (Uri.to_string uri, None) + (Uri.to_string uri, None, true) | `remote_pool -> let uri = Uri.make ~scheme:"http" ~host:"127.0.0.1" ~port:!Xapi_globs.local_yum_repo_port ~path:"/repository/enabled/" () in - (Uri.to_string uri, None) + (Uri.to_string uri, None, false) in let gpgkey_path = match Db.Repository.get_gpgkey_path ~__context ~self with @@ -186,7 +187,7 @@ let sync ~__context ~self ~token ~token_id ~remote_addr ~username ~password = s in let write_initial_yum_config () = - 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 write_initial_yum_config () ;