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

bugfix: print version to stderr on startup #6172

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

kmk3
Copy link
Collaborator

@kmk3 kmk3 commented Jan 28, 2024

Unlike the rest of the normal startup output (which goes to stderr), the
version number is being printed to stdout, which makes it harder to
ignore all of firejail's output. Example:

$ firejail --noprofile /usr/bin/true --version 2>/dev/null
firejail version 0.9.73

true (GNU coreutils) 9.4
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Jim Meyering.

So make the normal startup version output go to stderr and keep the
other occurrences (such as in firejail --version) going to stdout, to
make it easier to grep things in the output.

Added on commit f019f0e ("Print version on startup for
firejail/firecfg", 2023-05-11) / PR #5829.

Reported by @rusty-snake[1].

[1] #6171 (comment)

Unlike the rest of the normal startup output (which goes to stderr), the
version number is being printed to stdout, which makes it harder to
ignore all of firejail's output.  Example:

    $ firejail --noprofile /usr/bin/true --version 2>/dev/null
    firejail version 0.9.73

    true (GNU coreutils) 9.4
    Copyright (C) 2023 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

    Written by Jim Meyering.

So make the normal startup version output go to stderr and keep the
other occurrences (such as in `firejail --version`) going to stdout, to
make it easier to grep things in the output.

Added on commit f019f0e ("Print version on startup for
firejail/firecfg", 2023-05-11) / PR netblue30#5829.

Reported by @rusty-snake[1].

[1] netblue30#6171 (comment)
@kmk3 kmk3 merged commit fcde0cb into netblue30:master Jan 31, 2024
13 checks passed
@kmk3 kmk3 deleted the fix-version-stdout branch January 31, 2024 19:32
kmk3 added a commit that referenced this pull request Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done (on RELNOTES)
Development

Successfully merging this pull request may close these issues.

2 participants