Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oci native image is missing /usr/bin/ld #4201

Closed
akdev1l opened this issue Dec 9, 2022 · 2 comments
Closed

oci native image is missing /usr/bin/ld #4201

akdev1l opened this issue Dec 9, 2022 · 2 comments
Labels
triaged This issue was triaged

Comments

@akdev1l
Copy link

akdev1l commented Dec 9, 2022

Host system details

Provide the output of rpm-ostree status.

$ rpm-ostree status
State: idle
Deployments:
● ostree-unverified-registry:ghcr.io/akdev1l/ostree-images/fedora-nvsb:latest
                   Digest: sha256:aec51c811f4329e6b642db2cf7365630ac11b5cbca7d6c6c5163eb8b92cd4c69
                  Version: 37.20221203.0 (2022-12-09T03:44:46Z)

  ostree-unverified-registry:ghcr.io/akdev1l/ostree-images/fedora-nvsb:latest
                   Digest: sha256:ab8f5d84395c2660f13b52ab76a80ab4309a1a97cf79022250a85db7cf829e9d
                  Version: 37.20221203.0 (2022-12-09T01:57:44Z)

Expected vs actual behavior

When I create a custom derived image and I install binutils I see that /usr/bin/ld is missing.

the expected behaviour is that installing binutils provides /usr/bin/ld.

the actual behaviour is that even with that package installed this specific file is not there.

$ podman run --rm -it --entrypoint /bin/bash test:latest
bash-5.2# rpm -qf /usr/bin/ld
binutils-2.38-25.fc37.x86_64
bash-5.2# /usr/bin/ld
bash: /usr/bin/ld: No such file or directory

Steps to reproduce it

Provide any additional data that may help debug this - which specific version of
an RPM is in the repo, or any host system configuration.

I checked my fedora system and I saw that this file is actually a symlink that goes /usr/bin/ld -> /etc/alternatives/ld -> /usr/bin/ld.bfd

This is minimal verifiable example in script form:

  1. build the container image
$ cat Container <<EOF >Containerfile
FROM ghcr.io/cgwalters/fedora-silverblue:37

RUN rpm-ostree install binutils && \
    ostree container commit 
EOF

podman build --format oci -t test:latest .
  1. run it with podman run --rm -it --entrypoint /bin/bash test:latest
  2. verify that binutils is installed but /usr/bin/ld is missing: rpm -qf /usr/bin/ld && /usr/bin/ld

podman info in case that matters:

host:
  arch: amd64
  buildahVersion: 1.28.0
  cgroupControllers:
  - cpu
  - io
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.5-1.fc37.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.5, commit: '
  cpuUtilization:
    idlePercent: 98.82
    systemPercent: 0.25
    userPercent: 0.92
  cpus: 16
  distribution:
    distribution: fedora
    variant: workstation
    version: "37"
  eventLogger: journald
  hostname: toronto.hq.akdev.xyz
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 6.0.10-300.fc37.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 12185288704
  memTotal: 67342004224
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun-1.7-1.fc37.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.7
      commit: 40d996ea8a827981895ce22886a9bac367f87264
      rundir: /run/user/1000/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: 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: true
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.0-8.fc37.x86_64
    version: |-
      slirp4netns version 1.2.0
      commit: 656041d45cfca7a4176f6b7eed9e4fe6c11e8383
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.3
  swapFree: 8585211904
  swapTotal: 8589930496
  uptime: 40h 39m 28.00s (Approximately 1.67 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /home/akdev/.config/containers/storage.conf
  containerStore:
    number: 13
    paused: 0
    running: 1
    stopped: 12
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/akdev/.local/share/containers/storage
  graphRootAllocated: 1978662912000
  graphRootUsed: 1251037745152
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 20
  runRoot: /run/user/1000/containers
  volumePath: /home/akdev/.local/share/containers/storage/volumes
version:
  APIVersion: 4.3.1
  Built: 1668178887
  BuiltTime: Fri Nov 11 10:01:27 2022
  GitCommit: ""
  GoVersion: go1.19.2
  Os: linux
  OsArch: linux/amd64
  Version: 4.3.1

Would you like to work on the issue?

I am totally open to contribute but I am not at all familiar with this project :-(. I know a little rust.

@cgwalters
Copy link
Member

Yeah, this is #1614

@cgwalters
Copy link
Member

Marking as dup of #1614

@cgwalters cgwalters closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged This issue was triaged
Projects
None yet
Development

No branches or pull requests

2 participants