net-fs/webdav-server-rs: new package, add 0.4.0_pre20231124

Signed-off-by: Pavel Sobolev <contact@paveloom.dev>
This commit is contained in:
Pavel Sobolev
2025-07-05 12:34:28 +03:00
parent edc9a90515
commit ae6181d686
5 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
DIST webdav-server-rs-0.4.0_pre20231124-deps.tar.xz 19519152 BLAKE2B d1bbecf31efe7aba08c76d07a62454454db274673a5ecbdecd6c0d7cce19d9b8b666c21d91a334d8166a9902e809537f3f29ddebd2be3da32877745c13a9256b SHA512 2e7dcaf6bf7f22982c676c6289e7902ca79f3bc17e4f5707d135fc963b27582a8c9ec51e5afe7da1b5be7134f150987adad179a7f3c0fc89ab32e96094f6c460
DIST webdav-server-rs-0.4.0_pre20231124.tar.gz 54013 BLAKE2B aac46e62845f81529ff1865ceb22d979d1e124e47161bef69de7f1dc65bbeff0b01160a197de3617fd86077a406f6975b3c0c72f414cab867c52055865941089 SHA512 fa7d560e3b08933d55ea5b71e5f027577c8f04c78ffdaa148465c7c3ca1719f6929c72c9d2cea17c6c94fe88e60c07e505571cf594422c840823e95f94f5f9a5

View File

@@ -0,0 +1,16 @@
From: Pavel Sobolev <contact@paveloom.dev>
Subject: [PATCH] Use the version `0.2.0` of `webdav-handler`.
Signed-off-by: Pavel Sobolev <contact@paveloom.dev>
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -71,6 +71,5 @@ tokio = { version = "1.5.0", features = ["full"] }
tokio-rustls = "0.23.4"
toml = "0.5.8"
url = "2.2.2"
-webdav-handler = { path = "../webdav-handler-rs", version = "=0.2.0" }
-#webdav-handler = "0.2.0"
+webdav-handler = "0.2.0"
pwhash = "1.0.0"

View File

@@ -0,0 +1,11 @@
[Unit]
Description=WebDAV Server
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/webdav-server -c /etc/webdav-server-rs/config.toml
PrivateTmp=true
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>contact@paveloom.dev</email>
<name>Pavel Sobolev</name>
</maintainer>
<upstream>
<bugs-to>https://github.com/miquels/webdav-server-rs/issues</bugs-to>
<remote-id type="github">miquels/webdav-server-rs</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,52 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cargo systemd
EGIT_COMMIT="50318a66f2f2350e99f89e46a1c130d2c01397af"
DESCRIPTION="WebDAV server in Rust"
HOMEPAGE="https://github.com/miquels/webdav-server-rs"
SRC_URI="
https://github.com/miquels/webdav-server-rs/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz
https://gitlab.com/api/v4/projects/69517529/packages/generic/${PN}/${PV}/${P}-deps.tar.xz
"
S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
LICENSE="Apache-2.0 BSD ISC MIT Unicode-DFS-2016"
SLOT="0"
KEYWORDS="~amd64"
PATCHES=(
"${FILESDIR}"/${P}-use-the-version-0.2.0-of-webdav-handler.patch
)
RDEPEND="
acct-group/webdav
acct-user/webdav
net-libs/libtirpc:=
sys-libs/pam
"
DEPEND="${RDEPEND}"
BDEPEND="
net-libs/rpcsvc-proto
"
src_prepare() {
default
sed -i "s/uid = 33/uid = $(id -u webdav)/" webdav-server.toml
sed -i "s/gid = 33/gid = $(id -g webdav)/" webdav-server.toml
}
src_install() {
cargo_src_install
insinto "/etc/${PN}"
newins webdav-server.toml config.toml.example
systemd_dounit "${FILESDIR}/${PN}.service"
}