RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1728855 - /etc/profile.d/PackageKit.sh broken for mksh (possibly others, but mksh for certain).
Summary: /etc/profile.d/PackageKit.sh broken for mksh (possibly others, but mksh for c...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: PackageKit
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Richard Hughes
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 1745633 1755139
TreeView+ depends on / blocked
 
Reported: 2019-07-10 19:02 UTC by Thomas Gardner
Modified: 2024-03-25 15:20 UTC (History)
5 users (show)

Fixed In Version: PackageKit-1.1.12-4.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 15:57:59 UTC
Type: Bug
Target Upstream Version:
Embargoed:
vanhoof: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-24897 0 None None None 2022-10-05 11:26:48 UTC
Red Hat Product Errata RHBA-2020:1677 0 None None None 2020-04-28 15:58:02 UTC

Description Thomas Gardner 2019-07-10 19:02:31 UTC
Description of problem:

See BZ#1699038 which is the Fedora cousin of this RHEL BZ.

Line 14 of /etc/profile.d/PackageKit.sh reads:

[[ $- =~ i ]] || runcnf=0

which isn't valid syntax for mksh (possibly others as well, but the customer in this case is using mksh).

We support mksh as a valid shell, and it doesn't support this syntax, so we either have to fix this or stop supporting mksh.

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

PackageKit-command-not-found-1.1.12-2.el8 (one of the packages produced by PackageKit proper).

How reproducible:

100%


Steps to Reproduce:
1. Log in with a user whose default shell is mksh with the PackageKit-command-not-found package installed.
2. Note the error.
3. Facepalm.

Comment 1 Richard Hughes 2019-07-31 09:01:15 UTC
I think we just make the script exit if non-bash.

Comment 3 Bohdan Milar 2019-12-10 10:56:47 UTC
Tested on x86_64 (vm):

# useradd -s /usr/bin/mksh test-mksh
# passwd test-mksh
# rpm -q PackageKit
PackageKit-1.1.12-3.el8.x86_64
# su - test-mksh
Password:
mksh: /etc/profile.d/PackageKit.sh[14]: syntax error: unexpected operator/operand '=~'
$ exit
# dng upgrade PackageKit*
...
# rpm -q PackageKit
PackageKit-1.1.12-4.el8.x86_64
$ su - test-mksh 
Password: 
$

Comment 5 errata-xmlrpc 2020-04-28 15:57:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1677


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