From adf719b863fa185403088d278b7e6bb18bf69805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Tue, 20 Jun 2023 10:14:17 +0200 Subject: [PATCH] Use the opensuse template on all openSUSE variants At the moment you have to manually specify the template file name on Leap, as gem2rpm tries to use the opensuse-leap template on Leap, which does not exist. Therefore we fallback to the opensuse template instead. (cherry picked from commit 2f3487679010ec0ca1e4d91896483e7e171711cb) --- bin/gem2rpm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/gem2rpm b/bin/gem2rpm index f81c127..444ffe8 100755 --- a/bin/gem2rpm +++ b/bin/gem2rpm @@ -32,8 +32,8 @@ if template_file.nil? && File.exist?('/etc/os-release') File.read('/etc/os-release').each_line(chomp: true) do |line| line.match(%r{^ID=(.*)$}) { |m| template_file = m[1] } end - if template_file.eql? '"opensuse-tumbleweed"' - $stderr.puts 'Using template opensuse on Tumbleweed' + if template_file.match? '^"opensuse' + $stderr.puts 'Using template opensuse on openSUSE variant' template_file = 'opensuse' end end