Release 1.6.0

- Add support for non-build dependencies
- Add default build without pandoc dependency
- Fix Issue 24
- Fix Issue 25
This commit is contained in:
Cagebreak Signing Key 3 2021-03-05 18:13:42 +01:00
commit 2da91699ca
10 changed files with 119 additions and 51 deletions

26
Bugs.md
View file

@ -76,7 +76,7 @@ workspace 2. Therefore, this change would simplify the code base, while at
the same time increasing the feature set.
PS: As a side effect, this would allow quirky statements such as
`bind dbind r hsplit` which would bind the d key to binding the r key to
`bind d bind r hsplit` which would bind the d key to binding the r key to
split the output...
```
@ -297,3 +297,27 @@ Cagebreak up to and including release 1.4.4 had a potential use-after-free bug.
Cagebreak up to and including release 1.4.4 could have focussed views without tiles.
### Issue 24
* github issue number: N/A
* Fixed: 1.6.0
Cagebreak up to and including release 1.5.1 had an error, where the code
incremented a variable and not a pointer. This resulted in a bug in a
surface counting iterator.
### Issue 25
* github issue number: N/A
* Fixed: 1.6.0
Cagebreak, beginning with release 1.5.0, when a keybinding containing an output
configuration is removed from the list of active keybindings, the output
configuration contained in this keybinding is destroyed in order to
prevent memory leaks. However, after an output configuration was applied,
it was inserted into the list of active output configurations and if it
was later destroyed, this led to a use-after-free memory corruption.
Starting from release 1.6.0, output configurations are copied before
being inserted into the list of active output configurations and
therefore remain valid even if the original is freed.

View file

@ -67,6 +67,11 @@ 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 `pandoc`
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
@ -171,7 +176,7 @@ There are reproducibility issues up to and including release `1.2.0`. See
All hashes and signatures are provided for the following build instructions.
```
meson build -Dxwayland=true --buildtype=release
meson build -Dxwayland=true -Dman-pages=true --buildtype=release
ninja -C build
```
@ -179,6 +184,11 @@ ninja -C build
For every release after 1.0.5, hashes will be provided.
1.6.0
* sha 256: aef473eae73454429afb158d66a7bd9aec75ef915845b7508de5448820357aa8
* sha 512: 17889bc1af9f343598a5ee599b25e702987dd0bd905a9566874e8a0094c57168e413938624949fa214e6e382cbcf89d7342292b44012cd8e692947f6c01a960a
1.5.1
* sha 256: 9c6df4b94c180f5657cb424383aa2bf3aca063c8e7b40af0497be1ef7bdb858a
@ -399,6 +409,16 @@ Adds close command for windows as described in the man pages.
Adds options to disable or enable outputs. See Issue 22 in Bugs.md and Issue #2 on github.
### Release 1.6.0
Adds support for non-build dependencies and an option for builds without pandoc.
## Contributors
* Aisha Tammy
* [make man pages optional](https://github.com/project-repo/cagebreak/pull/4), released
in 1.6.0 with slight modifications
## License
Please see [LICENSE](https://github.com/project-repo/cagebreak/blob/master/LICENSE)

View file

@ -832,25 +832,36 @@ keybinding_move_view_to_workspace(struct cg_server *server, uint32_t ws) {
void
keybinding_configure_output(struct cg_server *server,
struct cg_output_config *cfg) {
struct cg_output_config *config;
config = malloc(sizeof(struct cg_output_config));
if(config == NULL) {
wlr_log(WLR_ERROR,
"Could not allocate memory for server configuration.");
return;
}
*config = *cfg;
config->output_name = strdup(cfg->output_name);
struct cg_output_config *it, *tmp;
wl_list_for_each_safe(it, tmp, &server->output_config, link) {
if(strcmp(cfg->output_name, it->output_name) == 0) {
if(strcmp(config->output_name, it->output_name) == 0) {
wl_list_remove(&it->link);
free(it->output_name);
free(it);
}
}
wl_list_insert(&server->output_config, &cfg->link);
wl_list_insert(&server->output_config, &config->link);
struct cg_output *output, *tmp_output;
wl_list_for_each_safe(output, tmp_output, &server->outputs, link) {
if(strcmp(cfg->output_name, output->wlr_output->name) == 0) {
if(strcmp(config->output_name, output->wlr_output->name) == 0) {
output_configure(server, output);
return;
}
}
wl_list_for_each_safe(output, tmp_output, &server->disabled_outputs, link) {
if(strcmp(cfg->output_name, output->wlr_output->name) == 0) {
if(strcmp(config->output_name, output->wlr_output->name) == 0) {
output_configure(server, output);
return;
}

View file

@ -1,4 +1,4 @@
% CAGEBREAK-CONFIG(1) Version 1.5.1 | Cagebreak Manual
% CAGEBREAK-CONFIG(1) Version 1.6.0 | Cagebreak Manual
# NAME

View file

@ -1,4 +1,4 @@
% CAGEBREAK(1) Version 1.5.1 | Cagebreak Manual
% CAGEBREAK(1) Version 1.6.0 | Cagebreak Manual
# NAME

View file

@ -1,5 +1,5 @@
project('cagebreak', 'c',
version: '1.5.1',
version: '1.6.0',
license: 'MIT',
default_options: [
'c_std=c11',
@ -175,47 +175,57 @@ endforeach
foreach header : cagebreak_header_strings
cagebreak_headers += files(header)
endforeach
# Dependencies marked with "true" are required to have
# the version specified below in order for the build
# to be reproducible.
cagebreak_dependencies_dict = {
'server_protos': server_protos,
'wayland_server': wayland_server,
'wayland_client': wayland_client,
'wayland_cursor': wayland_cursor,
'wlroots': wlroots,
'xkbcommon': xkbcommon,
'fontconfig': fontconfig,
'pixman': pixman,
'pango': pango,
'cairo': cairo,
'pangocairo': pangocairo,
'math': math
'server_protos': [server_protos,true],
'wayland_server': [wayland_server,false],
'wayland_client': [wayland_client,true],
'wayland_cursor': [wayland_cursor,true],
'wlroots': [wlroots,true],
'xkbcommon': [xkbcommon,true],
'fontconfig': [fontconfig,true],
'pixman': [pixman,true],
'pango': [pango,true],
'cairo': [cairo,true],
'pangocairo': [pangocairo,true],
'math': [math,true],
}
reproducible_build_versions = {
'server_protos': '-1',
'wayland_server': '1.18.0',
'wayland_client': '1.18.0',
'wayland_cursor': '1.18.0',
'wayland_server': '1.19.0',
'wayland_client': '1.19.0',
'wayland_cursor': '1.19.0',
'wlroots': '0.12.0',
'xkbcommon': '1.0.3',
'xkbcommon': '1.1.0',
'fontconfig': '2.13.91',
'pixman': '0.40.0',
'pango': '1.48.1',
'pango': '1.48.2',
'cairo': '1.17.4',
'pangocairo': '1.48.1',
'pangocairo': '1.48.2',
'math': '-1'
}
cagebreak_dependencies = []
foreach name, dep : cagebreak_dependencies_dict
cagebreak_dependencies += dep
cagebreak_dependencies += dep[0]
endforeach
foreach name, dep : cagebreak_dependencies_dict
if reproducible_build_versions[name] != '-1' and reproducible_build_versions[name] != dep.version()
warning('The installed version of "' + name + '" on your machine (' + dep.version() + ') differs from the one used to generate the binary specified in the README section "Reproducible Builds" (' + reproducible_build_versions[name] + '). Cagebreak does not guarantee a reproducible build for this configuration.'
)
break
if reproducible_build_versions[name] != '-1'
if dep[1] == false
if dep[0].version() < reproducible_build_versions[name]
warning('The installed version of "' + name + '" on your machine (' + dep[0].version() + ') is older than the one used to generate the binary specified in the README section "Reproducible Builds" (' + reproducible_build_versions[name] + '). It is recommended to use an up-to-date version for compiling cagebreak.'
)
endif
elif reproducible_build_versions[name] != dep[0].version()
warning('The installed version of "' + name + '" on your machine (' + dep[0].version() + ') differs from the one used to generate the binary specified in the README section "Reproducible Builds" (' + reproducible_build_versions[name] + '). Cagebreak does not guarantee a reproducible build for this configuration.'
)
break
endif
endif
endforeach
@ -237,25 +247,27 @@ executable(
c_args: fuzz_compile_args,
)
pandoc = find_program('pandoc')
mandir1 = join_paths(get_option('mandir'), 'man1')
mandir5 = join_paths(get_option('mandir'), 'man5')
if get_option('man-pages')
pandoc = find_program('pandoc')
mandir1 = join_paths(get_option('mandir'), 'man1')
mandir5 = join_paths(get_option('mandir'), 'man5')
cagebreak_man = custom_target('cagebreak_man',
output : 'cagebreak.1',
input : 'man/cagebreak.1.md',
command : [pandoc, '-i', '@INPUT@', '-o', '@OUTPUT@', '-f', 'markdown-smart', '-t', 'man', '-s'],
install: true,
install_dir: mandir1
)
cagebreak_man = custom_target('cagebreak_man',
output : 'cagebreak.1',
input : 'man/cagebreak.1.md',
command : [pandoc, '-i', '@INPUT@', '-o', '@OUTPUT@', '-f', 'markdown-smart', '-t', 'man', '-s'],
install: true,
install_dir: mandir1
)
cagebreak_man = custom_target('cagebreak_config_man',
output : 'cagebreak-config.5',
input : 'man/cagebreak-config.5.md',
command : [pandoc, '-i', '@INPUT@', '-o', '@OUTPUT@', '-f', 'markdown-smart', '-t', 'man', '-s'],
install: true,
install_dir: mandir5
)
cagebreak_man = custom_target('cagebreak_config_man',
output : 'cagebreak-config.5',
input : 'man/cagebreak-config.5.md',
command : [pandoc, '-i', '@INPUT@', '-o', '@OUTPUT@', '-f', 'markdown-smart', '-t', 'man', '-s'],
install: true,
install_dir: mandir5
)
endif
if get_option('fuzz')
subdir('fuzz')

View file

@ -1,3 +1,4 @@
option('xwayland', type: 'boolean', value: 'false', description: 'Enable support for X11 applications')
option('man-pages', type: 'boolean', value: 'false', description: 'Build man pages (requires pandoc)')
option('fuzz', type: 'boolean', value: 'false', description: 'Enable building fuzzer targets')
option('version_override', type: 'string', description: 'Set the project version to the string specified. Used for creating hashes for reproducible builds.')

View file

@ -207,7 +207,7 @@ static void
count_surface_iterator(struct cg_output *output, struct wlr_surface *surface,
struct wlr_box *_box, void *data) {
size_t *n = data;
n++;
(*n)++;
}
static bool

BIN
signatures/1.5.1.sig Normal file

Binary file not shown.

Binary file not shown.