Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-mini_portile2 for
openSUSE:Factory checked in at 2021-06-05 23:30:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-mini_portile2 (Old)
and /work/SRC/openSUSE:Factory/.rubygem-mini_portile2.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-mini_portile2"
Sat Jun 5 23:30:38 2021 rev:8 rq:896524 version:2.6.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/rubygem-mini_portile2/rubygem-mini_portile2.changes
2021-05-18 18:26:59.566819296 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-mini_portile2.new.1898/rubygem-mini_portile2.changes
2021-06-05 23:31:03.280388156 +0200
@@ -1,0 +2,11 @@
+Tue Jun 1 03:47:32 UTC 2021 - Manuel Schnitzer <[email protected]>
+
+- updated to version 2.6.1
+
+ #### Dependencies
+
+ Make `net-ftp` an optional dependency, since requiring it as a hard
dependency in v2.5.2 caused warnings
+ to be emitted by Ruby 2.7 and earlier. A warning message is emitted if FTP
functionality is called and
+ `net-ftp` isn't available; this should only happen in Ruby 3.1 and later.
+
+-------------------------------------------------------------------
Old:
----
mini_portile2-2.5.1.gem
New:
----
mini_portile2-2.6.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-mini_portile2.spec ++++++
--- /var/tmp/diff_new_pack.LmhetN/_old 2021-06-05 23:31:04.348390012 +0200
+++ /var/tmp/diff_new_pack.LmhetN/_new 2021-06-05 23:31:04.352390020 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-mini_portile2
-Version: 2.5.1
+Version: 2.6.1
Release: 0
%define mod_name mini_portile2
%define mod_full_name %{mod_name}-%{version}
++++++ mini_portile2-2.5.1.gem -> mini_portile2-2.6.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.github/workflows/ci.yml new/.github/workflows/ci.yml
--- old/.github/workflows/ci.yml 2021-04-28 22:59:07.000000000 +0200
+++ new/.github/workflows/ci.yml 2021-05-31 17:19:04.000000000 +0200
@@ -1,14 +1,19 @@
name: Continuous Integration
on:
+ workflow_dispatch:
push:
- branches: [main]
+ branches:
+ - main
+ - v*.*.x
+ tags:
+ - v*.*.*
pull_request:
types: [opened, synchronize]
- branches: [main]
+ branches:
+ - "*"
schedule:
- cron: "0 8 * * 5" # At 08:00 on Friday # https://crontab.guru/#0_8_*_*_5
- workflow_dispatch:
jobs:
test-unit:
@@ -17,7 +22,7 @@
strategy:
matrix:
platform: [ubuntu-latest, windows-latest]
- ruby: ["2.5", "2.6", "2.7", "3.0"]
+ ruby: ["2.3", "2.4", "2.5", "2.6", "2.7", "3.0", "head"]
runs-on: ${{ matrix.platform }}
steps:
- name: configure git crlf on windows
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 2021-04-28 22:59:07.000000000 +0200
+++ new/CHANGELOG.md 2021-05-31 17:19:04.000000000 +0200
@@ -1,5 +1,35 @@
## mini_portile changelog
+### 2.6.1 / 2021-05-31
+
+#### Dependencies
+
+Make `net-ftp` an optional dependency, since requiring it as a hard dependency
in v2.5.2 caused warnings to be emitted by Ruby 2.7 and earlier. A warning
message is emitted if FTP functionality is called and `net-ftp` isn't
available; this should only happen in Ruby 3.1 and later.
+
+
+### 2.5.3 / 2021-05-31
+
+#### Dependencies
+
+Make `net-ftp` an optional dependency, since requiring it as a hard dependency
in v2.5.2 caused warnings to be emitted by Ruby 2.7 and earlier. A warning
message is emitted if FTP functionality is called and `net-ftp` isn't
available; this should only happen in Ruby 3.1 and later.
+
+
+### 2.6.0 / 2021-05-31
+
+### Added
+
+Recipes may build against a local directory by specifying `source_directory`
instead of `files`. In
+particular, this may be useful for debugging problems with the upstream
dependency (e.g., use `git
+bisect` in a local clone) or for continuous integration with upstream HEAD.
+
+
+### 2.5.2 / 2021-05-28
+
+#### Dependencies
+
+Add `net-ftp` as an explicit dependency to accommodate the upcoming Ruby 3.1
changes that move this and other gems out of the "default" gem set and into the
"bundled" gem set. See https://bugs.ruby-lang.org/issues/17873 [#101]
+
+
### 2.5.1 / 2021-04-28
#### Dependencies
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Gemfile new/Gemfile
--- old/Gemfile 2021-04-28 22:59:07.000000000 +0200
+++ new/Gemfile 2021-05-31 17:19:04.000000000 +0200
@@ -1,4 +1,6 @@
source 'https://rubygems.org'
+gem "net-ftp" if Gem::Requirement.new(">
3.1.0.dev").satisfied_by?(Gem::Version.new(RUBY_VERSION))
+
# Specify your gem's dependencies in mini_portile2.gemspec
gemspec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2021-04-28 22:59:07.000000000 +0200
+++ new/README.md 2021-05-31 17:19:04.000000000 +0200
@@ -89,6 +89,18 @@
Same as above, but instead of `MiniPortile.new`, call `MiniPortileCMake.new`.
+### Local source directories
+
+Instead of downloading a remote file, you can also point mini_portile2 at a
local source
+directory. In particular, this may be useful for testing or debugging:
+
+``` ruby
+gem "mini_portile2", "~> 2.0.0" # NECESSARY if used in extconf.rb. see below.
+require "mini_portile2"
+recipe = MiniPortile.new("libiconv", "1.13.1")
+recipe.source_directory = "/path/to/local/source/for/library-1.2.3"
+```
+
### Directory Structure Conventions
`mini_portile2` follows the principle of **convention over configuration** and
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/mini_portile2/mini_portile.rb
new/lib/mini_portile2/mini_portile.rb
--- old/lib/mini_portile2/mini_portile.rb 2021-04-28 22:59:07.000000000
+0200
+++ new/lib/mini_portile2/mini_portile.rb 2021-05-31 17:19:04.000000000
+0200
@@ -1,7 +1,6 @@
require 'rbconfig'
require 'net/http'
require 'net/https'
-require 'net/ftp'
require 'fileutils'
require 'tempfile'
require 'digest'
@@ -31,7 +30,7 @@
class MiniPortile
attr_reader :name, :version, :original_host
attr_writer :configure_options
- attr_accessor :host, :files, :patch_files, :target, :logger
+ attr_accessor :host, :files, :patch_files, :target, :logger,
:source_directory
def self.windows?
RbConfig::CONFIG['target_os'] =~ /mswin|mingw/
@@ -55,10 +54,22 @@
@patch_files = []
@log_files = {}
@logger = STDOUT
+ @source_directory = nil
@original_host = @host = detect_host
end
+ def source_directory=(path)
+ @source_directory = File.expand_path(path)
+ end
+
+ def prepare_build_directory
+ raise "source_directory is not set" if source_directory.nil?
+ output "Building #{@name} #{@version} from source at '#{source_directory}'"
+ FileUtils.mkdir_p(File.join(tmp_path, [name, version].join("-")))
+ FileUtils.rm_rf(port_path) # make sure we always re-install
+ end
+
def download
files_hashs.each do |file|
download_file(file[:url], file[:local_path])
@@ -110,15 +121,16 @@
def configure
return if configured?
+ FileUtils.mkdir_p(tmp_path)
cache_file = File.join(tmp_path, 'configure.options_cache')
File.open(cache_file, "w") { |f| f.write computed_options.to_s }
+ command = Array(File.join((source_directory || "."), "configure"))
if RUBY_PLATFORM=~/mingw|mswin/
# Windows doesn't recognize the shebang.
- execute('configure', %w(sh ./configure) + computed_options)
- else
- execute('configure', %w(./configure) + computed_options)
+ command.unshift("sh")
end
+ execute('configure', command + computed_options)
end
def compile
@@ -139,7 +151,7 @@
end
def configured?
- configure = File.join(work_path, 'configure')
+ configure = File.join((source_directory || work_path), 'configure')
makefile = File.join(work_path, 'Makefile')
cache_file = File.join(tmp_path, 'configure.options_cache')
@@ -157,9 +169,13 @@
end
def cook
- download unless downloaded?
- extract
- patch
+ if source_directory
+ prepare_build_directory
+ else
+ download unless downloaded?
+ extract
+ patch
+ end
configure unless configured?
compile
install unless installed?
@@ -473,7 +489,6 @@
def download_file_http(url, full_path, count = 3)
filename = File.basename(full_path)
with_tempfile(filename, full_path) do |temp_file|
- progress = 0
total = 0
params = {
"Accept-Encoding" => 'identity',
@@ -482,7 +497,6 @@
if total
new_progress = (bytes * 100) / total
message "\rDownloading %s (%3d%%) " % [filename, new_progress]
- progress = new_progress
else
# Content-Length is unavailable because Transfer-Encoding is
chunked
message "\rDownloading %s " % [filename]
@@ -530,16 +544,15 @@
end
def download_file_ftp(uri, full_path)
+ require "net/ftp"
filename = File.basename(uri.path)
with_tempfile(filename, full_path) do |temp_file|
- progress = 0
total = 0
params = {
:content_length_proc => lambda{|length| total = length },
:progress_proc => lambda{|bytes|
new_progress = (bytes * 100) / total
message "\rDownloading %s (%3d%%) " % [filename, new_progress]
- progress = new_progress
}
}
if ENV["ftp_proxy"]
@@ -555,6 +568,8 @@
end
output
end
+ rescue LoadError
+ raise LoadError, "Ruby #{RUBY_VERSION} does not provide the net-ftp gem,
please add it as a dependency if you need to use FTP"
rescue Net::FTPError
return false
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/mini_portile2/version.rb
new/lib/mini_portile2/version.rb
--- old/lib/mini_portile2/version.rb 2021-04-28 22:59:07.000000000 +0200
+++ new/lib/mini_portile2/version.rb 2021-05-31 17:19:04.000000000 +0200
@@ -1,3 +1,3 @@
class MiniPortile
- VERSION = "2.5.1"
+ VERSION = "2.6.1"
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2021-04-28 22:59:07.000000000 +0200
+++ new/metadata 2021-05-31 17:19:04.000000000 +0200
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: mini_portile2
version: !ruby/object:Gem::Version
- version: 2.5.1
+ version: 2.6.1
platform: ruby
authors:
- Luis Lavena
@@ -10,7 +10,7 @@
autorequire:
bindir: bin
cert_chain: []
-date: 2021-04-28 00:00:00.000000000 Z
+date: 2021-05-31 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: bundler
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mini_portile2.gemspec new/mini_portile2.gemspec
--- old/mini_portile2.gemspec 2021-04-28 22:59:07.000000000 +0200
+++ new/mini_portile2.gemspec 2021-05-31 17:19:04.000000000 +0200
@@ -31,12 +31,12 @@
spec.test_files = spec.files.grep(%r{^(test|spec|features|examples)/})
spec.require_paths = ["lib"]
+ spec.required_ruby_version = ">= 2.3.0"
+
spec.add_development_dependency "bundler", "~> 2.1"
spec.add_development_dependency "minitar", "~> 0.7"
spec.add_development_dependency "minitest", "~> 5.11"
spec.add_development_dependency "minitest-hooks", "~> 1.5.0"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "webrick", "~> 1.0"
-
- spec.required_ruby_version = ">= 2.3.0"
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/test_cook.rb new/test/test_cook.rb
--- old/test/test_cook.rb 2021-04-28 22:59:07.000000000 +0200
+++ new/test/test_cook.rb 2021-05-31 17:19:04.000000000 +0200
@@ -113,3 +113,32 @@
end
end
end
+
+class TestCookAgainstSourceDirectory < TestCase
+ attr_accessor :recipe
+
+ def setup
+ super
+
+ @recipe ||= MiniPortile.new("test mini portile", "1.0.0").tap do |recipe|
+ recipe.source_directory = File.expand_path("../assets/test mini
portile-1.0.0", __FILE__)
+ end
+ end
+
+ def test_source_directory
+ recipe.cook
+
+ path = File.join(work_dir, "configure.txt")
+ assert(File.exist?(path))
+ assert_equal((recipe.configure_options +
["--prefix=#{recipe.path}"]).inspect,
+ File.read(path).chomp);
+
+ path = File.join(work_dir, "compile.txt")
+ assert(File.exist?(path))
+ assert_equal("[\"all\"]", File.read(path).chomp);
+
+ path = File.join(work_dir, "install.txt")
+ assert(File.exist?(path))
+ assert_equal("[\"install\"]", File.read(path).chomp);
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/test_download.rb new/test/test_download.rb
--- old/test/test_download.rb 2021-04-28 22:59:07.000000000 +0200
+++ new/test/test_download.rb 2021-05-31 17:19:04.000000000 +0200
@@ -18,10 +18,12 @@
end
end
- block.call
-
- thread.kill
- server.close
+ begin
+ block.call
+ ensure
+ thread.kill
+ server.close
+ end
request_count.must_be :>, 0
end