Compare commits

..

2 commits

Author SHA1 Message Date
Vít Ondruch
21a0726cb1 Add dependency on RubyGems to fix possible SEGFAULT (rhbz#858135). 2013-04-10 12:17:00 +02:00
Vít Ondruch
e9a6decd37 Merge branch 'master' into f18 2012-08-22 07:40:10 +02:00
6 changed files with 51 additions and 361 deletions

11
.gitignore vendored
View file

@ -1,12 +1 @@
/command-t-1.4.tar.gz
/command-t-1.5.tar.gz
/command-t-1.6.tar.gz
/command-t-1.8.tar.gz
/command-t-1.10.tar.gz
/command-t-1.13.tar.gz
/command-t-2.0.zip
/command-t-3.0.2.zip
/command-t-4.0.tar.gz
/command-t-5.0.2.tar.gz
/command-t-5.0.3.tar.gz
/command-t-5.0.5.tar.gz

View file

@ -1 +1 @@
SHA512 (command-t-5.0.5.tar.gz) = 300ecdc821c8554c3fd47940f28629644192bf5bb4e7c89a65021e271e526b7738a2eb54f5845af74c7879256ff69409f665dc158db502a2943ec4d36618a9d7
d98188718066276cc26ec4ea5002c076 command-t-1.4.tar.gz

View file

@ -1,43 +0,0 @@
From 4f1aefbeca21b6b3eb74252b70e8608dd20bc36a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 3 May 2016 07:45:56 +0200
Subject: [PATCH] Check RUBY_LIB_VERSION instead of RUBY_VERSION.
---
autoload/commandt.vim | 3 +--
ruby/command-t/ext/command-t/extconf.rb | 5 +----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/autoload/commandt.vim b/autoload/commandt.vim
index 7513f55..1299731 100644
--- a/autoload/commandt.vim
+++ b/autoload/commandt.vim
@@ -200,8 +200,7 @@ ruby << EOF
# compiled with.
patchlevel = defined?(RUBY_PATCHLEVEL) ? RUBY_PATCHLEVEL : nil
if CommandT::Metadata::UNKNOWN == true || (
- CommandT::Metadata::EXPECTED_RUBY_VERSION == RUBY_VERSION &&
- CommandT::Metadata::EXPECTED_RUBY_PATCHLEVEL == patchlevel
+ CommandT::Metadata::EXPECTED_RUBY_LIB_VERSION == RbConfig::CONFIG['RUBY_LIB_VERSION']
)
require 'command-t/ext' # eager load, to catch compilation problems early
$command_t = CommandT::Controller.new
diff --git a/ruby/command-t/ext/command-t/extconf.rb b/ruby/command-t/ext/command-t/extconf.rb
index 8603dad..643fa6a 100644
--- a/ruby/command-t/ext/command-t/extconf.rb
+++ b/ruby/command-t/ext/command-t/extconf.rb
@@ -55,10 +55,7 @@ basedir = Pathname.new(__FILE__).dirname
# This file was generated by #{(basedir + 'extconf.rb').to_s}
module CommandT
module Metadata
- EXPECTED_RUBY_VERSION = #{RUBY_VERSION.inspect}
- EXPECTED_RUBY_PATCHLEVEL = #{
- defined?(RUBY_PATCHLEVEL) ? RUBY_PATCHLEVEL.inspect : nil.inspect
- }
+ EXPECTED_RUBY_LIB_VERSION = #{RbConfig::MAKEFILE_CONFIG['RUBY_LIB_VERSION'].inspect}
UNKNOWN = false
end
end
--
2.8.2

View file

