Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ruby-build for openSUSE:Factory 
checked in at 2022-10-01 17:43:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ruby-build (Old)
 and      /work/SRC/openSUSE:Factory/.ruby-build.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ruby-build"

Sat Oct  1 17:43:45 2022 rev:11 rq:1007354 version:20220930

Changes:
--------
--- /work/SRC/openSUSE:Factory/ruby-build/ruby-build.changes    2022-09-12 
19:08:09.534521270 +0200
+++ /work/SRC/openSUSE:Factory/.ruby-build.new.2275/ruby-build.changes  
2022-10-01 17:44:13.601786908 +0200
@@ -1,0 +2,15 @@
+Fri Sep 30 23:00:27 UTC 2022 - Lukas M??ller <expee...@outlook.com>
+
+- Update to version 20220930.
+  Changelog: https://github.com/rbenv/ruby-build/releases/tag/v20220930
+  * Add JRuby 9.3.8.0 by @headius in #2045
+  * Use GMP from Homebrew if available by @casperisfine in #2044
+  * Fix linking to system OpenSSL on OpenSUSE by @hsbt in #2049
+  * rbenv-install: suggest rbenv global if there is no explicit global setting 
by @mislav in #2052
+  * rbenv-install: only print stderr notice if printing list output to a 
terminal by @mislav in #2055
+  * Touch up README for comprehension and clarity by @mislav in #2051
+  * Add minimum GitHub token permissions for workflows by @varunsh-coder in 
#2041
+  * Add Differential ShellCheck as shell linter by @jamacku in #2042
+  * Release with gh instead of with hub by @mislav in #2056
+
+-------------------------------------------------------------------

Old:
----
  ruby-build-20220910.1.tar.gz

New:
----
  ruby-build-20220930.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ruby-build.spec ++++++
--- /var/tmp/diff_new_pack.qcQZbg/_old  2022-10-01 17:44:15.341790072 +0200
+++ /var/tmp/diff_new_pack.qcQZbg/_new  2022-10-01 17:44:15.345790079 +0200
@@ -24,7 +24,7 @@
 %endif
 
 Name:           ruby-build
-Version:        20220910.1
+Version:        20220930
 Release:        0
 BuildArch:      noarch
 License:        MIT

++++++ ruby-build-20220910.1.tar.gz -> ruby-build-20220930.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ruby-build-20220910.1/.github/workflows/ci.yml 
new/ruby-build-20220930/.github/workflows/ci.yml
--- old/ruby-build-20220910.1/.github/workflows/ci.yml  2022-09-10 
08:01:09.000000000 +0200
+++ new/ruby-build-20220930/.github/workflows/ci.yml    2022-09-30 
20:17:36.000000000 +0200
@@ -2,6 +2,9 @@
 
 on: [push, pull_request]
 
+permissions:
+  contents: read
+
 jobs:
   test:
     strategy:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ruby-build-20220910.1/.github/workflows/differential-shellcheck.yml 
new/ruby-build-20220930/.github/workflows/differential-shellcheck.yml
--- old/ruby-build-20220910.1/.github/workflows/differential-shellcheck.yml     
1970-01-01 01:00:00.000000000 +0100
+++ new/ruby-build-20220930/.github/workflows/differential-shellcheck.yml       
2022-09-30 20:17:36.000000000 +0200
@@ -0,0 +1,26 @@
+# Doc: 
https://github.com/redhat-plumbers-in-action/differential-shellcheck#usage
+---
+
+name: Differential ShellCheck
+on:
+  pull_request:
+    branches: [master]
+
+permissions:
+  contents: read
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Repository checkout
+        uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+
+      - name: Differential ShellCheck
+        uses: redhat-plumbers-in-action/differential-shellcheck@v3
+        with:
+          severity: warning
+          token: ${{ secrets.GITHUB_TOKEN }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ruby-build-20220910.1/.github/workflows/mirror.yml 
new/ruby-build-20220930/.github/workflows/mirror.yml
--- old/ruby-build-20220910.1/.github/workflows/mirror.yml      2022-09-10 
08:01:09.000000000 +0200
+++ new/ruby-build-20220930/.github/workflows/mirror.yml        2022-09-30 
20:17:36.000000000 +0200
@@ -10,6 +10,9 @@
         description: Git commit reference to start comparing from
         required: true
 
+permissions:
+  contents: read
+
 jobs:
   mirror:
     runs-on: ubuntu-latest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ruby-build-20220910.1/.github/workflows/release.yml 
new/ruby-build-20220930/.github/workflows/release.yml
--- old/ruby-build-20220910.1/.github/workflows/release.yml     2022-09-10 
08:01:09.000000000 +0200
+++ new/ruby-build-20220930/.github/workflows/release.yml       2022-09-30 
20:17:36.000000000 +0200
@@ -3,6 +3,9 @@
   push:
     tags: 'v*'
 
+permissions:
+  contents: read
+
 jobs:
   homebrew:
     name: Bump Homebrew formula
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ruby-build-20220910.1/README.md 
new/ruby-build-20220930/README.md
--- old/ruby-build-20220910.1/README.md 2022-09-10 08:01:09.000000000 +0200
+++ new/ruby-build-20220930/README.md   2022-09-30 20:17:36.000000000 +0200
@@ -1,34 +1,37 @@
 # ruby-build
 
-ruby-build is a command-line utility that makes it easy to install virtually 
any
-version of Ruby, from source.
+ruby-build is a command-line tool that simplifies installation of any Ruby 
version from source on Unix-like systems.
 
-It is available as a plugin for [rbenv][] that
-provides the `rbenv install` command, or as a standalone program.
+It is available as a plugin for [rbenv][] as the `rbenv install` command, or 
as a standalone program as the `ruby-build` command.
 
 ## Installation
 
+### Homebrew package manager
 ```sh
-# Using Homebrew on macOS
-$ brew install ruby-build
-
-# As an rbenv plugin
-$ mkdir -p "$(rbenv root)"/plugins
-$ git clone https://github.com/rbenv/ruby-build.git "$(rbenv 
root)"/plugins/ruby-build
+brew install ruby-build
+```
 
-# As a standalone program
-$ git clone https://github.com/rbenv/ruby-build.git
-$ PREFIX=/usr/local ./ruby-build/install.sh
+Upgrade with:
+```sh
+brew update && brew upgrade ruby-build
 ```
 
-### Upgrading
+### Clone as rbenv plugin using git
+```sh
+git clone https://github.com/rbenv/ruby-build.git "$(rbenv 
root)"/plugins/ruby-build
+```
 
+Upgrade with:
 ```sh
-# Via Homebrew
-$ brew update && brew upgrade ruby-build
+git -C "$(rbenv root)"/plugins/ruby-build pull
+```
 
-# As an rbenv plugin
-$ git -C "$(rbenv root)"/plugins/ruby-build pull
+### Install manually as a standalone program
+
+First, download a tarball from 
https://github.com/rbenv/ruby-build/releases/latest. Then:
+```sh
+tar -xzf ruby-build-*.tar.gz
+PREFIX=/usr/local ./ruby-build-*/install.sh
 ```
 
 ## Usage
@@ -45,20 +48,25 @@
 $ ruby-build 2.2.0 ~/local/ruby-2.2.0  # installs Ruby 2.2.0 to 
~/local/ruby-2.2.0
 ```
 
-ruby-build does not check for system dependencies before downloading and
-attempting to compile the Ruby source. Please ensure that [all requisite
-libraries][build-env] are available on your system.
+> **Warning**  
+> ruby-build mostly does not verify that system dependencies are present 
before downloading and attempting to compile Ruby from source. Please ensure 
that [all requisite libraries][build-env] such as build tools and development 
headers are already present on your system.
+
+Basically, what ruby-build does when installing a Ruby version is this:
+- Downloads an official tarball of Ruby source code;
+- Extracts the archive into a temporary directory on your system;
+- Executes `./configure --prefix=/path/to/destination` in the source code;
+- Runs `make install` to compile Ruby;
+- Verifies that the installed Ruby is functional.
+
+Depending on the context, ruby-build does a little bit more than the above: 
for example, it will try to link Ruby to the appropriate OpenSSL version, even 
if that means downloading and compiling OpenSSL itself; it will discover and 
link to Homebrew-installed instances of some libraries like libyaml and 
readline, etc.
 
 ### Advanced Usage
 
 #### Custom Build Definitions
 
-If you wish to develop and install a version of Ruby that is not yet supported
-by ruby-build, you may specify the path to a custom ???build definition 
file??? in
-place of a Ruby version number.
+To install a version of Ruby that is not recognized by ruby-build, you can 
specify the path to a custom build definition file in place of a Ruby version 
number.
 
-Use the [default build definitions][definitions] as a template for your custom
-definitions.
+Check out [default build definitions][definitions] as examples on how to write 
definition files.
 
 #### Custom Build Configuration
 
@@ -90,9 +98,7 @@
 
 #### Applying Patches
 
-Both `rbenv install` and `ruby-build` support the `--patch` (`-p`) flag to 
apply
-a patch to the Ruby (/JRuby/Rubinius/TruffleRuby) source code before building.
-Patches are read from `STDIN`:
+Both `rbenv install` and `ruby-build` commands support the `-p/--patch` flag 
to apply a patch to the Ruby source code before building. Patches are read from 
standard input:
 
 ```sh
 # applying a single patch
@@ -107,12 +113,9 @@
 
 #### Checksum Verification
 
-If you have the `shasum`, `openssl`, or `sha256sum` tool installed, ruby-build 
will
-automatically verify the SHA2 checksum of each downloaded package before
-installing it.
+All Ruby definition files bundled with ruby-build include checksums for 
packages, meaning that all externally downloaded packages are automatically 
checked for integrity after fetching.
 
-Checksums are optional and specified as anchors on the package URL in each
-definition. All definitions bundled with ruby-build include checksums.
+See the next section for more information on how to author checksums.
 
 #### Package Mirrors
 
@@ -161,7 +164,7 @@
 Be sure to include the full build log for build failures.
 
 
-  [rbenv]: https://github.com/rbenv/rbenv
+  [rbenv]: https://github.com/rbenv/rbenv#readme
   [definitions]: 
https://github.com/rbenv/ruby-build/tree/master/share/ruby-build
   [wiki]: https://github.com/rbenv/ruby-build/wiki
   [build-env]: 
https://github.com/rbenv/ruby-build/wiki#suggested-build-environment
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ruby-build-20220910.1/bin/rbenv-install 
new/ruby-build-20220930/bin/rbenv-install
--- old/ruby-build-20220910.1/bin/rbenv-install 2022-09-10 08:01:09.000000000 
+0200
+++ new/ruby-build-20220930/bin/rbenv-install   2022-09-30 20:17:36.000000000 
+0200
@@ -62,6 +62,23 @@
   ruby-build --definitions | $(type -p ggrep grep | head -1) -F "$query" || 
true
 }
 
