Coder Social home page Coder Social logo

Comments (14)

vinc17fr avatar vinc17fr commented on June 6, 2024 1

The error comes from Sys/Info/Driver/Linux/OS/Distribution.pm, sub _probe_version, when executing $self->_get_file_info.

from cpan-sys-info-driver-linux.

maikelsteneker avatar maikelsteneker commented on June 6, 2024

This was a problem for me on a 32-bit Debian 7 system.

from cpan-sys-info-driver-linux.

dsheroh avatar dsheroh commented on June 6, 2024

Also getting this problem on

$ uname -a
Linux hostname 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u2 (2018-02-21) x86_64 GNU/Linux

with

$ perl -v
This is perl 5, version 24, subversion 1 (v5.24.1) built for x86_64-linux-gnu-thread-multi

Looking at the test results matrix, this seems to be a very widespread problem, with the current release showing failures for over 2/3 of test systems. (99 PASS / 273 FAIL at the time of this posting)

from cpan-sys-info-driver-linux.

nigelhorne avatar nigelhorne commented on June 6, 2024

Any update? I'm wondering if this module is still supported.

from cpan-sys-info-driver-linux.

nigelhorne avatar nigelhorne commented on June 6, 2024

FWIW, it works on this:

Linux pi2 4.19.42-v7+ #1219 SMP Tue May 14 21:20:58 BST 2019 armv7l GNU/Linux

from cpan-sys-info-driver-linux.

vinc17fr avatar vinc17fr commented on June 6, 2024

I have the same issue under Debian/unstable, x86_64, before and after the upgrade to perl 5.30.

from cpan-sys-info-driver-linux.

vinc17fr avatar vinc17fr commented on June 6, 2024

The problem is with

 local $self->{release_file} = $slot->{release}
    if $slot->{release};

as under Debian at least, $slot->{release} contains an array reference, not a file name. At least under Debian, this code could be ignored because the files from the array do not have the expected format.

from cpan-sys-info-driver-linux.

vinc17fr avatar vinc17fr commented on June 6, 2024

And this broken code has been introduced by changeset edc04a1 ("New centos workaround").

from cpan-sys-info-driver-linux.

nigelhorne avatar nigelhorne commented on June 6, 2024

@vinc17fr - could you put in a pull request pls?

from cpan-sys-info-driver-linux.

vinc17fr avatar vinc17fr commented on June 6, 2024

OK, I see where the real problem is: the Debian configuration information is obsolete. I'll update it. The consequence is that Debian versions earlier than Debian 6.8 will no longer be supported without a /etc/os-release file. But that's 4 versions earlier than the current stable and there's an easy workaround for them anyway, so that I don't think that this is an issue.

from cpan-sys-info-driver-linux.

vinc17fr avatar vinc17fr commented on June 6, 2024

I can see that some other distributions have a similar issue: several "release" files. But either they now provide a /etc/os-release file like what Debian did 7 years ago, and they could be dropped (I think), or one of them could be dropped (e.g. corresponding to very old versions of the distribution), or the _probe_version code could be changed to do a loop (but I can't test).

For Debian, /etc/debian_version contains the minor release, not present in /etc/os-release, so I need a closer look to see whether it may be useful...

from cpan-sys-info-driver-linux.

vinc17fr avatar vinc17fr commented on June 6, 2024

Note: This pull request fixes the test failure for Debian. The example in the Sys::Info::Driver::Linux::OS::Distribution man page does not work, but that's a separate issue, and I could check that there was the same issue even with an older version of the module.

from cpan-sys-info-driver-linux.

depesz avatar depesz commented on June 6, 2024

Hi. So it's failing, still (or maybe it's a new thing) on new debian:

=$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux bookworm/sid
Release:        testing
Codename:       bookworm

=$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux bookworm/sid"
NAME="Debian GNU/Linux"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

=$ make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-compile.t ........... ok
t/00-report-prereqs.t .... #
# Versions for all modules listed in MYMETA.json (including optional ones):
#
# === Configure Requires ===
#
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker  any 7.62
#
# === Build Requires ===
#
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker  any 7.62
#
# === Test Requires ===
#
#     Module              Want     Have
#     ------------------- ---- --------
#     ExtUtils::MakeMaker  any     7.62
#     File::Spec           any     3.80
#     IO::Handle           any     1.46
#     IPC::Open3           any     1.21
#     Test::More           any 1.302183
#     Test::Sys::Info     0.20     0.23
#
# === Test Recommends ===
#
#     Module         Want     Have
#     ---------- -------- --------
#     CPAN::Meta 2.120900 2.150010
#
# === Runtime Requires ===
#
#     Module             Want   Have
#     ---------------- ------ ------
#     Config::General     any   2.65
#     Sys::Info::Base  0.7801 0.7807
#     Unix::Processors    any  2.046
#
t/00-report-prereqs.t .... ok
t/03-basic.t ............. UNAME: Linux orange 5.19.0-2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.19.11-1 (2022-09-24) x86_64 GNU/Linux

t/03-basic.t ............. 1/? Can't open /etc/ARRAY(0x555ddf5bed38): No such file or directory at /home/depesz/.cpanm/work/1666876753.136068/Sys-Info-Driver-Linux-0.7905/blib/lib/Sys/Info/Driver/Linux/OS.pm line 204.
# Looks like your test exited with 2 just after 23.
t/03-basic.t ............. Dubious, test returned 2 (wstat 512, 0x200)
All 23 subtests passed
t/04-distribution.t ...... Can't open /etc/ARRAY(0x561cff082f58): No such file or directory at t/04-distribution.t line 10.
t/04-distribution.t ...... skipped: (no reason given)
t/author-pod-coverage.t .. skipped: these tests are for testing by the author
t/author-pod-syntax.t .... skipped: these tests are for testing by the author
t/release-distmeta.t ..... skipped: these tests are for release candidate testing

Test Summary Report
-------------------
t/03-basic.t           (Wstat: 512 Tests: 23 Failed: 0)
  Non-zero exit status: 2
t/04-distribution.t    (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
Files=7, Tests=31,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.27 cusr  0.04 csys =  0.32 CPU)
Result: FAIL
Failed 2/7 test programs. 0/31 subtests failed.
make: *** [Makefile:865: test_dynamic] Error 255

from cpan-sys-info-driver-linux.

dkechag avatar dkechag commented on June 6, 2024

This pr: #7 should be the minimal fix for this crash, but not sure if the author is following, as this seems like a longtime issue?

from cpan-sys-info-driver-linux.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.