commit rubygem-bcrypt_pbkdf for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-bcrypt_pbkdf for openSUSE:Factory checked in at 2024-06-19 16:36:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-bcrypt_pbkdf (Old) and /work/SRC/openSUSE:Factory/.rubygem-bcrypt_pbkdf.new.18349 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-bcrypt_pbkdf" Wed Jun 19 16:36:27 2024 rev:4 rq:1181450 version:1.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-bcrypt_pbkdf/rubygem-bcrypt_pbkdf.changes 2021-01-21 21:55:16.785791223 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-bcrypt_pbkdf.new.18349/rubygem-bcrypt_pbkdf.changes 2024-06-19 16:36:31.273272217 +0200 @@ -1,0 +2,6 @@ +Tue Jun 18 09:43:41 UTC 2024 - Marcus Rueckert <mrueckert@suse.de> + +- updated to version 1.1.1 + see installed CHANGELOG.md + +------------------------------------------------------------------- Old: ---- bcrypt_pbkdf-1.1.0.gem New: ---- bcrypt_pbkdf-1.1.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-bcrypt_pbkdf.spec ++++++ --- /var/tmp/diff_new_pack.0XiKzu/_old 2024-06-19 16:36:32.033299174 +0200 +++ /var/tmp/diff_new_pack.0XiKzu/_new 2024-06-19 16:36:32.033299174 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-bcrypt_pbkdf # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-bcrypt_pbkdf -Version: 1.1.0 +Version: 1.1.1 Release: 0 %define mod_name bcrypt_pbkdf %define mod_full_name %{mod_name}-%{version} ++++++ bcrypt_pbkdf-1.1.0.gem -> bcrypt_pbkdf-1.1.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 1970-01-01 01:00:00.000000000 +0100 +++ new/.github/workflows/ci.yml 2024-05-20 07:34:40.000000000 +0200 @@ -0,0 +1,48 @@ +--- +name: ci + +on: + pull_request: + branches: [ main ] + push: + branches: [ main ] + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + windows: + name: ${{ matrix.os }} ruby ${{ matrix.ruby }} + strategy: + fail-fast: false + matrix: + ruby: [2.7, 3.3, head, mingw, mswin, ucrt] + os: [windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - run: bundle exec rake compile + - run: bundle exec rake test + + unix: + name: ${{ matrix.os }} ruby ${{ matrix.ruby }} + strategy: + fail-fast: false + matrix: + ruby: [2.7, 3.3, head] + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - run: bundle exec rake compile + - run: bundle exec rake test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2024-05-20 07:34:40.000000000 +0200 @@ -0,0 +1,5 @@ +lib/ +pkg/ +tmp/ +Gemfile.lock +.bundle/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 2020-12-31 15:00:18.000000000 +0100 +++ new/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -language: ruby -arch: - - amd64 - - ppc64le -rvm: - - 2.3.0 - - 2.4.0 - - 2.5.0 - - 2.6.0 - - 2.7.0 -script: bundle exec rake diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2020-12-31 15:00:18.000000000 +0100 +++ new/README.md 2024-05-20 07:34:40.000000000 +0200 @@ -2,21 +2,21 @@ bcrypt_pbkdf is a ruby gem implementing bcrypt_pbkdf from OpenBSD. This is currently used by net-ssh to read password encrypted Ed25519 keys. -[![Build Status](https://travis-ci.org/mfazekas/bcrypt_pbkdf-ruby.png?branch=master)](https://travis-ci.org/mfazekas/bcrypt_pbkdf-ruby) +[![Build Status](https://github.com/net-ssh/bcrypt_pbkdf-ruby/actions/workflows/ci.yml/badge.svg?branch=master&event=push)](https://github.com/net-ssh/bcrypt_pbkdf-ruby/actions/workflows/ci.yml) -# Acknowledgements +## Acknowledgements * The gut of the code is based on OpenBSD's bcrypt_pbkdf.c implementation * Some ideas/code were taken adopted bcrypt-ruby: https://github.com/codahale/bcrypt-ruby -# Links: +## Links -http://www.tedunangst.com/flak/post/bcrypt-pbkdf -http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libutil/bcrypt_pbkdf.c?rev=1.13&content-type=text/x-cvsweb-markup +* http://www.tedunangst.com/flak/post/bcrypt-pbkdf +* http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libutil/bcrypt_pbkdf.c?rev=1.13&content-type=text/x-cvsweb-markup -# Building +## Building -For windows cross build make sure you checked out the gem source under the home directory +For windows and osx cross build make sure you checked out the gem source under the home directory and have docker installed. ```sh gem install rake-compiler-dock @@ -26,7 +26,7 @@ bundle exec rake compile bundle exec rake test bundle exec rake clean clobber -bundle exec rake gem:windows +bundle exec rake gem:all bundle exec rake release -bundle exec rake gem:windows:release +bundle exec rake gem:release ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile --- old/Rakefile 2020-12-31 15:00:18.000000000 +0100 +++ new/Rakefile 2024-05-20 07:34:40.000000000 +0200 @@ -5,37 +5,19 @@ require 'rake/clean' require 'rdoc/task' require 'benchmark' +require 'rake_compiler_dock' +CLEAN.add("{ext,lib}/**/*.{o,so}", "pkg") -CLEAN.include( - "tmp", - "lib/2.0", - "lib/2.1", - "lib/2.2", - "lib/2.3", - "lib/2.4", - "lib/2.5", - "lib/2.6", - "lib/2.7", - "lib/3.0", - "lib/bcrypt_pbkdf_ext.so" -) -CLOBBER.include( - "doc", - "pkg" -) - -task 'gem:windows' do - require 'rake_compiler_dock' - sh "bundle package" # Avoid repeated downloads of gems by using gem files from the host. - RakeCompilerDock.sh "bundle && rake cross native gem RUBY_CC_VERSION=3.0.0:2.7.0:2.6.0:2.5.0:2.4.0:2.3.0:2.2.2:2.1.6:2.0.0" -end - -task 'gem:windows:release' do - version = Gem::Specification::load("bcrypt_pbkdf.gemspec").version - sh "gem push pkg/bcrypt_pbkdf-#{version}-x86-mingw32.gem" - sh "gem push pkg/bcrypt_pbkdf-#{version}-x64-mingw32.gem" -end +cross_rubies = ["3.3.0", "3.2.0", "3.1.0", "3.0.0", "2.7.0"] +cross_platforms = [ + "arm64-darwin", + "x64-mingw-ucrt", + "x64-mingw32", + "x86-mingw32", + "x86_64-darwin", +] +ENV["RUBY_CC_VERSION"] = cross_rubies.join(":") GEMSPEC = Gem::Specification.load("bcrypt_pbkdf.gemspec") @@ -59,13 +41,128 @@ rdoc.rdoc_files.include(*GEMSPEC.extra_rdoc_files) end -Gem::PackageTask.new(GEMSPEC) do |pkg| - pkg.need_zip = true - pkg.need_tar = true -end - Rake::ExtensionTask.new("bcrypt_pbkdf_ext", GEMSPEC) do |ext| ext.ext_dir = 'ext/mri' ext.cross_compile = true - ext.cross_platform = ['x86-mingw32', 'x64-mingw32'] + ext.cross_platform = cross_platforms + ext.cross_config_options << "--enable-cross-build" # so extconf.rb knows we're cross-compiling end + +namespace "gem" do + cross_platforms.each do |platform| + desc "build native gem for #{platform}" + task platform do + RakeCompilerDock.sh(<<~EOF, platform: platform, verbose: true) + gem install bundler --no-document && + BUNDLE_IGNORE_CONFIG=1 BUNDLE_PATH=.bundle/#{platform} bundle && + BUNDLE_IGNORE_CONFIG=1 BUNDLE_PATH=.bundle/#{platform} bundle exec rake gem:#{platform}:buildit + EOF + end + + namespace platform do + # this runs in the rake-compiler-dock docker container + task "buildit" do + # use Task#invoke because the pkg/*gem task is defined at runtime + Rake::Task["native:#{platform}"].invoke + Rake::Task["pkg/#{GEMSPEC.full_name}-#{Gem::Platform.new(platform)}.gem"].invoke + end + + task "release" do + sh "gem push pkg/#{GEMSPEC.full_name}-#{Gem::Platform.new(platform)}.gem" + end + end + end + + desc "build native gem for all platforms" + task "all" do + cross_platforms.each do |platform| + Rake::Task["gem:#{platform}"].invoke + end + end + + desc "release native gem for all platforms" + task "release" do + cross_platforms.each do |platform| + Rake::Task["gem:#{platform}:release"].invoke + end + end +end + +def change_version(&block) + version = GEMSPEC.version + version_file = 'bcrypt_pbkdf.gemspec' + raise "No version found" if version.nil? + final = version.segments.take_while{ |i| i.is_a?(Integer) }.to_a + pre = version.segments.drop_while{ |i| i.is_a?(Integer) }.to_a.join("") + pre = nil if pre.empty? + tiny = final.last + result = block[pre: pre, tiny: tiny] + raise ArgumentError, "Version change logic should always return a pre" unless result.key?(:pre) + + puts "result: #{result.inspect}" + + new_pre = result[:pre] || [] + new_tiny = result[:tiny] || tiny + final[-1] = new_tiny + new_version = Gem::Version.new([final, *new_pre].join(".")) + + found = false + File.open("#{version_file}.new", "w") do |f| + File.readlines(version_file).each do |line| + match = /^(\s+s\.version\s*=\s*\')[\d[a-z]\.]+(\'\s*)$/.match(line) + if match + prefix = match[1] + postfix = match[2] + new_line = "#{prefix}#{new_version.to_s}#{postfix}" + puts "Changing:\n - #{line} + #{new_line}" + line = new_line + found = true + end + f.write(line) + end + raise ArgumentError, "Cound not find version line in #{version_file}" unless found + end + + FileUtils.mv version_file, "#{version_file}.old" + FileUtils.mv "#{version_file}.new", version_file + FileUtils.rm_f "#{version_file}.old" +end + +namespace :vbump do + desc "Final release" + task :final do + change_version do |pre:, tiny:| + _ = tiny + if pre.nil? + { tiny: tiny + 1, pre: nil } + else + raise ArgumentError, "Unexpected pre: #{pre}" if pre.nil? + + { pre: nil } + end + end + end + + desc "Increment prerelease" + task :pre, [:type] do |_t, args| + change_version do |pre:, tiny:| + puts " PRE => #{pre.inspect}" + match = /^([a-z]+)(\d+)/.match(pre) + raise ArgumentError, "Unexpected pre: #{pre}" if match.nil? && args[:type].nil? + + if match.nil? || (!args[:type].nil? && args[:type] != match[1]) + if pre.nil? + { pre: "#{args[:type]}1", tiny: tiny + 1 } + else + { pre: "#{args[:type]}1" } + end + else + { pre: "#{match[1]}#{match[2].to_i + 1}" } + end + end + end +end + +task "package" => cross_platforms.map { |p| "gem:#{p}" } # "package" task for all the native platforms + +Rake::Task["package"].prerequisites.prepend("compile") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcrypt_pbkdf.gemspec new/bcrypt_pbkdf.gemspec --- old/bcrypt_pbkdf.gemspec 2020-12-31 15:00:18.000000000 +0100 +++ new/bcrypt_pbkdf.gemspec 2024-05-20 07:34:40.000000000 +0200 @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'bcrypt_pbkdf' - s.version = '1.1.0' + s.version = '1.1.1' s.summary = "OpenBSD's bcrypt_pbkdf (a variant of PBKDF2 with bcrypt-based PRF)" s.description = <<-EOF @@ -10,13 +10,12 @@ s.files = `git ls-files`.split("\n") s.require_path = 'lib' - s.add_development_dependency 'rake-compiler', '~> 1.1.0' - s.add_development_dependency 'minitest', '>= 5' - s.add_development_dependency 'openssl' - s.add_development_dependency 'rdoc', '~> 3.12' - s.add_development_dependency 'rake-compiler-dock', '~> 1.0.1' + s.add_development_dependency 'rake-compiler', '~> 1.2.5' + s.add_development_dependency 'minitest', '~> 5' + s.add_development_dependency 'openssl', '~> 3' + s.add_development_dependency 'rdoc', '~> 6' + s.add_development_dependency 'rake-compiler-dock', '~> 1.5.0' - s.has_rdoc = true s.rdoc_options += ['--title', 'bcrypt_pbkdf', '--line-numbers', '--inline-source', '--main', 'README.md'] s.extra_rdoc_files += ['README.md', 'COPYING', 'CHANGELOG.md', *Dir['lib/**/*.rb']] Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/mri/explicit_bzero.c new/ext/mri/explicit_bzero.c --- old/ext/mri/explicit_bzero.c 2020-12-31 15:00:18.000000000 +0100 +++ new/ext/mri/explicit_bzero.c 2024-05-20 07:34:40.000000000 +0200 @@ -15,6 +15,6 @@ void explicit_bzero(void *p, size_t n) { - bzero(p, n); + memset(p, 0, n); } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/mri/includes.h new/ext/mri/includes.h --- old/ext/mri/includes.h 2020-12-31 15:00:18.000000000 +0100 +++ new/ext/mri/includes.h 2024-05-20 07:34:40.000000000 +0200 @@ -4,7 +4,7 @@ #include <stdint.h> #include <sys/types.h> #include <stdlib.h> -#include <strings.h> +#include <string.h> #if defined(_WIN32) || (defined(__sun) && defined(__SVR4)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2020-12-31 15:00:18.000000000 +0100 +++ new/metadata 2024-05-20 07:34:40.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: bcrypt_pbkdf version: !ruby/object:Gem::Version - version: 1.1.0 + version: 1.1.1 platform: ruby authors: - Miklos Fazekas autorequire: bindir: bin cert_chain: [] -date: 2020-12-31 00:00:00.000000000 Z +date: 2024-05-20 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake-compiler @@ -16,70 +16,70 @@ requirements: - - "~>" - !ruby/object:Gem::Version - version: 1.1.0 + version: 1.2.5 type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: 1.1.0 + version: 1.2.5 - !ruby/object:Gem::Dependency name: minitest requirement: !ruby/object:Gem::Requirement requirements: - - - ">=" + - - "~>" - !ruby/object:Gem::Version version: '5' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - ">=" + - - "~>" - !ruby/object:Gem::Version version: '5' - !ruby/object:Gem::Dependency name: openssl requirement: !ruby/object:Gem::Requirement requirements: - - - ">=" + - - "~>" - !ruby/object:Gem::Version - version: '0' + version: '3' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - ">=" + - - "~>" - !ruby/object:Gem::Version - version: '0' + version: '3' - !ruby/object:Gem::Dependency name: rdoc requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: '3.12' + version: '6' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: '3.12' + version: '6' - !ruby/object:Gem::Dependency name: rake-compiler-dock requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: 1.0.1 + version: 1.5.0 type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: 1.0.1 + version: 1.5.0 description: " This gem implements bcrypt_pbkdf (a variant of PBKDF2 with bcrypt-based PRF)\n" email: mfazekas@szemafor.com @@ -92,7 +92,8 @@ - CHANGELOG.md - lib/bcrypt_pbkdf.rb files: -- ".travis.yml" +- ".github/workflows/ci.yml" +- ".gitignore" - CHANGELOG.md - COPYING - Gemfile @@ -140,7 +141,7 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubygems_version: 3.0.3 +rubygems_version: 3.3.3 signing_key: specification_version: 4 summary: OpenBSD's bcrypt_pbkdf (a variant of PBKDF2 with bcrypt-based PRF) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/bcrypt_pnkdf/engine_test.rb new/test/bcrypt_pnkdf/engine_test.rb --- old/test/bcrypt_pnkdf/engine_test.rb 2020-12-31 15:00:18.000000000 +0100 +++ new/test/bcrypt_pnkdf/engine_test.rb 2024-05-20 07:34:40.000000000 +0200 @@ -1,4 +1,5 @@ require 'minitest/autorun' +require 'minitest/unit' require 'test_helper' # bcrypt_pbkdf in ruby @@ -43,7 +44,7 @@ amt = [amt, remlen].min (0...amt).each do |i| - dest = i * stride + (count -1) + dest = i * stride + (count - 1) key[dest] = out[i] if (dest < keylen) end @@ -54,7 +55,7 @@ end -class TestExt < MiniTest::Unit::TestCase +class TestExt < Minitest::Unit::TestCase def test_table assert_equal table, table.map{ |p,s,l,r| [p,s,l,r,BCryptPbkdf::Engine::__bc_crypt_pbkdf(p,s,l,r).bytes] } end
participants (1)
-
Source-Sync