rename release_log_level dev feature to dev_release_log_level, some rebranding

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-04-25 00:09:50 -04:00 committed by June
parent 76ab8ca69b
commit d55015ccda
8 changed files with 47 additions and 50 deletions

View file

@ -6,7 +6,7 @@ authors = [
"strawberry <strawberry@puppygock.gay>",
"timokoesters <timo@koesters.xyz>",
]
homepage = "https://puppygock.gay/conduwuit"
homepage = "https://conduwuit.puppyirl.gay/"
repository = "https://github.com/girlbossceo/conduwuit"
readme = "README.md"
version = "0.3.0"
@ -250,7 +250,7 @@ features = ["std", "derive", "help", "usage", "error-context", "string"]
version = "0.3.30"
default-features = false
# Used for reading the configuration from conduit.toml & environment variables
# Used for reading the configuration from conduwuit.toml & environment variables
[dependencies.figment]
version = "0.10.18"
features = ["env", "toml"]
@ -388,7 +388,7 @@ release_max_log_level = [
]
# developer feature useful only in debug builds.
release_log_level = []
dev_release_log_level = []
# client/server interopability hacks
#
@ -397,9 +397,9 @@ element_hacks = []
[package.metadata.deb]
name = "matrix-conduit"
name = "conduwuit"
maintainer = "strawberry <strawberry@puppygock.gay>"
copyright = "2024, Timo Kösters <timo@koesters.xyz>"
copyright = "2024, strawberry <strawberry@puppygock.gay>"
license-file = ["LICENSE", "3"]
depends = "$auto, ca-certificates"
extended-description = """\
@ -409,28 +409,28 @@ priority = "optional"
assets = [
[
"debian/README.md",
"usr/share/doc/matrix-conduit/README.Debian",
"usr/share/doc/conduwuit/README.Debian",
"644",
],
[
"README.md",
"usr/share/doc/matrix-conduit/",
"usr/share/doc/conduwuit/",
"644",
],
[
"target/release/conduit",
"usr/sbin/matrix-conduit",
"usr/sbin/conduwuit",
"755",
],
[
"conduwuit-example.toml",
"etc/matrix-conduit/conduit.toml",
"etc/conduwuit/conduwuit.toml",
"640",
],
]
conf-files = ["/etc/matrix-conduit/conduit.toml"]
conf-files = ["/etc/conduwuit/conduwuit.toml"]
maintainer-scripts = "debian/"
systemd-units = { unit-name = "matrix-conduit" }
systemd-units = { unit-name = "conduwuit" }
[profile.dev]

21
debian/README.md vendored
View file

@ -5,7 +5,7 @@ Installation
------------
Information about downloading, building and deploying the Debian package, see
the "Installing Conduit" section in the Deploying docs.
the "Installing conduwuit" section in the Deploying docs.
All following sections until "Setting up the Reverse Proxy" be ignored because
this is handled automatically by the packaging.
@ -14,24 +14,21 @@ Configuration
When installed, Debconf generates the configuration of the homeserver
(host)name, the address and port it listens on. This configuration ends up in
`/etc/matrix-conduit/conduit.toml`.
`/etc/conduwuit/conduwuit.toml`.
You can tweak more detailed settings by uncommenting and setting the variables
in `/etc/matrix-conduit/conduit.toml`. This involves settings such as the maximum
in `/etc/conduwuit/conduwuit.toml`. This involves settings such as the maximum
file size for download/upload, enabling federation, etc.
Running
-------
The package uses the `matrix-conduit.service` systemd unit file to start and
stop Conduit. It loads the configuration file mentioned above to set up the
The package uses the `conduwuit.service` systemd unit file to start and
stop conduwuit. It loads the configuration file mentioned above to set up the
environment before running the server.
This package assumes by default that Conduit will be placed behind a reverse
proxy such as Apache or nginx. This default deployment entails just listening
This package assumes by default that conduwuit will be placed behind a reverse
proxy. This default deployment entails just listening
on `127.0.0.1` and the free port `6167` and is reachable via a client using the URL
<http://localhost:6167>.
At a later stage this packaging may support also setting up TLS and running
stand-alone. In this case, however, you need to set up some certificates and
renewal, for it to work properly.
<http://localhost:6167>. Matrix federation requires TLS, so you will need to set up
some certificates and renewal, for it to work properly.

View file

@ -4,8 +4,8 @@ After=network-online.target
[Service]
DynamicUser=yes
User=_matrix-conduit
Group=_matrix-conduit
User=_conduwuit
Group=_conduwuit
Type=notify
AmbientCapabilities=
@ -44,9 +44,9 @@ StateDirectory=matrix-conduit
RuntimeDirectory=conduit
RuntimeDirectoryMode=0750
Environment="CONDUIT_CONFIG=/etc/matrix-conduit/conduit.toml"
Environment="CONDUIT_CONFIG=/etc/conduwuit/conduwuit.toml"
ExecStart=/usr/sbin/matrix-conduit
ExecStart=/usr/sbin/conduwuit
Restart=on-failure
RestartSec=5

6
debian/config vendored
View file

@ -5,13 +5,13 @@ set -e
. /usr/share/debconf/confmodule
# Ask for the Matrix homeserver name, address and port.
db_input high matrix-conduit/hostname || true
db_input high conduwuit/hostname || true
db_go
db_input low matrix-conduit/address || true
db_input low conduwuit/address || true
db_go
db_input medium matrix-conduit/port || true
db_input medium conduwuit/port || true
db_go
exit 0

18
debian/postinst vendored
View file

@ -3,26 +3,26 @@ set -e
. /usr/share/debconf/confmodule
CONDUIT_DATABASE_PATH=/var/lib/matrix-conduit/
CONDUWUIT_DATABASE_PATH=/var/lib/conduwuit/
case "$1" in
configure)
# Create the `_matrix-conduit` user if it does not exist yet.
if ! getent passwd _matrix-conduit > /dev/null ; then
echo 'Adding system user for the Conduwuit Matrix homeserver' 1>&2
# Create the `_conduwuit` user if it does not exist yet.
if ! getent passwd _conduwuit > /dev/null ; then
echo 'Adding system user for the conduwuit Matrix homeserver' 1>&2
adduser --system --group --quiet \
--home "$CONDUIT_DATABASE_PATH" \
--home "$CONDUWUIT_DATABASE_PATH" \
--disabled-login \
--shell "/usr/sbin/nologin" \
--force-badname \
_matrix-conduit
_conduwuit
fi
# Create the database path if it does not exist yet and fix up ownership
# and permissions.
mkdir -p "$CONDUIT_DATABASE_PATH"
chown _matrix-conduit:_matrix-conduit -R "$CONDUIT_DATABASE_PATH"
chmod 700 "$CONDUIT_DATABASE_PATH"
mkdir -p "$CONDUWUIT_DATABASE_PATH"
chown _conduwuit:_conduwuit -R "$CONDUWUIT_DATABASE_PATH"
chmod 700 "$CONDUWUIT_DATABASE_PATH"
;;
esac

12
debian/postrm vendored
View file

@ -3,8 +3,8 @@ set -e
. /usr/share/debconf/confmodule
CONDUIT_CONFIG_PATH=/etc/matrix-conduit
CONDUIT_DATABASE_PATH=/var/lib/matrix-conduit
CONDUWUIT_CONFIG_PATH=/etc/conduwuit
CONDUWUIT_DATABASE_PATH=/var/lib/conduwuit
case $1 in
purge)
@ -14,12 +14,12 @@ case $1 in
# Per https://www.debian.org/doc/debian-policy/ch-files.html#behavior
# "configuration files must be preserved when the package is removed, and
# only deleted when the package is purged."
if [ -d "$CONDUIT_CONFIG_PATH" ]; then
rm -r "$CONDUIT_CONFIG_PATH"
if [ -d "$CONDUWUIT_CONFIG_PATH" ]; then
rm -r "$CONDUWUIT_CONFIG_PATH"
fi
if [ -d "$CONDUIT_DATABASE_PATH" ]; then
rm -r "$CONDUIT_DATABASE_PATH"
if [ -d "$CONDUWUIT_DATABASE_PATH" ]; then
rm -r "$CONDUWUIT_DATABASE_PATH"
fi
;;
esac

6
debian/templates vendored
View file

@ -1,4 +1,4 @@
Template: matrix-conduit/hostname
Template: conduwuit/hostname
Type: string
Default: localhost
Description: The server (host)name of the Matrix homeserver
@ -7,14 +7,14 @@ Description: The server (host)name of the Matrix homeserver
If set to "localhost", you can connect with a client locally and clients
from other hosts and also other homeservers will not be able to reach you!
Template: matrix-conduit/address
Template: conduwuit/address
Type: string
Default: 127.0.0.1
Description: The listen address of the Matrix homeserver
This is the address the homeserver will listen on. Leave it set to 127.0.0.1
when using a reverse proxy.
Template: matrix-conduit/port
Template: conduwuit/port
Type: string
Default: 6167
Description: The port of the Matrix homeserver

View file

@ -2,11 +2,11 @@
/// In release-mode it becomes DEBUG level, and possibly subject to elision.
///
/// Release-mode can be simulated in debug-mode builds by enabling the feature
/// 'release_log_level'.
/// 'dev_release_log_level'.
#[macro_export]
macro_rules! debug_event {
( $level:expr, $($x:tt)+ ) => {
if cfg!(debug_assertions) && cfg!(not(feature = "release_log_level")) {
if cfg!(debug_assertions) && cfg!(not(feature = "dev_release_log_level")) {
tracing::event!( $level, $($x)+ );
} else {
tracing::debug!( $($x)+ );