File: CONTRIBUTING.md

package info (click to toggle)
glycin 2.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,216 kB
  • sloc: python: 432; ansic: 215; xml: 70; makefile: 30; sh: 27; javascript: 10
file content (92 lines) | stat: -rw-r--r-- 2,901 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Contributing to Glycin

## Running tests

```sh
$ meson setup -Dbuildtype=debug builddir
$ meson test -vC builddir
```

## Finding blocked syscalls

Auditd is enabled by default on Fedora. On Debian you need to

```sh
sudo apt install auditd
systemctl start auditd.service
```

After that you have to execute the failing operation again while running the program with `GLYCIN_SECCOMP_DEFAULT_ACTION=KILL_PROCESS`.

On Fedora the logs should be accessible via

```sh
journalctl -b | grep SECCOMP
```

On Debian via

```sh
sudo grep SECCOMP /var/log/audit/audit.log
```

## Using the locally built loaders

While `meson test` will ensure to run against the locally built loaders, for other commands, this is not the case. As a first step, you need to install the loaders into a local directory:

```sh
$ meson setup -Dbuildtype=debug --prefix=$(pwd)/install builddir
$ meson install -C builddir
```

You can set `GLYCIN_DATA_DIR=$(pwd)/install/share` to force glycin to use the locally built loaders.

Usually, the better option is to use `meson devenv` which will also set other relevant variables:

```sh
$ meson devenv -C builddir -w .
# Test if it works
$ ./tests/libglycin.py
```

## Useful Commands

Glycin comes with a few tools in `glycin-dev-tools/` that can be helpful for development.

```sh
$ meson devenv -C builddir -w .
$ cargo r --bin glycin-image-info image.png
```

Use ImageMagic to get Exif information.

```sh
$ identify -format '%[EXIF:*]' <image>
```

Increase memory usage (this can crash your PC)

```sh
$ sudo swapoff -a
$ stress-ng --vm-bytes 20G --vm-keep -m 1
```

## Test D-Bus API stability

The following test will ensure that the lastest API documented in `docs/` hasn't changed.

```
$ cargo test -p tests -- dbus_api_stability --include-ignored
```

## Resources

- [xdg/shared-mime-info](https://gitlab.freedesktop.org/xdg/shared-mime-info/-/blob/master/data/freedesktop.org.xml.in)

## Use of Generative AI

This project does not allow contributions generated by large languages models (LLMs) and chatbots. This ban includes, but is not limited to, tools like ChatGPT, Claude, Copilot, DeepSeek, and Devin AI. We are taking these steps as precaution due to the potential negative influence of AI generated content on quality, as well as likely copyright violations.

This ban of AI generated content applies to all parts of the projects, including, but not limited to, code, documentation, issues, and artworks. An exception applies for purely translating texts for issues and comments to English.

AI tools can be used to answer questions and find information. However, we encourage contributors to avoid them in favor of using [existing documentation](https://developer.gnome.org) and our [chats and forums](https://welcome.gnome.org). Since AI generated information is frequently misleading or false, we cannot supply support on anything referencing AI output.