Bug 2210593 - selinux-autorelabel-generator.sh: In POSIX sh, 'source' in place of '.' is undefined.
Summary: selinux-autorelabel-generator.sh: In POSIX sh, 'source' in place of '.' is un...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 38
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-28 21:35 UTC by Wiley Young
Modified: 2024-01-02 14:16 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-01-02 14:16:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Wiley Young 2023-05-28 21:35:09 UTC
This bug originally misfiled:
https://github.com/systemd/systemd/issues/27642

Used distribution

Fedora 38
Linux kernel version used

6.2.9-300.fc38.x86_64
CPU architectures issue was seen on

i686
Component

No response
Expected behaviour you didn't see

No response
Unexpected behaviour you saw

Ran shellcheck on /usr/lib/systemd/system-generators/selinux-autorelabel-generator.sh on Fedora 38; got back a warning.

Steps to reproduce the problem

[liveuser@localhost-live selinux]$ shellcheck -S warning /usr/lib/systemd/system-generators/selinux-autorelabel-generator.sh

In /usr/lib/systemd/system-generators/selinux-autorelabel-generator.sh line 22:
    source /etc/selinux/config
    ^------------------------^ SC3046 (warning): In POSIX sh, 'source' in place of '.' is undefined.

For more information:
  https://www.shellcheck.net/wiki/SC3046 -- In POSIX sh, 'source' in place of...


Reproducible: Always

Steps to Reproduce:
1. dnf install -y ShellCheck
2. shellcheck -S warning /usr/lib/systemd/system-generators/selinux-autorelabel-generator.sh
3. rpm -qf /usr/lib/systemd/system-generators/selinux-autorelabel-generator.sh

Actual Results:  
[liveuser@localhost-live selinux]$ shellcheck -S warning /usr/lib/systemd/system-generators/selinux-autorelabel-generator.sh

In /usr/lib/systemd/system-generators/selinux-autorelabel-generator.sh line 22:
    source /etc/selinux/config
    ^------------------------^ SC3046 (warning): In POSIX sh, 'source' in place of '.' is undefined.

For more information:
  https://www.shellcheck.net/wiki/SC3046 -- In POSIX sh, 'source' in place of...
[liveuser@localhost-live selinux]$ shellcheck -S warning /usr/lib/systemd/system-generators/selinux-autorelabel-generator.sh^C
[liveuser@localhost-live selinux]$ rpm -qf /usr/lib/systemd/system-generators/selinux-autorelabel-generator.sh
policycoreutils-3.5-1.fc38.x86_64


Expected Results:  
No warnings.

Comment 1 Petr Lautrbach 2023-05-29 08:39:27 UTC
Thanks!

https://src.fedoraproject.org/rpms/policycoreutils/pull-request/37


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