Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

Drop core module dependency workarounds intended for Red Hat #293

Closed
wants to merge 1 commit into from

Conversation

AdamWill
Copy link

It should never have been upstream's job to worry about this. inxi should just correctly expect all core modules to be present and not defend against them being absent. The fact that some Fedora/RHEL users were able to get into a situation where they had inxi installed but not the required core modules was caused by errors in the Fedora downstream inxi package.

I am fixing inxi on all current Fedora versions to ensure this cannot happen with packaged inxi. Older EOL Fedora versions will not get this change in their packaged inxi.

Anyone using inxi from a direct download on Fedora 28 or later, or EL 8 or later, can be assumed to have all core modules present if they did "dnf install perl". If they did not do "dnf install perl" in order to use a Perl program, that is their problem, not anybody else's (and it would be hard for the script to sensibly defend against all errors that could possibly happen in that case).

This also includes a bug fix: the sleep in set_sysctl_data tried to use $sleep, which not declared in that context. As it was in an eval block, this was hidden. Now it's not in an eval block, this causes a compilation failure if not fixed.

@AdamWill
Copy link
Author

AdamWill commented Jan 12, 2024

I've tested this on Fedora 39. I intend to test several other scenarios, but wanted to create the PR first so I can refer to it in a PR for the Fedora package. I will update this PR with a comment covering all the scenarios I think need to be considered when I'm done testing.

edit: https://src.fedoraproject.org/rpms/inxi/pull-request/1 is the pull request for the Fedora and EPEL package.

It should never have been upstream's job to worry about this.
inxi should just correctly expect all core modules to be present
and not defend against them being absent. The fact that some
Fedora/RHEL users were able to get into a situation where they
had inxi installed but not the required core modules was caused
by errors in the Fedora downstream inxi package.

I am fixing inxi on all current Fedora versions to ensure this
cannot happen with packaged inxi. Older EOL Fedora versions will
not get this change in their packaged inxi.

Anyone using inxi from a direct download on Fedora 28 or later,
or EL 8 or later, can be assumed to have all core modules present
if they did "dnf install perl". If they did not do "dnf install
perl" in order to use a Perl program, that is their problem, not
anybody else's (and it would be hard for the script to sensibly
defend against *all* errors that could possibly happen in that
case).

This also includes a bug fix: the sleep in set_sysctl_data tried
to use $sleep, which not declared in that context. As it was in
an `eval` block, this was hidden. Now it's not in an `eval`
block, this causes a compilation failure if not fixed.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
@AdamWill
Copy link
Author

ah, sorry, I see the note that PRs should go to pinxi, will move this there.

@AdamWill AdamWill closed this Jan 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant