From 17fc481ae58acaba340f8ea159b3534e29bc1bf5 Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel@debian.org>
Date: Tue, 6 May 2025 07:03:28 +0200
Subject: [PATCH] Adding debian version 0.5.4-1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
---
 debian/cargo-checksum.json                    |  1 +
 debian/changelog                              |  5 ++
 debian/control                                | 66 +++++++++++++++++++
 debian/copyright                              | 31 +++++++++
 ...st-ssh2-config+nolog-dev.lintian-overrides |  1 +
 debian/patches/debian/0001-cargo.patch        | 15 +++++
 debian/patches/series                         |  1 +
 debian/rules                                  |  4 ++
 debian/source/format                          |  1 +
 debian/tests/control                          | 63 ++++++++++++++++++
 debian/watch                                  |  4 ++
 11 files changed, 192 insertions(+)
 create mode 100644 debian/cargo-checksum.json
 create mode 100644 debian/changelog
 create mode 100644 debian/control
 create mode 100644 debian/copyright
 create mode 100644 debian/librust-ssh2-config+nolog-dev.lintian-overrides
 create mode 100644 debian/patches/debian/0001-cargo.patch
 create mode 100644 debian/patches/series
 create mode 100755 debian/rules
 create mode 100644 debian/source/format
 create mode 100644 debian/tests/control
 create mode 100644 debian/watch

