-
-
Notifications
You must be signed in to change notification settings - Fork 671
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
WIP: Native Debian packaging #715
base: main
Are you sure you want to change the base?
Conversation
Greetings, random ideas from a passer-by:
The file seems to be GNUmake, where it's usually called gmake on non-linux platforms. Plus very few makefiles have one, so it might be better to omit it all together
Nice fixes - should probably open another PR to land them sooner than later.
Ditto - very neat stuff. A separate PR might be in order? Thanks in advance for the man/typos o/ |
Completely agree with the comment above 👍🏽 Regarding the man pages: there's already an open pull request. It is stale for a while now, maybe we can merge the efforts. Optimization
Which optimization flags are you talking about? btop is built with Hardening
Which flags are you talking about? btop is built with FMT
This was discussed before. DebianPipeline
I don't see a reason why btop would need to conform to any external pipeline or CI. Verbose build
This is all described in the README. Yes, This will get you something like this:
If Debian wants a hardened package they can adjust their build flags. This is described in the README There is no reason for btop to provide more by default. All those come with a performance penalty which is in some cases undesirable and since not all Distributions want that behavior we should keep this minimal and let packagers adjust as needed.
This is all described in the README. CMake
There are #28 #324 #330 #362. All requests for CMake as a build system. It is not uncommon for a project to provide multiple ways to build the package, mostly a combination of meson and CMake. The Makefile currently does a lot what a Makefile generator otherwise would do. This was historically autotools and now modern generators like CMake or meson do this as well. They are meant for configuring a build file and provide faster rebuilds with ninja. The top level comment in the Hardening flags (v2)
As mentioned above. No, it's not intended to override the environment. Again, see the README for details. Testing
No, btop currently does not provide tests. I don't know why you added And there is already a debian package. Please open a new PR for the spell corrections 👍🏽 |
Thanks for taking the time to write a long answer addressing all the points. Yes, I have read the README, the Makefile, the CMakeLists.txt and skimmed through most of the source code. The reason I still had questions about the how the build is intended to work and what is the role of CMake is that the documentation only describes partially how the system works, and lacks explanations on why things are as they are, thus making it hard to reason about how changes should be designed and prompting questions about the background and purpose of things. I added Spelling and man page are now split into separate PRs #723 and #724. I will return to this PR soon along with a motivation why having Debian packaging sources at upstream comes only with integration and quality benefits and there are no downsides. |
Okay I took that a little too offensive. It's just an alternative to make to build btop. I personally find CMake better tool for the job since it is designed for configuring a Makefile, where in the raw Makefile we jump through a lot of hoops currently and adding new functionality is mostly more involved (IMO).
I don't quite understand? The build passed before? Since the CMake jobs are only to verify that the actual build works and not to generate artifacts with e.g. man pages included this won't be necessary. Regarding the musl images this needs some work probably but I don't know of any alternative currently. But |
According to the Linux Standard Base (LSB), README files should be installed in the /usr/share/doc directory. By convention however the README files should not go there 'bare', but in a subdirectory for each program. Install to $(PREFIX)/share/doc/btop/README.md to comply with this. To ensure the 'themes' is copied as a full directory and not individual files, create the /usr/share/btop in a separate step as the doc installation step no longer does it.
Hi!
I wanted to contribute to btop the native Debian packaging so that the project CI can build .deb packages on every commit and for example publish in a PPA, or just offer .deb package directly in the release artifacts. Additionallyo my goal is to make the absolute state-of-the-art build with all optimization flags, hardening flags, and have the build use the latest version of fmtlib in Debian unstable instead of stale embedded copy from
include/fmt
. Being state-of-the-art includes that the packaging must pass 100% all tests in Salsa-CI and Lintian.The code base is small, so being perfect should be a reasonable amount of work.
I've already done most of the work, and I can split parts of this PR into separate submissions (e.g. the man page could be an independent PR), but there are a couple of things I am stuck on:
Link with system fmtlib: Instead of the bundled
include/fmt
I'd like the build to use files from/usr/include/fmt
. Can you advice how I should extend the Makefile to use/usr/include/fmt
if it exist?Verbose build: I am trying to make the build as verbose as possible so that every single compiler/linker invocation prints out in the build log. However, no matter what I experiment with VERBOSE=true and QUIET=false the resulting log isn't verbose enough for blhc. Attached build log: btop_1.x.y_amd64.build.txt. Am I getting the most verbose mode now or not? Could the Makefile perhaps be extended with some inline comments explaining the purpose of QUIET and VERBOSE? Also I don't understand why there is also a CMakeLists.txt for CMake builds. When is CMake better, why was it created? The inline comment simply states CMake configuration for btop, nothing else.
Hardening flags: Related to above I am trying to debug what hardening flags are passed, but there are so many CFLAGS and LDFLAGS being overridden in the Makefile that I lost track. Is the Makefile intentionally written so that it will override most of the preset environment flags?
Current state of hardening-check shows:
make test
(none such target exists currently)? I can easily but btop in a build array that builds and runs it on 10 architectures, but I would need to have some test command to verify after the build that it actually runs.