Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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

Summary: /etc/profile.d/PackageKit.sh broken for mksh (possibly others, but mksh for certain).
Product: Red Hat Enterprise Linux 8 Reporter: Thomas Gardner <thgardne>
Component: PackageKitAssignee: Richard Hughes <rhughes>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.1CC: bmilar, klember, mclasen, tpelka, vanhoof
Target Milestone: rcFlags: vanhoof: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: PackageKit-1.1.12-4.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 15:57:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1745633, 1755139    

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