Re: Switch default ruby version in ports from 2.7 to 3.0

2021-09-02 Thread Kurt Mosiejczuk
On Wed, Sep 01, 2021 at 08:32:56PM +, Jeremy Evans wrote:
> On 08/25 01:25, Jeremy Evans wrote:
> > I would like to update to the default ruby version in ports from 2.7 to
> > 3.0.  We usually do this update after ruby-x.y.2 has been released, and
> > ruby-3.0.2 was released a while back. I think there is still sufficient
> > time in the release cycle for this to be tested before OpenBSD 7.0 is
> > released.

> > Tested on amd64 using a bulk of all ports that depend on a ruby port.
> > OKs?

> Parts of the previous diff have already been committed. Here's a simpler diff
> that is mostly just the default version change, REVISION bumps, and a
> few build fixes.

> Still looking for OKs.

ok kmos

--Kurt

> Thanks,
> Jeremy
> 
> Index: lang/ruby/ruby.port.mk
> ===
> RCS file: /cvs/ports/lang/ruby/ruby.port.mk,v
> retrieving revision 1.103
> diff -u -p -r1.103 ruby.port.mk
> --- lang/ruby/ruby.port.mk28 Dec 2020 16:48:27 -  1.103
> +++ lang/ruby/ruby.port.mk1 Sep 2021 20:22:55 -
> @@ -45,9 +45,9 @@ FULLPKGNAME?=   ${MODRUBY_PKG_PREFIX}-${P
>  SUBST_VARS+= GEM_BIN_SUFFIX GEM_MAN_SUFFIX
>  
>  FLAVOR?=
> -# Without a FLAVOR, assume the use of ruby 2.7.
> +# Without a FLAVOR, assume the use of ruby 3.0.
>  .if empty(FLAVOR)
> -FLAVOR = ruby27
> +FLAVOR = ruby30
>  .endif
>  
>  # Check for conflicting FLAVORs and set MODRUBY_REV appropriately based
> @@ -67,8 +67,8 @@ ERRORS += "Fatal: Conflicting flavors us
>  .endif
>  
>  # The default ruby version to use for non-gem ports.  Defaults to ruby
> -# 2.7 for consistency with the default ruby27 FLAVOR for gem ports.
> -MODRUBY_REV?=2.7
> +# 3.0 for consistency with the default ruby30 FLAVOR for gem ports.
> +MODRUBY_REV?=3.0
>  
>  # Because the jruby FLAVORs use same binary names but in
>  # different directories, GEM_MAN_SUFFIX is used for the man pages to avoid
> Index: databases/puppetdb5/Makefile
> ===
> RCS file: /cvs/ports/databases/puppetdb5/Makefile,v
> retrieving revision 1.28
> diff -u -p -r1.28 Makefile
> --- databases/puppetdb5/Makefile  19 May 2021 01:50:29 -  1.28
> +++ databases/puppetdb5/Makefile  1 Sep 2021 20:22:55 -
> @@ -9,7 +9,7 @@ PKGNAME-main= ${DISTNAME}
>  PKGNAME-plugin= puppetdb-termini-$V
>  CATEGORIES=  databases
>  REVISION-main=   1
> -REVISION-plugin=1
> +REVISION-plugin=2
>  
>  HOMEPAGE=https://puppet.com/docs/puppetdb/
>  
> Index: databases/xapian-bindings/Makefile
> ===
> RCS file: /cvs/ports/databases/xapian-bindings/Makefile,v
> retrieving revision 1.34
> diff -u -p -r1.34 Makefile
> --- databases/xapian-bindings/Makefile6 Jul 2021 16:55:32 -   
> 1.34
> +++ databases/xapian-bindings/Makefile1 Sep 2021 20:22:55 -
> @@ -7,6 +7,7 @@ COMMENT-ruby= ruby bindings for Xapian
>  V=   1.4.18
>  DISTNAME=xapian-bindings-${V}
>  REVISION-python= 1
> +REVISION-ruby = 0
>  
>  PKGNAME-main=xapian-bindings-perl-${V}
>  PKGNAME-python=  xapian-bindings-python-${V}
> @@ -50,7 +51,8 @@ SUBST_VARS+=MODRUBY_BINREV
>  
>  CONFIGURE_STYLE= autoconf
>  AUTOCONF_VERSION=2.69
> -CONFIGURE_ENV=   RUBY="${RUBY}" RDOC="${RUBY:S/ruby/rdoc/}"
> +CONFIGURE_ENV=   RUBY="${RUBY}" RDOC="${RUBY:S/ruby/rdoc/}" \
> + CXXFLAGS="${CXXFLAGS} -fdeclspec"
>  CONFIGURE_ARGS=  --with-perl \
>   --with-python3 \
>   --with-ruby \
> Index: devel/gitsh/Makefile
> ===
> RCS file: /cvs/ports/devel/gitsh/Makefile,v
> retrieving revision 1.13
> diff -u -p -r1.13 Makefile
> --- devel/gitsh/Makefile  17 Nov 2020 03:19:36 -  1.13
> +++ devel/gitsh/Makefile  1 Sep 2021 20:22:55 -
> @@ -1,7 +1,7 @@
>  # $OpenBSD: Makefile,v 1.13 2020/11/17 03:19:36 jeremy Exp $
>  
>  VERSION =0.13
> -REVISION =   1
> +REVISION =   2
>  
>  COMMENT =interactive shell for git
>  
> Index: devel/ragel/Makefile
> ===
> RCS file: /cvs/ports/devel/ragel/Makefile,v
> retrieving revision 1.12
> diff -u -p -r1.12 Makefile
> --- devel/ragel/Makefile  17 Nov 2020 03:19:37 -  1.12
> +++ devel/ragel/Makefile  1 Sep 2021 20:22:55 -
> @@ -3,7 +3,7 @@
>  COMMENT =state machine compiler
>  
>  DISTNAME =   ragel-6.9
> -REVISION =   4
> +REVISION =   5
>  CATEGORIES = devel
>  
>  HOMEPAGE =   http://www.colm.net/open-source/ragel/
> Index: devel/swig/Makefile
> ===
> RCS file: /cvs/ports/devel/swig/Make

Re: Switch default ruby version in ports from 2.7 to 3.0

2021-09-01 Thread Jeremy Evans
On 08/25 01:25, Jeremy Evans wrote:
> I would like to update to the default ruby version in ports from 2.7 to
> 3.0.  We usually do this update after ruby-x.y.2 has been released, and
> ruby-3.0.2 was released a while back. I think there is still sufficient
> time in the release cycle for this to be tested before OpenBSD 7.0 is
> released.
> 
> Tested on amd64 using a bulk of all ports that depend on a ruby port.
> OKs?

Parts of the previous diff have already been committed. Here's a simpler diff
that is mostly just the default version change, REVISION bumps, and a
few build fixes.

Still looking for OKs.

Thanks,
Jeremy

Index: lang/ruby/ruby.port.mk
===
RCS file: /cvs/ports/lang/ruby/ruby.port.mk,v
retrieving revision 1.103
diff -u -p -r1.103 ruby.port.mk
--- lang/ruby/ruby.port.mk  28 Dec 2020 16:48:27 -  1.103
+++ lang/ruby/ruby.port.mk  1 Sep 2021 20:22:55 -
@@ -45,9 +45,9 @@ FULLPKGNAME?= ${MODRUBY_PKG_PREFIX}-${P
 SUBST_VARS+=   GEM_BIN_SUFFIX GEM_MAN_SUFFIX
 
 FLAVOR?=
-# Without a FLAVOR, assume the use of ruby 2.7.
+# Without a FLAVOR, assume the use of ruby 3.0.
 .if empty(FLAVOR)
-FLAVOR =   ruby27
+FLAVOR =   ruby30
 .endif
 
 # Check for conflicting FLAVORs and set MODRUBY_REV appropriately based
@@ -67,8 +67,8 @@ ERRORS += "Fatal: Conflicting flavors us
 .endif
 
 # The default ruby version to use for non-gem ports.  Defaults to ruby
-# 2.7 for consistency with the default ruby27 FLAVOR for gem ports.
-MODRUBY_REV?=  2.7
+# 3.0 for consistency with the default ruby30 FLAVOR for gem ports.
+MODRUBY_REV?=  3.0
 
 # Because the jruby FLAVORs use same binary names but in
 # different directories, GEM_MAN_SUFFIX is used for the man pages to avoid
Index: databases/puppetdb5/Makefile
===
RCS file: /cvs/ports/databases/puppetdb5/Makefile,v
retrieving revision 1.28
diff -u -p -r1.28 Makefile
--- databases/puppetdb5/Makefile19 May 2021 01:50:29 -  1.28
+++ databases/puppetdb5/Makefile1 Sep 2021 20:22:55 -
@@ -9,7 +9,7 @@ PKGNAME-main=   ${DISTNAME}
 PKGNAME-plugin= puppetdb-termini-$V
 CATEGORIES=databases
 REVISION-main= 1
-REVISION-plugin=1
+REVISION-plugin=2
 
 HOMEPAGE=  https://puppet.com/docs/puppetdb/
 
Index: databases/xapian-bindings/Makefile
===
RCS file: /cvs/ports/databases/xapian-bindings/Makefile,v
retrieving revision 1.34
diff -u -p -r1.34 Makefile
--- databases/xapian-bindings/Makefile  6 Jul 2021 16:55:32 -   1.34
+++ databases/xapian-bindings/Makefile  1 Sep 2021 20:22:55 -
@@ -7,6 +7,7 @@ COMMENT-ruby=   ruby bindings for Xapian
 V= 1.4.18
 DISTNAME=  xapian-bindings-${V}
 REVISION-python= 1
+REVISION-ruby = 0
 
 PKGNAME-main=  xapian-bindings-perl-${V}
 PKGNAME-python=xapian-bindings-python-${V}
@@ -50,7 +51,8 @@ SUBST_VARS+=  MODRUBY_BINREV
 
 CONFIGURE_STYLE=   autoconf
 AUTOCONF_VERSION=  2.69
-CONFIGURE_ENV= RUBY="${RUBY}" RDOC="${RUBY:S/ruby/rdoc/}"
+CONFIGURE_ENV= RUBY="${RUBY}" RDOC="${RUBY:S/ruby/rdoc/}" \
+   CXXFLAGS="${CXXFLAGS} -fdeclspec"
 CONFIGURE_ARGS=--with-perl \
--with-python3 \
--with-ruby \
Index: devel/gitsh/Makefile
===
RCS file: /cvs/ports/devel/gitsh/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- devel/gitsh/Makefile17 Nov 2020 03:19:36 -  1.13
+++ devel/gitsh/Makefile1 Sep 2021 20:22:55 -
@@ -1,7 +1,7 @@
 # $OpenBSD: Makefile,v 1.13 2020/11/17 03:19:36 jeremy Exp $
 
 VERSION =  0.13
-REVISION = 1
+REVISION = 2
 
 COMMENT =  interactive shell for git
 
Index: devel/ragel/Makefile
===
RCS file: /cvs/ports/devel/ragel/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- devel/ragel/Makefile17 Nov 2020 03:19:37 -  1.12
+++ devel/ragel/Makefile1 Sep 2021 20:22:55 -
@@ -3,7 +3,7 @@
 COMMENT =  state machine compiler
 
 DISTNAME = ragel-6.9
-REVISION = 4
+REVISION = 5
 CATEGORIES =   devel
 
 HOMEPAGE = http://www.colm.net/open-source/ragel/
Index: devel/swig/Makefile
===
RCS file: /cvs/ports/devel/swig/Makefile,v
retrieving revision 1.73
diff -u -p -r1.73 Makefile
--- devel/swig/Makefile 23 Feb 2021 19:39:21 -  1.73
+++ devel/swig/Makefile 1 Sep 2021 20:22:55 -
@@ -4,6 +4,7 @@ COMMENT =   simplified wrapper and interfa
 
 SUBST_VARS =   VERSION
 VERSION =  4.0.2
+REVISION = 0
 
 DISTNAME =  

Re: Switch default ruby version in ports from 2.7 to 3.0

2021-08-26 Thread Jeremy Evans
On 08/25 01:25, Jeremy Evans wrote:
> I haven't started runtime tests of each Ruby port. I think it's likely
> there will runtime problems in some of them.  I think in most cases,
> problems will be solvable by upgrading to newer versions.  In some
> cases, we may need to keep them on ruby 2.7.  I'll start work on
> runtime testing shortly.

I did some basic runtime testing of all ruby30-* ports.  As expected, I
found some issues.  Some I've fixed today, others I've emailed
maintainers about.  There are a few ports that I recommend sending to
the Attic.  Most have been broken for some time:

net/ruby-agcaldav: Won't load on ruby 3.0 or 2.7, due to "undefined
method `ical_component' for Icalendar::Event:Class".  That was removed
in ruby-icalendar 2.0.0, so this port has been broken at runtime since
ruby-icalendar was upgraded to 2.1.0 in July 2014. No reverse
dependencies.

devel/ruby-racc: Won't install on ruby 3.0 due to conflicts with
lang/ruby/3.0, not needed in ruby 2.6 or 2.7 as the same or newer
version is shipped with ruby. No reverse dependencies.

www/ruby-mechanize: Imported in 2009, untouched since. Requires iconv at
runtime, which was removed in Ruby 2.0, so this has been broken since
then. Last updated in 2009. No reverse dependencies except
geo/ruby-findmyiphone.

geo/ruby-findmyiphone: Depends on www/ruby-mechanize. Since it depends
on mechanize, probably broken since Ruby 2.0. Last updated in 2015. No
reverse dependencies.

devel/ruby30-gir_ffi: Doesn't load on Ruby 2.6, 2.7, or 3.0 (Could not
open library '/usr/local/lib/girepository-1.0': File not an ELF
object.). No reverse dependencies. Last updated in 2015.

OK to remove these 5 ports?

Thanks,
Jeremy



Switch default ruby version in ports from 2.7 to 3.0

2021-08-25 Thread Jeremy Evans
I would like to update to the default ruby version in ports from 2.7 to
3.0.  We usually do this update after ruby-x.y.2 has been released, and
ruby-3.0.2 was released a while back. I think there is still sufficient
time in the release cycle for this to be tested before OpenBSD 7.0 is
released.

There are a few ports that need adjustments to package on ruby 3.0:

databases/xapian-bindings: Needs -fdeclspec patch
graphics/ruby-gruff: Needs update to 0.9.0 (newer versions require
 histrogram gem dependency)
net/weechat: Needs -fdeclspec patch
security/arirang: Needs -fdeclspec patch
sysutils/mcollective: Needs install.rb patch
sysutils/ruby-puppet/5: Needs install.rb patch
sysutils/ruby-puppet/6: Needs install.rb patch
textproc/redland-bindings: Needs -fdeclspec patch
x11/kde-applications/kross-interpreters: Needs rb_set_safe_level removed

There are a couple of ports that I would like to keep on 2.7 for a bit,
though these can be handled by reimporting the ruby-xmlrpc port that was
imported and removed in April 2019 (earlier versions of Ruby shipped
with xmlrpc, Ruby 3.0 does not): 

security/ruby-cms_scanner: Needs textproc/ruby-xmlrpc
security/wpscan: Depends on ruby-cms_scanner

In devel/ruby-bundler, I'm removing code related to pre-ruby 2.6
support.  Ruby 2.6, 2.7, and 3.0 all ship with a newer version of
bundler.  The only packages depending on devel/ruby-bundler are 3
packages that have it as a test dependency, none of which have working
tests with Ruby 3.0 (one has working tests in Ruby 2.7).  I think
devel/ruby-bundler is a good candidate for the Attic.

Not included is a bump for lang/mruby.  I have a separate update for
mruby to 3.0.0 that I will send, which I can commit at the same time.

Tested on amd64 using a bulk of all ports that depend on a ruby port.
OKs?

I haven't started runtime tests of each Ruby port. I think it's likely
there will runtime problems in some of them.  I think in most cases,
problems will be solvable by upgrading to newer versions.  In some
cases, we may need to keep them on ruby 2.7.  I'll start work on
runtime testing shortly.

Thanks,
Jeremy

Index: lang/ruby/ruby.port.mk
===
RCS file: /cvs/ports/lang/ruby/ruby.port.mk,v
retrieving revision 1.103
diff -u -p -r1.103 ruby.port.mk
--- lang/ruby/ruby.port.mk  28 Dec 2020 16:48:27 -  1.103
+++ lang/ruby/ruby.port.mk  24 Aug 2021 15:03:27 -
@@ -45,9 +45,9 @@ FULLPKGNAME?= ${MODRUBY_PKG_PREFIX}-${P
 SUBST_VARS+=   GEM_BIN_SUFFIX GEM_MAN_SUFFIX
 
 FLAVOR?=
-# Without a FLAVOR, assume the use of ruby 2.7.
+# Without a FLAVOR, assume the use of ruby 3.0.
 .if empty(FLAVOR)
-FLAVOR =   ruby27
+FLAVOR =   ruby30
 .endif
 
 # Check for conflicting FLAVORs and set MODRUBY_REV appropriately based
@@ -67,8 +67,8 @@ ERRORS += "Fatal: Conflicting flavors us
 .endif
 
 # The default ruby version to use for non-gem ports.  Defaults to ruby
-# 2.7 for consistency with the default ruby27 FLAVOR for gem ports.
-MODRUBY_REV?=  2.7
+# 3.0 for consistency with the default ruby30 FLAVOR for gem ports.
+MODRUBY_REV?=  3.0
 
 # Because the jruby FLAVORs use same binary names but in
 # different directories, GEM_MAN_SUFFIX is used for the man pages to avoid
Index: databases/puppetdb5/Makefile
===
RCS file: /cvs/ports/databases/puppetdb5/Makefile,v
retrieving revision 1.28
diff -u -p -r1.28 Makefile
--- databases/puppetdb5/Makefile19 May 2021 01:50:29 -  1.28
+++ databases/puppetdb5/Makefile25 Aug 2021 19:37:40 -
@@ -9,7 +9,7 @@ PKGNAME-main=   ${DISTNAME}
 PKGNAME-plugin= puppetdb-termini-$V
 CATEGORIES=databases
 REVISION-main= 1
-REVISION-plugin=1
+REVISION-plugin=2
 
 HOMEPAGE=  
https://u22788749.ct.sendgrid.net/ls/click?upn=yGPgKxLt0dQzFpcLvHl2PK8uBfWZqqNCBMBt-2B-2Fv9i8vRE98WD7bKND98R1pasb72TWQT_7a8z5HXKglTa4iEppNBl7pmmyiLmNe-2BkBcvOJjbwgwTdqMw4WVnf2GWTp4CJZTC9CYkEOU8U-2FWmXo4YTSUauZgbNJy0aPk85ZIOqwB9Ig6OOfbJCgZzexnijOAtmivZ3Vn06GJp54lwSM9ZxOUvyg6pTSybbuZmw1KpHmCZ8LtM4aemvOi0-2FbgHxsEKEITQyjbBzDsXEXB4bOv6IJEfhNA-3D-3D
 
Index: databases/xapian-bindings/Makefile
===
RCS file: /cvs/ports/databases/xapian-bindings/Makefile,v
retrieving revision 1.34
diff -u -p -r1.34 Makefile
--- databases/xapian-bindings/Makefile  6 Jul 2021 16:55:32 -   1.34
+++ databases/xapian-bindings/Makefile  25 Aug 2021 18:28:54 -
@@ -7,6 +7,7 @@ COMMENT-ruby=   ruby bindings for Xapian
 V= 1.4.18
 DISTNAME=  xapian-bindings-${V}
 REVISION-python= 1
+REVISION-ruby = 0
 
 PKGNAME-main=  xapian-bindings-perl-${V}
 PKGNAME-python=xapian-bindings-python-${V}
@@ -50,7 +51,8 @@ SUBST_VARS+=  MODRUBY_BINREV
 
 CONFIGURE_STYLE=   autoconf
 AUTOCONF_VERSION=  2.69
-CONFIGURE_ENV= RUBY="${RUBY}"