Skip to content

Make debug() compile-time- and runtime-configurable, and use it around mount_setattr() - #796

Merged
cgwalters merged 2 commits into
containers:mainfrom
smcv:debug
Sep 16, 2026
Merged

cgwalters merged 2 commits into
containers:mainfrom
smcv:debug

Conversation

@smcv

@smcv smcv commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator
  • Slightly modernize CI #795 (based on that PR to avoid merge conflicts)

  • Add a mechanism to enable debug() at compile-time

    Now that bubblewrap doesn't support being setuid, we can safely look
    at environment variables to decide whether to emit noisy debug messages.
    Instead of inventing our own environment variable, let's use
    DEBUG_INVOCATION as popularized by systemd.

    Enable debug messages in one CI pass, leaving them disabled in the
    other.

  • bind-mount: Add some debug() calls around mount_setattr()

@smcv smcv changed the title Make debug() a bit more like g_debug() Make debug() compile-time- and runtime-configurable, and use it around mount_setattr() Sep 15, 2026
@smcv

smcv commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator Author

I think having better debug logging would help with efforts like #793 and #788.

Now that bubblewrap doesn't support being setuid, we can safely look
at environment variables to decide whether to emit noisy debug messages.
Instead of inventing our own environment variable, let's use
`DEBUG_INVOCATION` as popularized by systemd.

Enable debug messages in one CI pass, leaving them disabled in the
other.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
@smcv

smcv commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator Author

360dcd8: rebased, no functional change.

@cgwalters
cgwalters merged commit a383f74 into containers:main Sep 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants