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      Fri05PM    0:05.56 
> /usr/local/bin/ruby26 /usr/local/bin/puppet agent
> snb      29563  0.0  0.2   288  1252 p0  S+p     8:59AM    0:00.00 grep puppet
> 
> on OpenBSD 6.9-current:
> $ ps auxww | grep puppet
> root     91047  0.0  1.4 108760 56900 ??  S      Fri07PM    0:05.86 
> /usr/local/bin/ruby27 -W0 /usr/local/bin/puppet agent
> root     81078  0.0  0.0   632  1544 p0  S+p     9:00AM    0: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 -0000       1.36
+++ 5/Makefile  13 Mar 2021 13:26:22 -0000
@@ -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 -0000      1.16
+++ 6/Makefile  13 Mar 2021 13:26:20 -0000
@@ -3,6 +3,7 @@
 PORTROACH=             limit:^6
 
 VERSION=               6.21.1
+REVISION=              0
 
 MAINTAINER=            Klemens Nanni <k...@openbsd.org>
 
@@ -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 <bsd.port.mk>
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 -0000      1.3
+++ pkg/puppet.rc       13 Mar 2021 13:26:49 -0000
@@ -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

Reply via email to