Compare commits

..

1 Commits

Author SHA1 Message Date
c6bc85ccd5 Merge upstream/master into merge/upstream-full
Some checks failed
CI Code / Check coding style (pull_request) Failing after 5s
CI Code / Check spelling (pull_request) Successful in 15s
CI Code / Linux (ubuntu) (pull_request) Successful in 4m29s
CI Code / Linux (arch) (pull_request) Successful in 4m38s
CI Code / Linux (debian) (pull_request) Successful in 7m25s
CI Code / Code Coverage (pull_request) Successful in 7m28s
Merge profanity-im/profanity master (373 commits) into cproof fork.

Source changes (manual merge):
- src/command/: cmd_defs, cmd_funcs, cmd_ac — upstream g_new0, auto_gchar,
  launch_editor callback; keep our XEP-0308 LMC, force-encryption, CWE-134
- src/config/: preferences, tlscerts, account — upstream UNIQUE dedup,
  dynamic pad capacity; keep our db_history_result_t, scroll logic
- src/database.*: upstream g_new0 memory mgmt; keep our return types,
  add null-check fix for msg->timestamp
- src/omemo/, src/pgp/: upstream _gpgme_key_get_email, g_new0;
  keep our replace_id in omemo_on_message_send
- src/tools/: editor, http_upload, bookmark_ignore — upstream launch_editor
  callback API
- src/ui/: console, window, chatwin, mucwin, inputwin, buffer —
  upstream win_warn_needed/sent dedup, PAD_MIN_HEIGHT dynamic pads;
  keep our y_start_pos scroll, _truncate_datetime_suffix
- src/xmpp/: message, stanza, presence, roster_list, iq, session —
  upstream connection_get_available_resources; keep our LMC stanza logic
- src/common.c: fix format-security (cons_show)

Build system:
- Makefile.am: updated test paths to subdirectory structure, added
  test_cmd_ac, test_forced_encryption
- Restored autotools files deleted by upstream meson migration:
  bootstrap.sh, autogen.sh, m4/ax_valgrind_check.m4, configure-debug

Tests:
- Unit tests: upstream unittests.c base + our forced_encryption tests
  (482 passed, 0 failed across all 4 configurations)
- Functional tests: kept our version (93 passed, 0 failed)
  upstream version requires stbbr_for_xmlns not yet in our stabber fork
- Updated test stubs: stub_xmpp.c, stub_omemo.c from upstream

Compile fixes:
- src/common.c: cons_show(errmsg) -> cons_show("%s", errmsg)
- src/database.c: null-check before msg->timestamp access
- src/ui/console.c: size_t -> (int) cast for format width
- src/config/tlscerts.c: %d -> %zu for size_t
2026-04-11 13:34:51 +03:00
6 changed files with 2 additions and 306 deletions

View File

@@ -45,10 +45,10 @@ jobs:
# if this check fails, you have to update the number of auto types known and the list of auto types in the check below
- name: Check auto types are up-to-date
run: |
[[ "$(find src -type f -name '*.[ch]' -exec awk '/^#define auto_[\W]*/ {print $2}' '{}' \; | sort -u | wc -l)" == "8" ]] || exit -1
[[ "$(find src -type f -name '*.[ch]' -exec awk '/^#define auto_[\W]*/ {print $2}' '{}' \; | sort -u | wc -l)" == "9" ]] || exit -1
- name: Check auto types are initialized
run: |
grep -P 'auto_(char|gchar|gcharv|guchar|jid|sqlite|gfd|FILE)[\w *]*;$' -r src && exit -1 || true
grep -P 'auto_(char|gchar|gcharv|guchar|gerror|jid|sqlite|gfd|FILE)[\w *]*;$' -r src && exit -1 || true
- name: Check CWE-134 format string vulnerabilities
run: ./check-cwe134.sh

View File

@@ -1,64 +0,0 @@
name: "CodeQL"
on:
pull_request:
branches: [master]
jobs:
analyze:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: 'c-cpp'
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libcmocka-dev libcurl4-openssl-dev libgcrypt20-dev libglib2.0-dev \
libgpgme-dev libgtk-3-dev libmicrohttpd-dev libncursesw5-dev \
libnotify-dev libotr5-dev libreadline-dev libsignal-protocol-c-dev \
libomemo-c-dev libssl-dev libtool libxss-dev meson ninja-build \
pkg-config python3-dev python-dev-is-python3 libsqlite3-dev \
libgdk-pixbuf-2.0-dev libqrencode-dev libenchant-2-dev \
autoconf autoconf-archive automake cmake expect
- name: Install stabber and libstrophe
run: |
git clone --depth 1 https://github.com/profanity-im/stabber /tmp/stabber
cd /tmp/stabber && ./bootstrap.sh && ./configure --prefix=/usr && make -j$(nproc) && sudo make install
git clone --depth 1 https://github.com/strophe/libstrophe /tmp/libstrophe
cd /tmp/libstrophe && ./bootstrap.sh && ./configure --prefix=/usr && make -j$(nproc) && sudo make install
- name: Build for Analysis
run: |
meson setup build_codeql \
-Dnotifications=enabled \
-Dpython-plugins=enabled \
-Dc-plugins=enabled \
-Dotr=enabled \
-Dpgp=enabled \
-Domemo=enabled \
-Domemo-qrcode=enabled \
-Dicons-and-clipboard=enabled \
-Dgdk-pixbuf=enabled \
-Dxscreensaver=enabled \
-Dspellcheck=enabled \
-Dtests=false
meson compile -C build_codeql
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:c-cpp"

View File

