From 14428946da59f5f119edee2e4e24297e167cdab2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Gr=C3=BCnbichler?= Date: Thu, 3 Feb 2022 13:41:28 +0100 Subject: [PATCH] add packaging MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabian Grünbichler --- Makefile | 44 +++++++++++++++++++++++++++++++++ debian/changelog | 5 ++++ debian/control | 58 ++++++++++++++++++++++++++++++++++++++++++++ debian/copyright | 16 ++++++++++++ debian/debcargo.toml | 13 ++++++++++ 5 files changed, 136 insertions(+) create mode 100644 Makefile create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/debcargo.toml diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4f2a799 --- /dev/null +++ b/Makefile @@ -0,0 +1,44 @@ +.PHONY: all +all: check + +.PHONY: check +check: + cargo test --all-features + +.PHONY: dinstall +dinstall: deb + sudo -k dpkg -i build/librust-*.deb + +.PHONY: build +build: + rm -rf build + rm -f debian/control + mkdir build + debcargo package \ + --config "$(PWD)/debian/debcargo.toml" \ + --changelog-ready \ + --no-overlay-write-back \ + --directory "$(PWD)/build/proxmox-websocket-tunnel" \ + "proxmox-websocket-tunnel" \ + "$$(dpkg-parsechangelog -l "debian/changelog" -SVersion | sed -e 's/-.*//')" + echo system >build/rust-toolchain + rm -f build/proxmox-websocket-tunnel/Cargo.lock + find build/proxmox-websocket-tunnel/debian -name '*.hint' -delete + cp build/proxmox-websocket-tunnel/debian/control debian/control + +.PHONY: deb +deb: build + (cd build/proxmox-websocket-tunnel && dpkg-buildpackage -b -uc -us) + lintian build/*.deb + +.PHONY: clean +clean: + rm -rf build *.deb *.buildinfo *.changes *.orig.tar.gz + cargo clean + +upload: deb + cd build; \ + dcmd --deb rust-proxmox-websocket-tunnel_*.changes \ + | grep -v '.changes$$' \ + | tar -cf- -T- \ + | ssh -X repoman@repo.proxmox.com upload --product pve --dist bullseye diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..04751ce --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +rust-proxmox-websocket-tunnel (0.1.0-1) unstable; urgency=medium + + * initial release + + -- Proxmox Support Team Tue, 18 May 2021 14:18:14 +0200 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..7f6b4c3 --- /dev/null +++ b/debian/control @@ -0,0 +1,58 @@ +Source: rust-proxmox-websocket-tunnel +Section: admin +Priority: optional +Build-Depends: debhelper (>= 12), + dh-cargo (>= 25), + cargo:native, + rustc:native, + libstd-rust-dev, + librust-anyhow-1+default-dev, + librust-base64-0.13+default-dev, + librust-futures-0.3+default-dev, + librust-futures-util-0.3+default-dev, + librust-hex-0.4+default-dev, + librust-hyper-0.14+default-dev, + librust-openssl-0.10+default-dev, + librust-percent-encoding-2+default-dev, + librust-proxmox-http-0.6+client-dev, + librust-proxmox-http-0.6+default-dev, + librust-proxmox-http-0.6+websocket-dev, + librust-proxmox-sys-0.2+default-dev (>= 0.2.2-~~), + librust-serde-1+default-dev, + librust-serde-1+derive-dev, + librust-serde-json-1+default-dev, + librust-tokio-1+default-dev, + librust-tokio-1+io-std-dev, + librust-tokio-1+io-util-dev, + librust-tokio-1+macros-dev, + librust-tokio-1+rt-multi-thread-dev, + librust-tokio-1+sync-dev, + librust-tokio-stream-0.1+default-dev, + librust-tokio-stream-0.1+io-util-dev, + librust-tokio-util-0.6+default-dev +Maintainer: Proxmox Support Team +Standards-Version: 4.5.1 +Vcs-Git: git://git.proxmox.com/git/proxmox-websocket-tunnel.git +Vcs-Browser: https://git.proxmox.com/?p=proxmox-websocket-tunnel.git +Rules-Requires-Root: no + +Package: proxmox-websocket-tunnel +Architecture: any +Multi-Arch: allowed +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + ${cargo:Depends} +Recommends: + ${cargo:Recommends} +Suggests: + ${cargo:Suggests} +Provides: + ${cargo:Provides} +Built-Using: ${cargo:Built-Using} +XB-X-Cargo-Built-Using: ${cargo:X-Cargo-Built-Using} +Description: Proxmox websocket tunneling helper + Proxmox websocket tunnel helper + . + This package contains a helper binary for tunnelling UNIX sockets over a + websocket connection diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..5661ef6 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,16 @@ +Copyright (C) 2021 Proxmox Server Solutions GmbH + +This software is written by Proxmox Server Solutions GmbH + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . diff --git a/debian/debcargo.toml b/debian/debcargo.toml new file mode 100644 index 0000000..dfe933e --- /dev/null +++ b/debian/debcargo.toml @@ -0,0 +1,13 @@ +overlay = "." +crate_src_path = ".." +maintainer = "Proxmox Support Team " + +[source] +vcs_git = "git://git.proxmox.com/git/proxmox-websocket-tunnel.git" +vcs_browser = "https://git.proxmox.com/?p=proxmox-websocket-tunnel.git" +section = "admin" + +[packages.bin] +description="""Proxmox websocket tunnel helper + +This package contains a helper binary for tunnelling UNIX sockets over a websocket connection""" -- 2.39.2