diff --git a/.cargo/config b/.cargo/config index 3b5b6e4..b08ce29 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,5 +1,5 @@ [source] -[source.debian-packages] -directory = "/usr/share/cargo/registry" +[source.vendor] +directory = "vendor" [source.crates-io] -replace-with = "debian-packages" +replace-with = "vendor" diff --git a/Cargo.toml b/Cargo.toml index 60c3ae0..8464181 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,3 +16,8 @@ curl = "0.4" clap = "2.33" proxmox-io = "1" proxmox-sys = "0.2" +zstd-sys = { features = [ "pkg-config" ] } + +[patch.crates-io] +proxmox-io = { path = "../proxmox/proxmox-io" } +proxmox-sys = { path = "../proxmox/proxmox-sys" } diff --git a/Makefile b/Makefile index cd583fb..6c15792 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,14 @@ $(SUBDIRS): cargo-build: cargo build $(CARGO_BUILD_ARGS) +.PHONY: cargo-vendor +cargo-vendor: + cargo vendor + rm -f vendor/endian_trait/rust-toolchain + rm -f vendor/endian_trait_derive/rust-toolchain + sed -i "s#\"rust-toolchain[^,]\+,##" vendor/endian_trait/.cargo-checksum.json + sed -i "s#\"rust-toolchain[^,]\+,##" vendor/endian_trait_derive/.cargo-checksum.json + .PHONY: build build: rm -rf build @@ -53,9 +61,10 @@ build: .PHONY: deb deb: ${DEB} -$(DEB): build - cd build; dpkg-buildpackage -b -uc -us --no-pre-clean - lintian ${DEB} +$(DEB): cargo-vendor + echo "git clone git://git.proxmox.com/git/pve-xtermjs.git\\ngit checkout ${GITVERSION}" > debian/SOURCE + DEB_CARGO_PACKAGE=$(PACKAGE) dpkg-buildpackage -b -uc -us --no-pre-clean + lintian ../${DEB} @echo ${DEB} .PHONY: dsc diff --git a/debian/cargo-checksum.json b/debian/cargo-checksum.json new file mode 100644 index 0000000..e69de29 diff --git a/debian/changelog b/debian/changelog index 19bc1d1..1bd362a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +rust-termproxy (4.16.0-2) bullseye; urgency=medium + + * fix Connection closed (Code: 1000) error - WARN: I/O source already registered with a `Registry` + + -- Wolfgang Tue, 14 Mar 2023 21:01:43 +0100 + rust-termproxy (4.16.0-1) bullseye; urgency=medium * upgrade xterm.js from 4.12.0 to 4.16.0 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..d59a66c --- /dev/null +++ b/debian/control @@ -0,0 +1,30 @@ +Source: rust-termproxy +Section: admin +Priority: optional +Build-Depends: debhelper (>= 12), + libzstd-dev +Maintainer: Proxmox Support Team +Standards-Version: 4.5.1 +Vcs-Git: git://git.proxmox.com/git/pve-xtermjs.git +Vcs-Browser: https://git.proxmox.com/?p=pve-xtermjs.git;a=summary +Homepage: https://www.proxmox.com +Rules-Requires-Root: no + +Package: pve-xtermjs +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: HTML/JS Shell client for Proxmox projects + This package provides an xterm.js client/proxy for Proxmoxprojects' Hosts, + Proxmox VE containers or Proxmox VE VM's serial-terminals. diff --git a/debian/install b/debian/install index 04be689..0e69d82 100644 --- a/debian/install +++ b/debian/install @@ -1 +1,2 @@ -src/www/* /usr/share/pve-xtermjs/ +src/www/* /usr/share/pve-xtermjs/ +target/release/termproxy /usr/bin/ diff --git a/debian/rules b/debian/rules index 2b62edd..436684e 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f %: - dh $@ --buildsystem cargo + dh $@ override_dh_auto_build: dh_auto_build diff --git a/debian/rules.debcargo.hint b/debian/rules.debcargo.hint index 92c239b..4aaf62a 100755 --- a/debian/rules.debcargo.hint +++ b/debian/rules.debcargo.hint @@ -1,6 +1,6 @@ #!/usr/bin/make -f %: - dh $@ --buildsystem cargo + dh $@ override_dh_auto_test: dh_auto_test -- test --all