5
0
mirror of git://git.proxmox.com/git/pve-xtermjs.git synced 2025-03-11 20:58:41 +03:00

123 Commits

Author SHA1 Message Date
Thomas Lamprecht
749ebb0907 termproxy: fix port/fd range check
The valid upper range was swapped, while at it switch from i32::Max to
RawFd::Max, while currently RawFd is a type alias to i32, it's easier
to grasp what's going on and might even change in the future.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-17 14:57:04 +02:00
Thomas Lamprecht
f451fe2768 termproxy: bump version to 1.0.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-17 10:51:25 +02:00
Thomas Lamprecht
55deb66575 termproxy: d/rules: drop bogus dh_build/install overrides for LIBEXECDIR
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-17 10:49:54 +02:00
Thomas Lamprecht
72c15d118f termproxy: install to usr/libexec directory
this is not a standard CLI tool that should be exposed to all users,
but an internal binary, so  move it to /usr/libexec/proxmox.
That location was chosen over a multiarch path
/usr/lib/<triplet>/proxmox to make resolving the path easier for the
caller, as the standard ways to get the multiarch triplet (e.g.,
"x86_64-linux-gnu") involve CC and are not easily/cheaply available in
perl – we would basically create an architecture specific package that
provides a path resolution with multiarch triplet resolved at "build"
time of that module; as we probably do not ever install termproxy
multiple times targeting different arch's on the same system, this is
just to much complexity.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-17 10:49:54 +02:00
Thomas Lamprecht
11c42e4fc7 xterm.js: bump version to 5.3.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-17 10:49:54 +02:00
Thomas Lamprecht
83a3b0745d xtermjs: hard-depent on proxmox-termproxy for now
Avoids that we need to bump all frontends with updated dependencies
and then add them to the proxmox-termproxy's Breaks info.

We can loosen this dependency on the next major release, or when all
users switch to the respective ones (with a versioned Break!).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-17 10:49:54 +02:00
Thomas Lamprecht
7d87397198 termproxy: enable full LTO
shaves of over 100KB of the final binary and this crate is small
enough to not notice a relevant compile time impact.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-17 10:49:54 +02:00
Thomas Lamprecht
145da0bf45 split upstream and our native into different source packages
We should have never added a upstream repackage and some custom tools
in the same source package, let alone binary package. Finally resolve
that tech debt and do a split.

This commit does a bit more than I'd like at once, but it's really not
trivial to make a clean split while keeping all sanely buildable in
multiple commits.

What roughly happens is:
- two complete separate source packages
  - one for xterm.js, we keep this purely to the xterm.js and our
    local additions and modifications that are relevant directly to
    xterm.js itself
  - one for termproxy, where only the rust-based tool is shipped.
    This also reduces churn, as the termproxy doesn't sees lots of
    updates, so no point in building it on every xterm.js update.
  - drop debcargo, which while great for library source code packages
    for build dependencies, is just a PITA for binary packages
    shipping actual compiled rust code, it adds almost nothing there
    but provides lots of special handling to get the correct result.
  - rename `termproxy` to `proxmox-termproxy` but keep a backward
    compat link for now, termproxy is way to general a name.
    Maybe we should also move this away from /bin in general, into the
    /lib/<arch-qualifier>/proxmox/ directory like we do for
    proxmox-backup.
  - clean ups all over the place

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-17 10:49:54 +02:00
Thomas Lamprecht
13e2e50222 termproxy: update clap crate to major version 4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-04 17:19:49 +02:00
Thomas Lamprecht
8acab7c358 readme: update and reword slightly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-04 15:40:01 +02:00
Dominik Csapak
154b65d5b9 download and use xterm-addon-webgl as renderer
since xterm.js 5.0.0, the previous default canvas renderer is not
built-in anymore and only recommended as a fallback. The new recommended
renderer is this webgl one, so use it with a fallback to the default
built-in dom renderer (which is slower, but still functional).

to use it we have to load the addon after `terminal.open` so move the
`open` call to before the addon loading. While we're touching that line,
remove the superfluous second 'true' parameter that did not do anything.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-09-26 10:20:11 +02:00
Dominik Csapak
1ad0d6aba6 upgrade to xterm.js 5.3.0
and update xterm-addon-fit to a compatible version (0.8.0)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-09-26 08:33:26 +02:00
Dominik Csapak
34d796a1e3 ui: fix typo in error handler
s/even/event/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-09-26 08:30:57 +02:00
Thomas Lamprecht
1a99994c69 extend .gitignore
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-23 14:13:00 +02:00
Thomas Lamprecht
7f0ffe8aa4 d/source: set format to 3.0 (quilt)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-23 14:11:28 +02:00
Thomas Lamprecht
99c9d21425 bump version to 4.16.0-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-23 14:02:48 +02:00
Thomas Lamprecht
9683c7f7a3 update proxmox-sys to 0.5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-23 14:02:48 +02:00
Thomas Lamprecht
149874209b d/control: define compat level via build-depends and raise to 13
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-23 14:02:48 +02:00
Thomas Lamprecht
0534882fe3 buildsys: derive upload dist automatically
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-23 14:02:48 +02:00
Thomas Lamprecht
d007d21eba buildsys: fix source tarball generation and add sbuild target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-23 14:02:48 +02:00
Thomas Lamprecht
11430bcc1f buildsys: avoid debcargo and dh-cargo on build
debcargo package requires all dependencies to be installed, even if
we basically just use it for d/control generation, which makes it a
bad choice for build dir generation here (i.e., with a native
package) as the DSC should be buildable without requiring all build
dependencies.

Add a target to update d/control manually (not much tested) and move
the build away from dh-cargo

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-23 14:02:48 +02:00
Thomas Lamprecht
033c3cb412 buildsys: do not skip pre-cleaning source
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-23 14:02:48 +02:00
Thomas Lamprecht
3f491b8562 buildsys: smarter generation of xterm.js addon exclusion arguments
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-23 13:23:54 +02:00
Thomas Lamprecht
ff0954988b buildsys: use full DEB_VERSION and correct DEB_HOST_ARCH
and drop git and srcdir variable

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-23 13:23:54 +02:00
Thomas Lamprecht
d174283d1f makefile: convert to use simple parenthesis
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-23 13:23:54 +02:00
Thomas Lamprecht
b73169a3ea update cargo metadata
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-23 13:23:54 +02:00
Thomas Lamprecht
1c04ac68c0 update lintian-overrides for debhelper 13+
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-23 13:23:54 +02:00
Thomas Lamprecht
abbfa6dc5d d/control: wrap and sort
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-23 13:23:54 +02:00
Thomas Lamprecht
cbc9e16965 check in debian/control
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-22 16:09:25 +02:00
Thomas Lamprecht
596907ca04 bump version to 4.16.0-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-22 15:35:38 +02:00
Dominik Csapak
8c6783e991 update to clap 3 / proxmox-sys 0.4
only major difference was that clap now does not allow invalid utf8 by
default, but that's necessary for our 'cmd' parameter so add that

(also includes a rustfmt fixup)

Acked-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-01-23 10:32:16 +01:00
Fabian Grünbichler
27f74629bc update to proxmox-lang 1.1 / proxmox-sys 0.3.0
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-06-02 14:14:07 +02:00
Fabian Grünbichler
e5681aa289 Cargo.toml: bump mio to 0.8
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-06-02 10:03:36 +02:00
Dominik Csapak
9871a3b81e detect not running guests and add start button
akin to what we now have in novnc
css classes copied from novnc, so that we have the same look

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-04-25 18:23:14 +02:00
Thomas Lamprecht
81a288b933 switch from curl to ureq
Not only less code, we lose a whopping 29 libraries on linkage cruft:

> --- ldd.before  2022-01-26 19:03:25.759426164 +0100
> +++ ldd.after   2022-01-26 19:03:31.919529632 +0100
> @@ -5,36 +5,7 @@ librt.so.1
>  libzstd.so.1
>  libc.so.6
>  /lib64/ld-linux-x86-64.so.2
> -libcurl-gnutls.so.4
>  libgcc_s.so.1
>  libpthread.so.0
>  libm.so.6
>  libdl.so.2
> -libnghttp2.so.14
> -libidn2.so.0
> -librtmp.so.1
> -libssh2.so.1
> -libpsl.so.5
> -libnettle.so.8
> -libgnutls.so.30
> -libgssapi_krb5.so.2
> -libldap_r-2.4.so.2
> -liblber-2.4.so.2
> -libbrotlidec.so.1
> -libz.so.1
> -libunistring.so.2
> -libhogweed.so.6
> -libgmp.so.10
> -libgcrypt.so.20
> -libp11-kit.so.0
> -libtasn1.so.6
> -libkrb5.so.3
> -libk5crypto.so.3
> -libcom_err.so.2
> -libkrb5support.so.0
> -libresolv.so.2
> -libsasl2.so.2
> -libbrotlicommon.so.1
> -libgpg-error.so.0
> -libffi.so.7
> -libkeyutils.so.1

IOW.: curl is really nice for a CLI tool and super powerful library,
but way to much overkill for simple HTTP requests (not even TLS) we
need here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-01-28 09:18:00 +01:00
Thomas Lamprecht
cfa75e79d7 use anyhow for result/error
it's in out dependency chain anyway through proxmox-sys or -time and
it makes life a bit easier. FWIW, I got slightly pressured into this
by the future switch from curl to ureq, as the latter brings their
own Error type.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2022-01-28 09:16:59 +01:00
Thomas Lamprecht
7a03b1a956 buildsys: fix upload target and track debug package
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-01-25 15:38:28 +01:00
Thomas Lamprecht
8dcff86a32 bump version to 4.16.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-01-25 15:32:41 +01:00
Dominik Csapak
4dc4b7dfdc upgrade xterm.js to 4.16.0
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-01-25 15:01:13 +01:00
Dominik Csapak
f0815f0a90 upgrade xterm.js from 4.12.0 to 4.15.0
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-12-16 13:27:56 +01:00
Dominik Csapak
cc1dbda3de update rust dependencies
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-12-16 13:18:38 +01:00
Thomas Lamprecht
3b087ebf80 bump version to 4.12.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-14 14:50:51 +02:00
Thomas Lamprecht
bae1e03346 debian: update summary/description & fix homepage link
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-14 14:50:51 +02:00
Thomas Lamprecht
f9af7f8355 debcargo: commit automatic changes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-14 14:50:51 +02:00
Thomas Lamprecht
10de4e738e buildsys: fix indentation of continued command
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-14 14:50:51 +02:00
Thomas Lamprecht
7327730483 debcargo: workaround bug with package description/summary generation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-14 14:45:51 +02:00
Thomas Lamprecht
d0f166b119 update xterm.js to 4.12.0 and the fit-addon to 0.5.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-14 08:09:55 +02:00
Fabian Grünbichler
d82a762636 build: track d/control
for easier build-dependency installation

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-02 13:08:15 +01:00
Fabian Grünbichler
3c586bd826 rustfmt
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-02 13:08:15 +01:00
Fabian Grünbichler
bb32b0c68e style: use Interest | Interest instead of .add
BitOr is implemented via .add anyway, but this is more readable.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-02 13:08:15 +01:00