No description
  • C 76.6%
  • Standard ML 13%
  • Shell 6.7%
  • Meson 3.7%
Find a file
2022-12-27 14:29:42 +01:00
examples Add output scaling (#34) 2022-11-28 21:23:41 +01:00
fuzz Release 1.8.3 2022-01-26 22:45:41 +01:00
keys Release 1.9.0 2022-04-21 21:12:57 +02:00
man Fix man page 2022-12-27 14:29:08 +01:00
signatures Release 1.9.1 2022-07-29 22:41:17 +02:00
.clang-format Release 1.0.0 2020-02-17 17:28:35 +00:00
.gitignore Release 1.0.0 2020-02-17 17:28:35 +00:00
Bugs.md Fix Bugs.md highlighting 2022-12-27 12:16:33 +01:00
cagebreak.c Refactor output configuration 2022-12-26 08:14:57 +01:00
Changelog.md Release 1.9.0 2022-04-21 21:12:57 +02:00
CODE_OF_CONDUCT.md Add Code of Conduct 2022-10-16 23:36:49 +02:00
config.h.in Release 1.2.1 2020-05-24 18:48:52 +02:00
FAQ.md Add cagebreak start FAQ entry 2022-12-27 13:19:27 +01:00
Hashes.md Add Hashes template for 2.0.0 2022-10-17 01:20:43 +02:00
idle_inhibit_v1.c Update year in copyright notices 2021-12-06 11:08:21 +01:00
idle_inhibit_v1.h Release 1.4.0 2020-09-10 17:30:24 +02:00
input.h Remove unused code 2022-10-02 11:43:31 +02:00
input_manager.c Fix grouping of virtual keyboards 2022-12-25 15:09:25 +01:00
input_manager.h Release 1.8.3 2022-01-26 22:45:41 +01:00
ipc_server.c Restrict access to ipc socket 2022-09-25 11:34:17 +02:00
ipc_server.h Add support for event notifications over ipc 2021-12-25 15:35:31 +01:00
keybinding.c Set cursor to box when not in default mode 2022-12-24 14:52:12 +01:00
keybinding.h Release 1.9.0 2022-04-21 21:12:57 +02:00
libinput.c Fix bugs reported by scan-build 2022-09-30 18:28:49 +02:00
LICENSE Update year in copyright notices 2021-12-06 11:08:21 +01:00
meson.build Update release version numbers 2022-12-27 14:29:23 +01:00
meson_options.txt Adjust message 2021-03-05 07:53:46 +01:00
message.c Apply clang-format 2022-11-28 21:35:31 +01:00
message.h Release 1.9.0 2022-04-21 21:12:57 +02:00
output.c Refactor output configuration 2022-12-26 08:14:57 +01:00
output.h Refactor output configuration 2022-12-26 08:14:57 +01:00
pango.c Add support for printing input/output identifiers 2021-09-19 10:23:36 +02:00
pango.h Release 1.4.0 2020-09-10 17:30:24 +02:00
parse.c Add documentation for output rotate 2022-12-27 14:01:42 +01:00
parse.h Add support for printing input/output identifiers 2021-09-19 10:23:36 +02:00
README.md Move to meson setup 2022-12-27 14:29:42 +01:00
seat.c Fix grouping of virtual keyboards 2022-12-25 15:09:25 +01:00
seat.h Add ipc message on cursor switching tile 2022-09-25 11:05:51 +02:00
SECURITY.md Improve SECURITY.md 2022-09-30 23:54:17 +02:00
server.c Fix bugs reported by scan-build 2022-09-30 18:28:49 +02:00
server.h Refactor output configuration 2022-12-26 08:14:57 +01:00
util.c Apply clang-format 2022-09-09 19:03:56 +02:00
util.h Add support for printing input/output identifiers 2021-09-19 10:23:36 +02:00
view.c Apply clang-format 2022-09-09 19:03:56 +02:00
view.h Apply clang-format 2022-09-09 19:03:56 +02:00
workspace.c Merge branch 'development' of https://github.com/project-repo/cagebreak into development 2022-10-02 08:26:19 +02:00
workspace.h Release 1.8.3 2022-01-26 22:45:41 +01:00
xdg_shell.c Apply clang-format 2022-09-09 19:03:56 +02:00
xdg_shell.h Switch to wlr_scene api 2022-01-26 19:36:10 +01:00
xwayland.c Merge branch 'master' into development 2022-10-02 11:38:14 +02:00
xwayland.h Switch to wlr_scene api 2022-01-26 19:36:10 +01:00

Cagebreak: A Wayland Tiling Compositor

CII Best Practices Packaging status AUR package

Quick Introduction

Cagebreak is a Wayland tiling compositor based on Cage and inspired by ratpoison.

Purpose

The goal of this project is to provide a successor to ratpoison for Wayland. However, this is no reimplementation of ratpoison.

New Features, Bugs and Contact Information

Should you want to know if a feature will be implemented, file a bug or get in touch, open an issue or write an e-mail (See SECURITY.md for details.).

The Roadmap section outlines what is planned for the future.

Compatibility & Development Distribution

Cagebreak supports Arch Linux and uses the libraries (and software versions) as they are obtained through pacman at the time of release. Any other use is out of scope.

Most other setups probably work with a bit of luck. We make no guarantees.

Quick Installation

This assumes Arch Linux:

  1. Use the cagebreak PKGBUILD.
  2. Add an example config such as config to $USER/.config/cagebreak/config
  3. Execute cagebreak like any other binary.

See the ArchWiki for details on getting started and the documentation for everything else.

Documentation

What's new?

See the Changelog.

Uninstallation

pacman -R cagebreak should be sufficient.

Contributing

  • Just open an issue and state your idea. We will consider the proposal and get back to you.
  • Don't open a pull request. We might not accept your code and it would be sad to waste the effort.
  • Respect the Code of Conduct (To date, we never had to intervene - Keep it that way!)

Name

Cagebreak is based on Cage, a Wayland kiosk compositor. Since it breaks the kiosk into tiles the name Cagebreak seemed appropriate.

Installation

On Arch Linux, just use the PKGBUILDs from the AUR:

  • Using cagebreak, Cagebreak is compiled on the target system (since release 1.3.0)
  • Using cagebreak-bin, the pre-built binaries are extracted to appropriate paths on the target system (since release 1.3.2)

See cagebreak-pkgbuild for details.

Obtaining Source Code

There are different ways to obtain cagebreak source:

Verifying Source Code

There are corresponding methods of verifying that you obtained the correct code:

  • our git history includes signed tags for releases
  • release assets starting at release 1.2.1 contain a signature for the tarball

Building Cagebreak

You can build Cagebreak with the meson build system. It requires wayland, wlroots and xkbcommon to be installed. Note that Cagebreak is developed against the latest tag of wlroots, in order not to constantly chase breaking changes as soon as they occur.

Simply execute the following steps to build Cagebreak:

$ meson setup build
$ ninja -C build

Release Build

By default, this builds a debug build. To build a release build, use meson setup build --buildtype=release.

Xwayland Support

Cagebreak comes with compile-time support for XWayland. To enable this, first make sure that your version of wlroots is compiled with this option. Then, add -Dxwayland=true to the meson command above. Note that you'll need to have the XWayland binary installed on your system for this to work.

Man Pages

Cagebreak has man pages. To use them, make sure that you have scdoc installed. Then, add -Dman-pages=true to the meson command.

Running Cagebreak

You can start Cagebreak by running ./build/cagebreak. If you run it from within an existing X11 or Wayland session, it will open in a virtual output as a window in your existing session. If you run it in a TTY, it'll run with the KMS+DRM backend. For more configuration options, see the man pages.

Contributing

  • Read this document.
  • Just open an issue and state your feature request. We will consider the proposal and get back to you.
  • Don't open a pull request. We might not accept your code and it would be sad to waste the effort.
  • Respect the Code of Conduct (To date, we never had to intervene - Keep it that way!)

Good First Contributions

  • Reviewing the project is always welcome.
    • Read the code.
    • Read the documentation.
    • Test whether the documentation matches the code.
    • Test Cagebreak in more esoteric setups (many monitors, for instance).
    • Compile the code.
  • Ideas on improving the testing and quality assurance are particularly welcome.
  • Iff you are happy with Cagebreak and use Arch Linux, you may vote for Cagebreak in the AUR.
  • The points above still apply.

Philosophy

Cagebreak is currently developed to fit the needs of its creators.

The feature set is intentionally limited - we removed support for a desktop background image for example.

Nonetheless, don't be intimidated by any other part of this file. Do your best and we will collaborate toward a solution.

Development

Compatibility & Development Distribution

Cagebreak supports Arch Linux and uses the libraries (and software versions) as they are obtained through pacman at the time of release. Any other use is out of scope.

However, Cagebreak may also work on other distributions given the proper library versions (Some package maintainers have done this and it seems to work (To date, we dealt with a few Issues and never felt the need to ask for the distribution the user was having the issue on.)).

Packaging status

You should use Arch Linux if you want to modify Cagebreak for yourself.

GCC and -fanalyzer

Cagebreak should compile with any reasonably new gcc or clang. Consider a gcc version of at least 10.1 if you want to get the benefit of the brand-new -fanalyzer flag. However, this new flag sometimes produces false-postives and we selectively disable warnings for affected code segments as described below.

Meson is configured to set CG_HAS_FANALYZE if -fanalyzer is available. Therefore, to maintain portability, false-positive fanalyzer warnings are to be disabled using the following syntax:

#if CG_HAS_FANALYZE
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "WARNING OPTION"
#endif

and after

#if CG_HAS_FANALYZE
#pragma GCC diagnostic pop
#endif

Fuzzing

Along with the project source code, a fuzzing framework based on libfuzzer is supplied. This allows for the testing of the parsing code responsible for reading the cagebreak configuration file. When libfuzzer is available (please use the clang compiler to enable it), building the fuzz-testing software can be enabled by passing -Dfuzz=true to meson. This generates a build/fuzz/fuzz-parse binary according to the libfuzzer specifications. Further documentation on how to run this binary can be found here.

Here is an example workflow:

rm -rf build
CC=clang meson build -Dfuzz=true -Db_sanitize=address,undefined -Db_lundef=false
ninja -C build/
mkdir build/fuzz_corpus
cp examples/config build/fuzz_corpus/
WLR_BACKENDS=headless ./build/fuzz/fuzz-parse -jobs=12 -max_len=50000 -close_fd_mask=3 build/fuzz_corpus/

You may want to tweak -jobs or add other options depending on your own setup. We have found code path discovery to increase rapidly when the fuzzer is supplied with an initial config file. We are working on improving our fuzzing coverage to find bugs in other areas of the code.

Caveat

Currently, there are memory leaks which do not seem to stem from our code but rather the code of wl-roots or some other library we depend on. We are working on the problem. In the meantime, add -Db_detect-leaks=0 to the meson command to exclude memory leaks.

Reproducible Builds

Cagebreak offers reproducible builds given the exact library versions specified in meson.build. Should a version mismatch occur, a warning will be emitted. We have decided on this compromise to allow flexibility and security. In general we will adapt the versions to the packages available under Arch Linux at the time of release.

There are reproducibility issues up to and including release 1.2.0. See Issue 5 in Bugs.md.

Reproducible Build Instructions

All hashes and signatures are provided for the following build instructions.

meson setup build -Dxwayland=true -Dman-pages=true --buildtype=release
ninja -C build

Hashes for Builds

For every release after 1.0.5, hashes will be provided.

For every release after 1.7.0, hashes will be provided for man pages too.

See Hashes.md

GPG Signatures

For every release after 1.0.5, a GPG signature will be provided in signatures.

The current signature is called cagebreak.sig, whereas all older signatures will be named after their release version.

Due to errors in the release process, the releases 1.7.1 and 1.7.2 did not include the release signatures in the appropriate folder of the git repository. However, signatures were provided as release-artefacts at the time of release. The signatures were introduced into the repository with 1.7.3. The integrity of cagebreak is still the same because the signatures were provided as release-artefacts (which were themselves signed) and the hashes in Hashes.md are part of a signed release tag.

Signing Keys

All releases are signed by at least one of the following collection of keys.

  • E79F6D9E113529F4B1FFE4D5C4F974D70CEC2C5B
  • 4739D329C9187A1C2795C20A02ABFDEC3A40545F
  • 7535AB89220A5C15A728B75F74104CC7DCA5D7A8
  • 827BC2320D535AEAD0540E6E2E66F65D99761A6F
  • A88D7431E5BAAD0B6EAE550AC8D61D8BD4FA3C46
  • 8F872885968EB8C589A32E9539ACC012896D450F
  • 896B92AF738C974E0065BF42F2576BD366156BB9
  • AA927AFD50AF7C6810E69FE8274F2C605359E31B
  • BE2DED372287BC4EB2213E13A0C743848A638955
  • 0F3476E4B2404F95EC41600683D5810F7911B020

Should we at any point retire a key, we will only replace it with keys signed by at least one of the above collection.

We registered project-repo.co and added mail addresses after release 1.3.0.

We now have a mail address and its key is signed by signing keys. See Security Bugs for details.

The full public keys can be found in keys/ along with any revocation certificates.

Versioning & Branching Strategy

Cagebreak uses semantic versioning.

There are three permanent branches in cagebreak:

  • master (for releases)
  • development (for polishing code between releases)
  • hotfix (for small emergent releases, usually up-to-date with master)

Releases are merged to master as per the release procedure, with reasonable exceptions as the situation requires.

The release commit is tagged with the release version.

In the past, our git history did not perfectly reflect this scheme.

Release Procedure

The release procedure outlines the process for a release to occur.

  • git checkout development
  • git pull origin development
  • git push origin development
  • New semantic version number determined
  • Adjust version number
    • meson.build
    • git tag
    • man pages
    • README.md repology badges minversion
  • Relevant Documentation completed
    • New features
      • man pages
        • cagebreak
        • cagebreak-config
        • cagebreak-socket
        • Set EPOCH to release day in man generation in meson.build
      • FAQ.md
      • Changelog.md for major and minor releases but not patches
    • Check features for SECURITY.md relevance (changes to socket scope for example)
      • Synchronize any socket changes to cagebreak-socket man page
    • Fixed bugs documented in Bugs.md
      • Include issue discussion from github, where applicable
  • Testing
    • Manual testing
    • Libfuzzer testing
    • Build version without xwayland support
  • meson.build reproducible build versions are current archlinux libraries and gcc
  • ninja -C build clang-format makes no changes
  • ninja -C build scan-build shows no issues
  • Cagebreak is reproducible on multiple machines
  • Documented reproducible build artefacts
    • Hashes of the artefacts in Hashes.md
    • Renamed previous signatures
    • Created gpg signature of the artefacts
      • gpg --detach-sign -u keyid cagebreak
      • gpg --detach-sign -u keyid cagebreak.1
      • gpg --detach-sign -u keyid cagebreak-config.5
      • gpg --detach-sign -u keyid cagebreak-socket.7
  • git add relevant files
  • git commit
  • git push origin development
  • Determined commit and tag message (Start with "Release version_number\n\n")
    • Mentioned fixed Bugs.md issues ("Fixed Issue n")
    • Mentioned other important changes
  • git checkout master
  • git merge --squash development
  • git commit and insert message
  • git tag -u keyid version HEAD and insert message
  • git tag -v version and check output
  • git push --tags origin master
  • git checkout development (merge to development depends on whether release was a hotfix)
  • git merge master
  • git push --tags origin development
  • git checkout hotfix (hotfix is to be kept current with master after releases)
  • git merge master
  • git push --tags origin hotfix
  • git archive --prefix=cagebreak/ -o release_version.tar.gz tags/version .
  • Create release-artefacts_version.tar.gz
    • mkdir release-artefacts_version
    • cp build/cagebreak release-artefacts_version/
    • cp build/cagebreak.sig release-artefacts_version/
    • cp build/cagebreak.1 release-artefacts_version/
    • cp build/cagebreak.1.sig release-artefacts_version/
    • cp build/cagebreak-config.5 release-artefacts_version/
    • cp build/cagebreak-config.5.sig release-artefacts_version/
    • cp build/cagebreak-socket.7 release-artefacts_version/
    • cp build/cagebreak-socket.7.sig release-artefacts_version/
    • cp LICENSE release-artefacts_version/
    • cp README.md release-artefacts_version/
    • cp SECURITY.md release-artefacts_version/
    • cp FAQ.md release-artefacts_version/
    • export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) ; tar --sort=name --mtime= --owner=0 --group=0 --numeric-owner -czf release-artefacts_version.tar.gz release-artefacts_version
  • Checked archive
    • tar -xvf release_version.tar.gz
    • cd cagebreak
    • meson setup build -Dxwayland=true -Dman-pages=true --buildtype=release
    • ninja -C build
    • gpg --verify ../signatures/cagebreak.sig build/cagebreak
    • cd ..
    • rm -rf cagebreak
  • gpg --detach-sign -u keyid release_version.tar.gz
  • gpg --detach-sign -u keyid release-artefacts_version.tar.gz
  • Upload archives and signatures as release assets

