Compare commits
No commits in common. "c8-stream-2.7" and "c8-beta-stream-2.5" have entirely different histories.
c8-stream-
...
c8-beta-st
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/pg-1.2.3.gem
|
SOURCES/pg-1.0.0.gem
|
||||||
|
@ -1 +1 @@
|
|||||||
8d6059a2769035768d7b9f2ac60e12eb3093b6fe SOURCES/pg-1.2.3.gem
|
ef2bbde400a47744aea9b32948331d0ad318c3d2 SOURCES/pg-1.0.0.gem
|
||||||
|
32
SOURCES/rubygem-pg-1.1.3-Fix-specs-for-PostgreSQL-11.patch
Normal file
32
SOURCES/rubygem-pg-1.1.3-Fix-specs-for-PostgreSQL-11.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User Lars Kanis <lars@greiz-reinsdorf.de>
|
||||||
|
# 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
|
||||||
|
|
@ -0,0 +1,40 @@
|
|||||||
|
diff --git a/spec/helpers.rb b/spec/helpers.rb
|
||||||
|
index 4362750..9b064ea 100755
|
||||||
|
--- a/spec/helpers.rb
|
||||||
|
+++ b/spec/helpers.rb
|
||||||
|
@@ -199,8 +199,8 @@ module PG::TestingHelpers
|
||||||
|
@test_pgdata = TEST_DIRECTORY + 'data'
|
||||||
|
@test_pgdata.mkpath
|
||||||
|
|
||||||
|
- @port = 54321
|
||||||
|
- ENV['PGPORT'] = @port.to_s
|
||||||
|
+ ENV['PGPORT'] ||= "54321"
|
||||||
|
+ @port = ENV['PGPORT'].to_i
|
||||||
|
ENV['PGHOST'] = 'localhost'
|
||||||
|
@conninfo = "host=localhost port=#{@port} dbname=test"
|
||||||
|
|
||||||
|
diff --git a/spec/pg/connection_spec.rb b/spec/pg/connection_spec.rb
|
||||||
|
index a1d7e42..1f6cd8d 100755
|
||||||
|
--- a/spec/pg/connection_spec.rb
|
||||||
|
+++ b/spec/pg/connection_spec.rb
|
||||||
|
@@ -241,7 +241,7 @@ describe PG::Connection do
|
||||||
|
expect( @conn.db ).to eq( "test" )
|
||||||
|
expect( @conn.user ).to be_a_kind_of( String )
|
||||||
|
expect( @conn.pass ).to eq( "" )
|
||||||
|
- expect( @conn.port ).to eq( 54321 )
|
||||||
|
+ expect( @conn.port ).to eq( @port )
|
||||||
|
expect( @conn.tty ).to eq( "" )
|
||||||
|
expect( @conn.options ).to eq( "" )
|
||||||
|
end
|
||||||
|
@@ -741,7 +741,7 @@ describe PG::Connection do
|
||||||
|
it "can return the default connection options as a Hash" do
|
||||||
|
expect( described_class.conndefaults_hash ).to be_a( Hash )
|
||||||
|
expect( described_class.conndefaults_hash ).to include( :user, :password, :dbname, :host, :port )
|
||||||
|
- expect( ['5432', '54321'] ).to include( described_class.conndefaults_hash[:port] )
|
||||||
|
+ expect( ['5432', '54321', @port.to_s] ).to include( described_class.conndefaults_hash[:port] )
|
||||||
|
expect( @conn.conndefaults_hash ).to eq( described_class.conndefaults_hash )
|
||||||
|
end
|
||||||
|
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
@ -2,8 +2,8 @@
|
|||||||
%global gem_name pg
|
%global gem_name pg
|
||||||
|
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 1.2.3
|
Version: 1.0.0
|
||||||
Release: 1%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: A Ruby interface to the PostgreSQL RDBMS
|
Summary: A Ruby interface to the PostgreSQL RDBMS
|
||||||
# Upstream license clarification (https://bitbucket.org/ged/ruby-pg/issue/72/)
|
# Upstream license clarification (https://bitbucket.org/ged/ruby-pg/issue/72/)
|
||||||
#
|
#
|
||||||
@ -11,13 +11,17 @@ Summary: A Ruby interface to the PostgreSQL RDBMS
|
|||||||
# the BSD 3-Clause license; the contents of the BSD file are incorrect.
|
# the BSD 3-Clause license; the contents of the BSD file are incorrect.
|
||||||
#
|
#
|
||||||
License: (BSD or Ruby) and PostgreSQL
|
License: (BSD or Ruby) and PostgreSQL
|
||||||
URL: https://github.com/ged/ruby-pg
|
URL: https://bitbucket.org/ged/ruby-pg
|
||||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
# Disable RPATH.
|
# Disable RPATH.
|
||||||
# https://bitbucket.org/ged/ruby-pg/issue/183
|
# https://bitbucket.org/ged/ruby-pg/issue/183
|
||||||
Patch0: rubygem-pg-0.17.1-remove-rpath.patch
|
Patch0: rubygem-pg-0.17.1-remove-rpath.patch
|
||||||
# Required in ext/pg_text_decoder.c
|
# Add feature to set testing port.
|
||||||
Requires: rubygem(bigdecimal)
|
# 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: ruby(release)
|
||||||
BuildRequires: rubygems-devel
|
BuildRequires: rubygems-devel
|
||||||
BuildRequires: ruby-devel
|
BuildRequires: ruby-devel
|
||||||
@ -25,8 +29,7 @@ BuildRequires: ruby-devel
|
|||||||
# https://fedoraproject.org/wiki/Packaging:C_and_C++#BuildRequires_and_Requires
|
# https://fedoraproject.org/wiki/Packaging:C_and_C++#BuildRequires_and_Requires
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
|
||||||
BuildRequires: postgresql-server libpq-devel
|
BuildRequires: postgresql-server postgresql-devel
|
||||||
BuildRequires: rubygem(bigdecimal)
|
|
||||||
BuildRequires: rubygem(rspec)
|
BuildRequires: rubygem(rspec)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -43,9 +46,11 @@ BuildArch: noarch
|
|||||||
Documentation for %{name}.
|
Documentation for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{gem_name}-%{version}
|
%setup -q -n %{gem_name}-%{version}
|
||||||
|
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Create the gem as gem install only works on a gem file
|
# Create the gem as gem install only works on a gem file
|
||||||
@ -76,19 +81,23 @@ for file in `find %{buildroot}%{gem_libdir} -type f -name "*.rb"`; do
|
|||||||
&& chmod -v 644 $file
|
&& chmod -v 644 $file
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Fix spec shebangs.
|
||||||
|
# https://bitbucket.org/ged/ruby-pg/issues/269/
|
||||||
|
for file in `find %{buildroot}%{gem_instdir}/spec -type f -name "*.rb"`; do
|
||||||
|
if [ ! -z "`head -n 1 $file | grep \"^#!/\"`" ]; then
|
||||||
|
sed -i '/^#!\/usr\/bin\/env/ d' $file
|
||||||
|
chmod -v 644 $file
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
%check
|
%check
|
||||||
pushd .%{gem_instdir}
|
pushd .%{gem_instdir}
|
||||||
# Set --verbose to show detail log by $VERBOSE.
|
# Set --verbose to show detail log by $VERBOSE.
|
||||||
# See https://github.com/ged/ruby-pg/blob/master/spec/helpers.rb $VERBOSE
|
# See https://github.com/ged/ruby-pg/blob/master/spec/helpers.rb $VERBOSE
|
||||||
# Assign a random port to consider a case of multi builds in parallel in a host.
|
# Assign a random port to consider a case of multi builds in parallel in a host.
|
||||||
# https://github.com/ged/ruby-pg/pull/39
|
# https://github.com/ged/ruby-pg/pull/39
|
||||||
if ! PGPORT="$((54321 + ${RANDOM} % 1000))" ruby -S --verbose \
|
PGPORT="$((54321 + ${RANDOM} % 1000))" ruby -S --verbose \
|
||||||
rspec -I$(dirs +1)%{gem_extdir_mri} -f d spec; then
|
rspec -I$(dirs +1)%{gem_extdir_mri} -f d spec
|
||||||
echo "==== [setup.log start ] ===="
|
|
||||||
cat tmp_test_specs/setup.log
|
|
||||||
echo "==== [setup.log end ] ===="
|
|
||||||
false
|
|
||||||
fi
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -116,15 +125,8 @@ popd
|
|||||||
%{gem_instdir}/spec
|
%{gem_instdir}/spec
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri May 29 2020 Jun Aruga <jaruga@redhat.com> - 1.2.3-1
|
* Tue Jun 13 2023 Jarek Prokop <jprokop@redhat.com> - 1.0.0-3
|
||||||
- Update to pg 1.2.3 by merging Fedora master branch (commit: 5db4d26)
|
- Fix FTBFS with PostgreSQL 10.6 and above.
|
||||||
Resolves: rhbz#1817135
|
|
||||||
|
|
||||||
* Wed Jun 12 2019 Jun Aruga <jaruga@redhat.com> - 1.1.4-1
|
|
||||||
- Update to pg 1.1.4 by merging Fedora master branch (commit: 397796e)
|
|
||||||
* BuildRequires: s/postgresql-devel/libpq-devel/
|
|
||||||
* Add marking lines at the start and end of the setup.log
|
|
||||||
Resolves: rhbz#1672575
|
|
||||||
|
|
||||||
* Thu May 23 2019 Jun Aruga <jaruga@redhat.com> - 1.0.0-2
|
* Thu May 23 2019 Jun Aruga <jaruga@redhat.com> - 1.0.0-2
|
||||||
- Assign a random testing port.
|
- Assign a random testing port.
|
||||||
|
Loading…
Reference in New Issue
Block a user