#1 Rebase to 0.22.1
Merged 6 years ago by pvalena. Opened 6 years ago by pvalena.
rpms/ pvalena/rubygem-sup rebase  into  master

file modified
+1 -2
@@ -1,2 +1,1 @@ 

- sup-0.10.2.gem

- /sup-0.21.0.gem

+ /sup-*.gem

file removed
-12
@@ -1,12 +0,0 @@ 

- diff -uNr sup-0.21.0/ext/mkrf_conf_xapian.rb sup-0.21.0p/ext/mkrf_conf_xapian.rb

- --- sup-0.21.0/ext/mkrf_conf_xapian.rb	2015-05-01 11:33:02.331805203 +0530

- +++ sup-0.21.0p/ext/mkrf_conf_xapian.rb	2015-05-01 11:40:07.496788064 +0530

- @@ -13,7 +13,7 @@

-  inst = Gem::DependencyInstaller.new

-  begin

-  

- -  if !RbConfig::CONFIG['arch'].include?('openbsd')

- +  if RbConfig::CONFIG['arch'].include?('openbsd')

-      # update version in Gemfile as well

-      name    = "xapian-ruby"

-      version = "~> 1.2.15"

@@ -15,10 +15,10 @@ 

  index 2aa6906..9d23409 100755

  --- a/bin/sup

  +++ b/bin/sup

- @@ -4,7 +4,13 @@

+ @@ -3,7 +3,13 @@

+  

   $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])

   

-  require 'rubygems'

  -require 'ncursesw'

  +no_ncursesw = false

  +begin
@@ -30,7 +30,7 @@ 

   

   require 'sup/util/ncurses'

   require 'sup/util/locale_fiddler'

- @@ -25,6 +31,10 @@ if ENV['SUP_PROFILE']

+ @@ -24,6 +30,10 @@ if ENV['SUP_PROFILE']

     RubyProf.start

   end

   
@@ -45,9 +45,7 @@ 

  index 947b3d5..c981a23 100644

  --- a/contrib/colorpicker.rb

  +++ b/contrib/colorpicker.rb

- @@ -1,6 +1,10 @@

-  require 'rubygems'

-  

+ @@ -1,4 +1,8 @@

  -require 'ncursesw'

  +begin

  +  require 'ncursesw'
@@ -89,7 +87,7 @@ 

   if defined? Ncurses

  --- a/lib/sup.rb

  +++ b/lib/sup.rb

- @@ -6,7 +6,11 @@

+ @@ -5,7 +5,11 @@

   require 'thread'

   require 'fileutils'

   require 'locale'

file modified
+32 -29
@@ -2,13 +2,11 @@ 

  

  Summary: A console-based email client written in ruby

  Name: rubygem-%{gem_name}

- Version: 0.21.0

- Release: 8%{?dist}

- Group: Applications/Internet

+ Version: 0.22.1

+ Release: 1%{?dist}

  License: GPLv2+

  URL: http://sup.rubyforge.org/

  Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem

- Patch0: mkrf_conf.patch

  # Revert dependency on ncursesw. The downside is incorrect wide character support.

  # TODO: Resurrect rubygem-ncursesw (rhbz#597709).

  # https://github.com/sup-heliotrope/sup/commit/c52016368e0456baf1ee97d25304b703da542cec
@@ -25,7 +23,6 @@ 

  BuildRequires: xapian-bindings-ruby

  BuildRequires: zlib-devel

  BuildRequires: rubygem-rake

- BuildRequires: gcc-c++

  

  BuildArch: noarch

  
@@ -33,7 +30,6 @@ 

  

  %package doc

  Summary: Documentation for %{name}

- Group: Documentation

  Requires:%{name} = %{version}-%{release}

  

  %description doc
@@ -55,29 +51,23 @@ 

  labels, automatically track recent contacts, and much more!  The goal of Sup

  is to become the email client of choice for nerds everywhere.

  

- 

  %prep

- gem unpack %{SOURCE0}

- %setup -q -D -T -n  %{gem_name}-%{version}

- gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec

- %patch0 -p1

+ %setup -q -n %{gem_name}-%{version}

  %patch1 -p1

  

- # Relax rubygem-mime-types dependency.

- sed -i '/mime-types/ s/~> 1.0/>= 1.0/' %{gem_name}.gemspec

+ # Remove unnecessary fake extension module

+ sed -i '/s.extensions =/ s/^/#/' ../%{gem_name}-%{version}.gemspec

  

  # Relax rubygem-chronic dependency.

- sed -i '/chronic/ s/0.9.1/0.9/' %{gem_name}.gemspec

+ sed -i '/chronic/ s/0.9.1/0.9/' ../%{gem_name}-%{version}.gemspec

+ 

+ # Remove dependency on xapian-full and ncursesw

+ sed -i '/xapian-full/ s/^/#/' ../%{gem_name}-%{version}.gemspec

+ sed -i '/ncursesw/ s/^/#/' ../%{gem_name}-%{version}.gemspec

  

  %build

- gem build %{gem_name}.gemspec

+ gem build ../%{gem_name}-%{version}.gemspec

  %gem_install

- rm %{_builddir}/%{gem_name}-%{version}%{gem_dir}/gems/%{gem_name}-%{version}/.gitignore

- rm %{_builddir}/%{gem_name}-%{version}%{gem_dir}/gems/%{gem_name}-%{version}/.travis.yml

- rm %{_builddir}/%{gem_name}-%{version}%{gem_dir}/gems/%{gem_name}-%{version}/.gitmodules

- rm -fr %{_builddir}/%{gem_name}-%{version}%{gem_dir}/gems/%{gem_name}-%{version}/test

- rm -fr %{_builddir}/%{gem_name}-%{version}%{gem_dir}/gems/%{gem_name}-%{version}/devel

- 

  

  %install

  mkdir -p %{buildroot}%{gem_dir}
