containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
23.23k stars 2.37k forks source link

Podman build fails when label contains whitespace #22719

Closed zackman0010 closed 4 months ago

zackman0010 commented 4 months ago

Issue Description

When building an image, a label value that contains whitespace causes a failure. Whitespaces are supposed to be valid inside labels.

Steps to reproduce the issue

Steps to reproduce the issue

  1. podman build --label "name=value with spaces" .

Describe the results you received

Error: accepts at most 1 arg(s), received 2

Describe the results you expected

Podman should build the image

podman info output

host:
  arch: amd64
  buildahVersion: 1.31.3
  cgroupControllers:
  - cpuset
  - cpu
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.8-1.module+el8.9.0+20326+387084d0.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.8, commit: 21e9be52d14128789284e1bbf54d8c25b4820215'
  cpuUtilization:
    idlePercent: 99.06
    systemPercent: 0.46
    userPercent: 0.48
  cpus: 4
  databaseBackend: boltdb
  distribution:
    distribution: '"rhel"'
    version: "8.9"
  eventLogger: journald
  freeLocks: 2043
  hostname: sl-sispacew1t.corp.wan
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 213
      size: 1
    - container_id: 1
      host_id: 165537
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 213
      size: 1
    - container_id: 1
      host_id: 165537
      size: 65536
  kernel: 4.18.0-513.11.1.el8_9.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 3049394176
  memTotal: 16480669696
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: Unknown
      path: /home/csapp/podman/aardvark-dns
      version: aardvark-dns 1.10.0
    package: Unknown
    path: /home/csapp/podman/netavark
    version: netavark 1.10.3
  ociRuntime:
    name: runc
    package: runc-1.1.9-1.module+el8.9.0+20326+387084d0.x86_64
    path: /usr/bin/runc
    version: |-
      runc version 1.1.9
      spec: 1.0.2-dev
      go: go1.20.6
      libseccomp: 2.5.2
  os: linux
  pasta:
    executable: ""
    package: ""
    version: ""
  remoteSocket:
    exists: true
    path: /run/user/213/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_NET_RAW,CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.1-1.module+el8.9.0+20326+387084d0.x86_64
    version: |-
      slirp4netns version 1.2.1
      commit: 09e31e92fa3d2a1d3ca261adaeb012c8d75a8194
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.2
  swapFree: 4292866048
  swapTotal: 4294963200
  uptime: 2492h 30m 57.00s (Approximately 103.83 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.access.redhat.com
  - registry.redhat.io
  - docker.io
store:
  configFile: /home/csapp/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /usr/local/csapps/podman/storage
  graphRootAllocated: 86325067776
  graphRootUsed: 11753627648
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 24
  runRoot: /run/user/213/storage
  transientStore: false
  volumePath: /usr/local/csapps/podman/storage/volumes
version:
  APIVersion: 4.6.1
  Built: 1696868155
  BuiltTime: Mon Oct  9 11:15:55 2023
  GitCommit: ""
  GoVersion: go1.20.6
  Os: linux
  OsArch: linux/amd64
  Version: 4.6.1

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

No

Additional environment details

No response

Additional information

I'm running on the latest version available to the RHEL 8 repositories. Our system admins are currently working on plans to upgrade our servers to RHEL 9, but until that happens this is the latest version of Podman available to me. If this issue has already been fixed on a later version of Podman, please let me know!

giuseppe commented 4 months ago

works for me with upstream Podman.

Please try with a newer version

zackman0010 commented 4 months ago

That's a good enough confirmation for me, I'll just have to wait until we can get our servers upgraded so we can get on a newer version. Thanks!