Update to pg 1.3.0.

Resolves: rhbz#1814862
This commit is contained in:
Vít Ondruch 2022-01-31 14:53:58 +01:00
parent b81f114f62
commit 8bb5a0b258
5 changed files with 66 additions and 37 deletions

2
.gitignore vendored
View File

@ -14,3 +14,5 @@
/pg-1.2.1.gem
/pg-1.2.2.gem
/pg-1.2.3.gem
/pg-1.3.0-spec.tar.gz
/pg-1.3.0.gem

View File

@ -1,17 +0,0 @@
diff --git a/ext/extconf.rb b/ext/extconf.rb
--- a/ext/extconf.rb
+++ b/ext/extconf.rb
@@ -33,13 +33,6 @@
incdir = `"#{pgconfig}" --includedir`.chomp
libdir = `"#{pgconfig}" --libdir`.chomp
dir_config 'pg', incdir, libdir
-
- # Try to use runtime path linker option, even if RbConfig doesn't know about it.
- # The rpath option is usually set implicit by dir_config(), but so far not
- # on MacOS-X.
- if RbConfig::CONFIG["RPATHFLAG"].to_s.empty? && try_link('int main() {return 0;}', " -Wl,-rpath,#{libdir}")
- $LDFLAGS << " -Wl,-rpath,#{libdir}"
- end
else
$stderr.puts "No pg_config... trying anyway. If building fails, please try again with",
" --with-pg-config=/path/to/pg_config"

View File

@ -0,0 +1,17 @@
diff --git a/ext/extconf.rb b/ext/extconf.rb
--- a/ext/extconf.rb
+++ b/ext/extconf.rb
@@ -33,13 +33,6 @@
else
incdir, libdir = dir_config 'pg'
dlldir = libdir
- end
-
- # Try to use runtime path linker option, even if RbConfig doesn't know about it.
- # The rpath option is usually set implicit by dir_config(), but so far not
- # on MacOS-X.
- if dlldir && RbConfig::CONFIG["RPATHFLAG"].to_s.empty?
- append_ldflags "-Wl,-rpath,#{dlldir.quote}"
end
end

View File

@ -2,8 +2,8 @@
%global gem_name pg
Name: rubygem-%{gem_name}
Version: 1.2.3
Release: 7%{?dist}
Version: 1.3.0
Release: 1%{?dist}
Summary: A Ruby interface to the PostgreSQL RDBMS
# Upstream license clarification (https://bitbucket.org/ged/ruby-pg/issue/72/)
#
@ -13,11 +13,16 @@ Summary: A Ruby interface to the PostgreSQL RDBMS
License: (BSD or Ruby) and PostgreSQL
URL: https://github.com/ged/ruby-pg
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# git clone https://github.com/ged/ruby-pg.git && cd ruby-pg
# git archive -v -o pg-1.3.0-spec.tar.gz v1.3.0 spec/
Source1: %{gem_name}-%{version}-spec.tar.gz
# Disable RPATH.
# https://bitbucket.org/ged/ruby-pg/issue/183
Patch0: rubygem-pg-0.17.1-remove-rpath.patch
# Required in ext/pg_text_decoder.c
Patch0: rubygem-pg-1.3.0-remove-rpath.patch
# ext/pg_text_decoder.c
Requires: rubygem(bigdecimal)
# lib/pg/text_{de,en}coder.rb
Requires: rubygem(json)
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby-devel
@ -43,7 +48,7 @@ BuildArch: noarch
Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version}
%setup -q -n %{gem_name}-%{version} -b 1
%patch0 -p1
@ -66,18 +71,32 @@ cp -a .%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri}
# Prevent dangling symlink in -debuginfo (rhbz#878863).
rm -rf %{buildroot}%{gem_instdir}/ext/
# Remove useless shebangs.
sed -i -e '/^#!\/usr\/bin\/env/d' %{buildroot}%{gem_instdir}/Rakefile
sed -i -e '/^#!\/usr\/bin\/env/d' %{buildroot}%{gem_instdir}/Rakefile.cross
# Files under %%{gem_libdir} are not executable.
for file in `find %{buildroot}%{gem_libdir} -type f -name "*.rb"`; do
sed -i '/^#!\/usr\/bin\/env/ d' $file \
&& chmod -v 644 $file
done
%check
pushd .%{gem_instdir}
ln -s %{_builddir}/spec .
# Test failures with disabled netwrok.
# https://github.com/ged/ruby-pg/issues/421
sed -i -r 's|\\d\+\\\.\\d\+\\\.\\d\+\\\.\\d\+|(\0)?|' spec/pg/connection_spec.rb
%ifarch ppc64le
# This test case should be ignored in theory, but it is not in practice:
# https://bugs.ruby-lang.org/issues/18560
# https://github.com/ged/ruby-pg/issues/423
mv spec/pg/gc_compact_spec.rb{,.disable}
%endif
%ifarch armv7hl
# Disable flaky tests.
# https://github.com/ged/ruby-pg/issues/424
sed -i \
-e '/it "waits when sending query data" do/a\ skip' \
-e '/it "can send lots of data per put_copy_data" do/a\ skip' \
-e '/it "should convert strings and parameters to #prepare and #exec_prepared" do/a\ skip' \
spec/pg/scheduler_spec.rb
%endif
# Set --verbose to show detail log by $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.
@ -94,28 +113,35 @@ popd
%files
%dir %{gem_instdir}
%{gem_extdir_mri}
%exclude %{gem_instdir}/.gemtest
%exclude %{gem_instdir}/.*
%license %{gem_instdir}/BSDL
%license %{gem_instdir}/POSTGRES
%license %{gem_instdir}/LICENSE
%license %{gem_instdir}/POSTGRES
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/ChangeLog
%doc %{gem_instdir}/Contributors.rdoc
%{gem_instdir}/Gemfile
%doc %{gem_instdir}/History.rdoc
%doc %{gem_instdir}/Manifest.txt
%doc %{gem_instdir}/README-OS_X.rdoc
%doc %{gem_instdir}/README-Windows.rdoc
%doc %{gem_instdir}/README.ja.rdoc
%lang(ja) %doc %{gem_instdir}/README.ja.rdoc
%doc %{gem_instdir}/README.rdoc
%{gem_instdir}/Rakefile*
%{gem_instdir}/spec
%{gem_instdir}/certs
%{gem_instdir}/misc
%{gem_instdir}/pg.gemspec
%{gem_instdir}/sample
%changelog
* Fri Jan 28 2022 Vít Ondruch <vondruch@redhat.com> - 1.3.0-1
- Update to pg 1.3.0.
Resolves: rhbz#1814862
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

View File

@ -1 +1,2 @@
SHA512 (pg-1.2.3.gem) = dd8fa7b256102aea7588fd7e1d4e28199be2bf9910149d266b5379e78a7a57aa2a22763d04a559f4763842cad4ba8d0fbc33e8b43b7497dc77039edfd1029585
SHA512 (pg-1.3.0-spec.tar.gz) = 0a390dccf155c72760005e8cb45ea0fe66816c55eda4509b8c4bb7e6574878f5af237abd83153dd4d91665ceb98dc65617209c43382fbdb507e19ee5ad838a37
SHA512 (pg-1.3.0.gem) = ff3b72ee77c197014521da18843af69544c55361f1d77c37ff4633a64c9b782e3820f7e07744c5684603162bf2435b8b0334f7a5bec390d6120e008cc66a18ba