From 4e43b595c45f39586664801569c472f3ad8bec58 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Mon, 18 Dec 2023 23:00:20 +0300 Subject: [PATCH] import rubygem-pg-1.0.0-3.module+el8.9.0+19193+435404ae --- ...pg-1.1.3-Fix-specs-for-PostgreSQL-11.patch | 32 +++++++++++++++++++ SPECS/rubygem-pg.spec | 11 +++++-- 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 SOURCES/rubygem-pg-1.1.3-Fix-specs-for-PostgreSQL-11.patch diff --git a/SOURCES/rubygem-pg-1.1.3-Fix-specs-for-PostgreSQL-11.patch b/SOURCES/rubygem-pg-1.1.3-Fix-specs-for-PostgreSQL-11.patch new file mode 100644 index 0000000..6287947 --- /dev/null +++ b/SOURCES/rubygem-pg-1.1.3-Fix-specs-for-PostgreSQL-11.patch @@ -0,0 +1,32 @@ +# HG changeset patch +# User Lars Kanis +# Date 1545850926 -3600 +# Node ID 74879444e437d42028a636425a4482467a65a711 +# Parent 626befee1debcc59472051e64f9ff067522fc3e1 +Fix specs for PostgreSQL-11 + +PG-11 changed the way how/when parameters are interpret. + +Fixes 287: https://bitbucket.org/ged/ruby-pg/issues/287/pg-connection-server-ping-returns-correct + +diff --git a/spec/pg/connection_spec.rb b/spec/pg/connection_spec.rb +--- a/spec/pg/connection_spec.rb ++++ b/spec/pg/connection_spec.rb +@@ -1099,8 +1099,16 @@ + expect( ping ).to eq( PG::PQPING_NO_RESPONSE ) + end + ++ it "returns error when ping connection arguments are wrong" do ++ ping = described_class.ping('localhost', 'localhost', nil, nil, :test, nil, nil) ++ expect( ping ).to_not eq( PG::PQPING_OK ) ++ end ++ + it "returns correct response when ping connection arguments are wrong" do +- ping = described_class.ping('localhost', 'localhost', nil, nil, :test, nil, nil) ++ ping = described_class.ping( ++ :host => 'localhost', ++ :invalid_option => 9999, ++ :dbname => :test) + expect( ping ).to eq( PG::PQPING_NO_ATTEMPT ) + end + diff --git a/SPECS/rubygem-pg.spec b/SPECS/rubygem-pg.spec index beea041..ca20877 100644 --- a/SPECS/rubygem-pg.spec +++ b/SPECS/rubygem-pg.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 1.0.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A Ruby interface to the PostgreSQL RDBMS # Upstream license clarification (https://bitbucket.org/ged/ruby-pg/issue/72/) # @@ -19,6 +19,9 @@ Patch0: rubygem-pg-0.17.1-remove-rpath.patch # Add feature to set testing port. # https://github.com/ged/ruby-pg/commit/104ec67 Patch1: rubygem-pg-1.1.4-add-feature-to-set-testing-port.patch +# Fix compatibility with PG 10.6 and above. +# https://github.com/ged/ruby-pg/issues/287 +Patch2: rubygem-pg-1.1.3-Fix-specs-for-PostgreSQL-11.patch BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby-devel @@ -47,6 +50,7 @@ Documentation for %{name}. %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build # Create the gem as gem install only works on a gem file @@ -121,9 +125,12 @@ popd %{gem_instdir}/spec %changelog -* Tue Dec 12 2023 MSVSphere Packaging Team - 1.0.0-2 +* Tue Dec 12 2023 MSVSphere Packaging Team - 1.0.0-3 - Rebuilt for MSVSphere 8.8 +* Tue Jun 13 2023 Jarek Prokop - 1.0.0-3 +- Fix FTBFS with PostgreSQL 10.6 and above. + * Thu May 23 2019 Jun Aruga - 1.0.0-2 - Assign a random testing port.