When generating Conmon's command line, we read containers.conf to
get log_size_max and used it if the container didn't override it.
However, `podman inspect` only reads from the container's own
config, and ignores containers.conf. Unify the way we determine
maximum log size with a single function and use it for both
inspect and containers.conf, and add a test for this behavior.
Fixes https://issues.redhat.com/browse/RHEL-96776
Signed-off-by: Matt Heon <mheon@redhat.com>
Currently WSL uses UTF-16 encoded output by default but is planning
to use UTF-8.
See https://github.com/containers/podman/issues/26527
To get ready for the change we are enforcing UTF-8 encoded output by
setting the environment variable `WSL_UTF8=1` and by updating the
code that transfomed wsl output from UTF-16 to UTF-8.
Fixes https://github.com/containers/podman/issues/26527
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
Given container logs end up in syslog by default, somewhat-clarify that `--syslog` is about podman logs, not container logs.
Signed-off-by: Chris Hofstaedtler <zeha@users.noreply.github.com>
During my binary size reduce experiments I often switch build tags
around but make binaries does not recompile in these cases.
It is annoying to always do touch cmd/podman/main.go so let's add it to
the SOURCES instead so the Makefile will recompile on changes.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
The build tag was added to remove the "golang.org/x/net/trace"
dependency[1]. So let's use that.
With that we reoduce the binary size by 432KB.
[1] https://github.com/grpc/grpc-go/pull/6954
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Unfortunately on a number of occasions, Podman has been released
officially with a `-dev` suffix in the version number. Assist in
catching this mistake at release time by the addition of a simple
conditional test. Note that it must be positively enabled by a
magic env. var. before executing the system tests.
Also (thanks to @lsm5) update the TMT test to trigger the new
condition for future Fedora releases.
Signed-off-by: Chris Evich <cevich@redhat.com>
An HTTP response with Content-Type application/json does not need
to be HTML escaped. Doing this causes encoding issues in the Podman
REST API output as seen in the issue:
Fixes#17769
Remove the HTML escaping from Content-Type: application/json responses.
Signed-off-by: Stef Walter <stef@thewalter.net>
Co-Authored-By: Claude <noreply@anthropic.com>
All callers ignore the error anyways so no reason to return it as the
function itself already logs it.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>