Merge upstream/master into merge/upstream-full
Some checks failed
CI Code / Check coding style (pull_request) Failing after 7s
CI Code / Check spelling (pull_request) Successful in 17s
CI Code / Linux (debian) (pull_request) Successful in 7m1s
CI Code / Linux (ubuntu) (pull_request) Successful in 7m44s
CI Code / Code Coverage (pull_request) Successful in 7m35s
Lint / DCO (pull_request) Failing after 7s
Lint / conventional commits (pull_request) Failing after 45s
CI Code / Linux (arch) (pull_request) Successful in 9m23s
Build / ubuntu | func | signal (pull_request) Has been cancelled
Lint / coding style (pull_request) Has been cancelled
Lint / spellcheck (pull_request) Has been cancelled
Build / cygwin / build only (pull_request) Has been cancelled
CodeQL / analyze (pull_request) Has been cancelled
Some checks failed
CI Code / Check coding style (pull_request) Failing after 7s
CI Code / Check spelling (pull_request) Successful in 17s
CI Code / Linux (debian) (pull_request) Successful in 7m1s
CI Code / Linux (ubuntu) (pull_request) Successful in 7m44s
CI Code / Code Coverage (pull_request) Successful in 7m35s
Lint / DCO (pull_request) Failing after 7s
Lint / conventional commits (pull_request) Failing after 45s
CI Code / Linux (arch) (pull_request) Successful in 9m23s
Build / ubuntu | func | signal (pull_request) Has been cancelled
Lint / coding style (pull_request) Has been cancelled
Lint / spellcheck (pull_request) Has been cancelled
Build / cygwin / build only (pull_request) Has been cancelled
CodeQL / analyze (pull_request) Has been cancelled
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
This commit is contained in:
44
.github/ISSUE_TEMPLATE/bug_report.md
vendored
44
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,44 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!--- Provide a general summary of the issue in the Title above -->
|
||||
|
||||
<!--- More than 50 issues open? Please don't file any new feature requests -->
|
||||
<!--- Help us reduce the work first :-) -->
|
||||
|
||||
## Expected Behavior
|
||||
<!--- If you're describing a bug, tell us what should happen -->
|
||||
<!--- If you're suggesting a change/improvement, tell us how it should work -->
|
||||
|
||||
## Current Behavior
|
||||
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
|
||||
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
|
||||
|
||||
## Possible Solution
|
||||
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
|
||||
<!--- or ideas how to implement the addition or change -->
|
||||
|
||||
## Steps to Reproduce (for bugs)
|
||||
<!--- Describe, in detail, what needs to happen to reproduce this bug -->
|
||||
<!--- Give us a screenshot (if it's helpful for this particular bug) -->
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
4.
|
||||
|
||||
## Context
|
||||
<!--- How has this issue affected you? What are you trying to accomplish? -->
|
||||
|
||||
## Environment
|
||||
* Give us the version and build information output generated by `profanity -v`
|
||||
* If you could not yet build profanity, mention the revision you try to build from
|
||||
* Operating System/Distribution
|
||||
* glib version
|
||||
* libstrophe version
|
||||
* Some bugs might be due to specific implementation in the server. `/serversoftware example.domain` can be helpful
|
||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
10
.github/issue_template.md
vendored
10
.github/issue_template.md
vendored
@@ -1,3 +1,12 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!--- Provide a general summary of the issue in the Title above -->
|
||||
|
||||
<!--- More than 50 issues open? Please don't file any new feature requests -->
|
||||
@@ -31,4 +40,3 @@
|
||||
* glib version
|
||||
* libstrophe version
|
||||
* Some bugs might be due to specific implementation in the server. `/serversoftware example.domain` can be helpful
|
||||
|
||||
|
||||
4
.github/workflows/ci-code.yml
vendored
4
.github/workflows/ci-code.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: docker build -f Dockerfile.${{ matrix.flavor }} -t profanity .
|
||||
run: docker build -f ci/Dockerfile.${{ matrix.flavor }} -t profanity .
|
||||
- name: Run tests
|
||||
run: docker run profanity ./ci-build.sh
|
||||
|
||||
@@ -108,6 +108,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: docker build -f Dockerfile.arch -t profanity-cov .
|
||||
run: docker build -f ci/Dockerfile.arch -t profanity-cov .
|
||||
- name: Run coverage
|
||||
run: docker run profanity-cov ./ci-build.sh --coverage-only
|
||||
64
.github/workflows/codeql.yml
vendored
Normal file
64
.github/workflows/codeql.yml
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
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"
|
||||
34
.github/workflows/commit-lint.yml
vendored
Normal file
34
.github/workflows/commit-lint.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
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 }}
|
||||
81
.github/workflows/cygwin-build.yml
vendored
Normal file
81
.github/workflows/cygwin-build.yml
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
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
|
||||
80
.github/workflows/functional-tests.yml
vendored
Normal file
80
.github/workflows/functional-tests.yml
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
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
|
||||
45
.github/workflows/style.yml
vendored
Normal file
45
.github/workflows/style.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
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
|
||||
Reference in New Issue
Block a user