Re: ruby27 vs Puppet

2021-05-04 Thread Klemens Nanni
On Tue, May 04, 2021 at 11:16:04AM +0200, Giovanni Bechis wrote:
> In the previous diff we forgot about puppetmaster that now has the same 
> problem,
> ok for this diff ?
Of course, thanks.



Re: ruby27 vs Puppet

2021-05-04 Thread Giovanni Bechis
On Sun, Mar 14, 2021 at 05:36:55PM +0100, Giovanni Bechis wrote:
> On Sat, Mar 13, 2021 at 02:33:48PM +0100, Klemens Nanni wrote:
> > On Sat, Mar 13, 2021 at 09:05:18AM +0100, Giovanni Bechis wrote:
> > > Hi,
> > > after updating to current I receive daily warnings that my Puppet client 
> > > is not running.
> > > This is because ruby27 starts programs in a different way then ruby26.
> > > 
> > > On OpenBSD 6.8 I have:
> > > $ ps auxww | grep puppet
> > > root 63876  0.0 10.2 82024 51836 ??  S  Fri05PM0:05.56 
> > > /usr/local/bin/ruby26 /usr/local/bin/puppet agent
> > > snb  29563  0.0  0.2   288  1252 p0  S+p 8:59AM0:00.00 grep 
> > > puppet
> > > 
> > > on OpenBSD 6.9-current:
> > > $ ps auxww | grep puppet
> > > root 91047  0.0  1.4 108760 56900 ??  S  Fri07PM0:05.86 
> > > /usr/local/bin/ruby27 -W0 /usr/local/bin/puppet agent
> > > root 81078  0.0  0.0   632  1544 p0  S+p 9:00AM0:00.01 grep 
> > > puppet
> > Not sure, I think this is because sebastia added `-W0' in 5/Makefile:
> > 
> > revision 1.33
> > date: 2021/01/18 22:26:11;  author: sebastia;  state: Exp;  lines: +4 
> > -2;  commitid: V8KuIdf4R32pgNMt;
> > suppress the huge number of deprecation/obsolete warnings since Ruby 2.7
> > 
> > > The "-W0" parameter breaks "rcctl ls failed" and a daily warning is sent.
> > > Is this a known issue ? I think other softwares may be affected.
> > I did not notice it because I'm using Puppet 6, but also without the
> > rc script, i.e. in a masterless setup.
> > 
> > I think the diff below should have been part of sebastia's commit,
> > it is untested however;  can you give this a try?
> > 
> That diff fixes it.
> ok giovanni@ if sebastia@ agrees.
> 
In the previous diff we forgot about puppetmaster that now has the same problem,
ok for this diff ?

 Giovanni

Index: 5/Makefile
===
RCS file: /cvs/ports/sysutils/ruby-puppet/5/Makefile,v
retrieving revision 1.37
diff -u -p -r1.37 Makefile
--- 5/Makefile  16 Mar 2021 18:43:40 -  1.37
+++ 5/Makefile  4 May 2021 09:03:50 -
@@ -3,7 +3,7 @@
 PORTROACH= limit:^5
 
 VERSION=   5.5.22
-REVISION=  7
+REVISION=  8
 
 RUN_DEPENDS+=  databases/ruby-hiera3,${MODRUBY_FLAVOR} \
devel/ruby-gettext-setup,${MODRUBY_FLAVOR}>=0.28,<1 \
Index: pkg/puppetmaster.rc
===
RCS file: /cvs/ports/sysutils/ruby-puppet/pkg/puppetmaster.rc,v
retrieving revision 1.2
diff -u -p -r1.2 puppetmaster.rc
--- pkg/puppetmaster.rc 11 Jan 2018 19:27:10 -  1.2
+++ pkg/puppetmaster.rc 4 May 2021 09:03:50 -
@@ -6,7 +6,7 @@ daemon="${TRUEPREFIX}/bin/puppet master"
 
 . /etc/rc.d/rc.subr
 
-pexp="${RUBY} ${daemon}${daemon_flags:+ ${daemon_flags}}"
+pexp="${RUBY} -W0 ${daemon}${daemon_flags:+ ${daemon_flags}}"
 rc_reload=NO
 
 rc_cmd $1


signature.asc
Description: PGP signature


Re: ruby27 vs Puppet

2021-03-14 Thread Giovanni Bechis
On Sat, Mar 13, 2021 at 02:33:48PM +0100, Klemens Nanni wrote:
> On Sat, Mar 13, 2021 at 09:05:18AM +0100, Giovanni Bechis wrote:
> > Hi,
> > after updating to current I receive daily warnings that my Puppet client is 
> > not running.
> > This is because ruby27 starts programs in a different way then ruby26.
> > 
> > On OpenBSD 6.8 I have:
> > $ ps auxww | grep puppet
> > root 63876  0.0 10.2 82024 51836 ??  S  Fri05PM0:05.56 
> > /usr/local/bin/ruby26 /usr/local/bin/puppet agent
> > snb  29563  0.0  0.2   288  1252 p0  S+p 8:59AM0:00.00 grep 
> > puppet
> > 
> > on OpenBSD 6.9-current:
> > $ ps auxww | grep puppet
> > root 91047  0.0  1.4 108760 56900 ??  S  Fri07PM0:05.86 
> > /usr/local/bin/ruby27 -W0 /usr/local/bin/puppet agent
> > root 81078  0.0  0.0   632  1544 p0  S+p 9:00AM0:00.01 grep 
> > puppet
> Not sure, I think this is because sebastia added `-W0' in 5/Makefile:
> 
>   revision 1.33
>   date: 2021/01/18 22:26:11;  author: sebastia;  state: Exp;  lines: +4 
> -2;  commitid: V8KuIdf4R32pgNMt;
>   suppress the huge number of deprecation/obsolete warnings since Ruby 2.7
> 
> > The "-W0" parameter breaks "rcctl ls failed" and a daily warning is sent.
> > Is this a known issue ? I think other softwares may be affected.
> I did not notice it because I'm using Puppet 6, but also without the
> rc script, i.e. in a masterless setup.
> 
> I think the diff below should have been part of sebastia's commit,
> it is untested however;  can you give this a try?
> 
That diff fixes it.
ok giovanni@ if sebastia@ agrees.

 Cheers & Thanks
   Giovanni


> 
> Index: 5/Makefile
> ===
> RCS file: /cvs/ports/sysutils/ruby-puppet/5/Makefile,v
> retrieving revision 1.36
> diff -u -p -r1.36 Makefile
> --- 5/Makefile2 Feb 2021 20:10:09 -   1.36
> +++ 5/Makefile13 Mar 2021 13:26:22 -
> @@ -3,7 +3,7 @@
>  PORTROACH=   limit:^5
>  
>  VERSION= 5.5.22
> -REVISION=6
> +REVISION=7
>  
>  RUN_DEPENDS+=databases/ruby-hiera3,${MODRUBY_FLAVOR} \
>   devel/ruby-gettext-setup,${MODRUBY_FLAVOR}>=0.28,<1 \
> Index: 6/Makefile
> ===
> RCS file: /cvs/ports/sysutils/ruby-puppet/6/Makefile,v
> retrieving revision 1.16
> diff -u -p -r1.16 Makefile
> --- 6/Makefile17 Feb 2021 18:45:58 -  1.16
> +++ 6/Makefile13 Mar 2021 13:26:20 -
> @@ -3,6 +3,7 @@
>  PORTROACH=   limit:^6
>  
>  VERSION= 6.21.1
> +REVISION=0
>  
>  MAINTAINER=  Klemens Nanni 
>  
> @@ -32,5 +33,7 @@ do-install:
>   mv ${WRKINST}${SYSCONFDIR}/puppetlabs 
> ${PREFIX}/${MODRUBY_RELEXAMPLEDIR}-puppet
>   ${INSTALL_DATA} ${WRKSRC}/conf/*.conf \
>   ${PREFIX}/${MODRUBY_RELEXAMPLEDIR}-puppet/puppet/
> + # Suppress a huge number of Ruby deprecation/obsolete warnings
> + sed -i -e "s/ruby${MODRUBY_BINREV}/ruby${MODRUBY_BINREV} -W0/" 
> ${PREFIX}/bin/puppet
>  
>  .include 
> Index: pkg/puppet.rc
> ===
> RCS file: /cvs/ports/sysutils/ruby-puppet/pkg/puppet.rc,v
> retrieving revision 1.3
> diff -u -p -r1.3 puppet.rc
> --- pkg/puppet.rc 11 Jan 2018 19:27:10 -  1.3
> +++ pkg/puppet.rc 13 Mar 2021 13:26:49 -
> @@ -6,7 +6,7 @@ daemon="${TRUEPREFIX}/bin/puppet agent"
>  
>  . /etc/rc.d/rc.subr
>  
> -pexp="${RUBY} ${daemon}${daemon_flags:+ ${daemon_flags}}"
> +pexp="${RUBY} -W0 ${daemon}${daemon_flags:+ ${daemon_flags}}"
>  rc_reload=NO
>  
>  rc_cmd $1
> 


signature.asc
Description: PGP signature


Re: ruby27 vs Puppet

2021-03-13 Thread Klemens Nanni
On Sat, Mar 13, 2021 at 09:05:18AM +0100, Giovanni Bechis wrote:
> Hi,
> after updating to current I receive daily warnings that my Puppet client is 
> not running.
> This is because ruby27 starts programs in a different way then ruby26.
> 
> On OpenBSD 6.8 I have:
> $ ps auxww | grep puppet
> root 63876  0.0 10.2 82024 51836 ??  S  Fri05PM0:05.56 
> /usr/local/bin/ruby26 /usr/local/bin/puppet agent
> snb  29563  0.0  0.2   288  1252 p0  S+p 8:59AM0:00.00 grep puppet
> 
> on OpenBSD 6.9-current:
> $ ps auxww | grep puppet
> root 91047  0.0  1.4 108760 56900 ??  S  Fri07PM0:05.86 
> /usr/local/bin/ruby27 -W0 /usr/local/bin/puppet agent
> root 81078  0.0  0.0   632  1544 p0  S+p 9:00AM0:00.01 grep puppet
Not sure, I think this is because sebastia added `-W0' in 5/Makefile:

revision 1.33
date: 2021/01/18 22:26:11;  author: sebastia;  state: Exp;  lines: +4 
-2;  commitid: V8KuIdf4R32pgNMt;
suppress the huge number of deprecation/obsolete warnings since Ruby 2.7

> The "-W0" parameter breaks "rcctl ls failed" and a daily warning is sent.
> Is this a known issue ? I think other softwares may be affected.
I did not notice it because I'm using Puppet 6, but also without the
rc script, i.e. in a masterless setup.

I think the diff below should have been part of sebastia's commit,
it is untested however;  can you give this a try?


Index: 5/Makefile
===
RCS file: /cvs/ports/sysutils/ruby-puppet/5/Makefile,v
retrieving revision 1.36
diff -u -p -r1.36 Makefile
--- 5/Makefile  2 Feb 2021 20:10:09 -   1.36
+++ 5/Makefile  13 Mar 2021 13:26:22 -
@@ -3,7 +3,7 @@
 PORTROACH= limit:^5
 
 VERSION=   5.5.22
-REVISION=  6
+REVISION=  7
 
 RUN_DEPENDS+=  databases/ruby-hiera3,${MODRUBY_FLAVOR} \
devel/ruby-gettext-setup,${MODRUBY_FLAVOR}>=0.28,<1 \
Index: 6/Makefile
===
RCS file: /cvs/ports/sysutils/ruby-puppet/6/Makefile,v
retrieving revision 1.16
diff -u -p -r1.16 Makefile
--- 6/Makefile  17 Feb 2021 18:45:58 -  1.16
+++ 6/Makefile  13 Mar 2021 13:26:20 -
@@ -3,6 +3,7 @@
 PORTROACH= limit:^6
 
 VERSION=   6.21.1
+REVISION=  0
 
 MAINTAINER=Klemens Nanni 
 
@@ -32,5 +33,7 @@ do-install:
mv ${WRKINST}${SYSCONFDIR}/puppetlabs 
${PREFIX}/${MODRUBY_RELEXAMPLEDIR}-puppet
${INSTALL_DATA} ${WRKSRC}/conf/*.conf \
${PREFIX}/${MODRUBY_RELEXAMPLEDIR}-puppet/puppet/
+   # Suppress a huge number of Ruby deprecation/obsolete warnings
+   sed -i -e "s/ruby${MODRUBY_BINREV}/ruby${MODRUBY_BINREV} -W0/" 
${PREFIX}/bin/puppet
 
 .include 
Index: pkg/puppet.rc
===
RCS file: /cvs/ports/sysutils/ruby-puppet/pkg/puppet.rc,v
retrieving revision 1.3
diff -u -p -r1.3 puppet.rc
--- pkg/puppet.rc   11 Jan 2018 19:27:10 -  1.3
+++ pkg/puppet.rc   13 Mar 2021 13:26:49 -
@@ -6,7 +6,7 @@ daemon="${TRUEPREFIX}/bin/puppet agent"
 
 . /etc/rc.d/rc.subr
 
-pexp="${RUBY} ${daemon}${daemon_flags:+ ${daemon_flags}}"
+pexp="${RUBY} -W0 ${daemon}${daemon_flags:+ ${daemon_flags}}"
 rc_reload=NO
 
 rc_cmd $1