mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-29 11:57:32 +00:00
Compare commits
33
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de24fcbb8c | ||
|
|
2adb9a7941 | ||
|
|
d81f4df61c | ||
|
|
6b259d15ee | ||
|
|
eeef60d540 | ||
|
|
a01035e63a | ||
|
|
52c1544e6f | ||
|
|
ed38212391 | ||
|
|
86fe98c90d | ||
|
|
4078062331 | ||
|
|
40935cf96a | ||
|
|
182c5a120e | ||
|
|
8e71ed7b63 | ||
|
|
4696cbb751 | ||
|
|
ebea06b687 | ||
|
|
62b58e1a6a | ||
|
|
1ba90deeba | ||
|
|
71ed283141 | ||
|
|
a7ae7b2e75 | ||
|
|
0d45ae7e21 | ||
|
|
61e121ad5c | ||
|
|
31960beb75 | ||
|
|
bdd9b6b50c | ||
|
|
216033cf20 | ||
|
|
95ddb1bbe5 | ||
|
|
1ad4ca0f67 | ||
|
|
95790d8152 | ||
|
|
02c61b3840 | ||
|
|
6ee501ac69 | ||
|
|
252ebb4642 | ||
|
|
0fb95df7a5 | ||
|
|
a72eda19f1 | ||
|
|
4fc808114f |
No files matched your search
@@ -71,7 +71,7 @@ runs:
|
|||||||
|
|
||||||
- name: Install timelord-cli and git-warp-time
|
- name: Install timelord-cli and git-warp-time
|
||||||
if: steps.check-binaries.outputs.need-install == 'true'
|
if: steps.check-binaries.outputs.need-install == 'true'
|
||||||
uses: https://github.com/taiki-e/install-action@15449e3094499af05d8d964a1c884208e4b8b595 # v2
|
uses: https://github.com/taiki-e/install-action@9e1e5806d4a4822de933115878265be9aaa786d9 # v2
|
||||||
with:
|
with:
|
||||||
tool: git-warp-time,timelord-cli@3.0.1
|
tool: git-warp-time,timelord-cli@3.0.1
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ on:
|
|||||||
- "v*.*.*"
|
- "v*.*.*"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '30 0 * * *'
|
- cron: '30 0 * * 1'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -41,20 +41,9 @@ jobs:
|
|||||||
# else
|
# else
|
||||||
# echo "No workaround needed for llvm-project#153385"
|
# echo "No workaround needed for llvm-project#153385"
|
||||||
# fi
|
# fi
|
||||||
- name: Pick compatible clang version
|
|
||||||
id: clang-version
|
|
||||||
run: |
|
|
||||||
# both latest need to use clang-23, but oldstable and previous can just use clang
|
|
||||||
if [[ "${{ matrix.container }}" == "ubuntu-latest" ]]; then
|
|
||||||
echo "Using clang-23 package for ${{ matrix.container }}"
|
|
||||||
echo "version=clang-23" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "Using default clang package for ${{ matrix.container }}"
|
|
||||||
echo "version=clang" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Checkout repository with full history
|
- name: Checkout repository with full history
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ github.ref_name }}
|
ref: ${{ github.ref_name }}
|
||||||
@@ -93,10 +82,10 @@ jobs:
|
|||||||
# VERSION is the package version, COMPONENT is used in
|
# VERSION is the package version, COMPONENT is used in
|
||||||
# apt's repository config like a git repo branch
|
# apt's repository config like a git repo branch
|
||||||
VERSION=$BASE_VERSION
|
VERSION=$BASE_VERSION
|
||||||
if [[ ${{ forge.ref_name }} =~ ^v+[0-9]\.+[0-9]\.+[0-9]$ ]]; then
|
if [[ ${{ forge.ref_name }} =~ ^v+[0-9]+\.+[0-9]+\.+[0-9]+$ ]]; then
|
||||||
# Use the "stable" component for tagged semver releases
|
# Use the "stable" component for tagged semver releases
|
||||||
COMPONENT="stable"
|
COMPONENT="stable"
|
||||||
elif [[ ${{ forge.ref_name }} =~ ^v+[0-9]\.+[0-9]\.+[0-9] ]]; then
|
elif [[ ${{ forge.ref_name }} =~ ^v+[0-9]+\.+[0-9]+\.+[0-9]+ ]]; then
|
||||||
# Use the "unstable" component for tagged semver pre-releases
|
# Use the "unstable" component for tagged semver pre-releases
|
||||||
COMPONENT="unstable"
|
COMPONENT="unstable"
|
||||||
else
|
else
|
||||||
@@ -130,7 +119,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
# Build dependencies for rocksdb
|
# Build dependencies for rocksdb
|
||||||
apt-get install -y liburing-dev ${{ steps.clang-version.outputs.version }}
|
apt-get install -y liburing-dev clang
|
||||||
|
|
||||||
- name: Run cargo-deb
|
- name: Run cargo-deb
|
||||||
id: cargo-deb
|
id: cargo-deb
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ on:
|
|||||||
# - '.forgejo/workflows/build-fedora.yml'
|
# - '.forgejo/workflows/build-fedora.yml'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '30 0 * * *'
|
- cron: '30 0 * * 2'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -30,7 +30,7 @@ jobs:
|
|||||||
echo "Fedora version: $VERSION"
|
echo "Fedora version: $VERSION"
|
||||||
|
|
||||||
- name: Checkout repository with full history
|
- name: Checkout repository with full history
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ github.ref_name }}
|
ref: ${{ github.ref_name }}
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
name: Build / Static via Nix
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: "build-nix-${{ forge.ref }}"
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*.*.*"
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '30 0 * * 3'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: "Build ${{ matrix.filename }} Binary"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- package: default-static-x86_64
|
||||||
|
filename: conduwuit-linux-static-amd64
|
||||||
|
- package: default-static-aarch64
|
||||||
|
filename: conduwuit-linux-static-arm64
|
||||||
|
|
||||||
|
- package: max-perf-static-aarch64
|
||||||
|
filename: conduwuit-linux-static-arm64-maxperf
|
||||||
|
- package: max-perf-haswell-static-x86_64
|
||||||
|
filename: conduwuit-haswell-linux-static-amd64-maxperf
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
|
||||||
|
|
||||||
|
- name: Install Lix
|
||||||
|
uses: https://github.com/samueldr/lix-gha-installer-action@a0fee77b2a98bb7c5c0ed7ae6d6ad4903dbdad0d
|
||||||
|
with:
|
||||||
|
extra_nix_config: experimental-features = nix-command flakes flake-self-attrs
|
||||||
|
|
||||||
|
- name: Build static binary
|
||||||
|
run: |
|
||||||
|
nix build .#${{ matrix.package }}
|
||||||
|
install -D result/bin/conduwuit /tmp/binaries/${{ matrix.filename }}
|
||||||
|
|
||||||
|
- name: Upload binary artifact
|
||||||
|
uses: forgejo/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.filename }}
|
||||||
|
path: /tmp/binaries/${{ matrix.filename }}
|
||||||
|
|
||||||
|
release-binaries:
|
||||||
|
name: "Release Binaries"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
steps:
|
||||||
|
- name: Download binary artifacts
|
||||||
|
uses: forgejo/download-artifact@v4
|
||||||
|
with:
|
||||||
|
pattern: conduwuit*
|
||||||
|
path: binaries
|
||||||
|
merge-multiple: true
|
||||||
|
- name: Create Release and Upload
|
||||||
|
uses: https://github.com/softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3
|
||||||
|
with:
|
||||||
|
draft: true
|
||||||
|
files: binaries/*
|
||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Sync repository
|
- name: Sync repository
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ jobs:
|
|||||||
DOCKER_MIRROR_TOKEN: ${{ secrets.DOCKER_MIRROR_TOKEN }}
|
DOCKER_MIRROR_TOKEN: ${{ secrets.DOCKER_MIRROR_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ jobs:
|
|||||||
# repositories: continuwuity
|
# repositories: continuwuity
|
||||||
|
|
||||||
- name: Install regsync
|
- name: Install regsync
|
||||||
uses: https://github.com/regclient/actions/regsync-installer@14f9d37db17b5dc41fefd1ffdd1af4b9e2490560 # main
|
uses: https://github.com/regclient/actions/regsync-installer@4b4db1dcc7dad75ad67a788a380f75a20cc8a040 # main
|
||||||
|
|
||||||
- name: Check what images need mirroring
|
- name: Check what images need mirroring
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ jobs:
|
|||||||
rust: ${{ steps.filter.outputs.rust }}
|
rust: ${{ steps.filter.outputs.rust }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Prepare Docker build environment
|
- name: Prepare Docker build environment
|
||||||
@@ -100,7 +100,7 @@ jobs:
|
|||||||
needs: build-release
|
needs: build-release
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Create multi-platform manifest
|
- name: Create multi-platform manifest
|
||||||
@@ -133,7 +133,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Prepare max-perf Docker build environment
|
- name: Prepare max-perf Docker build environment
|
||||||
@@ -187,7 +187,7 @@ jobs:
|
|||||||
needs: build-maxperf
|
needs: build-maxperf
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Create max-perf manifest
|
- name: Create max-perf manifest
|
||||||
@@ -216,7 +216,7 @@ jobs:
|
|||||||
path: binaries
|
path: binaries
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
- name: Create Release and Upload
|
- name: Create Release and Upload
|
||||||
uses: https://github.com/softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3
|
uses: https://github.com/softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
files: binaries/*
|
files: binaries/*
|
||||||
|
|||||||
@@ -43,11 +43,11 @@ jobs:
|
|||||||
name: Renovate
|
name: Renovate
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/renovatebot/renovate:43.222.1@sha256:b9af3f59f3f4d92b2c41e9f4ca3ffe92400503f20158d0bd67d07a3fdbe781d2
|
image: ghcr.io/renovatebot/renovate:43.234.0@sha256:bff111bfe347c559c615b658b28721eba5b7bb32a7b7901ea321336767209fe1
|
||||||
options: --tmpfs /tmp:exec
|
options: --tmpfs /tmp:exec
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
show-progress: false
|
show-progress: false
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
update-flake-hashes:
|
update-flake-hashes:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
persist-credentials: true
|
persist-credentials: true
|
||||||
token: ${{ secrets.FORGEJO_TOKEN }}
|
token: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
- name: Get new toolchain hash
|
- name: Get new toolchain hash
|
||||||
run: |
|
run: |
|
||||||
# Set the current sha256 to an empty hash to make `nix build` calculate a new one
|
# Set the current sha256 to an empty hash to make `nix build` calculate a new one
|
||||||
awk '/fromToolchainFile *\{/{found=1; print; next} found && /sha256 =/{sub(/sha256 = .*/, "sha256 = lib.fakeSha256;"); found=0} 1' nix/rust.nix > temp.nix
|
awk '/fromToolchainName *\{/{found=1; print; next} found && /sha256 =/{sub(/sha256 = .*/, "sha256 = lib.fakeSha256;"); found=0} 1' nix/rust.nix > temp.nix
|
||||||
mv temp.nix nix/rust.nix
|
mv temp.nix nix/rust.nix
|
||||||
|
|
||||||
# Build continuwuity and filter for the new hash
|
# Build continuwuity and filter for the new hash
|
||||||
@@ -39,7 +39,7 @@ jobs:
|
|||||||
sed -i "s|lib.fakeSha256|\"$new_hash\"|" nix/rust.nix
|
sed -i "s|lib.fakeSha256|\"$new_hash\"|" nix/rust.nix
|
||||||
|
|
||||||
echo "New hash:"
|
echo "New hash:"
|
||||||
awk -F'"' '/fromToolchainFile/{found=1; next} found && /sha256 =/{print $2; found=0}' nix/rust.nix
|
awk -F'"' '/fromToolchainName/{found=1; next} found && /sha256 =/{print $2; found=0}' nix/rust.nix
|
||||||
echo "Expected new hash:"
|
echo "Expected new hash:"
|
||||||
cat new_toolchain_hash.txt
|
cat new_toolchain_hash.txt
|
||||||
|
|
||||||
|
|||||||
Generated
+59
-27
@@ -560,9 +560,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bytes"
|
name = "bytes"
|
||||||
version = "1.11.1"
|
version = "1.12.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
|
checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bytesize"
|
name = "bytesize"
|
||||||
@@ -805,7 +805,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "conduwuit"
|
name = "conduwuit"
|
||||||
version = "0.5.9"
|
version = "26.6.0-alpha.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aws-lc-rs",
|
"aws-lc-rs",
|
||||||
"clap",
|
"clap",
|
||||||
@@ -843,7 +843,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "conduwuit_admin"
|
name = "conduwuit_admin"
|
||||||
version = "0.5.9"
|
version = "26.6.0-alpha.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assign",
|
"assign",
|
||||||
"clap",
|
"clap",
|
||||||
@@ -868,7 +868,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "conduwuit_api"
|
name = "conduwuit_api"
|
||||||
version = "0.5.9"
|
version = "26.6.0-alpha.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assign",
|
"assign",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -889,7 +889,7 @@ dependencies = [
|
|||||||
"http-body-util",
|
"http-body-util",
|
||||||
"hyper",
|
"hyper",
|
||||||
"ipaddress",
|
"ipaddress",
|
||||||
"itertools 0.14.0",
|
"itertools 0.15.0",
|
||||||
"lettre",
|
"lettre",
|
||||||
"log",
|
"log",
|
||||||
"rand 0.10.1",
|
"rand 0.10.1",
|
||||||
@@ -906,7 +906,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "conduwuit_build_metadata"
|
name = "conduwuit_build_metadata"
|
||||||
version = "0.5.9"
|
version = "26.6.0-alpha.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"built",
|
"built",
|
||||||
"cargo_metadata",
|
"cargo_metadata",
|
||||||
@@ -914,7 +914,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "conduwuit_core"
|
name = "conduwuit_core"
|
||||||
version = "0.5.9"
|
version = "26.6.0-alpha.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"argon2",
|
"argon2",
|
||||||
"arrayvec",
|
"arrayvec",
|
||||||
@@ -942,7 +942,7 @@ dependencies = [
|
|||||||
"http-body-util",
|
"http-body-util",
|
||||||
"hyper-util",
|
"hyper-util",
|
||||||
"ipaddress",
|
"ipaddress",
|
||||||
"itertools 0.14.0",
|
"itertools 0.15.0",
|
||||||
"lettre",
|
"lettre",
|
||||||
"libc",
|
"libc",
|
||||||
"libloading 0.9.0",
|
"libloading 0.9.0",
|
||||||
@@ -980,7 +980,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "conduwuit_database"
|
name = "conduwuit_database"
|
||||||
version = "0.5.9"
|
version = "26.6.0-alpha.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-channel",
|
"async-channel",
|
||||||
"conduwuit_core",
|
"conduwuit_core",
|
||||||
@@ -1001,10 +1001,10 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "conduwuit_macros"
|
name = "conduwuit_macros"
|
||||||
version = "0.5.9"
|
version = "26.6.0-alpha.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cargo_toml",
|
"cargo_toml",
|
||||||
"itertools 0.14.0",
|
"itertools 0.15.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn",
|
||||||
@@ -1012,7 +1012,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "conduwuit_router"
|
name = "conduwuit_router"
|
||||||
version = "0.5.9"
|
version = "26.6.0-alpha.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assign",
|
"assign",
|
||||||
"axum",
|
"axum",
|
||||||
@@ -1044,13 +1044,13 @@ dependencies = [
|
|||||||
"serde_json",
|
"serde_json",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tower",
|
"tower",
|
||||||
"tower-http",
|
"tower-http 0.7.0",
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "conduwuit_service"
|
name = "conduwuit_service"
|
||||||
version = "0.5.9"
|
version = "26.6.0-alpha.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"askama",
|
"askama",
|
||||||
"assign",
|
"assign",
|
||||||
@@ -1070,7 +1070,7 @@ dependencies = [
|
|||||||
"http",
|
"http",
|
||||||
"image",
|
"image",
|
||||||
"ipaddress",
|
"ipaddress",
|
||||||
"itertools 0.14.0",
|
"itertools 0.15.0",
|
||||||
"lettre",
|
"lettre",
|
||||||
"log",
|
"log",
|
||||||
"loole",
|
"loole",
|
||||||
@@ -1099,7 +1099,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "conduwuit_web"
|
name = "conduwuit_web"
|
||||||
version = "0.5.9"
|
version = "26.6.0-alpha.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"askama",
|
"askama",
|
||||||
"assign",
|
"assign",
|
||||||
@@ -1116,7 +1116,7 @@ dependencies = [
|
|||||||
"ruma",
|
"ruma",
|
||||||
"serde",
|
"serde",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tower-http",
|
"tower-http 0.7.0",
|
||||||
"tower-sec-fetch",
|
"tower-sec-fetch",
|
||||||
"tracing",
|
"tracing",
|
||||||
"validator",
|
"validator",
|
||||||
@@ -2641,6 +2641,15 @@ dependencies = [
|
|||||||
"either",
|
"either",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "itertools"
|
||||||
|
version = "0.15.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8b4baf93f58d4425749ca49a51c50ebab072c5df6994d08fed93541c331481dc"
|
||||||
|
dependencies = [
|
||||||
|
"either",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "itoa"
|
name = "itoa"
|
||||||
version = "1.0.18"
|
version = "1.0.18"
|
||||||
@@ -3945,9 +3954,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.45"
|
version = "1.0.46"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
@@ -4112,7 +4121,7 @@ dependencies = [
|
|||||||
"tokio",
|
"tokio",
|
||||||
"tokio-rustls",
|
"tokio-rustls",
|
||||||
"tower",
|
"tower",
|
||||||
"tower-http",
|
"tower-http 0.6.11",
|
||||||
"tower-service",
|
"tower-service",
|
||||||
"url",
|
"url",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
@@ -4157,7 +4166,7 @@ dependencies = [
|
|||||||
"tokio-rustls",
|
"tokio-rustls",
|
||||||
"tokio-util",
|
"tokio-util",
|
||||||
"tower",
|
"tower",
|
||||||
"tower-http",
|
"tower-http 0.6.11",
|
||||||
"tower-service",
|
"tower-service",
|
||||||
"url",
|
"url",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
@@ -4386,7 +4395,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruminuwuity"
|
name = "ruminuwuity"
|
||||||
version = "0.5.9"
|
version = "26.6.0-alpha.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assign",
|
"assign",
|
||||||
"ruma",
|
"ruma",
|
||||||
@@ -5144,9 +5153,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.117"
|
version = "2.0.118"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -5627,10 +5636,33 @@ dependencies = [
|
|||||||
"tower",
|
"tower",
|
||||||
"tower-layer",
|
"tower-layer",
|
||||||
"tower-service",
|
"tower-service",
|
||||||
"tracing",
|
|
||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tower-http"
|
||||||
|
version = "0.7.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b11f75e912b0c2be01b63d8cf8057b8c3f97cf34abb3d431a3a4c8675498e233"
|
||||||
|
dependencies = [
|
||||||
|
"async-compression",
|
||||||
|
"bitflags",
|
||||||
|
"bytes",
|
||||||
|
"futures-core",
|
||||||
|
"futures-util",
|
||||||
|
"http",
|
||||||
|
"http-body",
|
||||||
|
"http-body-util",
|
||||||
|
"percent-encoding",
|
||||||
|
"pin-project-lite",
|
||||||
|
"tokio",
|
||||||
|
"tokio-util",
|
||||||
|
"tower",
|
||||||
|
"tower-layer",
|
||||||
|
"tower-service",
|
||||||
|
"tracing",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tower-layer"
|
name = "tower-layer"
|
||||||
version = "0.3.3"
|
version = "0.3.3"
|
||||||
@@ -6481,7 +6513,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "xtask"
|
name = "xtask"
|
||||||
version = "0.5.9"
|
version = "26.6.0-alpha.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"askama",
|
"askama",
|
||||||
"cargo_metadata",
|
"cargo_metadata",
|
||||||
|
|||||||
+3
-3
@@ -12,7 +12,7 @@ license = "Apache-2.0"
|
|||||||
# See also `rust-toolchain.toml`
|
# See also `rust-toolchain.toml`
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://forgejo.ellis.link/continuwuation/continuwuity"
|
repository = "https://forgejo.ellis.link/continuwuation/continuwuity"
|
||||||
version = "0.5.9"
|
version = "26.6.0-alpha.1"
|
||||||
|
|
||||||
[workspace.metadata.crane]
|
[workspace.metadata.crane]
|
||||||
name = "conduwuit"
|
name = "conduwuit"
|
||||||
@@ -124,7 +124,7 @@ default-features = false
|
|||||||
features = ["util"]
|
features = ["util"]
|
||||||
|
|
||||||
[workspace.dependencies.tower-http]
|
[workspace.dependencies.tower-http]
|
||||||
version = "0.6.8"
|
version = "0.7.0"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = [
|
features = [
|
||||||
"add-extension",
|
"add-extension",
|
||||||
@@ -316,7 +316,7 @@ default-features = false
|
|||||||
|
|
||||||
# Used to make working with iterators easier, was already a transitive depdendency
|
# Used to make working with iterators easier, was already a transitive depdendency
|
||||||
[workspace.dependencies.itertools]
|
[workspace.dependencies.itertools]
|
||||||
version = "0.14.0"
|
version = "0.15.0"
|
||||||
|
|
||||||
# to parse user-friendly time durations in admin commands
|
# to parse user-friendly time durations in admin commands
|
||||||
#TODO: overlaps chrono?
|
#TODO: overlaps chrono?
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Added static builds using Nix, allowing for Continuwuity on musl. During this, we also introduced a `max-perf-haswell` package, separating it from `max-perf`, so you may want to swap to this if you are on NixOS. Contributed by @Henry-Hiles (QuadRadical).
|
||||||
+1
-1
@@ -50,7 +50,7 @@ EOF
|
|||||||
|
|
||||||
# Developer tool versions
|
# Developer tool versions
|
||||||
# renovate: datasource=github-releases depName=cargo-bins/cargo-binstall
|
# renovate: datasource=github-releases depName=cargo-bins/cargo-binstall
|
||||||
ENV BINSTALL_VERSION=1.20.0
|
ENV BINSTALL_VERSION=1.20.1
|
||||||
# renovate: datasource=github-releases depName=psastras/sbom-rs
|
# renovate: datasource=github-releases depName=psastras/sbom-rs
|
||||||
ENV CARGO_SBOM_VERSION=0.9.1
|
ENV CARGO_SBOM_VERSION=0.9.1
|
||||||
# renovate: datasource=crate depName=lddtree
|
# renovate: datasource=crate depName=lddtree
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ RUN --mount=type=cache,target=/etc/apk/cache apk add \
|
|||||||
|
|
||||||
# Developer tool versions
|
# Developer tool versions
|
||||||
# renovate: datasource=github-releases depName=cargo-bins/cargo-binstall
|
# renovate: datasource=github-releases depName=cargo-bins/cargo-binstall
|
||||||
ENV BINSTALL_VERSION=1.20.0
|
ENV BINSTALL_VERSION=1.20.1
|
||||||
# renovate: datasource=github-releases depName=psastras/sbom-rs
|
# renovate: datasource=github-releases depName=psastras/sbom-rs
|
||||||
ENV CARGO_SBOM_VERSION=0.9.1
|
ENV CARGO_SBOM_VERSION=0.9.1
|
||||||
# renovate: datasource=crate depName=lddtree
|
# renovate: datasource=crate depName=lddtree
|
||||||
|
|||||||
@@ -47,9 +47,15 @@ and, for amd64, target the haswell CPU architecture.
|
|||||||
|
|
||||||
### Nix
|
### Nix
|
||||||
|
|
||||||
Theres a Nix package defined in our flake, available for Linux and MacOS. Add continuwuity as an input to your flake, and use `inputs.continuwuity.packages.${system}.default` to get a working Continuwuity package.
|
If you wish to generate a static binary, you can do so using Nix: `nix build git+https://forgejo.ellis.link/continuwuation/continuwuity#packageName`, where `packageName` is one of:
|
||||||
|
|
||||||
If you simply wish to generate a binary using Nix, you can run `nix build git+https://forgejo.ellis.link/continuwuation/continuwuity` to generate a binary in `result/bin/conduwuit`.
|
- `default-static-x86_64`
|
||||||
|
- `default-static-aarch64`
|
||||||
|
- `max-perf-static-x86_64`
|
||||||
|
- `max-perf-haswell-static-x86_64`
|
||||||
|
- `max-perf-static-aarch64`
|
||||||
|
|
||||||
|
`max-perf` takes longer to build, but has more runtime optimizations. Haswell builds are optimized for modern CPUs.
|
||||||
|
|
||||||
### Compiling
|
### Compiling
|
||||||
|
|
||||||
|
|||||||
@@ -47,9 +47,16 @@ The NixOS module provides these configuration options:
|
|||||||
- `extraEnvironment`: Extra environment variables to pass to the Continuwuity server
|
- `extraEnvironment`: Extra environment variables to pass to the Continuwuity server
|
||||||
- `package`: The Continuwuity package to use, defaults to `pkgs.matrix-continuwuity`
|
- `package`: The Continuwuity package to use, defaults to `pkgs.matrix-continuwuity`
|
||||||
- You may want to override this to be from our flake, for faster updates and unstable versions:
|
- You may want to override this to be from our flake, for faster updates and unstable versions:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
package = inputs.continuwuity.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
package = inputs.continuwuity.packages.${pkgs.stdenv.hostPlatform.system}.packageName;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Where `packageName` is one of:
|
||||||
|
- `default`
|
||||||
|
- `max-perf`: Takes longer to build, but has more runtime optimizations
|
||||||
|
- `max-perf-haswell`: Optimized for modern CPUs, don't use if your CPU is not Haswell or later.
|
||||||
|
|
||||||
- `admin.enable`: Whether to add the `conduwuit` binary to `PATH` for administration (enabled by default)
|
- `admin.enable`: Whether to add the `conduwuit` binary to `PATH` for administration (enabled by default)
|
||||||
- `settings`: The Continuwuity configuration
|
- `settings`: The Continuwuity configuration
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
"message": "Welcome to Continuwuity! Important announcements about the project will appear here."
|
"message": "Welcome to Continuwuity! Important announcements about the project will appear here."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 13,
|
"id": 14,
|
||||||
"mention_room": true,
|
"mention_room": true,
|
||||||
"date": "2026-05-08",
|
"date": "2026-06-20",
|
||||||
"message": "[v0.5.9](https://forgejo.ellis.link/continuwuation/continuwuity/releases/tag/v0.5.9) has been released, fixing a few low-severity federation-related vulnerabilities. It is recommended you read the changelog and update as soon as possible. There are no new features or other changes in this release, only related bugfixes. Deployments tracking the main branch should also update to the latest commit."
|
"message": "[v0.5.10](https://forgejo.ellis.link/continuwuation/continuwuity/releases/tag/v0.5.10) has been released. It is a security release, so we suggest you update as soon as possible. Don't forget to also join [our announcements room](https://matrix.to/#/!jIdNjSM5X-V5JVx2h2kAhUZIIQ08GyzPL55NFZAH1vM/%24K1ISNKIqfNiZzsNVCaTt2E7ZtNeP6Dsy6sbz9l3rO0A?via=ellis.link&via=gingershaped.computer&via=matrix.org)."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{ inputs, ... }:
|
|
||||||
{
|
|
||||||
perSystem =
|
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
self',
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
_module.args.craneLib = (inputs.crane.mkLib pkgs).overrideToolchain (
|
|
||||||
pkgs: self'.packages.stable-toolchain
|
|
||||||
);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./rust.nix
|
./rust.nix
|
||||||
./crane.nix
|
|
||||||
./packages
|
./packages
|
||||||
./devshell.nix
|
./devshell.nix
|
||||||
./fmt.nix
|
./fmt.nix
|
||||||
|
|||||||
+29
-28
@@ -1,7 +1,6 @@
|
|||||||
{
|
{ inputs, ... }: {
|
||||||
perSystem =
|
perSystem =
|
||||||
{
|
{
|
||||||
craneLib,
|
|
||||||
self',
|
self',
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@@ -9,34 +8,36 @@
|
|||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
# basic nix shell containing all things necessary to build continuwuity in all flavors manually (on x86_64-linux)
|
# basic nix shell containing all things necessary to build continuwuity in all flavors manually (on x86_64-linux)
|
||||||
devShells.default = craneLib.devShell {
|
devShells.default =
|
||||||
packages = [
|
(inputs.crane.mkLib pkgs).overrideToolchain (pkgs: self'.packages.stable-toolchain).devShell
|
||||||
self'.packages.rocksdb
|
{
|
||||||
pkgs.nodejs
|
packages = [
|
||||||
pkgs.pkg-config
|
self'.packages.rocksdb
|
||||||
]
|
pkgs.nodejs
|
||||||
++ lib.optionals pkgs.stdenv.isLinux [
|
pkgs.pkg-config
|
||||||
pkgs.liburing
|
|
||||||
pkgs.rust-jemalloc-sys-unprefixed
|
|
||||||
];
|
|
||||||
|
|
||||||
env = {
|
|
||||||
LIBCLANG_PATH = lib.makeLibraryPath [ pkgs.llvmPackages.libclang.lib ];
|
|
||||||
LD_LIBRARY_PATH = lib.makeLibraryPath (
|
|
||||||
[
|
|
||||||
pkgs.stdenv.cc.cc.lib
|
|
||||||
]
|
]
|
||||||
++ lib.optionals pkgs.stdenv.isLinux [
|
++ lib.optionals pkgs.stdenv.isLinux [
|
||||||
pkgs.liburing
|
pkgs.liburing
|
||||||
pkgs.jemalloc
|
pkgs.rust-jemalloc-sys-unprefixed
|
||||||
]
|
];
|
||||||
);
|
|
||||||
}
|
env = {
|
||||||
// lib.optionalAttrs pkgs.stdenv.isLinux {
|
LIBCLANG_PATH = lib.makeLibraryPath [ pkgs.llvmPackages.libclang.lib ];
|
||||||
PKG_CONFIG_PATH = lib.makeSearchPath "lib/pkgconfig" [
|
LD_LIBRARY_PATH = lib.makeLibraryPath (
|
||||||
pkgs.liburing.dev
|
[
|
||||||
];
|
pkgs.stdenv.cc.cc.lib
|
||||||
};
|
]
|
||||||
};
|
++ lib.optionals pkgs.stdenv.isLinux [
|
||||||
|
pkgs.liburing
|
||||||
|
pkgs.jemalloc
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// lib.optionalAttrs pkgs.stdenv.isLinux {
|
||||||
|
PKG_CONFIG_PATH = lib.makeSearchPath "lib/pkgconfig" [
|
||||||
|
pkgs.liburing.dev
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -2,14 +2,14 @@
|
|||||||
lib,
|
lib,
|
||||||
self,
|
self,
|
||||||
stdenv,
|
stdenv,
|
||||||
liburing,
|
rocksdb,
|
||||||
craneLib,
|
craneLib,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
|
liburing,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
cargoExtraArgs ? "",
|
cargoExtraArgs ? "",
|
||||||
rustflags ? "",
|
rustflags ? "",
|
||||||
target_cpu ? null,
|
target_cpu ? null,
|
||||||
rocksdb,
|
|
||||||
profile ? "release",
|
profile ? "release",
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
@@ -28,18 +28,26 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
attrs = {
|
attrs = {
|
||||||
|
__structuredAttrs = true;
|
||||||
|
strictDeps = true;
|
||||||
|
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkg-config
|
pkg-config
|
||||||
rustPlatform.bindgenHook
|
rustPlatform.bindgenHook
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ liburing ];
|
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ liburing ];
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
|
|
||||||
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
|
|
||||||
CARGO_PROFILE = profile;
|
CARGO_PROFILE = profile;
|
||||||
RUSTFLAGS = rustflags;
|
RUSTFLAGS = rustflags;
|
||||||
}
|
}
|
||||||
|
// (lib.optionalAttrs (rocksdb != null) {
|
||||||
|
ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
|
||||||
|
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
|
||||||
|
})
|
||||||
// (lib.optionalAttrs (target_cpu != null) {
|
// (lib.optionalAttrs (target_cpu != null) {
|
||||||
TARGET_CPU = target_cpu;
|
TARGET_CPU = target_cpu;
|
||||||
});
|
});
|
||||||
@@ -51,7 +59,7 @@ craneLib.buildPackage (
|
|||||||
cargoArtifacts = craneLib.buildDepsOnly attrs;
|
cargoArtifacts = craneLib.buildDepsOnly attrs;
|
||||||
|
|
||||||
# Needed to make continuwuity link to rocksdb
|
# Needed to make continuwuity link to rocksdb
|
||||||
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
|
postFixup = lib.optionalString (stdenv.hostPlatform.isLinux && rocksdb != null) ''
|
||||||
old_rpath="$(patchelf --print-rpath $out/bin/conduwuit)"
|
old_rpath="$(patchelf --print-rpath $out/bin/conduwuit)"
|
||||||
extra_rpath="${
|
extra_rpath="${
|
||||||
lib.makeLibraryPath [
|
lib.makeLibraryPath [
|
||||||
|
|||||||
+74
-21
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
inputs,
|
||||||
self,
|
self,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
@@ -6,32 +7,84 @@
|
|||||||
perSystem =
|
perSystem =
|
||||||
{
|
{
|
||||||
self',
|
self',
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
inputs',
|
||||||
|
system,
|
||||||
craneLib,
|
craneLib,
|
||||||
|
mkToolchain,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
packages = {
|
packages =
|
||||||
rocksdb = pkgs.callPackage ./rocksdb.nix { };
|
let
|
||||||
default = pkgs.callPackage ./continuwuity.nix {
|
mkPackages =
|
||||||
inherit self craneLib;
|
pkgs:
|
||||||
inherit (self'.packages) rocksdb;
|
let
|
||||||
# extra features via `cargoExtraArgs`
|
fnx = inputs'.fenix.packages;
|
||||||
cargoExtraArgs = "-F http3";
|
|
||||||
# extra RUSTFLAGS via `rustflags`
|
|
||||||
# the stuff below is required for http3
|
|
||||||
rustflags = "--cfg reqwest_unstable";
|
|
||||||
};
|
|
||||||
# users may also override this with other cargo profiles to build for other feature sets
|
|
||||||
# for features configuration see `default` package which enables http3 by default
|
|
||||||
|
|
||||||
# example: different compilation profile and different target_cpu
|
isStatic = pkgs.stdenv.hostPlatform.isMusl;
|
||||||
max-perf-haswell = self'.packages.default.override {
|
|
||||||
# compiles explicitly for haswell arch cpus
|
craneLib = (inputs.crane.mkLib pkgs).overrideToolchain (
|
||||||
target_cpu = "haswell";
|
_:
|
||||||
# compiles slower but with more thorough optimizations
|
if isStatic then
|
||||||
profile = "release-max-perf";
|
fnx.combine [
|
||||||
};
|
self'.packages.stable-toolchain
|
||||||
};
|
(mkToolchain fnx.targets.${pkgs.stdenv.hostPlatform.config}).rust-std
|
||||||
|
]
|
||||||
|
else
|
||||||
|
self'.packages.stable-toolchain
|
||||||
|
);
|
||||||
|
|
||||||
|
default = pkgs.callPackage ./continuwuity.nix {
|
||||||
|
inherit self craneLib;
|
||||||
|
|
||||||
|
liburing = (if isStatic then pkgs.pkgsStatic else pkgs).liburing;
|
||||||
|
rocksdb = if isStatic then null else self'.packages.rocksdb;
|
||||||
|
|
||||||
|
# extra features via `cargoExtraArgs`
|
||||||
|
cargoExtraArgs = "-F http3";
|
||||||
|
# extra RUSTFLAGS via `rustflags`
|
||||||
|
# the stuff below is required for http3
|
||||||
|
rustflags = "--cfg reqwest_unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
# users may also override this with other cargo profiles to build for other feature sets
|
||||||
|
# for features configuration see `default` package which enables http3 by default
|
||||||
|
|
||||||
|
max-perf = default.override {
|
||||||
|
# compiles slower but with more thorough optimizations
|
||||||
|
profile = "release-max-perf";
|
||||||
|
};
|
||||||
|
|
||||||
|
max-perf-haswell = max-perf.override {
|
||||||
|
# compiles explicitly for haswell arch cpus
|
||||||
|
target_cpu = "haswell";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit default max-perf max-perf-haswell;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
rocksdb = pkgs.callPackage ./rocksdb.nix { };
|
||||||
|
}
|
||||||
|
// (mkPackages pkgs)
|
||||||
|
// (lib.mapAttrs' (name: value: lib.nameValuePair "${name}-static-x86_64" value) (
|
||||||
|
mkPackages (
|
||||||
|
import inputs.nixpkgs {
|
||||||
|
localSystem = system;
|
||||||
|
crossSystem = "x86_64-unknown-linux-musl";
|
||||||
|
}
|
||||||
|
)
|
||||||
|
))
|
||||||
|
// (lib.mapAttrs' (name: value: lib.nameValuePair "${name}-static-aarch64" value) (
|
||||||
|
mkPackages (
|
||||||
|
import inputs.nixpkgs {
|
||||||
|
localSystem = system;
|
||||||
|
crossSystem = "aarch64-unknown-linux-musl";
|
||||||
|
}
|
||||||
|
)
|
||||||
|
));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
+13
-9
@@ -2,22 +2,26 @@
|
|||||||
{
|
{
|
||||||
perSystem =
|
perSystem =
|
||||||
{
|
{
|
||||||
system,
|
|
||||||
lib,
|
lib,
|
||||||
|
inputs',
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
mkToolchain =
|
||||||
|
target:
|
||||||
|
target.fromToolchainName {
|
||||||
|
name = (lib.importTOML "${inputs.self}/rust-toolchain.toml").toolchain.channel;
|
||||||
|
sha256 = "sha256-mvUGEOHYJpn3ikC5hckneuGixaC+yGrkMM/liDIDgoU=";
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
|
_module.args = { inherit mkToolchain; };
|
||||||
|
|
||||||
packages =
|
packages =
|
||||||
let
|
let
|
||||||
fnx = inputs.fenix.packages.${system};
|
fnx = inputs'.fenix.packages;
|
||||||
|
stable-toolchain = (mkToolchain fnx).toolchain;
|
||||||
stable-toolchain = fnx.fromToolchainFile {
|
|
||||||
file = inputs.self + "/rust-toolchain.toml";
|
|
||||||
|
|
||||||
# See also `rust-toolchain.toml`
|
|
||||||
sha256 = "sha256-mvUGEOHYJpn3ikC5hckneuGixaC+yGrkMM/liDIDgoU=";
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit stable-toolchain;
|
inherit stable-toolchain;
|
||||||
|
|||||||
@@ -87,6 +87,10 @@ pub(crate) async fn handle_login(
|
|||||||
return Err!(Request(InvalidParam("User ID does not belong to this homeserver")));
|
return Err!(Request(InvalidParam("User ID does not belong to this homeserver")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if services.users.is_deactivated(&user_id).await? {
|
||||||
|
return Err!(Request(UserDeactivated("This account has been deactivated.")));
|
||||||
|
}
|
||||||
|
|
||||||
if services.users.is_locked(&user_id).await? {
|
if services.users.is_locked(&user_id).await? {
|
||||||
return Err!(Request(UserLocked("This account has been locked.")));
|
return Err!(Request(UserLocked("This account has been locked.")));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,6 +162,9 @@ impl CheckAuth for AccessToken {
|
|||||||
query: AuthQueryParams,
|
query: AuthQueryParams,
|
||||||
route: TypeId,
|
route: TypeId,
|
||||||
) -> Result<Self::Identity> {
|
) -> Result<Self::Identity> {
|
||||||
|
if output.is_empty() {
|
||||||
|
return Err!(Request(Unauthorized("Missing access token.")));
|
||||||
|
}
|
||||||
if let Ok((sender_user, sender_device)) = services.users.find_from_token(&output).await {
|
if let Ok((sender_user, sender_device)) = services.users.find_from_token(&output).await {
|
||||||
// Locked users can only use /logout and /logout/all
|
// Locked users can only use /logout and /logout/all
|
||||||
if services
|
if services
|
||||||
@@ -259,6 +262,9 @@ impl CheckAuth for AppserviceToken {
|
|||||||
_query: AuthQueryParams,
|
_query: AuthQueryParams,
|
||||||
_route: TypeId,
|
_route: TypeId,
|
||||||
) -> Result<Self::Identity> {
|
) -> Result<Self::Identity> {
|
||||||
|
if output.is_empty() {
|
||||||
|
return Err!(Request(Unauthorized("Missing access token.")));
|
||||||
|
}
|
||||||
let Ok(appservice_info) = services.appservice.find_from_token(&output).await else {
|
let Ok(appservice_info) = services.appservice.find_from_token(&output).await else {
|
||||||
return Err!(Request(Unauthorized("Invalid appservice token.")));
|
return Err!(Request(Unauthorized("Invalid appservice token.")));
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -676,6 +676,13 @@ async fn handle_edu_direct_to_device(
|
|||||||
messages
|
messages
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.stream()
|
.stream()
|
||||||
|
.broad_filter_map(|(target_user_id, map)| async move {
|
||||||
|
services
|
||||||
|
.users
|
||||||
|
.is_active_local(&target_user_id)
|
||||||
|
.await
|
||||||
|
.then_some((target_user_id, map))
|
||||||
|
})
|
||||||
.for_each_concurrent(automatic_width(), |(target_user_id, map)| {
|
.for_each_concurrent(automatic_width(), |(target_user_id, map)| {
|
||||||
handle_edu_direct_to_device_user(services, target_user_id, sender, &ev_type, map)
|
handle_edu_direct_to_device_user(services, target_user_id, sender, &ev_type, map)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -423,7 +423,7 @@ pub fn url_preview_allowed(&self, url: &Url) -> bool {
|
|||||||
url_preview_domain_explicit_denylist (check 1/3)",
|
url_preview_domain_explicit_denylist (check 1/3)",
|
||||||
&root_domain
|
&root_domain
|
||||||
);
|
);
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if allowlist_domain_explicit.contains(&root_domain.to_owned()) {
|
if allowlist_domain_explicit.contains(&root_domain.to_owned()) {
|
||||||
|
|||||||
@@ -338,6 +338,7 @@ impl Service {
|
|||||||
|
|
||||||
/// Find out which user an access token belongs to.
|
/// Find out which user an access token belongs to.
|
||||||
pub async fn find_from_token(&self, token: &str) -> Result<(OwnedUserId, OwnedDeviceId)> {
|
pub async fn find_from_token(&self, token: &str) -> Result<(OwnedUserId, OwnedDeviceId)> {
|
||||||
|
assert!(!token.is_empty(), "Empty access token");
|
||||||
self.db.token_userdeviceid.get(token).await.deserialized()
|
self.db.token_userdeviceid.get(token).await.deserialized()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user