summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Silence -Wunused-but-set-variable with clangSimon McVittie2022-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This variable is only used for lifetime tracking (autocleanup), but clang warns on that. Signed-off-by: Simon McVittie <smcv@collabora.com>
* | | | Merge pull request #492 from smcv/mipsSimon McVittie2022-05-101-3/+3
|\ \ \ \ | | | | | | | | | | try-syscall: Use compiler-predefined macros to detect mips ABI
| * | | | try-syscall: Use compiler-predefined macros to detect mips ABISimon McVittie2022-04-051-3/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _MIPS_SIM_ABI32 etc. are defined by Linux <asm/sgidefs.h>, which is included by glibc <sys/syscall.h> (which defers to Linux headers to get syscall numbers), but not by musl <sys/syscall.h>. _ABIO32 etc. are predefined by the compiler, so they are always available, regardless of libc. References: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=27d54b2a6c18ef1ae50f1a5b432d590438445b90 https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=0ea339ea4d9c3e04ae17da6bf389617eb0251e57 Signed-off-by: Simon McVittie <smcv@collabora.com>
* | | | Merge pull request #493 from smcv/bwrapdirSimon McVittie2022-05-102-5/+12
|\ \ \ \ | | | | | | | | | | meson: Allow installation directory to be set explicitly
| * | | | meson: Allow installation directory to be set explicitlySimon McVittie2022-04-052-5/+12
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Overriding the libexecdir via default_options doesn't always work when used as a subproject. Signed-off-by: Simon McVittie <smcv@collabora.com>
* | | | Merge pull request #496 from smcv/missing-defSimon McVittie2022-05-102-0/+8
|\ \ \ \ | | | | | | | | | | Allow building on old glibc without PR_SET_CHILD_SUBREAPER defined
| * | | | Allow building on old glibc without PR_SET_CHILD_SUBREAPER definedSimon McVittie2022-04-052-0/+8
| |/ / / | | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* | | | tests: Disable leak detection when joining user-specified pid namespaceSimon McVittie2022-05-032-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we don't do this, AddressSanitizer busy-loops with this backtrace: #0 in sched_yield #1 in __sanitizer::StopTheWorld #2 in __lsan::LockStuffAndStopTheWorldCallback #3 in __GI___dl_iterate_phdr #4 in __lsan::LockStuffAndStopTheWorld #5 in __lsan::CheckForLeaks #6 in __lsan::DoLeakCheck #7 __lsan::DoLeakCheck #8 in __cxa_finalize #9 in __do_global_dtors_aux #10 in ?? #11 in _dl_fini This fixes the hang described in commit 2e3d6e7d, so remove the workarounds from that commit. Signed-off-by: Simon McVittie <smcv@collabora.com>
* | | | tests: Disable sanitizers for try-syscallSimon McVittie2022-05-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc's AddressSanitizer makes system calls that our filter doesn't allow for, resulting in a fatal error when run under a restrictive seccomp filter. try-syscall is a helper for the test, rather than being code under test itself, so we don't really need this instrumentation in it: all we want it to do is make some specific syscalls. Signed-off-by: Simon McVittie <smcv@collabora.com>
* | | | build: Auto-detect presence of Docbook XSL stylesheetsSimon McVittie2022-05-031-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This follows the usual feature semantics: they're mandatory if the feature is enabled, aren't checked if the feature is disabled, and are optional if the feature is in the auto state (which is the default for this particular feature). The logic used here is similar to AX_CHECK_DOCBOOK_XSLT in autoconf-archive. Resolves: https://github.com/containers/bubblewrap/issues/500 Signed-off-by: Simon McVittie <smcv@collabora.com>
* | | | Merge pull request #501 from rusty-snake/fix-missing-options-in-manpageSimon McVittie2022-04-211-0/+26
|\ \ \ \ | | | | | | | | | | Add --share-net & --json-status-fd to the manpage
| * | | | Add --share-net & --json-status-fd to the manpagerusty-snake2022-04-211-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #469 Fixes #499 Signed-off-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
* | | | | Merge pull request #491 from ffontaine/mainSimon McVittie2022-04-212-1/+9
|\ \ \ \ \ | |/ / / / |/| | | | meson: add tests option
| * | | | meson: add tests optionFabrice Fontaine2022-04-062-1/+9
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge pull request #489 from Newbytee/patch-1Simon McVittie2022-04-061-1/+1
|\ \ \ \ | |/ / / |/| | | Link to the last commit where xdg-app-helper.c existed
| * | | Link to the last commit where xdg-app-helper.c existedNewbyte2022-03-231-1/+1
|/ / / | | | | | | | | | | | | | | | Right now this link just opens a "path not found" page, so let's fix that by linking to the last commit where it existed instead. Signed-off-by: Newbyte <newbie13xd@gmail.com>
* | | Merge pull request #484 from rusty-snake/install-instructionsSimon McVittie2022-03-221-0/+24
|\ \ \ | | | | | | | | Add install instruction to README.md
| * | | Add install instruction to README.mdrusty-snake2022-03-221-0/+24
| |/ / | | | | | | | | | | | | | | | | | | Closes #315 Closes #363 Signed-off-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
* | | Merge pull request #483 from rusty-snake/add-seccomp-fd-completionsSimon McVittie2022-03-222-0/+2
|\ \ \ | | | | | | | | Add --add-seccomp-fd to bash/zsh completion
| * | | Add --add-seccomp-fd to bash/zsh completionrusty-snake2022-03-222-0/+2
| |/ / | | | | | | | | | Signed-off-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
* | | Merge pull request #482 from rusty-snake/fix-add-seccomp-fdSimon McVittie2022-03-221-1/+1
|\ \ \ | |/ / |/| | Fix --add-seccomp-fd argument name in usage
| * | Fix --add-seccomp-fd argument name in usagerusty-snake2022-03-221-1/+1
|/ / | | | | | | | | | | | | --help shows --add-seccomp instead of --add-seccomp-fd which is the correct argument. Signed-off-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
* | Merge pull request #481 from Keruspe/clangSimon McVittie2022-03-181-0/+2
|\ \ | | | | | | tests: fix build with clang
| * | tests: properly tag ok as being printf-likeMarc-Antoine Perennou2022-03-181-0/+2
|/ / | | | | | | | | | | | | | | Avoids breaking warning with clang Fixes #478 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
* | Prepare v0.6.1v0.6.1Simon McVittie2022-02-252-2/+2
| | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* | Add a release checklistSimon McVittie2022-02-251-0/+18
| | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* | Merge pull request #476 from smcv/zsh-noexecSimon McVittie2022-02-251-0/+0
|\ \ | | | | | | completions: Make zsh completion non-executable
| * | completions: Make zsh completion non-executableSimon McVittie2022-02-241-0/+0
|/ / | | | | | | | | | | | | | | | | | | | | The Autotools build system installed it with 0644 permissions because it's listed as DATA, but the Meson build system installs executable files as executable by default. zsh completions don't need to be executable to work, and this one doesn't have the `#!` marker that should start an executable script. Signed-off-by: Simon McVittie <smcv@collabora.com>
* | Release v0.6.0v0.6.0Simon McVittie2022-02-241-1/+1
| | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* | Merge pull request #475 from smcv/mesonColin Walters2022-02-247-11/+37
|\ \ | | | | | | Fix Meson build system to be able to run tests
| * | meson: Improve compatibility with Meson 0.49Simon McVittie2022-02-201-1/+0
| | | | | | | | | | | | | | | | | | That version doesn't allow more than two arguments for define_variable. Signed-off-by: Simon McVittie <smcv@collabora.com>
| * | Disable test-specifying-pidns.sh under 'meson dist' while I investigateSimon McVittie2022-02-202-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | This test is hanging when run under 'meson dist' for some reason, but not when run under 'meson test', and not locally, only in the Github Workflow-based CI. Disable it for now. Signed-off-by: Simon McVittie <smcv@collabora.com>
| * | meson: Actually build and run the testsSimon McVittie2022-02-201-0/+2
| | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
| * | tests: Fix compiler warnings for unused argumentsSimon McVittie2022-02-201-2/+2
| | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
| * | meson: Run test scripts from $srcdirSimon McVittie2022-02-201-2/+2
| | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
| * | meson: Make G_TEST_SRCDIR, G_TEST_BUILDDIR match AutotoolsSimon McVittie2022-02-201-2/+2
| | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
| * | meson: Run the Python test script with Python, not bashSimon McVittie2022-02-203-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | meson: Build the try-syscall helperSimon McVittie2022-02-191-0/+5
| | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
| * | meson: Build tests with equivalent of -I$(top_srcdir) -I$(top_builddir)Simon McVittie2022-02-192-0/+2
| | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
| * | meson.build: Remove unnecessary check for shSimon McVittie2022-02-191-1/+0
|/ / | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* | Merge pull request #432 from smcv/mesonColin Walters2022-02-1814-1/+408
|\ \ | | | | | | Add a Meson build system
| * | Add a Meson build systemSimon McVittie2022-02-1814-1/+408
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Use HEAD to refer to other projects' default branches in documentationSimon McVittie2022-02-134-5/+5
| | | | | | | | | | | | | | This makes the URL independent of the name they have chosen for their default branches. Signed-off-by: Simon McVittie <smcv@collabora.com>
* | workflows: Update for rename of default branch to mainSimon McVittie2022-02-131-2/+2
|/ | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Merge pull request #459 from smcv/multiple-seccompSimon McVittie2022-01-315-42/+943
|\ | | | | Allow loading more than one seccomp program
| * tests: Exercise seccomp filtersSimon McVittie2022-01-313-0/+813
| | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
| * Allow loading more than one seccomp programSimon McVittie2022-01-312-23/+94
| | | | | | | | | | | | | | | | | | This will allow Flatpak to combine an allow-list (default-deny) of known system calls with a deny-list (default-allow) of system calls that are undesired. Resolves: https://github.com/containers/bubblewrap/issues/453 Signed-off-by: Simon McVittie <smcv@collabora.com>
| * Generalize linked lists of LockFile and SetupOpSimon McVittie2022-01-311-19/+36
|/ | | | | | | I'm about to add a third linked list, for seccomp programs, which would seem like too much duplication. Signed-off-by: Simon McVittie <smcv@collabora.com>
* Merge pull request #466 from soenkehahn/patch-1Simon McVittie2022-01-311-1/+1
|\ | | | | Fix typo
| * Fix typoSönke Hahn2021-12-071-1/+1
| |