Skip to content

Commit c1bda32

Browse files
committed
Rebrand, move to GitHub and related changes
1 parent 7b93f8b commit c1bda32

35 files changed

Lines changed: 2753 additions & 546 deletions

.github/dependencies.apt.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
meson
2+
ninja-build
3+
python3-jsonschema
4+
python3-yaml

.github/workflows/check.yml

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: main
6+
paths-ignore:
7+
- '.gitignore'
8+
- 'LICENSE'
9+
- 'README'
10+
- '.pre-commit-config.yaml'
11+
pull_request:
12+
branches: main
13+
paths-ignore:
14+
- '.gitignore'
15+
- 'LICENSE'
16+
- 'README'
17+
- '.pre-commit-config.yaml'
18+
workflow_dispatch:
19+
20+
jobs:
21+
lint:
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
25+
timeout-minutes: 10
26+
steps:
27+
# 6.0.2
28+
- name: Checkout repository
29+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
30+
with:
31+
persist-credentials: false
32+
33+
- name: Install uv
34+
# 7.2.0
35+
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b
36+
with:
37+
version: "0.9.21"
38+
enable-cache: true
39+
save-cache: ${{ github.ref == 'refs/heads/main' }}
40+
cache-dependency-glob: |
41+
**/uv.lock
42+
**/pyproject.toml
43+
44+
- name: Install python dependencies
45+
run: uv sync --all-extras --all-groups --frozen
46+
47+
- name: Check Python code formatting
48+
run: uv run ruff format --check
49+
50+
- name: Check Python code lint
51+
run: uv run ruff check --output-format=github
52+
53+
- name: Check Python code types
54+
run: uv run mypy .
55+
56+
- name: Run tests
57+
run: uv run pytest
58+
59+
build:
60+
strategy:
61+
matrix:
62+
os: ['ubuntu-24.04', 'ubuntu-24.04-arm']
63+
compiler: ['gcc', 'clang']
64+
runs-on: ${{ matrix.os }}
65+
container:
66+
image: ubuntu:26.04
67+
options: --privileged
68+
permissions:
69+
contents: read
70+
timeout-minutes: 20
71+
env:
72+
CC: ${{ matrix.compiler }}
73+
BUILDDIR: builddir
74+
CONFIG_OPTS: -Dtests=true
75+
MESON_TEST_TIMEOUT_MULTIPLIER: 2
76+
DEBIAN_FRONTEND: noninteractive
77+
steps:
78+
- name: Install dependencies
79+
run: apt-get update && apt-get install -y git findutils
80+
81+
- name: Set git safe directory
82+
run: git config --global safe.directory "*"
83+
84+
# 6.0.2
85+
- name: Checkout repository
86+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
87+
with:
88+
persist-credentials: false
89+
90+
- name: Install build dependencies
91+
run: |
92+
apt-get install -y ${{ matrix.compiler }} uncrustify \
93+
$(xargs < .github/dependencies.apt.txt)
94+
95+
- name: Run uncrustify
96+
run: ./uncrustify.sh && git diff --exit-code
97+
98+
- name: Configure with meson
99+
run: |
100+
if [ "${{ matrix.compiler }}" = "gcc" ]; then
101+
SANITIZE_OPTS="-Db_sanitize=address,undefined"
102+
else
103+
SANITIZE_OPTS=""
104+
fi
105+
106+
meson setup --wrap-mode nodownload ${CONFIG_OPTS} \
107+
-Dwerror=true ${SANITIZE_OPTS} ${BUILDDIR} .
108+
109+
- name: Build with meson
110+
run: meson compile -C ${BUILDDIR}
111+
112+
- name: Run tests with Meson
113+
env:
114+
ASAN_OPTIONS: "detect_leaks=1:fast_unwind_on_malloc=0:malloc_context_size=20:symbolize=1"
115+
UBSAN_OPTIONS: "print_stacktrace=1"
116+
run: |
117+
export LSAN_OPTIONS="suppressions=$GITHUB_WORKSPACE/tests/lsan.supp"
118+
meson test -C ${BUILDDIR} --verbose --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER}
119+
120+
- name: Upload test logs
121+
# 7.0.0
122+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
123+
if: failure() || cancelled()
124+
with:
125+
name: test logs
126+
path: |
127+
builddir/meson-logs/testlog.txt
128+
installed-test-logs/
129+
130+
- name: Create dist tarball
131+
run: |
132+
meson setup --wrap-mode nodownload --reconfigure ${CONFIG_OPTS} ${BUILDDIR}_dist .
133+
meson dist --include-subprojects -C ${BUILDDIR}_dist

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
builddir/
2+
3+
__pycache__/
4+
.venv/
5+
venv/
6+
.pytest_cache/
7+
.mypy_cache/
8+
.ruff_cache/

