mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #4642] Switch from autotools to meson #2735
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#2735
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rusty-snake on GitHub (Oct 26, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4642
This came up in https://github.com/netblue30/firejail/issues/4633#issuecomment-950317130. I like the idea. Meson is faster and has an simpler and less error-prone syntax. Is this something we want to do?
CMake would be a second alternative.
@topimiettinen commented on GitHub (Oct 26, 2021):
+1
I'm still learning Meson but it seems so much better than autoconf + configure + Make. There are also bonus stuff like support for
clang scan-build, integrated tests and test coverage analysis.@rusty-snake commented on GitHub (Oct 29, 2021):
MWE 1, compile firejail
MWE 2, run
firejail --noprofile echo Hi@kmk3 commented on GitHub (Oct 31, 2021):
@rusty-snake commented on Oct 26:
I find the core of the syntax of autotools and make to be rather simple. In
the case of make there are some terse operator-looking internal macros (e.g.:
$<) that are easy to forget, but usually only a few of them are used and IMOthey aren't overused in this repo anyway.
I'll post a
makeguide later in a new thread to show what I mean.I think it would be a great loss to break building with the traditional/more
portable build tools (I'll expand on this later).
The benefits of supporting alternative build systems isn't very clear either.
As for the speed, what are the workflows in question and the benchmark results?
Was
maketested with something like-j$(nproc)?@rusty-snake commented on GitHub (Oct 31, 2021):
The syntax of
Makefiles is simple but$(subst test-,,$@)vs.'foobar'.replace("test-", "")👍
Suggestion: https://github.com/netblue30/firejail/discussions/categories/show-and-tell
Two things to add (before you expand this)
https://mesonbuild.com/Simple-comparison.html
@rusty-snake commented on GitHub (Oct 31, 2021):
I know not all are strong arguments / arguments for meson or against autotools in general
--enable-sanitizer=orfatal-warningsare integrated and don't need to be written.configure.acand forget to commitconfigure...configure.acand generateconfigurewith a different version ...enable-contrib-installhas a broken logic for years==> firejail is to small to see a big difference (if you type
make -j4<ENTER>; meson:nin<TAB><ENTER>; reality:<UP><ENTER>)@matu3ba commented on GitHub (Oct 31, 2021):
Also: + Automatic generation of pkg-config for code reusage in third-party projects.
Personally I would prefer a low-level build library, since that reduces code to a minimum, while sharing testing with most projects. But unfortunately the only project that attempts this (and a pile of other stuff) is a few years from stable.
@reinerh commented on GitHub (Nov 2, 2021):
We currently also have a lot of redundancy in our
Makefile.infiles (and some are not even in sync with others). And they are "buggy", as the object targets miss stuff likeCPPFLAGS, the linking targets missCFLAGSetc...common.mk.inis also a bit of a mess.I think in our current build system there is already a lof of room for improvement (maybe using automake would there a bit).
I don't have much experience with meson, but from what I heard/read it's one of the better build systems. (Personally I find it only a bit annoying that it's needed to list all source files (afaik), instead of letting it use all sources in the directory.)
But I'm fine with using either of them.
@rusty-snake commented on GitHub (Nov 2, 2021):
https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard
https://mesonbuild.com/FAQ.html#but-i-really-want-to-use-wildcards
@amano-kenji commented on GitHub (Jun 10, 2022):
Meson seems far simpler than cmake.
@eli-schwartz commented on GitHub (Jun 12, 2022):
I had a recent discussion with a sourceware project maintainer about build systems... it included this rather insightful comment about why autotools is a highly preferable build system:
This isn't really a problem with projects that only support Linux. Of course, neither is it relevant that Meson, unlike autotools, has good support for Windows.
Since portability doesn't actually matter in the slightest, maybe the real issue is about build system requirements? autotools famously has none, which is another way of saying that it requires make but assumes you have it already (Linux will always have the other POSIX shell tools needed to run
./configure). Meson requires python, which is... common, and should always be trivial to get, but may not be preinstalled in minimal environments, and may require 50mb of disk space if you don't have it.If that is the concern here, you may be interested in https://sr.ht/~lattis/muon/, a c99 reimplementation of Meson with good coverage for the core Meson functionality, which bootstraps with sh and a c99 compiler plus samurai (that itself bootstraps with make) and can compile down to a single statically linked prebuilt binary with an internal copy of samurai (ninja-compatible build tool which Meson uses instead of make) thrown in for good measure... all weighing in at 4.5 mb.
@amano-kenji commented on GitHub (Jun 12, 2022):
Firejail targets desktop linux market. You can expect desktop machines to have at least 4GB RAM and 128GB storage space.
If you can't run firefox on your machine, you are not a target market.
If your computing environment is limited, then you don't need to worry about sandboxing.
@eli-schwartz commented on GitHub (Jun 12, 2022):
In my experience the concern usually tends to be less about "unable" and more "don't want to".
It's not all that unreasonable of an opinion. Most users will get it from a distro package, and distros almost always build in stripped down environments.
Also, some people may just not have any personal use for python. "Why install a large programming language stack if you don't need it" is a common refrain. If it's something you don't have already, it's also something you need to download, and bandwidth is, in many parts of the world, a big issue, far bigger than disk space or computing power.
This is why options are nice. Not everyone has to care about this, but if you do... then python isn't your only option to build stuff with Meson.
@amano-kenji commented on GitHub (Jun 12, 2022):
Python is a build dependency. Binary distro users don't need to install python.
"Stripped down" in disto build environment means self-imposed sandboxes. Not artificial resource constraints like restrictions on RAM size. Build machines tend to have a lot of RAM because they need to build chromium and firefox every few weeks.
You don't need to worry about installing python if you are not using source-based distros like gentoo linux. If you are on gentoo, you should have more than 32GB RAM and 256GB storage space anyway.
My build machine has enough power to browse the internet and watch youtube videos while building chromium browser. Firefox build routinely consumes 16GB RAM while I'm browsing the internet and watching videos.
Deficient machines aren't fit to be build machines. Use a binary distro if your computer is weak.