49 Commits

Author SHA1 Message Date
2be16df905 ci(docker): add Docker publishing workflow and Dockerfile
All checks were successful
CI Code / Check spelling (pull_request) Successful in 13s
CI Code / Check coding style (pull_request) Successful in 24s
CI Code / Code Coverage (pull_request) Successful in 3m42s
CI Code / Linux (debian) (pull_request) Successful in 5m13s
CI Code / Linux (ubuntu) (pull_request) Successful in 5m18s
CI Code / Linux (arch) (pull_request) Successful in 6m59s
CI Code / Check spelling (push) Successful in 13s
CI Code / Check coding style (push) Successful in 23s
CI Code / Code Coverage (push) Successful in 3m38s
Publish Docker image / Push Docker image to Docker Hub (push) Successful in 4m46s
CI Code / Linux (debian) (push) Successful in 5m26s
CI Code / Linux (ubuntu) (push) Successful in 5m33s
CI Code / Linux (arch) (push) Successful in 7m10s
Introduce GitHub Actions workflow for automated Docker image
publishing to Docker Hub, along with a dedicated Dockerfile in
the ci directory to streamline container builds.
2026-07-11 17:43:16 +00:00
72f4f186da merge: sync upstream profanity-im/profanity
All checks were successful
CI Code / Check spelling (push) Successful in 18s
CI Code / Check coding style (push) Successful in 34s
CI Code / Code Coverage (push) Successful in 2m36s
CI Code / Linux (debian) (push) Successful in 4m41s
CI Code / Linux (ubuntu) (push) Successful in 4m52s
CI Code / Linux (arch) (push) Successful in 5m40s
Sync with upstream profanity-im/profanity.

Major upstream changes incorporated:

Memory management
  - Replace malloc+memset with g_new0 throughout codebase
  - Adopt auto_gchar / auto_gcharv / auto_gerror / auto_jid cleanup macros
  - Replace free() with g_free() for GAlloc'd memory

Editor rewrite
  - Remove pthread-based async editor; use GChildWatch callback API
  - New launch_editor(initial_content, callback, user_data) interface
  - Proper signal handling (SIGINT, SIGTSTP, SIGPIPE reset in child)
  - ui_suspend()/ui_resume() integration for TTY management

OMEMO improvements
  - Dual backend support: libsignal-protocol-c and libomemo-c
  - Proper pre-key removal after use (XEP-0384 compliance)
  - Automatic pre-key regeneration when store drops below threshold
  - New functions: omemo_is_device_active(), omemo_is_jid_trusted()
  - omemo_get_jid_untrusted_fingerprints() for better error messages
  - Fingerprint notifications on new device identity discovery
  - Deterministic pre-key ID generation tracking max_pre_key_id
  - omemo_trust_changed() UI updates on trust state changes

