Bug 1520477 - niceload command completely broken in F27
Summary: niceload command completely broken in F27
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: parallel (Show other bugs)
(Show other bugs)
Version: 27
Hardware: All All
unspecified
high
Target Milestone: ---
Assignee: Golo Fuchert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-04 14:45 UTC by Bert DeKnuydt
Modified: 2018-04-27 11:17 UTC (History)
2 users (show)

Fixed In Version: parallel-20180322-1.fc27 parallel-20180322-1.fc28 parallel-20180322-1.fc26
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-27 01:17:10 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Bert DeKnuydt 2017-12-04 14:45:06 UTC
Description of problem:

In Fedora 27, the 'niceload' command is no functioning at all.

Version-Release number of selected component (if applicable):

parallel-20160722-3.fc26.noarch

How reproducible:

Always

Steps to Reproduce:
1. niceload -n 2 sleep 30
2.
3.

Actual results:

In Fedora 27:
---
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/vm\.loadavg: { <-- HERE  ([0-9.]+) ([0-9.]+) ([0-9.]+) }/ at /usr/bin/niceload line 1022.
(exit and error)
---


In Fedora 26:
---
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/vm\.loadavg: { <-- HERE  ([0-9.]+) ([0-9.]+) ([0-9.]+) }/ at /usr/bin/niceload line 1022.
(and the command runs)
---

This is due to a literal { in a regular expressions being deprecated since perl 5.22 and simply flagged as errors
from perl 5.26. F26 has 5.24, while F27 has 5.26.

Expected results:

Function as described in the man page.

Additional info:

I guess two options ...

*) Quick fix:

Edit line 1022 and escape the left brace with a backslash:

---------------------------
--- /usr/bin/niceload.orig      2017-12-04 09:58:56.968454067 +0100
+++ /usr/bin/niceload   2017-12-04 09:59:15.182548403 +0100
@@ -1019,7 +1019,7 @@
 
 sub load_status_darwin {
     my $loadavg = `sysctl vm.loadavg`;
-    if($loadavg =~ /vm\.loadavg: { ([0-9.]+) ([0-9.]+) ([0-9.]+) }/) {
+    if($loadavg =~ /vm\.loadavg: \{ ([0-9.]+) ([0-9.]+) ([0-9.]+) }/) {
        $loadavg = $1;
     } elsif (open(IN,"LANG=C uptime|")) {
        my $upString = <IN>;
--------------------------

*) Other fix:

Update to upstream version parallel-20170206.

Comment 1 Fedora Update System 2018-04-15 04:10:28 UTC
parallel-20180322-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-bfe7526175

Comment 2 Fedora Update System 2018-04-15 04:10:39 UTC
parallel-20180322-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-aea2d04f19

Comment 3 Fedora Update System 2018-04-15 04:10:45 UTC
parallel-20180322-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-61299d188b

Comment 4 Fedora Update System 2018-04-17 03:02:39 UTC
parallel-20180322-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-bfe7526175

Comment 5 Fedora Update System 2018-04-18 02:28:48 UTC
parallel-20180322-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-aea2d04f19

Comment 6 Fedora Update System 2018-04-18 02:57:57 UTC
parallel-20180322-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-61299d188b

Comment 7 Fedora Update System 2018-04-27 01:17:10 UTC
parallel-20180322-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2018-04-27 04:03:17 UTC
parallel-20180322-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2018-04-27 11:17:29 UTC
parallel-20180322-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.