clean up changes

This commit is contained in:
rozodru 2025-07-18 19:24:07 -04:00
parent 639de7b834
commit 7ebde8b3a0
149 changed files with 2 additions and 1015 deletions

View File

@ -1,67 +0,0 @@
# FAQ for Development
## How is cagebreak adjusted to a new wlroots version?
There are three steps:
1. Try to compile Cagebreak with the new wlroots.
2. Fix the compiler errors one-by-one using the wlroots
changelog for reference (https://gitlab.freedesktop.org/wlroots/wlroots/-/releases).
3. Debug until Cagebreak works again.
## How do I add a new test?
1. Add a shell script to `test/`
2. Optionally add test configs to `test/testing-configurations/`
3. Make sure the files have shebang, copyright and SPDX License identifiers
(use the other files for reference)
4. Add the test to `meson.build` as in the example below.
5. Add paths and env vars as shown in the other tests
6. Make sure the test is added to the correct suite
(check out CONTRIBUTING.md for details)
```
test('Scan-build (static analysis)', find_program('test/scan-build'), env : [ ''.join('MESONCURRENTCONFIGDIR=', meson.current_source_dir()) ], suite: 'devel-long')
```
## How do I add a new script?
1. Add a shell script to `scripts/`
2. Make sure the files have shebang, copyright and SPDX License identifiers
(use the other files for reference)
3. Add the script to CONTRIBUTING.md
4. Add the script to meson.build as shown below
```
run_target('create-sigs',
command : ['scripts/create-signatures', get_option('gpg_id')])
```
## How do I add an example script?
Extrapolate from the examples in the `example_scripts` directory.
The script should be executable standalone. See `test/script-header` for a possible
library.
License, contributors etc. should be appropriate.
Shellcheck must pass on any script (use of shellcheck pragmas is allowed but
discouraged).
## How do I add a new gpg key?
1. Check which gpg key versions are currently valid.
2. Generate keys with incremented numbers/emails/dates/passphrase.
* Use 4096 Bit RSA Keys
3. Sign the new keys with at least one then-old signing key.
4. Genereate new cagebreak@project-repo.co key
5. Sign the new mail key with the new signing keys.
6. Generate new pkgbuild key.
7. Sign the pkgbuild key with the new signing keys.
8. Add public keys to `keys/`.
9. Update meson_options.txt
10. Update [all man pages](../manuals.md), [CONTRIBUTING](../CONTRIBUTING.md), gpg-validity test & [SECURITY.md](../SECURITY.md)
11. Update the pkgbuild repo with the new key (key and readme).
12. Update git config email.
13. Securely distribute private keys and revocation certificates as per the internal wiki.

View File

@ -1,26 +0,0 @@
# Description
<!-- Replace this with a description of your pull request. -->
<!-- Please reference any relevant issues, PRs etc. -->
## Type of Change
* [ ] Fix
* [ ] Backwards-compatible Feature
* [ ] Breaking Change
## Considerations
<!-- Replace this with a description of what might be missing, any points of confusion or -->
<!-- side effects you would like to point out. -->
## Credit
* [ ] I want to be credited as YOUR_NAME_OR_PSEUDONYM in your contributor section
* [ ] I don't want to be credited.
<!-- (by signing off, you state that you are allowed to contribute and allow us to publish -->
<!-- your contribution under the MIT License) -->
signed-off-by: YOUR_NAME_OR_PSEUDONYM

View File

@ -1,44 +0,0 @@
#!/bin/bash
# Copyright 2023 - 2025, project-repo, sodface and the cagebreak contributors
# SPDX-License-Identifier: MIT
#
# Execute this script if you want to take a screenshot.
# Please supply your chosen cropping/editing tool as a
# command-line argument. The filepath to the temporary
# file will be given as an argument to your command.
#
# Example:
# screenshot_script "gwenview"
named_pipe_send="$(mktemp -u)"
named_pipe_recv="$(mktemp -u)"
mkfifo "${named_pipe_send}"
mkfifo "${named_pipe_recv}"
nc -U "${CAGEBREAK_SOCKET}" < "${named_pipe_send}" > "${named_pipe_recv}"&
# The file descriptor 3 is set up to send commands to cagebreak and file
# descriptor 4 can be used to read events. Notice that events will pile up in
# file descriptor 4, so it is a good idea to continuously read from it or to
# clear it before starting a new transaction.
exec 3>"${named_pipe_send}"
exec 4<"${named_pipe_recv}"
# When the script exits, the os will clean up the pipe
rm "${named_pipe_recv}"
rm "${named_pipe_send}"
if [[ ${#} -lt 1 ]]
then
echo "Expected a single command line argument specifying the command to edit the screenshot."
exit 1
fi
edit_cmd="${1}"
echo "dump" >&3
IFS= read -r -d $'\0' event <&4
co="$(echo "${event:6}"|jq -r ".curr_output")"
tmpfile="$(mktemp)"
grim -t png -o "${co}" "${tmpfile}"
bash -c "${edit_cmd} \"${tmpfile}\""
wl-copy < "${tmpfile}"
rm "${tmpfile}"

View File

@ -1,38 +0,0 @@
#!/bin/bash
# Copyright 2020 - 2025, project-repo and the cagebreak contributors
# SPDX-License-Identifier: MIT
#
# This script displays the process names of the views on the current workspace.
named_pipe_send="$(mktemp -u)"
named_pipe_recv="$(mktemp -u)"
mkfifo "${named_pipe_send}"
mkfifo "${named_pipe_recv}"
nc -U "${CAGEBREAK_SOCKET}" < "${named_pipe_send}" > "${named_pipe_recv}"&
# The file descriptor 3 is set up to send commands to cagebreak and file
# descriptor 4 can be used to read events. Notice that events will pile up in
# file descriptor 4, so it is a good idea to continuously read from it or to
# clear it before starting a new transaction.
exec 3>"${named_pipe_send}"
exec 4<"${named_pipe_recv}"
# When the script exits, the os will clean up the pipe
rm "${named_pipe_recv}"
rm "${named_pipe_send}"
echo "dump" >&3
while IFS= read -r -d $'\0' event
do
# Remove the cg-ipc header
event="${event:6}"
if [[ "$(echo "${event}" | jq ".event_name")" = "\"dump\"" ]]
then
curr_output="$(echo "${event}"|jq ".curr_output")"
curr_workspace="$(echo "${event}"|jq -r ".outputs.${curr_output}.curr_workspace")"
# Print the process names of the view on the current workspace. jq retrieves
# their PID and ps is then used to retrieve the process names.
# shellcheck disable=2046
(echo -n "message ";ps -o comm=Command -p $(echo "${event}"|jq -r ".outputs.${curr_output}.workspaces[$((curr_workspace-1))].views[].pid")|tail +2|sed ':a; N; $!ba; s/\n/||/g') >&3
break
fi
done <&4

View File

@ -1,4 +1,3 @@
# Copyright 2020 - 2025, project-repo and the NEDM contributors
# SPDX-License-Identifier: MIT
# General settings and key bindings
@ -23,8 +22,8 @@ bind R setmode resize
bind N nextscreen
bind P prevscreen
bind a time
bind C-n movetonextscreen
bind C-p movetoprevscreen
bind A-n movetonextscreen
bind A-p movetoprevscreen
bind H exchangeleft
bind J exchangedown
bind K exchangeup

View File

@ -1,2 +0,0 @@
3.0.1
2025-07-05

View File

@ -1,2 +0,0 @@
3.0.1
2025-07-05

View File

@ -1,2 +0,0 @@
3.0.1
2025-07-05

View File

@ -1,2 +0,0 @@
3.0.1
2025-07-05

View File

@ -1,2 +0,0 @@
3.0.1
2025-07-05

View File

@ -1,2 +0,0 @@
3.0.1
2025-07-05

View File

@ -1,2 +0,0 @@
3.0.1
2025-07-05

View File

@ -1,2 +0,0 @@
3.0.1
2025-07-05

View File

@ -1,2 +0,0 @@
3.0.1
2025-07-05

View File

@ -1,2 +0,0 @@
3.0.1
2025-07-05

View File

@ -1,2 +0,0 @@
3.0.1
2025-07-05

View File

@ -1,2 +0,0 @@
3.0.1
2025-07-05

View File

@ -1,13 +0,0 @@
#!/bin/bash
# Copyright 2023 - 2025, project-repo and the cagebreak contributors
# SPDX-License-Identifier: MIT
if [[ -n ${MESON_SOURCE_ROOT} ]]
then
# shellcheck disable=2164
cd "${MESON_SOURCE_ROOT}"
fi
# shellcheck disable=2034
ssepoch=$(date +%s)
sed -i -e "/secssinceepoch \=/s/[0-9]*$/$ssepoch/" meson.build

View File

@ -1,40 +0,0 @@
#!/bin/bash
# Copyright 2023 - 2025, project-repo and the cagebreak contributors
# SPDX-License-Identifier: MIT
if [[ -n ${MESON_SOURCE_ROOT} ]]
then
# shellcheck disable=2164
cd "${MESON_SOURCE_ROOT}"
fi
readonly gpg_id="${1}"
readonly version="${2}"
git archive --prefix=cagebreak/ -o "release_${version}.tar.gz" "tags/${version}" .
rm -rf "release-artefacts_${version}"
mkdir "release-artefacts_${version}"
rm -rf temp-rel-artefacts
meson setup temp-rel-artefacts -Dxwayland=true -Dman-pages=true --buildtype=release
ninja -C temp-rel-artefacts
cp LICENSE "release-artefacts_${version}"
cp SECURITY.md "release-artefacts_${version}"
cp FAQ.md "release-artefacts_${version}"
cp README.md "release-artefacts_${version}"
cp temp-rel-artefacts/cagebreak "release-artefacts_${version}"
cp temp-rel-artefacts/cagebreak.1 "release-artefacts_${version}"
cp temp-rel-artefacts/cagebreak-config.5 "release-artefacts_${version}"
cp temp-rel-artefacts/cagebreak-socket.7 "release-artefacts_${version}"
cp signatures/cagebreak*.sig "release-artefacts_${version}"
# shellcheck disable=2155
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}"
gpg -u "${gpg_id}" --detach-sign "release-artefacts_${version}.tar.gz"
gpg -u "${gpg_id}" --detach-sign "release_${version}.tar.gz"
rm -rf temp-rel-artefacts

View File

@ -1,37 +0,0 @@
#!/bin/bash
# Copyright 2023 - 2025, project-repo and the cagebreak contributors
# SPDX-License-Identifier: MIT
if [[ -n ${MESON_SOURCE_ROOT} ]]
then
# shellcheck disable=2164
cd "${MESON_SOURCE_ROOT}"
fi
readonly gpg_id="${1}"
# shellcheck disable=2155
readonly old_tags=$(git tag| tail -1)
mv signatures/cagebreak.sig "signatures/${old_tags}-cagebreak.sig"
mv signatures/cagebreak.1.sig "signatures/${old_tags}-cagebreak.1.sig"
mv signatures/cagebreak-config.5.sig "signatures/${old_tags}-cagebreak-config.5.sig"
mv signatures/cagebreak-socket.7.sig "signatures/${old_tags}-cagebreak-socket.7.sig"
git add "signatures/${old_tags}-cagebreak.sig"
git add "signatures/${old_tags}-cagebreak.1.sig"
git add "signatures/${old_tags}-cagebreak-config.5.sig"
git add "signatures/${old_tags}-cagebreak-socket.7.sig"
rm -rf temp-sigs
meson setup temp-sigs -Dxwayland=true -Dman-pages=true --buildtype=release
ninja -C temp-sigs
gpg -u "${gpg_id}" --detach-sign temp-sigs/cagebreak
gpg -u "${gpg_id}" --detach-sign temp-sigs/cagebreak.1
gpg -u "${gpg_id}" --detach-sign temp-sigs/cagebreak-config.5
gpg -u "${gpg_id}" --detach-sign temp-sigs/cagebreak-socket.7
cp temp-sigs/*.sig signatures/
rm -rf temp-sigs

View File

@ -1,17 +0,0 @@
#!/bin/bash
# Copyright 2023 - 2025, project-repo and the cagebreak contributors
# SPDX-License-Identifier: MIT
readonly fuzzing_corpus="${1}"
if [[ -n ${MESON_SOURCE_ROOT} ]]
then
# shellcheck disable=2164
cd "${MESON_SOURCE_ROOT}"
fi
rm -rf fuzzing-directory
CC=clang CCXFLAGS=-std=c11 meson setup fuzzing-directory -Dfuzz=true -Db_sanitize=address,undefined -Db_lundef=false
ninja -C fuzzing-directory/
WLR_BACKENDS=headless ./fuzzing-directory/fuzz-parse -detect_leaks=0 -jobs=12 -max_len=50000 -close_fd_mask=3 "${fuzzing_corpus}"
rm -rf fuzzing-directory

View File

@ -1,8 +0,0 @@
#!/bin/bash
# Copyright 2023 - 2025, project-repo and the cagebreak contributors
# SPDX-License-Identifier: MIT
readonly gpg_id="${1}"
readonly version="${2}"
git tag -u "${gpg_id}" "${version}" HEAD

View File

@ -1,13 +0,0 @@
#!/bin/bash
# Copyright 2023 - 2025, project-repo and the cagebreak contributors
# SPDX-License-Identifier: MIT
sudo pacman -Syu --noconfirm git grep sed xorg-xev meson ninja clang gcc shellcheck jq openbsd-netcat gnupg binutils alacritty wlroots wayland wayland-protocols libxkbcommon cairo pango fontconfig libinput libevdev pkgconf scdoc systemd-libs # systemd-libs is included because of libudev
if [[ -n ${MESON_SOURCE_ROOT} ]]
then
# shellcheck disable=2164
cd "${MESON_SOURCE_ROOT}"
fi
gpg --import keys/*

View File

@ -1,50 +0,0 @@
#!/bin/bash
# Copyright 2023 - 2025, project-repo and the cagebreak contributors
# SPDX-License-Identifier: MIT
if [[ -n ${MESON_SOURCE_ROOT} ]]
then
# shellcheck disable=2164
cd "${MESON_SOURCE_ROOT}"
fi
readonly version="${1}"
rm -rf hashes
meson setup hashes -Dxwayland=true -Dman-pages=true --buildtype=release
ninja -C hashes
cb256=$(sha256sum hashes/cagebreak | cut -d " " -f1)
cb512=$(sha512sum hashes/cagebreak | cut -d " " -f1)
cb1man256=$(sha256sum hashes/cagebreak.1 | cut -d " " -f1)
cb1man512=$(sha512sum hashes/cagebreak.1 | cut -d " " -f1)
cb5man256=$(sha256sum hashes/cagebreak-config.5 | cut -d " " -f1)
cb5man512=$(sha512sum hashes/cagebreak-config.5 | cut -d " " -f1)
cb7man256=$(sha256sum hashes/cagebreak-socket.7 | cut -d " " -f1)
cb7man512=$(sha512sum hashes/cagebreak-socket.7 | cut -d " " -f1)
echo "${version} cagebreak
* sha 256: ${cb256}
* sha 512: ${cb512}
${version} cagebreak.1
* sha 256: ${cb1man256}
* sha 512: ${cb1man512}
${version} cagebreak-config.5
* sha 256: ${cb5man256}
* sha 512: ${cb5man512}
${version} cagebreak-socket.7
* sha 256: ${cb7man256}
* sha 512: ${cb7man512}
" > local-hashes.txt
rm -rf hashes

View File

@ -1,18 +0,0 @@
#!/bin/bash
# Copyright 2023 - 2025, project-repo and the cagebreak contributors
# SPDX-License-Identifier: MIT
if [[ -n ${MESON_SOURCE_ROOT} ]]
then
# shellcheck disable=2164
cd "${MESON_SOURCE_ROOT}"
fi
# shellcheck disable=2034
version="${1}"
sed -i -e "s/minversion\=[0-9]*\.[0-9]*.[0-9]*/minversion=$version/" README.md
sed -i -e "s/Version [0-9]*\.[0-9]*.[0-9]*/Version $version/" man/cagebreak.1.md
sed -i -e "s/Version [0-9]*\.[0-9]*.[0-9]*/Version $version/" man/cagebreak-config.5.md
sed -i -e "s/Version [0-9]*\.[0-9]*.[0-9]*/Version $version/" man/cagebreak-socket.7.md

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More