Bug 1226056 - [doc] Issue in "Installation of Podman"
Summary: [doc] Issue in "Installation of Podman"
Status: RESOLVED FIXED
Alias: None
Product: Documentation
Classification: Non-product-specific documentation
Component: Smart Docs (show other bugs)
Version: unspecified
Hardware: Other Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Jana Halackova
QA Contact: Tanja Roth
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-06 17:04 UTC by Jared Hudson
Modified: 2024-06-10 07:15 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Hudson 2024-06-06 17:04:35 UTC
Installation of Podman:

https://documentation.suse.com/sle-micro/6.0/html/Micro-podman/index.html#podman-installation

The command-line suggested, "sudo transactional-update pkg install podman*", is problematic because shell globbing rules apply that podman* BEFORE the sudo command is run. Here's an example demonstrating this:

If I'm logged in as an unprivileged user and am in my home directory and there exists a file named podman.txt

user@slem6:~> ls
bin  podman.txt

and then I run 

user@slem6:~> sudo transactional-update pkg install podman*
...
2024-06-06 11:59:32 Executing `zypper -R /tmp/transactional-update-DGHXWe install podman.txt`:
...
'podman.txt' not found in package names. Trying capabilities.

See how the * shell glob character turned the podman* into podman.txt because it existed in the local non-root user's home current working directory and this happened BEFORE sudo but then sudo was asked to run a zypper command to install podman.txt which is not intended or valid. 

If podman* was written as podman\*  then the * would be escaped and shell globbing rules would not apply before sudo is ran and instead literally podman* would be passed to zypper which is the intended behavior. You could also escape it by using quotes. Here's two examples:

user@slem6:~> sudo transactional-update pkg install podman\*
...
2024-06-06 12:01:52 Executing `zypper -R /tmp/transactional-update-8ImQ4F install podman*`
...
The following 2 NEW packages are going to be installed:
  podman-docker podman-remote
...

or

user@slem6:~> sudo transactional-update pkg install 'podman*'
...
2024-06-06 12:02:41 Executing `zypper -R /tmp/transactional-update-Gqn0Qu install podman*`:
...
The following 2 NEW packages are going to be installed:
  podman-docker podman-remote
Comment 1 Jana Halackova 2024-06-07 07:48:44 UTC
Thank you for reporting the bug!
Comment 2 Jana Halackova 2024-06-10 07:15:20 UTC
Fixed in https://github.com/SUSE/doc-modular/commit/7edcfd824d1aee78a6ccf2f045a456ae5fb3512e
I decided to remove the asterisk to avoid installing unnecessary packages like the podman-docker.