Skip to content

Commit 67bd80c

Browse files
author
nuno
committed
refactor to async
1 parent 12d05f2 commit 67bd80c

File tree

22 files changed

+1060
-166
lines changed

22 files changed

+1060
-166
lines changed

debian/changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
frost-doh (0.1.0-1) UNRELEASED; urgency=medium
2+
3+
* Initial release.
4+
5+
-- nuno <nuno@unknown> Mon, 25 Aug 2025 17:33:24 +0100
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
2+
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
3+
<busconfig>
4+
<policy context="default">
5+
<allow own="com.glaciaos.NameResolver"/>
6+
<allow send_destination="com.glaciaos.NameResolver"/>
7+
<allow receive_sender="com.glaciaos.NameResolver"/>
8+
</policy>
9+
10+
<policy user="root">
11+
<allow own="com.glaciaos.NameResolver"/>
12+
<allow send_destination="com.glaciaos.NameResolver"/>
13+
</policy>
14+
15+
<policy context="default">
16+
<deny own="com.glaciaos.NameResolver"/>
17+
<deny send_destination="com.glaciaos.NameResolver"/>
18+
</policy>
19+
</busconfig>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[D-BUS Service]
2+
Name=com.glaciaos.NameResolver
3+
Exec=/usr/bin/doh-daemon
4+
User=root

debian/control

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Source: frost-doh
2+
Section: utils
3+
Priority: optional
4+
Maintainer: nuno <nuno@unknown>
5+
Rules-Requires-Root: no
6+
Build-Depends: debhelper-compat (= 13),
7+
cmake (>= 3.24.0),
8+
debhelper,
9+
dh-migrations,
10+
dh-translations,
11+
build-essential,
12+
libdbus-1-dev,
13+
pkg-config
14+
Standards-Version: 4.6.1
15+
Homepage: https://glaciaos.com#frostdoh
16+
#Vcs-Browser: https://salsa.debian.org/debian/frost-doh
17+
Vcs-Git: https://github.com/NunuM/dns-over-https-nss-linux
18+
19+
Package: frost-doh
20+
Architecture: any
21+
Depends:
22+
${shlibs:Depends},
23+
${misc:Depends},
24+
Description: D-Bus service that provides
25+
name resolution
26+
.

debian/copyright

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

debian/dbrotate

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/var/log/frost-doh/*.db {
2+
size 10M
3+
rotate 10
4+
compress
5+
delaycompress
6+
missingok
7+
notifempty
8+
copytruncate
9+
create 640 root root
10+
postrotate
11+
/usr/bin/systemctl restart frost-doh.service > /dev/null 2>&1 || true
12+
endscript
13+
dateext
14+
dateformat -%Y%m%d-%H%M%S
15+
}

debian/install

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
target/release/libnss_doh.so.2 /lib
2+
target/release/doh-daemon /usr/bin
3+
debian/com.glaciaos.NameResolver.conf /etc/dbus-1/system.d
4+
debian/com.glaciaos.NameResolver.service /usr/share/dbus-1/system-services
5+
debian/dbrotate /etc/logrotate.d
6+
doh-daemon/config.prod.ini /etc/frost-doh

debian/rules

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/make -f
2+
3+
export CARGO_HOME := $(CURDIR)/debian/cargo
4+
export DEB_CARGO_PACKAGE := $(shell dpkg-parsechangelog -S Source)
5+
export DEB_VERSION := $(shell dpkg-parsechangelog -S Version)
6+
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
7+
8+
%:
9+
dh $@
10+
11+
override_dh_auto_clean:
12+
rm -rf target
13+
dh_auto_clean
14+
15+
override_dh_auto_configure:
16+
# No special configuration needed for Rust projects
17+
true
18+
19+
override_dh_auto_build:
20+
cargo build --release
21+
22+
override_dh_auto_test:
23+
cargo test --release
24+
25+
override_dh_auto_install:
26+
cp target/release/libnss_doh.so target/release/libnss_doh.so.2
27+
28+
override_dh_installdocs:
29+
dh_installdocs README.md
30+
31+
override_dh_cargo:
32+
# Handle cargo dependencies
33+
dh_cargo --no-build

debian/source/options

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
tar-ignore=".git"
2+
tar-ignore=".idea"
3+
tar-ignore="target"
4+
tar-ignore="Cargo.lock"
5+
tar-ignore=".github"
6+
extend-diff-ignore=".git"
7+
extend-diff-ignore=".idea"
8+
extend-diff-ignore="target"
9+
extend-diff-ignore=".github"
10+
extend-diff-ignore="Cargo.lock"

doh-common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ name = "doh_common"
1111
libnss = { path = "../libnss" }
1212
log = "0.4.17"
1313
serde_json = "1.0"
14-
sqlite = "0.37.0"
14+
async-sqlite="0.5.3"
1515
zbus = "5.9.0"
1616

1717
zvariant = "5.6.0"

0 commit comments

Comments
 (0)