.gitlab-ci.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
default_install_hook_types:
2+
- pre-commit
3+
default_stages:
4+
- pre-commit
5+
fail_fast: true
6+
repos:
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b
9+
hooks:
10+
- id: trailing-whitespace
11+
- id: end-of-file-fixer
12+
- id: check-added-large-files
13+
args: ['--maxkb=100']
14+
- id: check-shebang-scripts-are-executable
15+
- id: check-executables-have-shebangs
16+
- id: check-symlinks
17+
- id: mixed-line-ending
18+
args: [--fix=lf]
19+
20+
- repo: local
21+
hooks:
22+
- id: uv-lock
23+
name: uv lock
24+
description: Sync uv lock
25+
entry: uv lock --quiet
26+
language: python
27+
pass_filenames: false
28+
- id: ruff-format
29+
name: ruff format
30+
description: Format with ruff
31+
entry: uv run --frozen -q ruff format
32+
language: system
33+
pass_filenames: false
34+
- id: ruff-check
35+
name: ruff
36+
description: Lint with ruff
37+
entry: uv run --frozen -q ruff check --fix --exit-non-zero-on-fix
38+
language: system
39+
pass_filenames: false
40+
- id: mypy-check
41+
name: mypy
42+
description: Check types with mypy
43+
entry: uv run --frozen -q mypy .
44+
language: system
45+
pass_filenames: false
46+
files: \.py$
47+
- id: py-test
48+
name: pytest
49+
description: Run pytest
50+
entry: uv run --frozen -q pytest --ff --exitfirst
51+
language: system
52+
pass_filenames: false
53+
- id: uncrustify
54+
name: uncrustify
55+
language: system
56+
entry: sh -c 'uncrustify -c uncrustify.cfg --no-backup $(git ls-files "*.c" "*.h") && git diff --exit-code'
57+
pass_filenames: false
58+
always_run: true
59+
- id: meson
60+
name: build and test with meson
61+
language: system
62+
entry: sh -c 'meson setup builddir --reconfigure -Dtests=true && meson compile -C builddir && meson test -C builddir'
63+
pass_filenames: false
64+
always_run: true

.ruff.toml

Lines changed: 0 additions & 23 deletions
This file was deleted.

LICENSE

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,9 @@ safest to attach them to the start of each source file to most effectively
470470
convey the exclusion of warranty; and each file should have at least the
471471
"copyright" line and a pointer to where the full notice is found.
472472

473-
shared-library-guard
474-
Copyright (C) 2019 freedesktop-sdk
473+
libloadguard
474+
Copyright (C) 2026 bbhtt
475+
Copyright (C) 2019-2026 freedesktop-sdk
475476

476477
This library is free software; you can redistribute it and/or
477478
modify it under the terms of the GNU Lesser General Public

README

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
LD_AUDIT-based runtime shared library path filter to help Flatpak
2+
applications cope with badly behaving programs. Versioning follows
3+
YY.MM.release
4+
5+
Format:
6+
7+
C code is formatted using Uncrustify [1]. `./uncrustify.sh` can be
8+
executed to format them. Python devlopment environment can be set up
9+
using uv [2].
10+
11+
```
12+
uv sync --all-extras --all-groups --frozen
13+
uv run ruff format
14+
uv run ruff check . --fix
15+
```
16+
17+
Build:
18+
19+
```
20+
meson setup --reconfigure builddir -Dtests=true
21+
meson compile -C builddir
22+
```
23+
24+
Test:
25+
26+
```
27+
meson test -C builddir
28+
uv run pytest
29+
```
30+
31+
[1]: https://github.com/uncrustify/uncrustify
32+
[2]: https://docs.astral.sh/uv/

Readme.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)