Roadmap

Cagebreak plans to do or keep doing the following things in the future:

Governance

Cagebreak is managed by project-repo.

Project-repo is a pseudonym of at least two individuals acting as benevolent dictators for the project by the others mutual consent.

The individuals comprising project-repo are not otherwise associated by payment from any organisation or grant.

For all intents and purposes consider project-repo as a single benevolent dictator for life that happens to occupy at least two brains.

Roles

There are members of project-repo and those who are not.

There are no specific roles forced unto anyone.

Bus Factor

The Bus Factor is a measure of how many people have to be incapacitated for a project to be unable to continue.

The current bus factor for Cagebreak is: 1

Project-repo could still react to issues (even confidential e-mails) and fix easier issues if any one individual were incapacitated.

However, not all aspects of the code or release engineering are fully resilient to the loss of any one individual.

We strive to improve the Bus Factor to at least two in all aspects of Cagebreak.

Governance Issues

Anyone can use the information in SECURITY.md to contact the members of project-repo and bring governance issues to their attention.

Bugs

For any bug, please create an issue on GitHub.

Fixed bugs are to be assigned a number and summarized inside Bugs.md for future reference independent of github, in case this service is unavailable.

For other means of contacting the Cagebreak authors and for security issues see SECURITY.md.

Contributors

License

MIT, please see LICENSE.