JID validation
  - RFC 6122-compliant validation in jid_is_valid()
  - Character-level checks (RFC 6122 forbidden chars: & ' / : < > @)
  - Length limits: 1023 per component, 3071 total
  - New jid_is_valid_user_jid() for user vs. service JID distinction

Database
  - Schema migration v3: UNIQUE constraint on archive_id for deduplication
  - Triggers for corrected message tracking (replaces_db_id / replaced_by_db_id)
  - db_history_result_t return type, _truncate_datetime_suffix()

UI / console
  - win_warn_needed() / win_warn_sent() warning deduplication hash table
  - PAD_MIN_HEIGHT dynamic pad sizing with PAD_THRESHOLD auto-cleanup
  - Spellcheck integration in input field with Unicode word detection
  - cons_spellcheck_setting() for /settings ui output
  - /[command]? shortcut for command help

Account config
  - Account name sanitization for GKeyFile special chars ([ ] = # \n \r)
  - Replace popen() with g_spawn_sync() for eval_password
  - TLS policy: add "direct" option alongside legacy

Connection
  - Port validation with g_assert (0–65535)
  - SHA-256 certificate fingerprint support (XMPP_CERT_PUBKEY_FINGERPRINT_SHA256)
  - "direct" TLS policy alias for legacy SSL

Common utilities
  - str_xml_sanitize() for XML 1.0 illegal character removal
  - string_matches_one_of() with formatted error messages
  - valid_tls_policy_option() helper
  - prof_date_time_format_iso8601() utility
  - Improved strip_arg_quotes() with backslash unescaping
  - prof_occurrences() uses g_slist_prepend + reverse for performance

PGP / OX
  - Proper GPGME resource cleanup with goto-cleanup pattern
  - g_string_free(xmppuri) leak fix in _ox_key_lookup

CSV export
  - Use GString + g_file_set_contents instead of raw write() syscalls

Tests
  - Restructured into subdirectories: command/, config/, xmpp/, ui/, omemo/, otr/, pgp/
  - New test_cmd_ac.c for autocompleter unit tests
  - Updated stubs for new UI suspend/resume functions

License headers
  - Migrate to SPDX-3.0 identifiers (GPL-3.0-or-later WITH OpenSSL-exception)

────────────────────────────────────────────────────
cproof-specific preservations:

  - XEP-0308 LMC: replace_id ?: id logic in message/stanza/omemo
  - Force encryption: cmd_force_encryption, test_forced_encryption
  - CWE-134: format string protection (cons_show("%s", ...))
  - y_start_pos-based paging in window.c
  - db_history_result_t return type, _truncate_datetime_suffix()

Merge-time fixes:

  - common.c: format-security (-Werror) — cons_show(errmsg) → cons_show("%s", errmsg)
  - database.c: null-deref guard — !msg->timestamp → msg && !msg->timestamp
  - console.c: implicit size_t → int cast — (int)(maxlen + 1)
  - tlscerts.c: %d for size_t — %zu

Build system:
  - Kept autotools (Makefile.am, configure.ac); upstream uses Meson
  - Restored deleted files: bootstrap.sh, autogen.sh, ax_valgrind_check.m4, configure-debug
  - Updated Makefile.am test paths for subdirectory structure
  - Added test_cmd_ac, test_forced_encryption to test sources

Functional tests:
  - Use cproof version; upstream requires stbbr_for_xmlns from updated stabber
  - Not yet available in devs/stabber fork

Closes #64

Merge author: jabber.developer2
Commits authors:
 Michael Vetter <jubalh@iodoru.org>
& Steffen Jaeckel <s@jaeckel.eu>
2026-05-26 17:48:14 +00:00
d4254db814 CI: Separate build and test steps
All checks were successful
CI Code / Check coding style (pull_request) Successful in 32s
CI Code / Check spelling (pull_request) Successful in 24s
CI Code / Code Coverage (pull_request) Successful in 4m46s
CI Code / Linux (debian) (pull_request) Successful in 6m5s
CI Code / Linux (ubuntu) (pull_request) Successful in 6m11s
CI Code / Linux (arch) (pull_request) Successful in 6m25s
2026-03-04 23:04:51 +03:00
467222d0ca fix(ui,db): harden NULL handling, fix CWE-134, optimize iterations
Some checks failed
CI Code / Code Coverage (push) Failing after 10m34s
CI Code / Check spelling (push) Failing after 10m47s
CI Code / Check coding style (push) Failing after 11m4s
CI Code / Linux (ubuntu) (push) Failing after 11m19s
CI Code / Linux (debian) (push) Failing after 11m28s
CI Code / Linux (arch) (push) Failing after 11m38s
security(CWE-134): fix format string injections + add CI check
fix(ui): subwindow lifecycle, newwin/newpad guards, fallback timestamps
fix(db): sqlite cleanup on failures, sqlite3_close_v2
fix(xmpp): queued_messages loop, barejid leak
perf(core): g_hash_table_iter_init instead of g_hash_table_get_keys
refactor(ui): CLAMP macro in _check_subwin_width
test: XEP-0012 and XEP-0045 functional tests

Author: jabber.developer2
Closes #58, #85
2026-02-06 19:27:40 +01:00
f8826b7c79 ci: improve CI stability with parallel builds and Valgrind
All checks were successful
CI Code / Check spelling (push) Successful in 20s
CI Code / Check coding style (push) Successful in 33s
CI Code / Code Coverage (push) Successful in 4m47s
CI Code / Linux (debian) (push) Successful in 6m9s
CI Code / Linux (ubuntu) (push) Successful in 6m13s
CI Code / Linux (arch) (push) Successful in 6m19s
Major changes:
Run 4 build configurations in parallel with Valgrind on Linux
Add test failure detection verification (meta-test)
Port allocation per build to prevent conflicts in parallel runs
Add --coverage-only flag for dedicated coverage builds
Code quality:

Add TEST_GROUPS constant, CMOCKA patterns, helper functions
Organize ci-build.sh into sections
2026-02-02 17:47:05 +01:00
85c817ee8c ci: speed up builds 4x with parallel tests, coverage, and ccache
All checks were successful
CI Code / Check spelling (push) Successful in 18s
CI Code / Check coding style (push) Successful in 31s
CI Code / Code Coverage (push) Successful in 15m25s
CI Code / Linux (debian) (push) Successful in 15m57s
CI Code / Linux (ubuntu) (push) Successful in 16m0s
CI Code / Linux (arch) (push) Successful in 16m6s
Split functional tests into 4 parallel groups and add check-functional-parallel target (~3x faster CI runs).
Add branch-aware LCOV coverage reporting with new --enable-coverage option and lcov summary in CI pipeline.
Enable ccache via -C configure flag for faster recompilations.
Install lcov in all Docker images and use --depth 1 git clones + parallel make -j$(nproc) for quicker container builds.
Update CONTRIBUTING.md with instructions for parallel test groups and adding new ones.

All changes are tightly related CI/performance improvements developed in sequence. No external service uploads (e.g. Codecov skipped due to Gitea incompatibility).
2026-01-21 16:35:17 +01:00
9fd62e2304 ci: restructure and optimize execution conditions
Some checks failed
CI API Docs / Test C API Documentation Generation (pull_request) Successful in 26s
CI API Docs / Test Python API Documentation Generation (pull_request) Failing after 28s
CI Code / Check coding style (pull_request) Has been cancelled
CI Code / Check spelling (pull_request) Has been cancelled
CI Code / Linux (arch) (pull_request) Has been cancelled
CI Code / Linux (debian) (pull_request) Has been cancelled
CI Code / Linux (ubuntu) (pull_request) Has been cancelled
- The code tests will ignore doc changes and vice versa.
- The CI is split in 2 parts for clarity
2025-09-17 01:00:30 +02:00
c94cd0b549 ci: add GitHub Actions workflow to test C and Python API doc generation
Introduce separate jobs to test C (Doxygen) and Python (Sphinx) API documentation generation. Ensures build failures are caught early, as API changes often produce warnings that developers miss without automated checks.
2025-09-10 19:05:32 +02:00
Michael Vetter
f419e65fad Update issue templates
According to the new way: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates

(cherry picked from commit 5dcbd84f75)
2025-09-10 14:18:01 +02:00
Michael Vetter
110b3d27b4 Rename issue template
Seems like GH changed how the templates work.

(cherry picked from commit f1e12a33cf)
2025-09-10 14:17:15 +02:00
a3e23c3514 Temporarily disable Fedora tests
All checks were successful
CI / Check spelling (pull_request) Successful in 15s
CI / Check coding style (pull_request) Successful in 28s
CI / Linux (arch) (pull_request) Successful in 11m52s
CI / Linux (ubuntu) (pull_request) Successful in 11m59s
CI / Linux (debian) (pull_request) Successful in 12m2s
CI / Check spelling (push) Successful in 17s
CI / Check coding style (push) Successful in 30s
CI / Linux (ubuntu) (push) Successful in 10m9s
CI / Linux (arch) (push) Successful in 12m4s
CI / Linux (debian) (push) Successful in 13m0s
They are failing on our runners due to issues with dependency resolution.
2025-08-07 03:27:14 +02:00
b4d3563b96 Cleanup (#5)
All checks were successful
CI / Check coding style (push) Successful in 29s
CI / Check spelling (push) Successful in 16s
CI / Linux (debian) (push) Successful in 9m35s
CI / Linux (arch) (push) Successful in 11m27s
CI / Linux (fedora) (push) Successful in 13m57s
CI / Linux (ubuntu) (push) Successful in 11m21s
- Update formatting for stub files
- Update docs

While original project, Profanity, provides valuable basis for this
fork, we are not affiliated with the upstream. This commit
is updating documentation to reflect accurate information.

The docs are going to be updated further once the website is created.

Reviewed-on: devs/profanity#5
Co-authored-by: Jabber Developer <jabber.developer@jabber.space>
Co-committed-by: Jabber Developer <jabber.developer@jabber.space>
2025-06-20 18:20:47 +00:00
0784662d40 Fix workflow
Current setup of the infratstrcture with DIND
was causing issues with volume binding,
leading to a false-positive error on code formatting check.

This commit addresses the issue by removing dependency on a container,
but at the same time it limits choice of formatting version.

This fix does not address the underlying issue with the architecture.

As an additional change, package versions are updated.
2025-06-20 14:54:12 +02:00
Michael Vetter
5b9516b483 Merge pull request #2022 from profanity-im/fixes
Memory fixes
2025-03-13 09:58:09 +01:00
Michael Vetter
b5f0cc0bd4 Fix more potential leaks in aesgcm_download 2025-03-13 09:48:27 +01:00
Steffen Jaeckel
ef476cbf96 Cancel all running build jobs on force-push of a PR branch
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
2025-03-12 10:15:39 +01:00
Michael Vetter
d7398d11e1 ci: re-enable arch
This reverts commit 3def839c0e.
2025-01-05 18:39:58 +01:00
Michael Vetter
a4cbf3e4c5 ci: disable macOS for now
We get some build fails there and I don't see what's the problem on a
first glance. Noone else stepped up neither.
2024-06-14 13:24:24 +02:00
Michael Vetter
57c8969de0 Expand issue template
Include libstrophe version and server software used.
2024-04-10 14:54:38 +02:00
Steffen Jaeckel
4c26462827 Ensure instances of auto types are initialized
Follow-up of #1913

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-11-06 22:22:35 +01:00
Steffen Jaeckel
970cb706fb Minor changes
* slightly improve PR template
* update gitignore

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-10-04 17:02:10 +02:00
Michael Vetter
35c3068a2d ci: reenable macos
This reverts commit a815e251b6.
2023-08-25 19:36:29 +02:00
Michael Vetter
a815e251b6 ci: disable macos until they have libstrophe 0.12.3 in brew 2023-08-03 08:45:41 +02:00
Michael Vetter
181772bd5c Add spellcheck to CI 2023-04-15 12:03:57 +02:00
Michael Vetter
663c773bff Switch to clang-format check action
Instead of running clang-format outselves on the old Ubuntu version.
This let's us easily configure which version of clang-format we want to
execute.

Used action:
https://github.com/marketplace/actions/clang-format-check

Properly fix:
https://github.com/profanity-im/profanity/pull/1774
2023-04-14 21:43:31 +02:00
Michael Vetter
4f94898611 Add test/valgrind section to PR template 2023-04-10 20:47:55 +02:00
Michael Vetter
4786073171 ci: disable TW
TW curently has problems:
```
Problem: the to be installed sqlite3-devel-3.39.2-1.2.x86_64 requires 'libsqlite3-0 = 3.39.2', but this requirement cannot be provided
  not installable providers: libsqlite3-0-3.39.2-1.2.i586[repo-oss]
                   libsqlite3-0-3.39.2-1.2.x86_64[repo-oss]
```
2022-09-07 12:22:32 +02:00
Michael Vetter
cdebb559bb ci: enable tumbleweed
This reverts commit 5c5c453219.

And removes the old python(2) pull in.

For some reason we get:
`Package python3-embed was not found in the pkg-config search path.`
with python38-devel but not with python310-devel. Let's bump it to that
version.
2022-08-18 15:02:36 +02:00
Michael Vetter
8f2f0edf7a ci: enable macos ci
This reverts commit d5bb93b927.
2022-08-09 13:37:40 +02:00
Michael Vetter
d5bb93b927 ci: disable macos until they have libstrophe 0.12.2 2022-08-08 14:09:10 +02:00
Michael Vetter
2394d033b9 ci: Remove TW for now
Until they fixed this:
```
Problem: the to be installed ncurses-devel-6.3.20220604-20.1.x86_64 requires 'libncurses6 = 6.3.20220604-20.1', but this requirement cannot be provided
Problem: the to be installed gtk2-devel-2.24.33-2.8.x86_64 requires 'pkgconfig(cairo)', but this requirement cannot be provided
Problem: the to be installed ncurses-devel-6.3.20220604-20.1.x86_64 requires 'libncurses6 = 6.3.20220604-20.1', but this requirement cannot be provided
  not installable providers: libncurses6-6.3.20220604-20.1.i586[repo-oss]
                   libncurses6-6.3.20220604-20.1.x86_64[repo-oss]
 Solution 1: downgrade of libncurses6-6.3.20220604-20.2.x86_64 to libncurses6-6.3.20220604-20.1.x86_64
 Solution 2: do not install ncurses-devel-6.3.20220604-20.1.x86_64
 Solution 3: break ncurses-devel-6.3.20220604-20.1.x86_64 by ignoring some of its dependencies
```
2022-06-16 20:16:04 +02:00
Steffen Jaeckel
67fa33ba4e add CI job to check coding style
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-30 18:26:10 +02:00
Michael Vetter
fc1a24b9fa Add Pull Request template 2022-02-18 18:11:51 +01:00
Michael Vetter
7500100a5b Remove Patreon 2022-02-16 12:21:18 +01:00
Michael Vetter
05435d2714 ci: re-enable tumblweed
Old docker/libseccomp from GH got updated.

This reverts commit 5c5c453219.
2021-12-03 16:50:00 +01:00
Michael Vetter
d6633e0920 ci: re-enable ubuntu
This reverts commit cc206ee8cc.
2021-12-03 16:14:26 +01:00
Michael Vetter
a980ab14a0 ci: re-enable macos
They have libstrophe 0.11.0 now.
This reverts commit 472a3ceec4.
2021-12-03 15:56:56 +01:00
Michael Vetter
472a3ceec4 ci: disable osx until they updated libstrophe 2021-10-28 20:15:40 +02:00
Michael Vetter
cc206ee8cc ci: remove ubuntu
Fails and I don't have time to check why.
Something package related most likely.
2021-10-22 16:57:24 +02:00
Michael Vetter
27e598e957 gh: fix typo in issue template 2021-06-10 13:52:24 +02:00
Michael Vetter
642fbf4118 gh: 50 issue feature request ban 2021-06-10 00:03:57 +02:00
Michael Vetter
5c5c453219 Disable Tumbleweed CI
```
 (248/297) Installing: system-group-hardware-20170617-19.2.noarch [..error]
Installation of system-group-hardware-20170617-19.2.noarch failed:
Error: Subprocess failed. Error: RPM failed: ERROR: neither groupadd nor busybox found!
error: %prein(system-group-hardware-20170617-19.2.noarch) scriptlet failed, exit status 1
error: system-group-hardware-20170617-19.2.noarch: install failed

Abort, retry, ignore? [a/r/i] (a): a
Warning: %posttrans scripts skipped while aborting:
    pam-1.5.1-2.2.x86_64.rpm
    shadow-4.8.1-5.2.x86_64.rpm
```

Seems to be a bug in old docker/libseccomp from GH.
2021-02-17 19:30:26 +01:00
Michael Vetter
3def839c0e Disable Arch CI
Again something wrong this Arch.
Not time to invest right now but we need a working CI for PRs.
2021-02-17 16:24:59 +01:00
William Wennerström
81c02d1231 Switch from Travis CI to GitHub Actions
Travis have been slow and the macOS runner is outdated (and a bunch of
other recurring issues).
2020-12-17 15:09:25 +01:00
Michael Vetter
601baa09b5 Lift 50 issues ban :-) 2020-02-03 16:25:10 +01:00
Michael Vetter
5490d148b9 Add my GitHub Sponsors URL 2019-11-05 17:36:05 +01:00
Michael Vetter
f023eb8d72 Dont allow new issues 2019-10-22 11:13:41 +02:00
Michael Vetter
ef86ec6240 Move ISSUE_TEMPLATE into github folder 2019-08-23 09:57:14 +02:00
Michael Vetter
0fb94042ae Add FUNDING.ymlg 2019-06-06 08:46:34 +02:00