diff --git a/debian/cargo-checksum.json b/debian/cargo-checksum.json
new file mode 100644
index 0000000..ab22e28
--- /dev/null
+++ b/debian/cargo-checksum.json
@@ -0,0 +1 @@
+{"package":"27c8904276fd411f602a6d7e447cccb6f669068badf71359bc4564a5144a866b","files":{}}
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..63252d5
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+rust-ssh2-config (0.5.4-1) unstable; urgency=low
+
+  * Initial upload to sid, needed for forgejo-cli.
+
+ -- Daniel Baumann <daniel@debian.org>  Tue, 06 May 2025 06:53:10 +0200
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..28802fd
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,66 @@
+Source: rust-ssh2-config
+Section: rust
+Priority: optional
+Maintainer: Daniel Baumann <daniel@debian.org>
+Build-Depends:
+ debhelper-compat (= 13),
+ dh-sequence-cargo,
+Build-Depends-Arch:
+ cargo:native <!nocheck>,
+ librust-anyhow-1+default-dev <!nocheck>,
+ librust-bitflags-2+default-dev <!nocheck>,
+ librust-dirs-5+default-dev <!nocheck>,
+ librust-git2-0.20+default-dev <!nocheck>,
+ librust-glob-0.3+default-dev <!nocheck>,
+ librust-log-0.4+default-dev <!nocheck>,
+ librust-thiserror-2+default-dev <!nocheck>,
+ librust-wildmatch-2+default-dev <!nocheck>,
+ libstd-rust-dev <!nocheck>,
+ rustc:native <!nocheck>,
+Rules-Requires-Root: no
+Standards-Version: 4.7.2
+Homepage: https://github.com/veeso/ssh2-config
+Vcs-Browser: https://forgejo.debian.net/forgejo/rust-ssh2-config
+Vcs-Git: https://forgejo.debian.net/forgejo/rust-ssh2-config
+X-Cargo-Crate: ssh2-config
+
+Package: librust-ssh2-config-dev
+Architecture: any
+Multi-Arch: same
+Depends:
+ librust-anyhow-1+default-dev,
+ librust-bitflags-2+default-dev,
+ librust-dirs-5+default-dev,
+ librust-git2-0.20+default-dev,
+ librust-glob-0.3+default-dev,
+ librust-log-0.4+default-dev,
+ librust-thiserror-2+default-dev,
+ librust-wildmatch-2+default-dev,
+ ${misc:Depends},
+Suggests:
+ librust-ssh2-config+nolog-dev (= ${binary:Version}),
+Provides:
+ librust-ssh2-config+default-dev (= ${binary:Version}),
+ librust-ssh2-config-0+default-dev (= ${binary:Version}),
+ librust-ssh2-config-0-dev (= ${binary:Version}),
+ librust-ssh2-config-0.5+default-dev (= ${binary:Version}),
+ librust-ssh2-config-0.5-dev (= ${binary:Version}),
+ librust-ssh2-config-0.5.4+default-dev (= ${binary:Version}),
+ librust-ssh2-config-0.5.4-dev (= ${binary:Version}),
+Description: Ssh configuration parser for ssh2-rs - Rust source code
+ Source code for Debianized Rust crate "ssh2-config"
+
+Package: librust-ssh2-config+nolog-dev
+Architecture: any
+Multi-Arch: same
+Depends:
+ librust-log-0.4+max-level-off-dev,
+ librust-ssh2-config-dev (= ${binary:Version}),
+ ${misc:Depends},
+Provides:
+ librust-ssh2-config-0+nolog-dev (= ${binary:Version}),
+ librust-ssh2-config-0.5+nolog-dev (= ${binary:Version}),
+ librust-ssh2-config-0.5.4+nolog-dev (= ${binary:Version}),
+Description: Ssh configuration parser for ssh2-rs - feature "nolog"
+ This metapackage enables feature "nolog" for the Rust ssh2-config crate, by
+ pulling in any additional dependencies needed by that feature.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..c574666
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,31 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: ssh2-config
+Upstream-Contact: https://github.com/veeso/ssh2-config/issues
+Source: https://github.com/veeso/ssh2-config/tags
+
+Files: *
+Copyright: 2021-2025 Christian Visintin <christian.visintin@veeso.dev>
+License: MIT
+
+Files: debian/*
+Copyright: 2025 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
+License: MIT
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
diff --git a/debian/librust-ssh2-config+nolog-dev.lintian-overrides b/debian/librust-ssh2-config+nolog-dev.lintian-overrides
new file mode 100644
index 0000000..0a56eed
--- /dev/null
+++ b/debian/librust-ssh2-config+nolog-dev.lintian-overrides
@@ -0,0 +1 @@
+librust-ssh2-config+nolog-dev binary: empty-rust-library-declares-provides *
diff --git a/debian/patches/debian/0001-cargo.patch b/debian/patches/debian/0001-cargo.patch
new file mode 100644
index 0000000..9d0eccb
--- /dev/null
+++ b/debian/patches/debian/0001-cargo.patch
@@ -0,0 +1,15 @@
+Author: Daniel Baumann <daniel@debian.org>
+Description: Updating cargo crate depends to available versions in the debian archive.
+
+diff -Naurp rust-ssh2-config.orig/Cargo.toml rust-ssh2-config/Cargo.toml
+--- rust-ssh2-config.orig/Cargo.toml
++++ rust-ssh2-config/Cargo.toml
+@@ -66,7 +66,7 @@ path = "examples/query.rs"
+ version = "^2"
+ 
+ [dependencies.dirs]
+-version = "^6"
++version = "^5"
+ 
+ [dependencies.glob]
+ version = "0.3"
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..2c2b5f8
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+debian/0001-cargo.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..9f15217
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+	dh ${@} --buildsystem cargo
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..cfc0d15
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,63 @@
+Test-Command: /usr/share/cargo/bin/cargo-auto-test ssh2-config 0.5.4 --all-targets --all-features
+Features:
+ test-name=rust-ssh2-config:@,
+Depends:
+ dh-cargo (>= 31),
+ librust-env-logger-0.11+default-dev,
+ librust-pretty-assertions-1+default-dev,
+ librust-rpassword-7+default-dev,
+ librust-ssh2-0.9+default-dev,
+ librust-tempfile-3+default-dev,
+ rustc,
+ @,
+Restrictions:
+ allow-stderr,
+ skip-not-installable,
+
+Test-Command: /usr/share/cargo/bin/cargo-auto-test ssh2-config 0.5.4 --all-targets
+Features:
+ test-name=librust-ssh2-config-dev:default,
+Depends:
+ dh-cargo (>= 31),
+ librust-env-logger-0.11+default-dev,
+ librust-pretty-assertions-1+default-dev,
+ librust-rpassword-7+default-dev,
+ librust-ssh2-0.9+default-dev,
+ librust-tempfile-3+default-dev,
+ rustc,
+ @,
+Restrictions:
+ allow-stderr,
+ skip-not-installable,
+
+Test-Command: /usr/share/cargo/bin/cargo-auto-test ssh2-config 0.5.4 --all-targets --no-default-features
+Features:
+ test-name=librust-ssh2-config-dev:,
+Depends:
+ dh-cargo (>= 31),
+ librust-env-logger-0.11+default-dev,
+ librust-pretty-assertions-1+default-dev,
+ librust-rpassword-7+default-dev,
+ librust-ssh2-0.9+default-dev,
+ librust-tempfile-3+default-dev,
+ rustc,
+ @,
+Restrictions:
+ allow-stderr,
+ skip-not-installable,
+
+Test-Command: /usr/share/cargo/bin/cargo-auto-test ssh2-config 0.5.4 --all-targets --no-default-features --features nolog
+Features:
+ test-name=librust-ssh2-config+nolog-dev:nolog,
+Depends:
+ dh-cargo (>= 31),
+ librust-env-logger-0.11+default-dev,
+ librust-pretty-assertions-1+default-dev,
+ librust-rpassword-7+default-dev,
+ librust-ssh2-0.9+default-dev,
+ librust-tempfile-3+default-dev,
+ rustc,
+ @,
+Restrictions:
+ allow-stderr,
+ skip-not-installable,
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..b20283b
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=4
+opts=filenamemangle=s/.*\/(.*)\/download/ssh2-config-$1\.tar\.gz/g,\
+uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\.?\d*)$/$1~$2/ \
+https://qa.debian.org/cgi-bin/fakeupstream.cgi?upstream=crates.io/ssh2-config .*/crates/ssh2-config/@ANY_VERSION@/download