From 285de21b4063121d1be01f326f6e5e200cf875f5 Mon Sep 17 00:00:00 2001 From: Jesus Bermudez Velazquez Date: Mon, 30 Dec 2024 09:35:15 +0000 Subject: [PATCH 1/3] Check for Micro for 6.0 and 6.1 As Micro 6.0 and 6.1 have 'SL-Micro' as identifier adjust the check to Micro to keep it working for SUMA and for bsc#1230419 --- app/controllers/api/connect/v3/systems/products_controller.rb | 2 +- .../strict_authentication/authentication_controller.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/connect/v3/systems/products_controller.rb b/app/controllers/api/connect/v3/systems/products_controller.rb index 648443ecd..38a1659b4 100644 --- a/app/controllers/api/connect/v3/systems/products_controller.rb +++ b/app/controllers/api/connect/v3/systems/products_controller.rb @@ -16,7 +16,7 @@ def show if @product.identifier.casecmp?('sles') # if system has SLE Micro # it should access to SLES products - sle_micro = @system.products.any? { |p| p.identifier.downcase.include?('sle-micro') } + sle_micro = @system.products.any? { |p| p.identifier.downcase.include?('micro') } sle_micro_same_arch = @system.products.pluck(:arch).include?(@product.arch) if sle_micro end if @system.products.include?(@product) || sle_micro_same_arch diff --git a/engines/strict_authentication/app/controllers/strict_authentication/authentication_controller.rb b/engines/strict_authentication/app/controllers/strict_authentication/authentication_controller.rb index b3fabfab6..2822c8402 100644 --- a/engines/strict_authentication/app/controllers/strict_authentication/authentication_controller.rb +++ b/engines/strict_authentication/app/controllers/strict_authentication/authentication_controller.rb @@ -40,7 +40,7 @@ def all_allowed_paths(headers) all_product_versions = @system.products.map { |p| Product.where(identifier: p.identifier, arch: p.arch) }.flatten allowed_paths = all_product_versions.map { |prod| prod.repositories.pluck(:local_path) }.flatten # Allow SLE Micro to access all free SLES repositories - sle_micro = @system.products.any? { |p| p.identifier.downcase.include?('sle-micro') } + sle_micro = @system.products.any? { |p| p.identifier.downcase.include?('micro') } if sle_micro system_products_archs = @system.products.pluck(:arch) product_free_sles_modules_only = Product.where( @@ -59,7 +59,7 @@ def all_allowed_paths(headers) manager_prod = @system.products.any? do |p| manager = p.identifier.downcase.include?('manager-server') # SUMA 5.0 must have access to SUMA 4.3, 4.2 and so on - micro = p.identifier.downcase.include?('sle-micro') + micro = p.identifier.downcase.include?('micro') instance_id_header = headers.fetch('X-Instance-Identifier', '').casecmp('suse-manager-server').zero? instance_version_header = headers.fetch('X-Instance-Version', '0').split('.')[0] >= '5' manager || (micro && instance_id_header && instance_version_header) From 1809d86dfb5f7c55273ee813c523e67833b7954f Mon Sep 17 00:00:00 2001 From: Jesus Bermudez Velazquez Date: Mon, 30 Dec 2024 16:57:22 +0000 Subject: [PATCH 2/3] Update changelog --- package/obs/rmt-server.changes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/obs/rmt-server.changes b/package/obs/rmt-server.changes index c86808f99..2370cea01 100644 --- a/package/obs/rmt-server.changes +++ b/package/obs/rmt-server.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Dec 30 16:55:41 UTC 2024 - Jesús Bermúdez Velázquez + +- Version 2.21 + * Update Micro check due to Micro 6.0 and 6.1 identifier to keep bsc#1230419 in place + ------------------------------------------------------------------- Mon Dec 23 08:03:56 UTC 2024 - Parag Jain From 63f6994cce382963dc38c77638daf4c0fd1ce7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Berm=C3=BAdez=20Vel=C3=A1zquez?= Date: Mon, 30 Dec 2024 17:31:55 +0000 Subject: [PATCH 3/3] Update rmt-server.changes merge changelog for the same version --- package/obs/rmt-server.changes | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/package/obs/rmt-server.changes b/package/obs/rmt-server.changes index fde78bf47..7821999d0 100644 --- a/package/obs/rmt-server.changes +++ b/package/obs/rmt-server.changes @@ -1,13 +1,8 @@ Mon Dec 23 14:07:00 UTC 2024 - Luís Caparroz - Version 2.21 -* Allow users to configure the SUMA product tree base URL to download - 'product_tree.json' from host other than 'scc.suse.com'. (bsc#1234844) - -------------------------------------------------------------------- -Mon Dec 30 16:55:41 UTC 2024 - Jesús Bermúdez Velázquez - -- Version 2.21 + * Allow users to configure the SUMA product tree base URL to download + 'product_tree.json' from host other than 'scc.suse.com'. (bsc#1234844) * Update Micro check due to Micro 6.0 and 6.1 identifier to keep bsc#1230419 in place -------------------------------------------------------------------