https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292915

            Bug ID: 292915
           Summary: Missing /etc/os-release in FreeBSD OCI images
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: misc
          Assignee: [email protected]
          Reporter: [email protected]

In the current FreeBSD OCI images, /etc/os-release is a symlink to
/var/run/os-release, but the target file is not present in the image layers.
Some container tooling expects an os-release file to be available in the
filesystem and does not account for it being generated dynamically at runtime.

Looking at the specification
https://www.freedesktop.org/software/systemd/man/latest/os-release.html
and the real world, it seems that most Linux distributions generate the file at
build/packaging time.

As a concrete idea: would it be reasonable to generate a static os-release file
as part of the OCI image build process (for example in
release/scripts/make-oci-image.sh), even if a dynamically generated version
still exists on full systems?

In the mean time, as a workaround (suggestion from
https://lists.freebsd.org/archives/freebsd-jail/2026-February/000668.html):
"for base images containing /bin/sh (e.g.
ghcr.io/freebsd/freebsd-runtime:<ver>), you can generate an os-release file by
running '/etc/rc.d/os-release start' - this can be added to
Containerfiles/Dockerfiles where /etc/os-release is needed."

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to