diff -Nru ruby-specinfra-2.84.0/debian/changelog ruby-specinfra-2.84.0/debian/changelog --- ruby-specinfra-2.84.0/debian/changelog 2023-01-18 14:56:48.000000000 +0000 +++ ruby-specinfra-2.84.0/debian/changelog 2023-02-28 00:03:39.000000000 +0000 @@ -1,3 +1,10 @@ +ruby-specinfra (2.84.0-2) unstable; urgency=medium + + * Team upload + * Add patch to improve detection of Debian testing + + -- Antonio Terceiro Mon, 27 Feb 2023 21:03:39 -0300 + ruby-specinfra (2.84.0-1) unstable; urgency=medium * New upstream version 2.84.0 diff -Nru ruby-specinfra-2.84.0/debian/patches/0004-Improve-detection-of-Debian-testing.patch ruby-specinfra-2.84.0/debian/patches/0004-Improve-detection-of-Debian-testing.patch --- ruby-specinfra-2.84.0/debian/patches/0004-Improve-detection-of-Debian-testing.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby-specinfra-2.84.0/debian/patches/0004-Improve-detection-of-Debian-testing.patch 2023-02-28 00:03:39.000000000 +0000 @@ -0,0 +1,48 @@ +From: Antonio Terceiro +Date: Sun, 26 Feb 2023 23:22:07 -0300 +Subject: Improve detection of Debian testing + +On Debian testing, lsb_release says that the release is "n/a" + +Forwarded: https://github.com/mizzy/specinfra/pull/741 +--- + lib/specinfra/helper/detect_os/debian.rb | 1 + + spec/helper/detect_os/debian_spec.rb | 15 +++++++++++++++ + 2 files changed, 16 insertions(+) + +diff --git a/lib/specinfra/helper/detect_os/debian.rb b/lib/specinfra/helper/detect_os/debian.rb +index ecaba94..927e2f3 100644 +--- a/lib/specinfra/helper/detect_os/debian.rb ++++ b/lib/specinfra/helper/detect_os/debian.rb +@@ -20,6 +20,7 @@ class Specinfra::Helper::DetectOs::Debian < Specinfra::Helper::DetectOs + end + distro ||= 'debian' + release ||= nil ++ release = "testing" if distro =~ /debian/i && release == "n/a" && debian_version.stdout.strip =~ /\w+\/sid$/ + { :family => distro.gsub(/[^[:alnum:]]/, '').downcase, :release => release } + end + end +diff --git a/spec/helper/detect_os/debian_spec.rb b/spec/helper/detect_os/debian_spec.rb +index 3b2d6c4..a4f42fb 100644 +--- a/spec/helper/detect_os/debian_spec.rb ++++ b/spec/helper/detect_os/debian_spec.rb +@@ -64,4 +64,19 @@ describe Specinfra::Helper::DetectOs::Debian do + :release => '16.04' + ) + end ++ it 'Should return debian testing when lsb_release says release = n/a' do ++ allow(debian).to receive(:run_command).with('cat /etc/debian_version') { ++ CommandResult.new(:stdout => "bookworm/sid", :exit_status => 0) ++ } ++ allow(debian).to receive(:run_command).with('lsb_release -ir') { ++ CommandResult.new(:stdout => "Distributor ID: Debian\nRelease: n/a\n", :exit_status => 0) ++ } ++ allow(debian).to receive(:run_command).with('cat /etc/lsb-release') { ++ CommandResult.new(:stdout => "", :exit_status => 1) ++ } ++ expect(debian.detect).to include( ++ :family => 'debian', ++ :release => 'testing' ++ ) ++ end + end diff -Nru ruby-specinfra-2.84.0/debian/patches/series ruby-specinfra-2.84.0/debian/patches/series --- ruby-specinfra-2.84.0/debian/patches/series 2023-01-18 14:55:34.000000000 +0000 +++ ruby-specinfra-2.84.0/debian/patches/series 2023-02-28 00:03:39.000000000 +0000 @@ -1,3 +1,4 @@ 0001-Remove-sfl-gem-dependency.patch 0002-Do-not-use-git-ls-files.patch 0003-Relax-ruby-net-telnet-version.patch +0004-Improve-detection-of-Debian-testing.patch diff -Nru ruby-specinfra-2.84.0/debian/salsa-ci.yml ruby-specinfra-2.84.0/debian/salsa-ci.yml --- ruby-specinfra-2.84.0/debian/salsa-ci.yml 2023-01-18 14:55:34.000000000 +0000 +++ ruby-specinfra-2.84.0/debian/salsa-ci.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ ---- -include: - - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml - - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml - -variables: - SALSA_CI_DISABLE_BLHC: 1 - SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1