From 1f74d9447899bfd8c5973aa51aefbea8e52dbe9f Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Mar 27 2023 11:20:09 +0000 Subject: Prevent trailing space character on user agent https://github.com/hashicorp/vagrant/pull/12925/ Resolves: rhbz#2177215 --- diff --git a/vagrant-2.3.1-Fix-downloader-user-agent.patch b/vagrant-2.3.1-Fix-downloader-user-agent.patch new file mode 100644 index 0000000..6085623 --- /dev/null +++ b/vagrant-2.3.1-Fix-downloader-user-agent.patch @@ -0,0 +1,21 @@ +From c7ef689d86294bcdb8ae5d31ddabcba416e3382d Mon Sep 17 00:00:00 2001 +From: Chris Roberts +Date: Wed, 28 Sep 2022 13:51:54 -0700 +Subject: [PATCH] Prevent trailing space character on user agent + +--- + lib/vagrant/util/downloader.rb | 2 +- + +diff --git a/lib/vagrant/util/downloader.rb b/lib/vagrant/util/downloader.rb +index eee9744e74f..a7daf9684b7 100644 +--- a/lib/vagrant/util/downloader.rb ++++ b/lib/vagrant/util/downloader.rb +@@ -21,7 +21,7 @@ class Downloader + # are properly tracked. + # + # Vagrant/1.7.4 (+https://www.vagrantup.com; ruby2.1.0) +- USER_AGENT = "Vagrant/#{VERSION} (+https://www.vagrantup.com; #{RUBY_ENGINE}#{RUBY_VERSION}) #{ENV['VAGRANT_USER_AGENT_PROVISIONAL_STRING']}".freeze ++ USER_AGENT = "Vagrant/#{VERSION} (+https://www.vagrantup.com; #{RUBY_ENGINE}#{RUBY_VERSION}) #{ENV['VAGRANT_USER_AGENT_PROVISIONAL_STRING']}".strip.freeze + + # Hosts that do not require notification on redirect + SILENCED_HOSTS = [ diff --git a/vagrant.spec b/vagrant.spec index dfa63c5..e161b31 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -7,7 +7,7 @@ Name: vagrant Version: 2.2.19 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Build and distribute virtualized development environments License: MIT URL: http://vagrantup.com @@ -31,6 +31,10 @@ Patch1: vagrant-2.2.9-do-not-load-dependencies.patch # Fix spec test suite for new rspec-mocks. # https://github.com/hashicorp/vagrant/pull/12699 Patch2: vagrant-2.2.19-fix-3.1-compatibility.patch +# Prevent trailing space character on user agent +# https://bugzilla.redhat.com/show_bug.cgi?id=2177215 +# https://github.com/hashicorp/vagrant/pull/12925/ +Patch6: vagrant-2.3.1-Fix-downloader-user-agent.patch # The load directive is supported since RPM 4.12, i.e. F21+. The build process # fails on older Fedoras. @@ -125,6 +129,7 @@ Documentation for %{name}. %patch0 -p1 %patch2 -p1 +%patch6 -p1 # TODO: package vagrant_cloud, as it is not in Fedora yet %gemspec_remove_dep -s %{name}.gemspec -g vagrant_cloud @@ -500,6 +505,9 @@ end %{vagrant_plugin_instdir}/vagrant-spec.config.example.rb %changelog +* Thu Mar 16 2023 Pavel Valena - 2.2.19-6 +- Handle URL properly + * Sat Jul 23 2022 Fedora Release Engineering - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild