Bug#952022: ruby-puppet-syntax: FTBFS: ERROR: Test "ruby2.7" failed: LoadError:

2020-03-23 Thread Daniel Leidert
Am Montag, den 23.03.2020, 19:28 +0100 schrieb Daniel Leidert:

[..]
> Thanks. This actually brought me on the right track. I just uploaded the
> fixed package.

The last three messages (#31, #36, #41) were reported against the wrong
package. They are related to #952024 instead. Please ignore them. The last mail
related to this report is:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=952022#24

Regards, Daniel


signature.asc
Description: This is a digitally signed message part


Bug#952022: ruby-puppet-syntax: FTBFS: ERROR: Test "ruby2.7" failed: LoadError:

2020-03-23 Thread Daniel Leidert
Am Montag, den 23.03.2020, 18:13 +0100 schrieb Stig Sandbeck Mathisen:
> Daniel Leidert  writes:
> 
> > Package: src:ruby-puppet-syntax
> > Followup-For: Bug #952022
> > 
> > The formentioned issue can probably be closed by applying this patch:
> > 
> > --- a/lib/rspec-puppet/support.rb
> > +++ b/lib/rspec-puppet/support.rb
> > @@ -440,7 +440,7 @@
> >  end
> >  
> >  def escape_special_chars(string)
> > -  string.gsub!(/\$/, "\\$")
> > +  string.gsub(/\$/, "\\$")
> >string
> >  end
> > 
> > But then there are new errors (see below). I'll stop here and leave
> > this to someone more experienced. So if anyone wants to go on, please
> > feel free to do so.
> > 
> > Regards, Daniel
> 
> I think that change turns the subroutine into a noop.
> 
> string.gsub(pattern,replacement) returns the changed string, and does
> not change the original object. The output in this instance is
> discarded.
> 
> string.gsub!(pattern,replacement) modifies the object.
>
> The subroutine then returns the original or changed string.

Thanks. This actually brought me on the right track. I just uploaded the fixed
package.

Regards, Daniel


signature.asc
Description: This is a digitally signed message part


Bug#952022: ruby-puppet-syntax: FTBFS: ERROR: Test "ruby2.7" failed: LoadError:

2020-03-23 Thread Stig Sandbeck Mathisen
Daniel Leidert  writes:

> Package: src:ruby-puppet-syntax
> Followup-For: Bug #952022
>
> The formentioned issue can probably be closed by applying this patch:
>
> --- a/lib/rspec-puppet/support.rb
> +++ b/lib/rspec-puppet/support.rb
> @@ -440,7 +440,7 @@
>  end
>  
>  def escape_special_chars(string)
> -  string.gsub!(/\$/, "\\$")
> +  string.gsub(/\$/, "\\$")
>string
>  end
>
> But then there are new errors (see below). I'll stop here and leave
> this to someone more experienced. So if anyone wants to go on, please
> feel free to do so.
>
> Regards, Daniel

I think that change turns the subroutine into a noop.

string.gsub(pattern,replacement) returns the changed string, and does
not change the original object. The output in this instance is
discarded.

string.gsub!(pattern,replacement) modifies the object.

The subroutine then returns the original or changed string.

See https://ruby-doc.org/core-2.7.0/String.html

-- 
Stig Sandbeck Mathisen
Debian Developer


signature.asc
Description: PGP signature


Bug#952022: ruby-puppet-syntax: FTBFS: ERROR: Test "ruby2.7" failed: LoadError:

2020-03-23 Thread Daniel Leidert
Package: src:ruby-puppet-syntax
Followup-For: Bug #952022

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

The formentioned issue can probably be closed by applying this patch:

- --- a/lib/rspec-puppet/support.rb
+++ b/lib/rspec-puppet/support.rb
@@ -440,7 +440,7 @@
 end
 
 def escape_special_chars(string)
- -  string.gsub!(/\$/, "\\$")
+  string.gsub(/\$/, "\\$")
   string
 end

But then there are new errors (see below). I'll stop here and leave this to
someone more experienced. So if anyone wants to go on, please feel free to do
so.

Regards, Daniel



Failures:

  1) escape is expected to contain File[/tmp/escape] with content =~ /\$MSG foo/
 Failure/Error: Puppet::Resource::Catalog.indirection.find(node.name, 
:use_node => node)

 Puppet::ParseErrorWithIssue:
   Could not parse for environment rp_env: Illegal variable name, The given 
name 'MSG' does not conform to the naming rule 
/^((::)?[a-z]\w*)*((::)?[a-z_]\w*)$/ (line: 52, column: 31) on node (node's 
fully qualified domain name)
 # ./lib/rspec-puppet/adapters.rb:84:in `catalog'
 # ./lib/rspec-puppet/adapters.rb:162:in `catalog'
 # ./lib/rspec-puppet/support.rb:415:in `build_catalog_without_cache'
 # ./lib/rspec-puppet/support.rb:426:in `block in build_catalog'
 # ./lib/rspec-puppet/cache.rb:17:in `get'
 # ./lib/rspec-puppet/support.rb:425:in `build_catalog'
 # ./lib/rspec-puppet/support.rb:90:in `block in load_catalogue'
 # ./lib/rspec-puppet/support.rb:376:in `with_vardir'
 # ./lib/rspec-puppet/support.rb:83:in `load_catalogue'
 # ./lib/rspec-puppet/example/class_example_group.rb:7:in `catalogue'
 # ./lib/rspec-puppet/support.rb:12:in `block in subject'
 # ./lib/rspec-puppet/matchers/create_generic.rb:84:in `matches?'
 # ./spec/classes/escape_spec.rb:6:in `block (2 levels) in '

  2) escape::def is expected to contain File[/tmp/bla] with content =~ /bar 
\$BLA/
 Failure/Error: Puppet::Resource::Catalog.indirection.find(node.name, 
:use_node => node)

 Puppet::ParseErrorWithIssue:
   Could not parse for environment rp_env: Illegal variable name, The given 
name 'BLA' does not conform to the naming rule 
/^((::)?[a-z]\w*)*((::)?[a-z_]\w*)$/ (line: 52, column: 43) on node (node's 
fully qualified domain name)
 # ./lib/rspec-puppet/adapters.rb:84:in `catalog'
 # ./lib/rspec-puppet/adapters.rb:162:in `catalog'
 # ./lib/rspec-puppet/support.rb:415:in `build_catalog_without_cache'
 # ./lib/rspec-puppet/support.rb:426:in `block in build_catalog'
 # ./lib/rspec-puppet/cache.rb:17:in `get'
 # ./lib/rspec-puppet/support.rb:425:in `build_catalog'
 # ./lib/rspec-puppet/support.rb:90:in `block in load_catalogue'
 # ./lib/rspec-puppet/support.rb:376:in `with_vardir'
 # ./lib/rspec-puppet/support.rb:83:in `load_catalogue'
 # ./lib/rspec-puppet/example/define_example_group.rb:7:in `catalogue'
 # ./lib/rspec-puppet/support.rb:12:in `block in subject'
 # ./lib/rspec-puppet/matchers/create_generic.rb:84:in `matches?'
 # ./spec/defines/escape_def_spec.rb:7:in `block (2 levels) in '




- -- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.3.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-BEGIN PGP SIGNATURE-

iQIzBAEBCgAdFiEEvu1N7VVEpMA+KD3HS80FZ8KW0F0FAl54zT4ACgkQS80FZ8KW
0F16iRAAhCzC8ny3ofA8J3tjEAQ2/E+bP8FR7fH+WmGxvKhkdNMpZPMpsrjHvgu8
8A434pd+E4wzAAPbnmcuv6iNSqJS9KVU4pkaTXEpSdgGaa+9WqUO6I0adBC2kZ0Y
mjQa4/sLiWCjd5vLsqgG2idNwhMQLUc3AxIBTdBHRJSsPB0pYRfv3iRUSKT4m1Te
Wd4YsW9W7pyUmCNkEfmnEMLzOnkkIqA8a/+JJPRYhPUD+eTIBIWBB2DAZLQKbgwt
eMfwkIlvo5AlE916t9B6iPZRt2ScEXseJp7DGUBa/wxXFj0HIwq5qi5EgPHgAKQO
v4g23yU9dApPImIowTK0obsHkUuy6fu/aA3uePtVyC6dprwJIw8+E7VAQJG+awuz
E3/mMZzj5PAMYg1pb/EgSFifRY1kRb68vtmOZ+kch9opgIKt//MG8iaX//f9O4o0
XwR/YLgcmYLUp+UhPUevW+vhVUR5Z/rUk3YXrD+8SASmzAimxYfQcOvv+2hPlNTh
GBis3FDKztnXuUhBt+cRMr+ISnJiIzhh7hviwgBO7E6/8wow/UDX5pwwVvzc71Ad
sgtFVFxRdeXn1XxI0zJem1vHJXh6nNr2I7FZv8sI7hGaPKlT3o+wsF5P+VusDzFR
NggIa0eEl8EC5PjJcMTyVND8wRysYC9XE1e6CxZleq6VEtfqefI=
=E+Lb
-END PGP SIGNATURE-



Bug#952022: ruby-puppet-syntax: FTBFS: ERROR: Test "ruby2.7" failed: LoadError:

2020-03-04 Thread Daniel Leidert
Package: src:ruby-puppet-syntax
Followup-For: Bug #952022

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

facter has been binNMUed. The Ruby2.7 tests then failed because sync was
missing (has been soplit out of Ruby). So I added ruby-sync. But the build
still fails:

Failures:

  1) PuppetSyntax::Templates on Puppet >= 3.7 should return nothing from a 
valid file
 Failure/Error: expect(res).to match([])

   expected ["/usr/lib/ruby/vendor_ruby/puppet/file_system/file_impl.rb:80: 
warning: Using the last argument as keyword parameters is deprecated\n"] to 
match []
   Diff:
   @@ -1 +1,2 @@
   +/usr/lib/ruby/vendor_ruby/puppet/file_system/file_impl.rb:80: warning: 
Using the last argument as keyword parameters is deprecated\n
 # ./spec/puppet-syntax/templates_spec.rb:103:in `block (3 levels) in '

  2) PuppetSyntax::Templates on Puppet >= 3.7 should catch SyntaxError
 Failure/Error: expect(res.size).to eq(1)

   expected: 1
got: 2

   (compared using ==)
 # ./spec/puppet-syntax/templates_spec.rb:110:in `block (3 levels) in '

  3) PuppetSyntax::Templates on Puppet >= 3.7 should read more than one valid 
file
 Failure/Error: expect(res).to match([])

   expected ["/usr/lib/ruby/vendor_ruby/puppet/file_system/file_impl.rb:80: 
warning: Using the last argument as k...ile_system/file_impl.rb:80: warning: 
Using the last argument as keyword parameters is deprecated\n"] to match []
   Diff:
   @@ -1 +1,2 @@
   +/usr/lib/ruby/vendor_ruby/puppet/file_system/file_impl.rb:80: warning: 
Using the last argument as keyword parameters is 
deprecated\n/usr/lib/ruby/vendor_ruby/puppet/file_system/file_impl.rb:80: 
warning: Using the last argument as keyword parameters is deprecated\n
 # ./spec/puppet-syntax/templates_spec.rb:118:in `block (3 levels) in '

  4) PuppetSyntax::Templates on Puppet >= 3.7 should continue after finding an 
error in the first file
 Failure/Error: expect(res.size).to eq(2)

   expected: 2
got: 3

   (compared using ==)
 # ./spec/puppet-syntax/templates_spec.rb:125:in `block (3 levels) in '

  5) PuppetSyntax::Templates on Puppet >= 3.7 when the 'epp_only' options is 
set should process an ERB as EPP and find an error
 Failure/Error: expect(res.size).to eq(1)

   expected: 1
got: 2

   (compared using ==)
 # ./spec/puppet-syntax/templates_spec.rb:139:in `block (4 levels) in '

Finished in 0.09464 seconds (files took 0.70415 seconds to load)
43 examples, 5 failures

Failed examples:

rspec ./spec/puppet-syntax/templates_spec.rb:99 # PuppetSyntax::Templates on 
Puppet >= 3.7 should return nothing from a valid file
rspec ./spec/puppet-syntax/templates_spec.rb:106 # PuppetSyntax::Templates on 
Puppet >= 3.7 should catch SyntaxError
rspec ./spec/puppet-syntax/templates_spec.rb:114 # PuppetSyntax::Templates on 
Puppet >= 3.7 should read more than one valid file
rspec ./spec/puppet-syntax/templates_spec.rb:121 # PuppetSyntax::Templates on 
Puppet >= 3.7 should continue after finding an error in the first file
rspec ./spec/puppet-syntax/templates_spec.rb:135 # PuppetSyntax::Templates on 
Puppet >= 3.7 when the 'epp_only' options is set should process an ERB as EPP 
and find an error

/usr/bin/ruby2.7 
-I/usr/share/rubygems-integration/all/gems/rspec-support-3.9.2/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.9.1/lib
 /usr/share/rubygems-integration/all/gems/rspec-core-3.9.1/exe/rspec --pattern 
./spec/\*\*/\*_spec.rb --format documentation failed
ERROR: Test "ruby2.7" failed. Exiting.

