From 8826f0688f09f023d760a80705f03dfa4a5aead7 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Wed, 1 Nov 2023 15:56:09 +0100 Subject: [PATCH 1/2] adapt products spec to work with services --- products.d/agama-products-opensuse.spec | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/products.d/agama-products-opensuse.spec b/products.d/agama-products-opensuse.spec index bc2af88b9d..d2c23829f9 100644 --- a/products.d/agama-products-opensuse.spec +++ b/products.d/agama-products-opensuse.spec @@ -23,9 +23,7 @@ Summary: Definition of openSUSE products for the Agama installer License: GPL-2.0-only Url: https://github.com/opensuse/agama BuildArch: noarch -Source0: tumbleweed.yaml -Source1: ALP-Dolomite.yaml -Source2: leap16.yaml +Source0: agama.tar %description Products definition for Agama installer. This one is for opensuse products. @@ -43,14 +41,13 @@ BuildArch: noarch Products definition for Agama installer. This one is for ALP Dolomite product. %prep +%autosetup -a0 -n agama %build %install install -D -d -m 0755 %{buildroot}%{_datadir}/agama/products.d -install -m 0644 %{SOURCE0} %{buildroot}%{_datadir}/agama/products.d -install -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/agama/products.d -install -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/agama/products.d +install -m 0644 *.yaml %{buildroot}%{_datadir}/agama/products.d %files %dir %{_datadir}/agama From 81d0df7e6b310e894df80aeb3f5be41aa930d9a0 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Wed, 1 Nov 2023 16:22:17 +0100 Subject: [PATCH 2/2] remove also filter config which is no longer needed --- service/share/filter-config.rb | 57 ---------------------------------- 1 file changed, 57 deletions(-) delete mode 100755 service/share/filter-config.rb diff --git a/service/share/filter-config.rb b/service/share/filter-config.rb deleted file mode 100755 index d3224841db..0000000000 --- a/service/share/filter-config.rb +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# Copyright (c) [2023] SUSE LLC -# -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of version 2 of the GNU General Public License as published -# by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, contact SUSE LLC. -# -# To contact SUSE LLC about this file by physical or electronic mail, you may -# find current contact information at www.suse.com. - -# Helper script to create a configuration file for a selected list of products. -# -# filter-config.rb /etc/agama.yaml ALP-Bedrock ALP-Micro - -require "yast" -require "agama/config" -require "yaml" - -if ARGV.size < 2 - warn("Please, specify a file and, at least, a product ID") - exit(1) -end - -path = ARGV[0] -product_ids = ARGV[1..-1] - -unless File.exist?(path) - warn("The specified file does not exist: #{path}") - exit(2) -end - -config = YAML.load_file(path) - -unknown_products = product_ids - config["products"].keys -unless unknown_products.empty? - warn(format("The following products are unknown: %{products}.", - products: unknown_products.join(", "))) - exit(3) -end - -keys_to_filter = (["products"] + config["products"].keys) - product_ids -products = product_ids.reduce({}) { |all, id| all.merge(id => config["products"][id]) } -new_config = { "products" => products } -new_config.merge!(config.reject { |k, _v| keys_to_filter.include?(k) }) -puts YAML.dump(new_config)