@@ -1,34 +0,0 @@
name: "Lint"
on:
pull_request:
branches: [master]
types: [opened, synchronize, reopened]
jobs:
commitlint:
name: "conventional commits"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Fetch all history so commitlint can see the commits in the PR
fetch-depth: 0
- name: "Conventional Commits"
uses: wagoid/commitlint-github-action@v6
dco:
name: "DCO"
runs-on: ubuntu-latest
steps:
- name: "Get PR Commits"
id: "get-pr-commits"
uses: tim-actions/get-pr-commits@v1.3.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: "Check DCO"
uses: tim-actions/dco@v1.1.0
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}

View File

@@ -1,81 +0,0 @@
name: Build
on:
pull_request:
push:
branches:
- master
jobs:
cygwin-build:
name: cygwin / build only
runs-on: windows-latest
env:
CYGWIN: winsymlinks:nativestrict
# Wrapper:
# - convert temp script + workspace to POSIX paths
# - strip CRLF
# - enable igncr and run under Cygwin bash
defaults:
run:
shell: >
C:\tools\cygwin\bin\bash.EXE --login -eo pipefail -c
"p=$(/usr/bin/cygpath -au '{0}');
w=$(/usr/bin/cygpath -au '${{ github.workspace }}');
/usr/bin/sed -i 's/\r$//' \"$p\" || true;
set -o igncr;
cd \"$w\" || (/usr/bin/pwd; /usr/bin/ls -la; exit 2);
/usr/bin/bash -leo pipefail \"$p\""
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Cygwin with build dependencies
uses: egor-tensin/setup-cygwin@v4
with:
packages: >-
meson
ninja
autoconf
automake
libtool
make
pkg-config
autoconf-archive
gcc-core
gettext-devel
git
libncursesw-devel
libglib2.0-devel
libcurl-devel
libreadline-devel
libsqlite3-devel
libexpat-devel
libcmocka-devel
- name: Build and install libstrophe from source
run: |
cd "$GITHUB_WORKSPACE"
mkdir -p deps && cd deps
git clone --depth 1 https://github.com/strophe/libstrophe.git
cd libstrophe
autoreconf -i
./configure --prefix=$PWD/install
make -j2 install
- name: Meson setup
env:
CC: /usr/bin/gcc
PKG_CONFIG_PATH: ${{ github.workspace }}/deps/libstrophe/install/lib/pkgconfig:$PKG_CONFIG_PATH
run: |
cd "$GITHUB_WORKSPACE"
meson setup build_run
- name: Build
run: |
cd "$GITHUB_WORKSPACE"
meson compile -C build_run

View File

@@ -1,80 +0,0 @@
name: Build
on:
push:
branches: [master]
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-func-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
functional-tests:
runs-on: ubuntu-latest
name: ubuntu | func | signal
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libcmocka-dev libcurl4-openssl-dev libgcrypt20-dev libglib2.0-dev \
libgpgme-dev libgtk-3-dev libmicrohttpd-dev libncursesw5-dev \
libnotify-dev libotr5-dev libreadline-dev libsignal-protocol-c-dev \
libomemo-c-dev libssl-dev libtool libxss-dev meson ninja-build \
pkg-config python3-dev python-dev-is-python3 libsqlite3-dev \
libgdk-pixbuf-2.0-dev libqrencode-dev libenchant-2-dev \
autoconf autoconf-archive automake cmake expect
- name: Install stabber
run: |
git clone --depth 1 https://github.com/profanity-im/stabber /tmp/stabber
cd /tmp/stabber
./bootstrap.sh
./configure --prefix=/usr
make -j$(nproc)
sudo make install
- name: Install libstrophe (master)
run: |
git clone --depth 1 https://github.com/strophe/libstrophe /tmp/libstrophe
cd /tmp/libstrophe
./bootstrap.sh
./configure --prefix=/usr
make -j$(nproc)
sudo make install
- name: Configure and Build
run: |
# Use --buildtype=debugoptimized (-O2) for fast execution.
# Explicitly disable sanitizers to avoid the performance penalty.
meson setup build_run \
--buildtype=debugoptimized \
-Db_sanitize=none \
-Dnotifications=enabled \
-Dpython-plugins=enabled \
-Dc-plugins=enabled \
-Dotr=enabled \
-Dpgp=enabled \
-Domemo=enabled \
-Domemo-qrcode=enabled \
-Dicons-and-clipboard=enabled \
-Dgdk-pixbuf=enabled \
-Dxscreensaver=enabled \
-Dspellcheck=enabled \
-Dtests=true
meson compile -C build_run profanity:executable functionaltests
- name: Verify Profanity Binary
run: |
./build_run/profanity --version
- name: Run Functional Tests
env:
TERM: xterm
LC_ALL: C.UTF-8
run: |
./build_run/functionaltests

View File

@@ -1,45 +0,0 @@
name: Lint
on:
push:
branches: [master]
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
code-style:
runs-on: ubuntu-22.04
name: coding style
continue-on-error: true
steps:
- uses: actions/checkout@v2
# if this check fails, you have to update the number of auto types known and the list of auto types in the check below
- name: Check auto types are up-to-date
run: |
[[ "$(find src -type f -name '*.[ch]' -exec awk '/^#define auto_[\W]*/ {print $2}' '{}' \; | sort -u | wc -l)" == "9" ]] || exit -1
- name: Check auto types are initialized
run: |
grep -P 'auto_(char|gchar|gcharv|gerror|guchar|jid|sqlite|gfd|FILE)[\w *]*;$' -r src && exit -1 || true
- name: Run clang-format
uses: jidicula/clang-format-action@v4.16.0
with:
clang-format-version: '21'
check-path: 'src'
spell-check:
runs-on: ubuntu-22.04
name: spellcheck
continue-on-error: true
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt update
sudo apt install -y --no-install-recommends codespell
- name: Check spelling
run: |
codespell