Rename bro cmdline program to brotli (or similar) #76

Closed
opened 2026-01-29 20:31:51 +00:00 by claunia · 6 comments
Owner

Originally created by @thinred on GitHub (Dec 18, 2015).

Hi,
I'm packaging brotli for Debian and I wanted to install bro.py in /usr/bin.
I wanted to know what would be the official name for this program and rename it if it conflicts:

According to the above, I'd be happy if you would rename bro.py to brotli or something else that does not conflict, nor violates Debian policy.

Best regards,
Tomasz

Originally created by @thinred on GitHub (Dec 18, 2015). Hi, I'm packaging brotli for Debian and I wanted to install bro.py in /usr/bin. I wanted to know what would be the official name for this program and rename it if it conflicts: - /usr/bin/bro.py => in Debian at least, .py scripts are discouraged in $PATH (https://lintian.debian.org/tags/script-with-language-extension.html) - /usr/bin/bro => it looks nice, but this is already occupied by this package: https://packages.debian.org/sid/amd64/bro/filelist - /usr/bin/brotli => seems to be fine According to the above, I'd be happy if you would rename bro.py to brotli or something else that does not conflict, nor violates Debian policy. Best regards, Tomasz
Author
Owner

@anthrotype commented on GitHub (Dec 18, 2015):

Hi @thinred,
The reason I did the bro.py script was primarily to test the Brotli Python extension on Windows (cf. https://github.com/google/brotli/pull/38).

At that time, I wasn't able to compile the bro.cc tool for Windows, and I wanted to avoid having to install Cygwin, MSYS, etc., in order to run the compatibility_test.sh and roundtrip_test.sh scripts. So I wrote a Python clone of the bro.cc tool and equivalent scripts for compatibility and roundtrip tests.

I didn't add bro.py to the brotli Python package, nor the setup.py script, because I thought that users of the Python bindings would be more interested in using brotli as a module to import in other applications, rather than as a command line script.

However, if you or others think it could be useful, we could easily move it inside the package and have setuptools generate a platform-specific console script (using its entry_points feature). On Linux or OS X, it would be named without the .py extension, whereas on Windows it will have .exe.

Although, I guess for Debian it would be fine to simply package the C++ command line tool (that is called bro with no language extensions).

Also, bear in mind, the Python bindings and hence bro.py still don't expose the new streaming API, while the bro C++ tool does (cf. https://github.com/google/brotli/pull/271).

@anthrotype commented on GitHub (Dec 18, 2015): Hi @thinred, The reason I did the `bro.py` script was primarily to test the Brotli Python extension on Windows (cf. https://github.com/google/brotli/pull/38). At that time, I wasn't able to compile the `bro.cc` tool for Windows, and I wanted to avoid having to install Cygwin, MSYS, etc., in order to run the `compatibility_test.sh` and `roundtrip_test.sh` scripts. So I wrote a Python clone of the `bro.cc` tool and equivalent scripts for compatibility and roundtrip tests. I didn't add `bro.py` to the `brotli` Python package, nor the `setup.py` script, because I thought that users of the Python bindings would be more interested in using `brotli` as a module to import in other applications, rather than as a command line script. However, if you or others think it could be useful, we could easily move it inside the package and have `setuptools` generate a platform-specific console script (using its `entry_points` feature). On Linux or OS X, it would be named without the `.py` extension, whereas on Windows it will have `.exe`. Although, I guess for Debian it would be fine to simply package the C++ command line tool (that is called `bro` with no language extensions). Also, bear in mind, the Python bindings and hence `bro.py` still don't expose the new streaming API, while the `bro` C++ tool does (cf. https://github.com/google/brotli/pull/271).
Author
Owner

@thinred commented on GitHub (Dec 18, 2015):

Hi @anthrotype,
thank you for your elaborate response. I must admit that I missed bro.cc in the sources :).
Ok, I prefer bro.cc too, but the naming issue remains. I think that it must be installed as /usr/bin/brotli and not /usr/bin/bro...

Another problem that may deserve its own issue is that brotli has no dynamic library. Do you plan to provide libbrotli?

@thinred commented on GitHub (Dec 18, 2015): Hi @anthrotype, thank you for your elaborate response. I must admit that I missed bro.cc in the sources :). Ok, I prefer bro.cc too, but the naming issue remains. I think that it must be installed as /usr/bin/brotli and not /usr/bin/bro... Another problem that may deserve its own issue is that brotli has no dynamic library. Do you plan to provide libbrotli?
Author
Owner

@nemequ commented on GitHub (Dec 21, 2015):

Another problem that may deserve its own issue is that brotli has no dynamic library. Do you plan to provide libbrotli?

I could be wrong, but I don't think brotli is API/ABI stable yet; it might be wise to hold off on packaging a library for now.

@nemequ commented on GitHub (Dec 21, 2015): > Another problem that may deserve its own issue is that brotli has no dynamic library. Do you plan to provide libbrotli? I could be wrong, but I don't think brotli is API/ABI stable yet; it might be wise to hold off on packaging a library for now.
Author
Owner

@thinred commented on GitHub (Dec 21, 2015):

That's what I thought, fair enough.
What about the name of cmdline program?

@thinred commented on GitHub (Dec 21, 2015): That's what I thought, fair enough. What about the name of cmdline program?
Author
Owner

@catlee commented on GitHub (Jan 19, 2016):

would be great if the CLI followed standard patterns like gzip, bzip2 and xz use.

@catlee commented on GitHub (Jan 19, 2016): would be great if the CLI followed standard patterns like gzip, bzip2 and xz use.
Author
Owner

@eustas commented on GitHub (Jun 1, 2017):

Fixed in #555.

@eustas commented on GitHub (Jun 1, 2017): Fixed in #555.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#76