Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for Micro for 6.0 and 6.1 #1266

Merged
merged 6 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions package/obs/rmt-server.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Mon Dec 23 14:07:00 UTC 2024 - Luís Caparroz <lcaparroz@suse.com>

- 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

-------------------------------------------------------------------
Mon Dec 23 08:03:56 UTC 2024 - Parag Jain <parag.jain@suse.com>

Expand Down
Loading