Skip to content

Commit 9879338

Browse files
Renamed project to 'Trawl' and updated all references
1 parent f1e7428 commit 9879338

25 files changed

+186
-185
lines changed

Cargo.lock

+31-31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[workspace]
22

33
members = [
4-
"resmand",
5-
"resdb",
6-
"rescat",
4+
"trawld",
5+
"trawldb",
6+
"trawlcat",
77
]

Makefile

+11-11
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ datarootdir = $(prefix)/share
99
libdir = $(exec_prefix)/lib
1010
zshcpl = $(datarootdir)/zsh/site-functions
1111

12-
BIN_D := resmand
13-
BIN_C := rescat
14-
BIN_DB := resdb
12+
BIN_D := trawld
13+
BIN_C := trawlcat
14+
BIN_DB := trawldb
1515

1616
all: build
1717

1818
clean:
1919
cargo clean
2020

2121
install:
22-
$(INSTALL_PROGRAM) "./target/release/$(BIN_C)" "$(bindir)/$(BIN_C)"
23-
$(INSTALL_PROGRAM) "./target/release/$(BIN_D)" "$(bindir)/$(BIN_D)"
24-
$(INSTALL_PROGRAM) "./target/release/$(BIN_DB)" "$(bindir)/$(BIN_DB)"
25-
$(INSTALL_DATA) "./$(BIN_D).service" "$(libdir)/systemd/user/$(BIN_D).service"
22+
sudo $(INSTALL_PROGRAM) "./target/release/$(BIN_C)" "$(bindir)/$(BIN_C)"
23+
sudo $(INSTALL_PROGRAM) "./target/release/$(BIN_D)" "$(bindir)/$(BIN_D)"
24+
sudo $(INSTALL_PROGRAM) "./target/release/$(BIN_DB)" "$(bindir)/$(BIN_DB)"
25+
sudo $(INSTALL_DATA) "./$(BIN_D).service" "$(libdir)/systemd/user/$(BIN_D).service"
2626
meson install -C client_api/build
2727

2828
uninstall:
@@ -39,16 +39,16 @@ setup:
3939

4040
build:
4141
cargo build --release
42-
echo "Ensure you have the latest build of resmand running"
42+
echo "Ensure you have the latest build of $(BIN_D) running"
4343
./postbuild.sh
4444
meson compile -C client_api/build/
4545
test:
4646
cargo test
4747

4848
code-coverage:
49-
cargo build --bin resmand
50-
cargo targe/debug/resmand &
49+
cargo build --bin $(BIN_D)
50+
cargo targe/debug/$(BIN_D) &
5151
cargo tarpaulin -b -- --test-threads 1
52-
killall resmand
52+
killall $(BIN_D)
5353

5454
.PHONY: all clean install uninstall setup build test code-coverage