The issue probably is the new warning thrown by Ruby. I guess that's the reason
why all those tests fail. Upstream maybe already fixed it but did not yet
release a new version.

I pushed my work to the repository.

Regards, Daniel

- -- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.3.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

-BEGIN PGP SIGNATURE-

iQIzBAEBCgAdFiEEvu1N7VVEpMA+KD3HS80FZ8KW0F0FAl5f87oACgkQS80FZ8KW
0F37/hAA2L6KoVI3ZnxYb0+XChM9xBUop07oHbYh+McgfwTwKXTpJJFPpa+jmnwQ
qUJVV7JJB0E//2oCOR2kN+NWLrdpSJHvpjYYy3nnfLR6rUjWxZ+vEJVIc/hfWOo+
Egg/o88uxzp8io8JXKRUrU3PHPIo1F+tL7SWhjDmlxzCTEtnpLQzYfLr3edVUFQb
zyfUZDcTLz7zIR0khe+EQEV6MTWanVD8XwrjhP1SBVrV6ZKmM+CkPbgcThk/JU0F
8rfVlS2DjQUPrzaAx+No1sEt1pr/NzXaRVUL07t9IQUGJ+L43owzrgviNsghW2Y+
Z/VnrZznXKxFGCYb9FiRAqxMr+bDnPn6FKeb+Hn34QBh6aW4GZ4vp/b5FWzT0hDS
lK+fK7ouLvD/jfHcAWsBc4C3KX88HW+hmlQR1Lke4L2qgvpljkUgYYmoBTXCe6CU
Y8iXeDe/tH4V3UVIlcKmCKBC+Jle30qrev+B5yBE/K2ap7SCyPXBLCRg7C4llWAz
RVmxccsx7k9NBgawWclUMl5AQYTCezmOZwNUR2g+MZlBrxkvOfhtYIVguSAvhYYM
l+qm9R/59Pm3A4xTuFYoox167r+1NhBksv/yEIXpm54HI14qJ0PFPTTCVoHFBW/a

Bug#952022: [DRE-maint] Bug#952022: ruby-puppet-syntax: FTBFS: ERROR: Test "ruby2.7" failed: LoadError:

2020-02-23 Thread Daniel Leidert
Am Sonntag, den 23.02.2020, 08:46 +0100 schrieb Lucas Nussbaum:

> During a rebuild of all packages in sid, your package failed to build
> on amd64.
> 
> Relevant part (hopefully):
> > LoadError:
> >   libfacter was not found. Please make sure it was installed to the
> > expected location.
> >   cannot load such file -- libfacter.so

facter needs a rebuild against ruby2.7.

Regards, Daniel


signature.asc
Description: This is a digitally signed message part


Bug#952022: ruby-puppet-syntax: FTBFS: ERROR: Test "ruby2.7" failed: LoadError:

2020-02-22 Thread Lucas Nussbaum
Source: ruby-puppet-syntax
Version: 2.6.1-1
Severity: serious
Justification: FTBFS on amd64
Tags: buster sid
Usertags: ftbfs-20200222 ftbfs-buster

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.

Relevant part (hopefully):
> LoadError:
>   libfacter was not found. Please make sure it was installed to the expected 
> location.
>   cannot load such file -- libfacter.so
> # ./lib/puppet-syntax/templates.rb:2:in `'
> # ./lib/puppet-syntax.rb:3:in `'
> # ./spec/spec_helper.rb:2:in `'
> # ./spec/puppet-syntax_spec.rb:1:in `'
> # --
> # --- Caused by: ---
> # LoadError:
> #   cannot load such file -- libfacter.so
> #   ./lib/puppet-syntax/templates.rb:2:in `'
> No examples found.
> 
> Finished in 0.3 seconds (files took 0.19211 seconds to load)
> 0 examples, 0 failures, 5 errors occurred outside of examples
> 
> /usr/bin/ruby2.7 
> -I/usr/share/rubygems-integration/all/gems/rspec-support-3.9.2/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.9.1/lib
>  /usr/share/rubygems-integration/all/gems/rspec-core-3.9.1/exe/rspec 
> --pattern ./spec/\*\*/\*_spec.rb --format documentation failed
> ERROR: Test "ruby2.7" failed: 

The full build log is available from:
   http://qa-logs.debian.net/2020/02/22/ruby-puppet-syntax_2.6.1-1_unstable.log

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on EC2 VM instances from
Amazon Web Services, using a clean, minimal and up-to-date chroot. Every
failed build was retried once to eliminate random failures.