Bug 2097428 - podman-compose traceback if env var value contains =
Summary: podman-compose traceback if env var value contains =
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: podman-compose
Version: 36
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-15 16:23 UTC by Barry Scott
Modified: 2022-08-10 01:16 UTC (History)
1 user (show)

Fixed In Version: podman-compose-1.0.3-6.fc36
Clone Of:
Environment:
Last Closed: 2022-08-10 01:16:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Barry Scott 2022-06-15 16:23:52 UTC
Description of problem:

I ran a build that works with docker and hit a traceback with a simple fix.

I symlinked docker and docker-compose to podman and podman-compose.

There is env var that is of the form A=B=C which needs this patch to allow podman-compose to work:

$ diff -u /usr/lib/python3.10/site-packages/podman_compose.py~ /usr/lib/python3.10/site-packages/podman_compose.py 
--- /usr/lib/python3.10/site-packages/podman_compose.py~        2022-06-14 14:16:45.825406742 +0100 
+++ /usr/lib/python3.10/site-packages/podman_compose.py 2022-06-14 14:16:45.825406742 +0100 
@@ -1502,7 +1502,7 @@ 
    if args.workdir: cnt["working_dir"] = args.workdir 
    env = dict(cnt.get('environment', {})) 
    if args.env: 
-        additional_env_vars = dict(map(lambda each: each.split('='), args.env)) 
+        additional_env_vars = dict(map(lambda each: each.split('=', 1), args.env)) 
        env.update(additional_env_vars) 
        cnt['environment'] = env 
    if not args.service_ports:


With this fix the build worked as expected.

Comment 1 Fedora Update System 2022-08-01 16:53:33 UTC
FEDORA-2022-fc3b52531e has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-fc3b52531e

Comment 2 Fedora Update System 2022-08-02 01:16:07 UTC
FEDORA-2022-fc3b52531e has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-fc3b52531e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-fc3b52531e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Fedora Update System 2022-08-10 01:16:02 UTC
FEDORA-2022-fc3b52531e has been pushed to the Fedora 36 stable repository.
If problem still persists, 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.