+suggest_selecting_global() {
+  # shellcheck disable=SC2155
+  local version_file="$(rbenv-version-file)"
+  [[ "$version_file" != "$RBENV_ROOT"/version || -e "$version_file" ]] && 
return 0
+  echo 
+  colorize 1 "NOTE:"
+  echo -n " to activate this Ruby version as the new default, run: "
+  colorize 33 "rbenv global $VERSION_NAME"
+  echo
+}
+
+colorize() {
+  if [ -t 1 ]; then printf "\e[%sm%s\e[m" "$1" "$2"
+  else printf "%s" "$2"
+  fi
+}
+
 indent() {
   sed 's/^/  /'
 }
@@ -80,7 +97,7 @@
     ;;
   "l" | "list" )
     ruby-build --list
-    {
+    [ -t 1 ] && {
       echo
       echo "Only latest stable releases for each Ruby implementation are 
shown."
       echo "Use 'rbenv install --list-all / -L' to show all local versions."
@@ -190,6 +207,7 @@
 # REE installer requires an existing Ruby installation to run. An
 # unsatisfied local .ruby-version file can cause the installer to
 # fail.)
+# shellcheck disable=SC2155
 export RBENV_VERSION="$(rbenv-global 2>/dev/null || true)"
 
 
@@ -238,6 +256,7 @@
 # Run `rbenv-rehash` after a successful installation.
 if [ "$STATUS" == "0" ]; then
   rbenv-rehash
+  suggest_selecting_global
 else
   cleanup
 fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ruby-build-20220910.1/bin/ruby-build 
new/ruby-build-20220930/bin/ruby-build
--- old/ruby-build-20220910.1/bin/ruby-build    2022-09-10 08:01:09.000000000 
+0200
+++ new/ruby-build-20220930/bin/ruby-build      2022-09-30 20:17:36.000000000 
+0200
@@ -14,7 +14,7 @@
 #   --version        Show version of ruby-build
 #
 
-RUBY_BUILD_VERSION="20220910.1"
+RUBY_BUILD_VERSION="20220930"
 
 OLDIFS="$IFS"
 
@@ -580,6 +580,7 @@
 
   if [ "$package_var_name" = "RUBY" ]; then
       use_homebrew_readline || use_freebsd_pkg ||true
+      use_homebrew_gmp || true
   fi
 
   ( if [ "${CFLAGS+defined}" ] || [ "${!PACKAGE_CFLAGS+defined}" ]; then
@@ -1047,6 +1048,16 @@
   fi
 }
 
+use_homebrew_gmp() {
+  local libdir="$(brew --prefix gmp 2>/dev/null || true)"
+  if [ -d "$libdir" ]; then
+    echo "ruby-build: using gmp from homebrew"
+    package_option ruby configure --with-gmp-dir="$libdir"
+  else
+    return 1
+  fi
+}
+
 use_freebsd_pkg() {
   # check if FreeBSD
   if [ "FreeBSD" = "$(uname -s)" ]; then
@@ -1090,7 +1101,7 @@
 }
 
 system_openssl_version() {
-  local version_text=$(printf '#include 
<openssl/opensslv.h>\nOPENSSL_VERSION_TEXT\n' | cc -xc -E - 2>/dev/null | tail 
-n 1)
+  local version_text=$(printf '#include 
<openssl/opensslv.h>\nOPENSSL_VERSION_TEXT\n' | cc -xc -E - 2>/dev/null)
   if [[ $version_text == *"OpenSSL "* ]]; then
     local version=${version_text#*OpenSSL }
     version=${version%% *}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ruby-build-20220910.1/script/release 
new/ruby-build-20220930/script/release
--- old/ruby-build-20220910.1/script/release    2022-09-10 08:01:09.000000000 
+0200
+++ new/ruby-build-20220930/script/release      2022-09-30 20:17:36.000000000 
+0200
@@ -4,20 +4,17 @@
 # - checks out the master branch
 # - changes version in `bin/ruby-build` to current date
 # - commits and tags the change
-# - pushes master + tag to GitHub
-# - opens pull request to update the Homebrew formula
+# - pushes master & the new tag to GitHub
+# - creates a new Release on GitHub
+# - [automated] a GitHub Action will create a Homebrew PR for the new release
 #
 # TODO: handle making multiple releases on the same date
 
 set -e
 
-echo "Running hub to see if configured correctly"
-echo "This shows the latest release:"
-hub release -L1
-
 git fetch -q --tags origin master
 git checkout -q master
-git merge --ff-only @{upstream}
+git merge --ff-only '@{upstream}'
 
 existing="$(git tag --points-at HEAD)"
 if [ -n "$existing" ]; then
@@ -40,15 +37,7 @@
 
 git commit -m "ruby-build ${new_version}" -- "$binfile"
 
-notes_file="$(mktemp)"
-{ echo "ruby-build $new_version"
-  echo
-  git log --no-merges --format='* %s%n%w(0,2,2)%+b' --reverse 
"${previous_tag}..HEAD^" -- bin share
-} >"$notes_file"
-trap "rm -f '$notes_file'" EXIT
-
-git tag "$version_tag" -F "$notes_file" --edit
+git tag "$version_tag"
 git push origin master "${version_tag}"
 
-git tag --list "$version_tag" 
--format='%(contents:subject)%0a%0a%(contents:body)' | \
-  hub release create -F- "$version_tag"
+gh release create "$version_tag" --title "ruby-build ${new_version}" 
--generate-notes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ruby-build-20220910.1/script/test 
new/ruby-build-20220930/script/test
--- old/ruby-build-20220910.1/script/test       2022-09-10 08:01:09.000000000 
+0200
+++ new/ruby-build-20220930/script/test 2022-09-30 20:17:36.000000000 +0200
@@ -1,4 +1,4 @@
 #!/bin/bash
 set -e
 
-bats ${CI:+--tap} test
+bats ${CI:+--tap} test "$@"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ruby-build-20220910.1/share/ruby-build/jruby-9.3.8.0 
new/ruby-build-20220930/share/ruby-build/jruby-9.3.8.0
--- old/ruby-build-20220910.1/share/ruby-build/jruby-9.3.8.0    1970-01-01 
01:00:00.000000000 +0100
+++ new/ruby-build-20220930/share/ruby-build/jruby-9.3.8.0      2022-09-30 
20:17:36.000000000 +0200
@@ -0,0 +1,2 @@
+require_java 8
+install_package "jruby-9.3.8.0" 
"https://repo1.maven.org/maven2/org/jruby/jruby-dist/9.3.8.0/jruby-dist-9.3.8.0-bin.tar.gz#674a4d1308631faa5f0124d01d73eb1edc89346ee7de21c70e14305bd61b46df";
 jruby
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ruby-build-20220910.1/test/build.bats 
new/ruby-build-20220930/test/build.bats
--- old/ruby-build-20220910.1/test/build.bats   2022-09-10 08:01:09.000000000 
+0200
+++ new/ruby-build-20220930/test/build.bats     2022-09-30 20:17:36.000000000 
+0200
@@ -186,7 +186,7 @@
   mkdir -p "$brew_libdir"
 
   stub uname '-s : echo Linux'
-  stub brew "--prefix libyaml : echo '$brew_libdir'" false
+  stub brew "--prefix libyaml : echo '$brew_libdir'" false false
   stub_make_install
 
   install_fixture definitions/needs-yaml
@@ -203,13 +203,37 @@
 OUT
 }
 
+@test "gmp is linked from Homebrew" {
+  cached_tarball "ruby-2.0.0"
+
+  gmp_libdir="$TMP/homebrew-gmp"
+  mkdir -p "$gmp_libdir"
+
+  stub brew false "--prefix gmp : echo '$gmp_libdir'"
+  stub_make_install
+
+  run_inline_definition <<DEF
+install_package "ruby-2.0.0" "http://ruby-lang.org/ruby/2.0/ruby-2.0.0.tar.gz";
+DEF
+  assert_success
+
+  unstub brew
+  unstub make
+
+  assert_build_log <<OUT
+ruby-2.0.0: --prefix=$INSTALL_ROOT --with-gmp-dir=$gmp_libdir
+make -j 2
+make install
+OUT
+}
+
 @test "readline is linked from Homebrew" {
   cached_tarball "ruby-2.0.0"
 
   readline_libdir="$TMP/homebrew-readline"
   mkdir -p "$readline_libdir"
 
-  stub brew "--prefix readline : echo '$readline_libdir'"
+  stub brew "--prefix readline : echo '$readline_libdir'" false
   stub_make_install
 
   run_inline_definition <<DEF
@@ -230,7 +254,7 @@
 @test "readline is not linked from Homebrew when explicitly defined" {
   cached_tarball "ruby-2.0.0"
 
-  stub brew
+  stub brew false
   stub_make_install
 
   export RUBY_CONFIGURE_OPTS='--with-readline-dir=/custom'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ruby-build-20220910.1/test/hooks.bats 
new/ruby-build-20220930/test/hooks.bats
--- old/ruby-build-20220910.1/test/hooks.bats   2022-09-10 08:01:09.000000000 
+0200
+++ new/ruby-build-20220930/test/hooks.bats     2022-09-30 20:17:36.000000000 
+0200
@@ -15,6 +15,7 @@
 OUT
   stub rbenv-hooks "install : echo '$HOOK_PATH'/install.bash"
   stub rbenv-rehash "echo rehashed"
+  stub rbenv-version-file "echo .ruby-version"
 
   definition="${TMP}/2.0.0"
   cat > "$definition" <<<"echo ruby-build"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ruby-build-20220910.1/test/rbenv.bats 
new/ruby-build-20220930/test/rbenv.bats
--- old/ruby-build-20220910.1/test/rbenv.bats   2022-09-10 08:01:09.000000000 
+0200
+++ new/ruby-build-20220930/test/rbenv.bats     2022-09-30 20:17:36.000000000 
+0200
@@ -6,6 +6,9 @@
 setup() {
   stub rbenv-hooks 'install : true'
   stub rbenv-rehash 'true'
+  stub rbenv-version-file 'echo $RBENV_ROOT/version'
+  mkdir -p "$RBENV_ROOT"
+  echo "system" > "$RBENV_ROOT/version"
 }
 
 stub_ruby_build() {
@@ -23,6 +26,20 @@
   unstub rbenv-rehash
 }
 
+@test "suggest running rbenv global after install" {
+  rm -rf "$RBENV_ROOT/version"
+  stub_ruby_build 'echo ruby-build "$@"'
+
+  run rbenv-install 2.1.2
+  assert_success <<OUT
+ruby-build 2.1.2 ${RBENV_ROOT}/versions/2.1.2
+
+NOTE: to activate this Ruby version as the new default, run: rbenv global 2.1.2
+OUT
+
+  unstub ruby-build
+}
+
 @test "install rbenv local version by default" {
   stub_ruby_build 'echo ruby-build "$1"'
   stub rbenv-local 'echo 2.1.2'

Reply via email to