diff --git a/Cargo.lock b/Cargo.lock index de33cbb..5f8b51b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -438,9 +438,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.3.5" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615caabe2c3160b313d52ccc905335f4ed5f10881dd63dc5699d47e90be85691" +checksum = "4a1ce40d6fc9764887c2fdc7305c3dcc429ba11ff981c1509416afd5697e4437" [[package]] name = "humantime" @@ -542,9 +542,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d855069fafbb9b344c0f962150cd2c1187975cb1c22c1522c240d8c4986714" +checksum = "9385f66bf6105b241aa65a61cb923ef20efc665cb9f9bb50ac2f0c4b7f378d41" [[package]] name = "linked-hash-map" @@ -928,7 +928,7 @@ checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d" dependencies = [ "proc-macro2 1.0.26", "quote 1.0.9", - "syn 1.0.68", + "syn 1.0.69", ] [[package]] @@ -1004,9 +1004,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ce15dd3ed8aa2f8eeac4716d6ef5ab58b6b9256db41d7e1a0224c2788e8fd87" +checksum = "48fe99c6bd8b1cc636890bcc071842de909d902c81ac7dab53ba33c421ab8ffb" dependencies = [ "proc-macro2 1.0.26", "quote 1.0.9", @@ -1045,7 +1045,7 @@ checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" dependencies = [ "proc-macro2 1.0.26", "quote 1.0.9", - "syn 1.0.68", + "syn 1.0.69", ] [[package]] @@ -1111,9 +1111,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +checksum = "eeb8be209bb1c96b7c177c7420d26e04eccacb0eeae6b980e35fcb74678107e0" dependencies = [ "matches", ] @@ -1202,7 +1202,7 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "webhookey" -version = "0.1.0" +version = "0.1.0-rc.0" dependencies = [ "anyhow", "dirs", diff --git a/Cargo.toml b/Cargo.toml index d4f6a0b..7c75771 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "webhookey" -version = "0.1.0" -authors = ["finga "] +version = "0.1.0-rc.0" +authors = ["finga "] edition = "2018" license = "GPL-3.0-or-later" readme = "README.md" @@ -27,3 +27,14 @@ hex = "0.4" ipnet = { version = "2.3", features = ["serde"] } thiserror = "1.0" run_script = "0.7" + +[package.metadata.deb] +extended-description = "Webhookey receives requests as for example sent by Gitea's webhooks. Those requests are filtered against configurable filters. When a filter matches values from the header and the body can be passed to scripts which are then executed." +maintainer-scripts = "debian/" +systemd-units = { enable = false } +assets = [ + ["config.yml", "etc/webhookey/", "644"], + ["target/release/webhookey", "usr/bin/", "755"], + ["README.md", "usr/share/doc/cargo-deb/README", "644"], + ["debian/service", "lib/systemd/system/webhookey.service", "644"], +] diff --git a/config.yml.example b/config.yml similarity index 100% rename from config.yml.example rename to config.yml diff --git a/webhookey.service b/debian/service similarity index 72% rename from webhookey.service rename to debian/service index 91530e2..88bffb4 100644 --- a/webhookey.service +++ b/debian/service @@ -6,10 +6,11 @@ After=network.target [Service] RestartSec=2s Type=simple -User=webhookey -Group=webhookey +User=%u +Group=%g +ExecStart=webhookey Restart=always -Environment=ROCKET_ADDRESS=127.0.0.1 ROCKET_PORT=8000 +Environment=ROCKET_ADDRESS=127.0.0.1 ROCKET_PORT=8000 RUST_LOG=info # Environment=ROCKET_ADDRESS=127.0.0.1 ROCKET_PORT=8000 ROCKET_TLS={certs="/path/to/certs.pem",key="/path/to/key.pem"} [Install]