summaryrefslogtreecommitdiff
path: root/meson_options.txt
Commit message (Collapse)AuthorAgeFilesLines
* meson: Add options to set a RPATH/RUNPATH on the bwrap executableSimon McVittie2022-05-161-0/+10
| | | | | | | | | | This is useful when building a self-contained, relocatable tree containing a build of bubblewrap and all of its non-glibc dependencies (in practice this means libcap and maybe libselinux), as is done in the Steam container runtime. A RPATH/RUNPATH pointing to ${ORIGIN}/../lib allows bwrap to find an adjacent, bundled copy of libcap. Signed-off-by: Simon McVittie <smcv@collabora.com>
* Merge pull request #493 from smcv/bwrapdirSimon McVittie2022-05-101-0/+5
|\ | | | | meson: Allow installation directory to be set explicitly
| * meson: Allow installation directory to be set explicitlySimon McVittie2022-04-051-0/+5
| | | | | | | | | | | | | | Overriding the libexecdir via default_options doesn't always work when used as a subproject. Signed-off-by: Simon McVittie <smcv@collabora.com>
* | meson: add tests optionFabrice Fontaine2022-04-061-0/+6
|/ | | | | | | | | | | | | | | | Allow the user to disable tests, for example to avoid the following build failure on mips32: FAILED: tests/try-syscall.p/try-syscall.c.o /home/autobuild/autobuild/instance-11/output-1/host/bin/mipsel-buildroot-linux-musl-gcc -Itests/try-syscall.p -Itests -I../tests -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -O3 -D_GNU_SOURCE -Werror=shadow -Werror=empty-body -Werror=strict-prototypes -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=missing-declarations -Werror=return-type -Werror=overflow -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=misleading-indentation -Werror=missing-include-dirs -Werror=aggregate-return -Werror=switch-default -Wswitch-enum -Wno-sign-compare -Wno-error=sign-compare -Wno-missing-field-initializers -Wno-error=missing-field-initializers -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O1 -g0 -MD -MQ tests/try-syscall.p/try-syscall.c.o -MF tests/try-syscall.p/try-syscall.c.o.d -o tests/try-syscall.p/try-syscall.c.o -c ../tests/try-syscall.c ../tests/try-syscall.c:34:5: error: #error "Unknown MIPS ABI" 34 | # error "Unknown MIPS ABI" | ^~~~~ Fixes: - http://autobuild.buildroot.org/results/cf0365354fc8c16e5871d561daae0fa5039d0bee Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
* meson: Run the Python test script with Python, not bashSimon McVittie2022-02-201-0/+5
| | | | | | | | | | | | The python build option can be used to swap to a different interpreter, for environments like the Steam Runtime where the python3 executable in the PATH is extremely old but there is a better interpreter available. This is treated as non-optional, because Meson is written in Python, so the situation where there is no Python interpreter at build-time shouldn't arise. Signed-off-by: Simon McVittie <smcv@collabora.com>
* Add a Meson build systemSimon McVittie2022-02-181-0/+47
This allows bwrap to be built as a subproject in larger Meson projects. When built as a subproject, we install into the --libexecdir and require a program prefix to be specified: for example, Flatpak would use program_prefix=flatpak- to get /usr/libexec/flatpak-bwrap. Verified to be backwards-compatible as far as Meson 0.49.0 (Debian 9 backports). Loosely based on previous work by Jussi Pakkanen (see #133). Differences between the Autotools and Meson builds: The Meson build requires a version of libcap that has pkg-config metadata (introduced in libcap 2.23, in 2013). The Meson build has no equivalent of --with-priv-mode=setuid. On distributions like Debian <= 10 and RHEL <= 7 that require a setuid bwrap executable, the sysadmin or distribution packaging will need to set the correct permissions on the bwrap executable; Debian already did this via packaging rather than the upstream build system. The Meson build supports being used as a subproject, and there is CI for this. It automatically disables shell completions and man pages, moves the bubblewrap executable to ${libexecdir}, and renames the bubblewrap executable according to a program_prefix option that the caller must specify (for example, Flatpak would use -Dprogram_prefix=flatpak- to get /usr/libexec/flatpak-bwrap). See the tests/use-as-subproject/ directory for an example. Signed-off-by: Simon McVittie <smcv@collabora.com>