Re: Request to change ruby default version to 2.5

2019-04-20 Thread Matthias Fechner
Am 20.04.2019 um 13:56 schrieb Hajimu UMEMOTO:
> w.schwarzenfeld> ===>>> Port directory: /usr/ports/databases/ruby-bdb
>
> w.schwarzenfeld>     ===>>> This port is marked BROKEN
> w.schwarzenfeld>     ===>>> does not build with Ruby 2.5
>
> How about this patch?

thanks for the patch!
Tested it and builds fine here, just commited it with r499463.

Gruß
Matthias

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Request to change ruby default version to 2.5

2019-04-20 Thread Walter Schwarzenfeld

Thanks! Builds fine without DOCS=on.

With DOCS=on

/usr/bin/strip 
/ram/usr/ports/databases/ruby-bdb/work/stage/usr/local/lib/ruby/site_ruby/2.5/amd64-freebsd11/bdb.so
/bin/mkdir -p 
/ram/usr/ports/databases/ruby-bdb/work/stage/usr/local/share/doc/ruby25/bdb/doc
(cd /ram/usr/ports/databases/ruby-bdb/work/bdb-0.6.6 && install  -m 0644 
Changes README.en bdb.rd docs/*.rd 
/ram/usr/ports/databases/ruby-bdb/work/stage/usr/local/share/doc/ruby25/bdb)
(cd /ram/usr/ports/databases/ruby-bdb/work/bdb-0.6.6/docs/doc && /bin/sh 
-c '(/usr/bin/find -Ed $1 $3 | /usr/bin/cpio -dumpl $2 >/dev/null 2>&1) 
&&  /usr/bin/find -Ed $1 $3 \(   -type d -exec /bin/sh -c '\''cd 
'\''$2'\'' && chmod 755 "$@"'\'' . {} +  -o -type f -exec /bin/sh -c 
'\''cd '\''$2'\'' && chmod 0644 "$@"'\'' . {} + \)' COPYTREE_SHARE . 
/ram/usr/ports/databases/ruby-bdb/work/stage/usr/local/share/doc/ruby25/bdb/doc)
cd: /ram/usr/ports/databases/ruby-bdb/work/bdb-0.6.6/docs/doc: No such 
file or directory

*** Error code 2

Stop.
make[1]: stopped in /usr/ports/databases/ruby-bdb
*** Error code 1

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Request to change ruby default version to 2.5

2019-04-20 Thread Hajimu UMEMOTO
Hi,

> On Sat, 20 Apr 2019 22:00:46 +1000
> Kubilay Kocak  said:

koobs> Issue reported/tracked here:

koobs> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237410

Okay, I commented to this issue report.
Thank you for letting me know.

Sincerely,

--
Hajimu UMEMOTO
u...@mahoroba.org  u...@freebsd.org
http://www.mahoroba.org/~ume/
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Request to change ruby default version to 2.5

2019-04-20 Thread Kubilay Kocak

On 20/04/2019 9:56 pm, Hajimu UMEMOTO wrote:

Hi,


On Sat, 20 Apr 2019 06:59:16 +0200
Walter Schwarzenfeld  said:


w.schwarzenfeld> ===>>> Port directory: /usr/ports/databases/ruby-bdb

w.schwarzenfeld>     ===>>> This port is marked BROKEN
w.schwarzenfeld>     ===>>> does not build with Ruby 2.5

How about this patch?




Issue reported/tracked here:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237410
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Request to change ruby default version to 2.5

2019-04-20 Thread Hajimu UMEMOTO
Hi,

> On Sat, 20 Apr 2019 06:59:16 +0200
> Walter Schwarzenfeld  said:

w.schwarzenfeld> ===>>> Port directory: /usr/ports/databases/ruby-bdb

w.schwarzenfeld>     ===>>> This port is marked BROKEN
w.schwarzenfeld>     ===>>> does not build with Ruby 2.5

How about this patch?

Sincerely,

Index: Makefile
===
--- Makefile(revision 499424)
+++ Makefile(working copy)
@@ -16,8 +16,6 @@
 
 LICENSE=   RUBY
 
-BROKEN_RUBY25= yes
-
 OPTIONS_DEFINE=DOCS EXAMPLES
 
 USE_RUBY=  yes
Index: files/patch-src-common.c
===
--- files/patch-src-common.c(revision 499424)
+++ files/patch-src-common.c(working copy)
@@ -1,38 +1,38 @@
 src/common.c.orig  2011-04-06 19:35:39.0 +
-+++ src/common.c   2015-01-22 17:10:32.0 +
-@@ -1229,7 +1229,7 @@
+--- src/common.c.orig  2011-04-06 19:35:39 UTC
 src/common.c
+@@ -1229,7 +1229,7 @@ bdb_s_new(int argc, VALUE *argv, VALUE o
  if (argc && TYPE(argv[argc - 1]) == T_HASH) {
VALUE v, f = argv[argc - 1];
  
 -  if ((v = rb_hash_aref(f, rb_str_new2("txn"))) != RHASH(f)->ifnone) {
-+  if ((v = rb_hash_aref(f, rb_str_new2("txn"))) != rb_hash_ifnone(f)) {
++  if ((v = rb_hash_lookup(f, rb_str_new2("txn"))) != Qnil) {
if (!rb_obj_is_kind_of(v, bdb_cTxn)) {
rb_raise(bdb_eFatal, "argument of txn must be a transaction");
}
-@@ -1241,7 +1241,7 @@
+@@ -1241,7 +1241,7 @@ bdb_s_new(int argc, VALUE *argv, VALUE o
dbst->options |= envst->options & BDB_NO_THREAD;
dbst->marshal = txnst->marshal;
}
 -  else if ((v = rb_hash_aref(f, rb_str_new2("env"))) != RHASH(f)->ifnone) 
{
-+  else if ((v = rb_hash_aref(f, rb_str_new2("env"))) != 
rb_hash_ifnone(f)) {
++  else if ((v = rb_hash_lookup(f, rb_str_new2("env"))) != Qnil) {
if (!rb_obj_is_kind_of(v, bdb_cEnv)) {
rb_raise(bdb_eFatal, "argument of env must be an 
environnement");
}
-@@ -1254,11 +1254,11 @@
+@@ -1254,11 +1254,11 @@ bdb_s_new(int argc, VALUE *argv, VALUE o
  #if HAVE_CONST_DB_ENCRYPT 
if (envst && (envst->options & BDB_ENV_ENCRYPT)) {
VALUE tmp = rb_str_new2("set_flags");
 -  if ((v = rb_hash_aref(f, rb_intern("set_flags"))) != 
RHASH(f)->ifnone) {
-+  if ((v = rb_hash_aref(f, rb_intern("set_flags"))) != 
rb_hash_ifnone(f)) {
++  if ((v = rb_hash_lookup(f, rb_intern("set_flags"))) != Qnil) {
rb_hash_aset(f, rb_intern("set_flags"), 
 INT2NUM(NUM2INT(v) | DB_ENCRYPT));
}
 -  else if ((v = rb_hash_aref(f, tmp)) != RHASH(f)->ifnone) {
-+  else if ((v = rb_hash_aref(f, tmp)) != rb_hash_ifnone(f)) {
++  else if ((v = rb_hash_lookup(f, tmp)) != Qnil) {
rb_hash_aset(f, tmp, INT2NUM(NUM2INT(v) | DB_ENCRYPT));
}
else {
-@@ -1570,10 +1570,10 @@
+@@ -1570,10 +1570,10 @@ bdb_init(int argc, VALUE *argv, VALUE ob
  #endif
switch(dbst->type) {
case DB_BTREE:
@@ -45,7 +45,7 @@
break;
case DB_RECNO:
{
-@@ -1581,17 +1581,17 @@
+@@ -1581,17 +1581,17 @@ bdb_init(int argc, VALUE *argv, VALUE ob
  
rb_warning("It's hard to distinguish Recnum with Recno for all 
versions of Berkeley DB");
if ((count = bdb_is_recnum(dbst->dbp)) != -1) {
@@ -66,7 +66,7 @@
break;
  #endif
default:
-@@ -1635,29 +1635,29 @@
+@@ -1635,29 +1635,29 @@ bdb_s_alloc(obj)
  dbst->options = BDB_NOT_OPEN;
  cl = obj;
  while (cl) {
@@ -102,36 +102,36 @@
dbst->type = DB_UNKNOWN;
break;
}
-@@ -3004,8 +3004,8 @@
+@@ -3004,8 +3004,8 @@ bdb_each_kvc(argc, argv, obj, sens, repl
  
  if (argc && TYPE(argv[argc - 1]) == T_HASH) {
VALUE g, f = argv[argc - 1];
 -  if ((g = rb_hash_aref(f, rb_intern("flags"))) != RHASH(f)->ifnone ||
 -  (g = rb_hash_aref(f, rb_str_new2("flags"))) != RHASH(f)->ifnone) {
-+  if ((g = rb_hash_aref(f, rb_intern("flags"))) != rb_hash_ifnone(f) ||
-+  (g = rb_hash_aref(f, rb_str_new2("flags"))) != rb_hash_ifnone(f)) {
++  if ((g = rb_hash_lookup(f, rb_intern("flags"))) != Qnil ||
++  (g = rb_hash_lookup(f, rb_str_new2("flags"))) != Qnil) {
flags = NUM2INT(g);
}
argc--;
-@@ -3323,8 +3323,8 @@
+@@ -3323,8 +3323,8 @@ bdb_clear(int argc, VALUE *argv, VALUE o
  flags = 0;
  if (argc && TYPE(argv[argc - 1]) == T_HASH) {
VALUE g, f = argv[argc - 1];
 -  if ((g = rb_hash_aref(f, rb_intern("flags"))) != RHASH(f)->ifnone ||
 -  (g = rb_hash_aref(f, rb_str_new2("flags"))) != RHASH(f)->ifnone) {
-+  if ((g = rb_hash_aref(f, rb_intern("flags"))) != rb_hash_ifnone(f) ||
-+  (g = rb_hash_aref(f, rb_str_new2("flags"))) != rb_hash_ifnone(f)) 

Re: Request to change ruby default version to 2.5

2019-04-20 Thread Walter Schwarzenfeld
Has nothing to do with portmaster, and poudriere would not help if the 
source uses wrong functions and/or parameters.


___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Request to change ruby default version to 2.5

2019-04-20 Thread Stefan Esser
Am 20.04.19 um 11:05 schrieb Matthias Fechner:
> Am 20.04.2019 um 06:59 schrieb Walter Schwarzenfeld:
>> After this change:
>>
>> |portmaster -R -r ruby-2.5|
>>
>> |
>> ===>>> Port directory: /usr/ports/databases/ruby-bdb
>>
>>     ===>>> This port is marked BROKEN
>>     ===>>> does not build with Ruby 2.5
>>
>>
>>     ===>>> If you are sure you can build it, remove the
>>        BROKEN line in the Makefile and try again. 
> 
> you have here several possibilities:
> 
> - keep on ruby 2.4 till portmaster is fixed, see UPDATING

What is there to fix in portmaster?

Portmaster uses the BROKEN= in the Makefile to detect ports
that will not build and warns about this situation before
trying to start the actual build ...

If there is a request to upgrade dependent ports (with -r)
then portmaster will perform checks that are possible before
starting the builds.

Without this check, the build will fail later-on, possibly
after replacing a number of ports with ones build for the
new ruby version. (Which may or may not cause problems, this
cannot be mechanically checked by portmaster.)

You can exclude ports from being rebuild with portmaster by
using "-x ruby-bdb" (for this particular case). But this may
lead to inconsistencies (will keep the version for ruby-2.4
installed, which will lead to run-time errors).

> - write a bug report upstream for ruby-bdb to get it fixed for ruby 2.5

Yes, that is the only sensible approach (IMHO), if you are
not able to fix the ruby-bdb port yourself to work with the
new ruby version.

> - fix portmaster by yourself

What do you suggest to change in portmaster?

> - use a more recent package builder like poudriere

How does this help, if a port requires ruby-bdb and that is not
yet available for the ruby version used to by the other ports?

Regards, STefan
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Request to change ruby default version to 2.5

2019-04-20 Thread Matthias Fechner
Am 20.04.2019 um 06:59 schrieb Walter Schwarzenfeld:
> After this change:
>
> |portmaster -R -r ruby-2.5|
>
> |
> ===>>> Port directory: /usr/ports/databases/ruby-bdb
>
>     ===>>> This port is marked BROKEN
>     ===>>> does not build with Ruby 2.5
>
>
>     ===>>> If you are sure you can build it, remove the
>        BROKEN line in the Makefile and try again. 

you have here several possibilities:

- keep on ruby 2.4 till portmaster is fixed, see UPDATING
- write a bug report upstream for ruby-bdb to get it fixed for ruby 2.5
- fix portmaster by yourself
- use a more recent package builder like poudriere

Gruß
Matthias

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Request to change ruby default version to 2.5

2019-04-19 Thread Walter Schwarzenfeld

After this change:

|portmaster -R -r ruby-2.5|

|
===>>> Port directory: /usr/ports/databases/ruby-bdb

    ===>>> This port is marked BROKEN
    ===>>> does not build with Ruby 2.5


    ===>>> If you are sure you can build it, remove the
       BROKEN line in the Makefile and try again.

|

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Request to change ruby default version to 2.5

2019-04-19 Thread Manfred Antar
This breaks portupgrade.
portupgrade requires ruby-bdb and it is marked broken for ruby2.5:

BROKEN_RUBY25=  yes 

so it’s back to 2.4 for me:)


> On Apr 19, 2019, at 3:53 PM, Matthias Fechner  wrote:
> 
> Am 19.04.2019 um 17:43 schrieb Steve Wills:
>> Yeah, it's fine, do it, just be sure to add an UPDATING entry similar
>> to previous entries for changing ruby default version. 
> 
> thanks, committed with 499391.
> 
> Gruß
> Matthias
> 
> -- 
> 
> "Programming today is a race between software engineers striving to
> build bigger and better idiot-proof programs, and the universe trying to
> produce bigger and better idiots. So far, the universe is winning." --
> Rich Cook
> 
> ___
> freebsd-ports@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Request to change ruby default version to 2.5

2019-04-19 Thread Matthias Fechner
Am 19.04.2019 um 17:43 schrieb Steve Wills:
> Yeah, it's fine, do it, just be sure to add an UPDATING entry similar
> to previous entries for changing ruby default version. 

thanks, committed with 499391.

Gruß
Matthias

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Request to change ruby default version to 2.5

2019-04-19 Thread Matthias Fechner
Hi Steve,

Am 19.04.2019 um 15:06 schrieb Steve Wills:
> Yeah, there was an exp-run for it:
>
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233901
>
> There are only 2 things to fix now and you can mark those broken with
> 2.5 if they are not already and do it. I should have done it in
> January, but was waiting for other things such as GitLab to catch
> up/officially support it. 

I marked them broken with 2.5 and referred to this PR.
So we should be save to switch ruby default version to 2.5?

Gruß
Matthias

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"