@ -1,47 +0,0 @@
From 5147a93a4b6cdb60cfa0ed1b792de711f44cd7b4 Mon Sep 17 00:00:00 2001
From: Greg Hurrell <greg@hurrell.net>
Date: Fri, 26 Aug 2022 23:59:38 +0200
Subject: [PATCH] test: avoid another deprecation warning
spec/command-t/watchman/utils_spec.rb:17: warning: constant
::Fixnum is deprecated
According to:
https://bugs.ruby-lang.org/issues/12005
> CRuby has two Integer classes, Fixnum and Bignum.
> But it is implementation detail.
> They should be seen as a single class Integer
Unification happened in Ruby 2.4.0, which is approximately $zillion
years ago (well, 25 Dec 2016):
https://www.ruby-lang.org/en/news/2016/12/25/ruby-2-4-0-released/
I doubt anybody running these tests is on such an old version at this
point, so it seems safe to switch to `Integer`.
Removed the comments because I am not certain whether we're going to hit
that first `if` branch's body any more, and I'd rather have no comments
than something inaccurate or misleading.
---
spec/command-t/watchman/utils_spec.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/spec/command-t/watchman/utils_spec.rb b/spec/command-t/watchman/utils_spec.rb
index 271589b6..6bfd0d0d 100644
--- a/spec/command-t/watchman/utils_spec.rb
+++ b/spec/command-t/watchman/utils_spec.rb
@@ -14,9 +14,9 @@ def binary(str)
def little_endian?
byte = [0xff00].pack('s')[0]
- if byte.is_a?(Fixnum) # ie. Ruby 1.8
+ if byte.is_a?(Integer)
byte.zero?
- elsif byte.is_a?(String) # ie. Ruby >= 1.9
+ elsif byte.is_a?(String)
byte == "\x00"
else
raise 'unable to determine endianness'

View file

@ -1,22 +0,0 @@
From 654b440fdfd5eaf52fac6882035f3b53ab48a39f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Mon, 14 Oct 2024 15:20:53 +0200
Subject: [PATCH] Use SPDX identifier in AppStream metadata
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-metadata_license
---
appstream/vim-command-t.metainfo.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/appstream/vim-command-t.metainfo.xml b/appstream/vim-command-t.metainfo.xml
index 53807879..78d08bdd 100644
--- a/appstream/vim-command-t.metainfo.xml
+++ b/appstream/vim-command-t.metainfo.xml
@@ -7,6 +7,6 @@
<summary>Provides an extremely fast, intuitive mechanism for opening files with a minimal number of keystrokes</summary>
<url type="homepage">https://github.com/wincent/command-t</url>
<metadata_license>CC0-1.0</metadata_license>
-<project_license>BSD</project_license>
+<project_license>BSD-2-Clause</project_license>
<updatecontact>v.ondruch@gmail.com</updatecontact>
</component>

View file