@@ -85,13 +75,6 @@ 

  mv .%{gem_dir}/* %{buildroot}%{gem_dir}

  mv .%{_bindir}/* %{buildroot}%{_bindir}

  

- # Modifying gemspec to remove dependency on xapian-full and ncursesw

- 

- pushd %{buildroot}%{gem_dir}/specifications

- sed -i -e '/xapian-full/, 1d' %{gem_name}-%{version}.gemspec

- sed -i -e '/ncursesw/, 1d' %{gem_name}-%{version}.gemspec

- popd

- 

  %files

  %dir %{gem_instdir}

  %{_bindir}/sup
@@ -104,14 +87,34 @@ 

  %{_bindir}/sup-import-dump

  %{_bindir}/sup-psych-ify-config-files

  %{_bindir}/sup-sync-back-maildir

- %{gem_instdir}/*

+ %license %{gem_instdir}/LICENSE

  %exclude %{gem_cache}

+ %exclude %{gem_instdir}/.*

+ %exclude %{gem_instdir}/%{gem_name}.gemspec

+ %{gem_instdir}/bin

+ %{gem_instdir}/lib

  %{gem_spec}

  

  %files doc

  %doc %{gem_docdir}

+ %{gem_instdir}/CONTRIBUTORS

+ %{gem_instdir}/Gemfile

+ %{gem_instdir}/HACKING

+ %{gem_instdir}/History.txt

+ %{gem_instdir}/Rakefile

+ %{gem_instdir}/README.md

+ %{gem_instdir}/ReleaseNotes

+ %{gem_instdir}/test

+ %{gem_instdir}/devel

+ %{gem_instdir}/contrib

+ %{gem_instdir}/doc

+ %{gem_instdir}/man

+ %{gem_instdir}/ext

  

  %changelog

+ * Mon Mar 26 2018 Pavel Valena <pvalena@redhat.com> - 0.22.1-1

+ - Update to sup 0.22.1.

+ 

  * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.0-8

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- b2ced90b9ec1e74c74950356a27cce19  sup-0.21.0.gem

+ SHA512 (sup-0.22.1.gem) = 26698917c7f6057462109e8bd2b1dcf02c588130ae1a02beb2556eb6d72a4ceaa7a1e636090369993f881bc4ed46fcaf74215abac5c081ecc993c8494c1d33b8

Anyone interested in testing this?

Your commit seems to have added an empty sup-0.22.1.gem file which is not wanted.

Apart from that, I built this for my F26 box and it works fine.

On startup it prints this:

Ignoring sup-0.22.1 because its extensions are not built.  Try: gem pristine sup --version 0.22.1

although it does work fine in spite of that error. Most likely it is because of some marker file which you are now excluding from the %files list, I remember a similar thing with gem.build_complete in rubygem-unicode a while back.

There are also some warnings about Fixnum deprecation:

/usr/share/gems/gems/sup-0.22.1/lib/sup/util.rb:474: warning: constant ::Fixnum is deprecated

I had fixed them in my local version of sup, I've filed a PR just now: https://github.com/sup-heliotrope/sup/pull/544 although upstream is long dead. These warnings are not fatal yet anyway.

If I touch /usr/lib64/gems/ruby/sup-0.22.1/gem.build_complete it makes the message about "Ignoring sup-0.22.1 because its extensions are not built" go away. But it doesn't make much sense. I can see that the gem build process does not itself create this file, because it's a pure Ruby gem, there are no compiled bits. So it (correctly) installs to /usr/share/gems and not /usr/lib64/gems.

I don't know why Ruby thinks sup should have a compiled extension...

Okay, it seems to be because of the weird ext/mkrf_conf_xapian.rb thing which is itself a bit of a hack. I don't think we need that in the Fedora package since we can just require the xapian ruby bindings as a normal package instead.

I see there is already mkrf_conf.patch being applied here but that is just flipping the conditional in the fake extension. It seems to have been written with a misunderstanding of what the extension is for. Better to just get rid of entirely I think, like this:

diff --git a/mkrf_conf.patch b/mkrf_conf.patch
deleted file mode 100644
index 86d9cc3..0000000
diff --git a/rubygem-sup.spec b/rubygem-sup.spec
index 43b4a65..eccc921 100644
--- a/rubygem-sup.spec
+++ b/rubygem-sup.spec
@@ -7,7 +7,6 @@ Release: 1%{?dist}
 License: GPLv2+
 URL: http://sup.rubyforge.org/
 Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
-Patch0: mkrf_conf.patch
 # Revert dependency on ncursesw. The downside is incorrect wide character support.
 # TODO: Resurrect rubygem-ncursesw (rhbz#597709).
 # https://github.com/sup-heliotrope/sup/commit/c52016368e0456baf1ee97d25304b703da542cec
@@ -57,9 +56,11 @@ is to become the email client of choice for nerds everywhere.
 gem unpack %{SOURCE0}
 %setup -q -D -T -n  %{gem_name}-%{version}
 gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
-%patch0 -p1
 %patch1 -p1

+# Remove unnecessary fake extension module
+sed -i '/s.extensions =/d' %{gem_name}.gemspec
+
 # Relax rubygem-chronic dependency.
 sed -i '/chronic/ s/0.9.1/0.9/' %{gem_name}.gemspec

This silences the complaint about the extension not being built.

Thanks for testing this!
I'll make the changes as suggested. Yes, as those Fixnum deprecations are just warnings, so let's hope the PR'll be merged (I won't apply a patch for that).

rebased onto af19c6f

6 years ago

This PR is still adding an empty sup-0.22.1.gem file in git, what's up with that?

Apart from that, seems fine to me.

Yes, sorry I forgot to comment on that.

When one does merge this PR, then the sources file is already included it's possible to build the package without adding another commit (you just have to upload the file with the same checksum).

I've simply generated the file (manually, without uploading the .gem). This avoids irreversibly uploading the file into dist-git in case the PR wouldn't be merged (or f.e. new version would be released).

rebased onto 93150e8

6 years ago

Correction: I've removed the empty .gem file.

Pull-Request has been merged by pvalena

6 years ago