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 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)