@ -1,22 +1,23 @@
# There is no better way how to obtain the vimfiles folder location :/
# https://bugzilla.redhat.com/show_bug.cgi?id=844975
%global vimfiles %{_datadir}/vim/vimfiles
%global rubyabi 1.9.1
%global commandt_so_dir %{ruby_vendorarchdir}/command-t
Name: vim-command-t
Version: 5.0.5
Release: 8%{?dist}
Version: 1.4
Release: 4%{?dist}
Summary: An extremely fast, intuitive mechanism for opening files in VIM
License: BSD-2-Clause
URL: https://github.com/wincent/command-t
Source0: https://github.com/wincent/command-t/archive/%{version}/command-t-%{version}.tar.gz
# Relax the Command-T version checking.
# https://github.com/wincent/command-t/issues/192
Patch0: vim-3.0.2-Check-RUBY_LIB_VERSION-instead-of-RUBY_VERSION.patch
# Use SPDX identifier in the AppStream data.
# https://github.com/wincent/command-t/pull/427
Patch1: vim-command-t-5.0.5-Use-SPDX-identifier-in-AppStream-metadata.patch
# https://github.com/wincent/command-t/commit/5147a93a4b6cdb60cfa0ed1b792de711f44cd7b4
# Ruby3.2 finally removes Fixnum
Patch3: vim-command-t-5.0.3-ruby32-Fixnum-removal.patch
Requires: ruby(release)
Group: Applications/Editors
License: BSD
URL: https://wincent.com/products/command-t
# Officialy distributed only using vimball:
# https://wincent.com/issues/1978
# git clone git://git.wincent.com/command-t.git && cd command-t/
# git archive 1.4 -o command-t-1.4.tar.gz
Source0: command-t-%{version}.tar.gz
Requires: ruby(abi) = %{rubyabi}
# Although command-t does not depend on rubygems directly, the RubyGems are
# required by Ruby, but not always (rhbz#845011). So it is necessary to enforce
# the RubyGems dependency, to fix possile SEGFAULT (rhbz#858135). There is
@ -24,16 +25,12 @@ Requires: ruby(release)
# support some conditional requires.
Requires: ruby(rubygems)
Requires: vim-common
BuildRequires: make
BuildRequires: ruby(release)
BuildRequires: ruby(abi) = %{rubyabi}
BuildRequires: ruby-devel
BuildRequires: rubygems
BuildRequires: rubygem(ostruct)
BuildRequires: rubygem(rspec) >= 3
BuildRequires: gcc
# Defines %%vimfiles_root
BuildRequires: vim-filesystem
BuildRequires: %{_bindir}/appstream-util
BuildRequires: %{_bindir}/rspec
BuildRequires: rubygem(rr)
Requires(post): %{_bindir}/vim
Requires(postun): %{_bindir}/vim
%description
The Command-T plug-in for VIM provides an extremely fast, intuitive mechanism
@ -47,14 +44,10 @@ locations (for example, immediately after a path separator) should be given
more weight.
%prep
%setup -q -n command-t-%{version}
%patch 0 -p1
%patch 1 -p1
%patch 3 -p1
%setup -q -c
%build
pushd ./ruby/command-t/ext/command-t
pushd ./ruby/command-t
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
ruby extconf.rb --vendor
@ -64,232 +57,52 @@ popd
%install
mkdir -p %{buildroot}%{vimfiles_root}
cp -par {autoload,doc,plugin,ruby} %{buildroot}%{vimfiles_root}
mkdir -p %{buildroot}%{vimfiles}
cp -par {doc,plugin,ruby} %{buildroot}%{vimfiles}
mkdir -p %{buildroot}%{commandt_so_dir}
chmod 0755 %{buildroot}%{vimfiles_root}/ruby/command-t/ext/command-t/ext.so
mv %{buildroot}%{vimfiles_root}/ruby/command-t/ext/command-t/ext.so %{buildroot}%{commandt_so_dir}
chmod 0755 %{buildroot}%{vimfiles}/ruby/command-t/ext.so
mv %{buildroot}%{vimfiles}/ruby/command-t/ext.so %{buildroot}%{commandt_so_dir}
# Remove all dot files.
find %{buildroot}%{vimfiles_root} -name '.*' -delete
find %{buildroot}%{vimfiles} -name '.*' -delete
# Install AppData.
mkdir -p %{buildroot}%{_metainfodir}
install -m 644 appstream/vim-command-t.metainfo.xml %{buildroot}%{_metainfodir}
# GVim ID in Fedora was changed by:
# https://src.fedoraproject.org/rpms/vim/pull-request/25
# therefore extend also the new ID.
# TODO: Submit this upstream if it proves to work.
sed -i '/<\/extends>/a <extends>org.vim.Vim</extends>' %{buildroot}%{_metainfodir}/vim-command-t.metainfo.xml
# Replace symlink with copy.
rm README.txt
cp -pa doc/command-t.txt README.txt
%check
# Get rid of Bundler
sed -i '/Bundler/,/^end$/ s/^/#/' spec/spec_helper.rb
sed -i '24,+5d' spec/spec_helper.rb
rspec -Iruby spec
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml
%post
vim -c ":helptags %{vimfiles}/doc" -c :q &> /dev/null
%postun
> %{vimfiles}/doc/tags
vim -c ":helptags %{vimfiles}/doc" -c :q &> /dev/null
%files
%license LICENSE
%doc README.md
%doc LICENSE
%doc README.txt
%{commandt_so_dir}
%{vimfiles_root}/autoload/*
%{vimfiles_root}/doc/*
%{vimfiles_root}/plugin/*
%exclude %{vimfiles_root}/ruby/command-t/ext/command-t/ext*
%exclude %{vimfiles_root}/ruby/command-t/ext/command-t/*.o
%exclude %{vimfiles_root}/ruby/command-t/ext/command-t/*.h
%exclude %{vimfiles_root}/ruby/command-t/ext/command-t/*.c
%exclude %{vimfiles_root}/ruby/command-t/ext/command-t/Makefile
%exclude %{vimfiles_root}/ruby/command-t/ext/command-t/mkmf.log
%exclude %{vimfiles_root}/ruby/command-t/ext/command-t/depend
%{vimfiles_root}/ruby
%{_metainfodir}/vim-command-t.metainfo.xml
%{vimfiles}/doc/*
%{vimfiles}/plugin/*
%exclude %{vimfiles}/ruby/command-t/ext*
%exclude %{vimfiles}/ruby/command-t/*.o
%exclude %{vimfiles}/ruby/command-t/*.h
%exclude %{vimfiles}/ruby/command-t/*.c
%exclude %{vimfiles}/ruby/command-t/Makefile
%exclude %{vimfiles}/ruby/command-t/mkmf.log
%exclude %{vimfiles}/ruby/command-t/depend
%{vimfiles}/ruby/*
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.5-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Thu Jan 08 2026 Mamoru TASAKA <mtasaka@fedoraproject.org> - 5.0.5-6
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0
* Mon Nov 17 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 5.0.5-5
- Add BR: rubygem(ostruct) for ruby4_0
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Tue Jan 07 2025 Vít Ondruch <vondruch@redhat.com> - 5.0.5-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.4
* Tue Oct 01 2024 Vít Ondruch <vondruch@redhat.com> - 5.0.5-1
- Update to Command-T 5.0.5.
Resolves: rhbz#2091276
* Wed Sep 04 2024 Miroslav Suchý <msuchy@redhat.com> - 5.0.3-13
- convert license to SPDX
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jan 03 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 5.0.3-10
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Jan 03 2023 Vít Ondruch <vondruch@redhat.com> - 5.0.3-7
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.2
* Wed Nov 23 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 5.0.3-6
- Patch from upstream for ruby3.2 Fixnum removal
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jan 26 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 5.0.3-4
- F-36: rebuild against ruby31
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Mar 04 2021 Vít Ondruch <vondruch@redhat.com> - 5.0.3-1
- Update to Command-T 5.0.3.
Resolves: rhbz#1631111
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.2-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jan 06 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 5.0.2-12
- F-34: rebuild against ruby 3.0
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jan 17 2020 Vít Ondruch <vondruch@redhat.com> - 5.0.2-9
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.7
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Jan 21 2019 Mamoru TASAKA <mtasaka@fedoraproject.org> - 5.0.2-6
- F-30: rebuild against ruby26
* Fri Jul 27 2018 Vít Ondruch <vondruch@redhat.com> - 5.0.2-5
- Add "BR: gcc" to fix FTBFS (rhbz#1606647).
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 5.0.2-3
- Rebuilt for switch to libxcrypt
* Fri Jan 05 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 5.0.2-2
- F-28: rebuild for ruby25
* Tue Sep 26 2017 Vít Ondruch <vondruch@redhat.com> - 5.0.2-1
- Update to Command-T 5.0.2.
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Jan 13 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 4.0-2
- F-26: rebuild for ruby24
* Tue Jun 07 2016 Vít Ondruch <vondruch@redhat.com> - 4.0-1
- Update to Command-T 4.0.
* Tue May 03 2016 Vít Ondruch <vondruch@redhat.com> - 3.0.2-1
- Update to Command-T 3.0.2.
- Relax version check.
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jan 08 2016 Vít Ondruch <vondruch@redhat.com> - 2.0-1
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.3
- Update to Command-T 2.0.
* Wed Sep 30 2015 Vít Ondruch <vondruch@redhat.com> - 1.13-1
- Update to Command-T 1.13.
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Jan 18 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.10-6
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_2.2
- Fix for rspec 3
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Fri Aug 15 2014 Vít Ondruch <vondruch@redhat.com> - 1.10-3
- Fix BE arch issues.
* Mon Aug 11 2014 Vít Ondruch <vondruch@redhat.com> - 1.10-2
- Add missing autoload directory.
* Mon Aug 11 2014 Vít Ondruch <vondruch@redhat.com> - 1.10-1
- Update to Command-T 1.10.
- Add Gnome Software plug-in AppData (rhbz#1110300).
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue Apr 29 2014 Vít Ondruch <vondruch@redhat.com> - 1.8-1
- Update to Command-T 1.8.
* Thu Dec 19 2013 Vít Ondruch <vondruch@redhat.com> - 1.6-1
- Update to command-t 1.6.
* Mon Sep 23 2013 Vít Ondruch <vondruch@redhat.com> - 1.5-1
- Update to command-t 1.5.
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Apr 10 2013 Vít Ondruch <vondruch@redhat.com> - 1.4-4
- Add dependency on RubyGems to fix possible SEGFAULT (rhbz#858135).
* Wed Feb 27 2013 Vít Ondruch <vondruch@redhat.com> - 1.4-3
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Fri Aug 03 2012 Vít Ondruch <vondruch@redhat.com> - 1.4-1
- Initial package.