README.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ make setup
3131
make
3232
sudo make install
3333
systemctl daemon-reload
34-
systemctl enable --now resmand
34+
systemctl enable --now trawld
3535
```
3636
**Note**: The `make setup` command will fail the first time you run it. This is because the code for dbus-interface is generated at this step. You can ignore this error and proceed to the following commands.
3737

@@ -81,63 +81,63 @@ Prefix the binaries with build directory path (`target/debug` or `target/release
8181
#endif
8282
```
8383

84-
## Start the config manager (_resmand_)
84+
## Start the config manager (trawld)
8585

86-
Run `resmand` to start the config daemon. You can pass optional arguments to the daemon to customize the behavior or to change the logging level. Run `resmand --help` documentation for more information.
86+
Run `trawld` to start the config daemon. You can pass optional arguments to the daemon to customize the behavior or to change the logging level. Run `trawld --help` documentation for more information.
8787

88-
## Using the CLI Cleint (_resdb_)
88+
## Using the CLI Cleint (_trawldb_)
8989

90-
The CLI client allows the user to interact with the config manager. Primary functions of the client include loading configurations fromo filesRun `resdb --help` for more information.
90+
The CLI client allows the user to interact with the config manager. Primary functions of the client include loading configurations fromo filesRun `trawldb --help` for more information.
9191

9292
### Examples
9393

9494
1. Load a file
9595
```bash
9696
# load a file (doesn't overwrite existing resources)
97-
resdb --load example/resources
97+
trawldb --load example/resources
9898
# load a file without preprocessing
9999
resrdb --load example/resources --nocpp
100100
```
101101
2. Merge resources from a file
102102
```bash
103103
# merge resource from a file (overrides existing resources)
104-
resdb --merge example/resources
104+
trawldb --merge example/resources
105105
# merge resource from a file without preprocessing
106-
resdb --merge example/resources --nocpp
106+
trawldb --merge example/resources --nocpp
107107
```
108108
3. Save currently loaded resources into a file
109109
```bash
110110
# if file exists it is backed up to a file with the same name but with a .bak extension
111-
resdb --edit all_resources
111+
trawldb --edit all_resources
112112
# specify suffix for -edit [.bak]
113-
resdb --edit all_resources --backup .old
113+
trawldb --edit all_resources --backup .old
114114
```
115115
4. Query Resources
116116
```bash
117117
# query all resources
118-
resdb --query
118+
trawldb --query
119119
# query a specific resource (partial matches are also shown)
120-
resdb --query key1
120+
trawldb --query key1
121121
```
122122
5. Get resource values
123123
```bash
124124
# get the value for the resouource whose name is 'key1'
125-
resdb --get key1
125+
trawldb --get key1
126126
```
127127

128-
## Get resource value (rescat)
128+
## Get resource value (trawlcat)
129129

130-
`rescat` is a drop-in replacement for `xrerscat` and prints the vlaue of the requested resouorce. For more info, see the ([xrerscat](https://github.com/regolith-linux/xrescat)) documentation.
130+
`trawlcat` is a drop-in replacement for `xrerscat` and prints the vlaue of the requested resouorce. For more info, see the ([xrerscat](https://github.com/regolith-linux/xrescat)) documentation.
131131

132132
## Client API (for C)
133133

134134
The header and implementation files for the dbus interface is autogenerated from the `service.xml` file during the `meson` build. The `client_api.h` header file provides a simple to use wrapper api. All the dbus method names are in snake case and are prefixed with `conf_client`.
135135

136136
## Rust Client Library
137137

138-
Include the `resdb` crate in the `Cargo.toml` file. You can then use the Rust client library to interact with the config manager.
138+
Include the `trawldb` crate in the `Cargo.toml` file. You can then use the Rust client library to interact with the config manager.
139139

140140
```toml
141141
[dependencies]
142-
resdb = { path = "/path/to/resdb" }
142+
trawldb = { path = "/path/to/trawldb" }
143143
```

client_api/client_api.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ bool conf_client_init(conf_client *proxy, GError **err) {
88
*proxy =
99
org_regolith_config1_proxy_new_for_bus_sync( G_BUS_TYPE_SESSION,
1010
G_DBUS_PROXY_FLAGS_NONE,
11-
"org.regolith.ConfigMgr",
12-
"/org/regolith/ConfigMgr",
11+
"org.regolith.Trawl",
12+
"/org/regolith/Trawl",
1313
NULL,
1414
err);
1515
if(*err) {

client_api/meson.build

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ sources += custom_target('dbus_codegen_files',
1414
command: ['scripts/run_codegen.sh', '@INPUT@', '@OUTPUT@'])
1515

1616
lib_so_version = '0'
17-
pkg_config_name = 'resdb-0'
17+
pkg_config_name = 'trawldb-0'
1818

1919
libclient_api = library ('regolith-config-client',
2020
sources,
@@ -23,10 +23,10 @@ libclient_api = library ('regolith-config-client',
2323
soversion: lib_so_version,
2424
install: true)
2525

26-
install_headers(['client_api.h', 'build/config_manager.h', ], subdir: 'resdb')
26+
install_headers(['client_api.h', 'build/config_manager.h', ], subdir: 'trawldb')
2727

2828
pkg.generate(libclient_api,
29-
name: 'resdb',
29+
name: 'trawldb',
3030
version: meson.project_version(),
3131
libraries: [libclient_api],
3232
filebase: pkg_config_name,

client_api/service.xml

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
22
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
33
<node>
4+
<interface name="org.freedesktop.DBus.Introspectable">
5+
<method name="Introspect">
6+
<arg type="s" direction="out"/>
7+
</method>
8+
</interface>
49
<interface name="org.freedesktop.DBus.Peer">
510
<method name="Ping">
611
</method>
@@ -38,7 +43,7 @@
3843
<arg name="cpp" type="s" direction="in"/>
3944
</method>
4045
<!--
41-
Returns all the matching
46+
Returns all the matching
4247
*Note*: Also a DBus interface
4348
-->
4449
<method name="Query">
@@ -56,15 +61,15 @@
5661
DBus interface to set the value of a resource. Overwrites exiting value.
5762
TODO: Separate implementation to make more testable
5863
# Emits
59-
**resources_changed**: This signal indicated the change
60-
in'resources' property value
64+
**resources_changed**: This signal indicated the change
65+
in'resources' property value
6166
-->
6267
<method name="SetResource">
6368
<arg name="key" type="s" direction="in"/>
6469
<arg name="val" type="s" direction="in"/>
6570
</method>
6671
<!--
67-
DBus interface to add a new resource. Doesn't overwrite exiting
72+
DBus interface to add a new resource. Doesn't overwrite exiting
6873
values in case of conflicts
6974
TODO: Separate implementation to make more testable
7075
-->
@@ -88,11 +93,6 @@
8893
-->
8994
<property name="Resources" type="a{ss}" access="read"/>
9095
</interface>
91-
<interface name="org.freedesktop.DBus.Introspectable">
92-
<method name="Introspect">
93-
<arg type="s" direction="out"/>
94-
</method>
95-
</interface>
9696
<interface name="org.freedesktop.DBus.Properties">
9797
<method name="Get">
9898
<arg name="interface_name" type="s" direction="in"/>

postbuild.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
# Use run this script after building resmand to generate updated
2+
# Use run this script after building trawld to generate updated
33
# Introspection xml for the dbus service
44

55
dbus-send --session \
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
2-
name = "rescat"
2+
name = "trawlcat"
33
version = "0.1.0"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
resdb = { path = "../resdb" }
9+
trawldb = { path = "../trawldb" }
1010
clap = { version = "3.2.8", features = ["derive"] }
1111
tokio = { version = "1", features = ["full"]}

rescat/src/main.rs trawlcat/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::{error::Error, process};
22
use clap::{Parser, AppSettings};
3-
use resdb::Client;
3+
use trawldb::Client;
44

55
#[derive(Parser)]
66
#[clap(author, version, about, setting(AppSettings::ArgRequiredElseHelp))]

resmand.service trawld.service

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[Unit]
2-
Description=Regolith Config Manager Daemon
2+
Description=Trawl Configuration Daemon
33
StartLimitInterval=200
44
StartLimitBurst=2
55

66
[Service]
7-
ExecStart=/usr/bin/resmand
7+
ExecStart=/usr/bin/trawld
88
Restart=on-failure
99
Restart=always
1010
RestartSec=1
1111
Type=dbus
12-
BusName=org.regolith.ConfigMgr
12+
BusName=org.regolith.Trawl
1313

1414
[Install]
15-
WantedBy=default.target
15+
WantedBy=default.target

resmand/Cargo.toml trawld/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "resmand"
2+
name = "trawld"
33
version = "0.1.0"
44
edition = "2021"
55

File renamed without changes.

0 commit comments

Comments
 (0)