From a2ab376241d76f434178a400690e6117cebf78844066eb22643dbddc144da3dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Mon, 8 Apr 2024 11:03:01 +0000 Subject: [PATCH 1/3] =?UTF-8?q?-=20Bump=20version:=203.0.10=20=E2=86=92=20?= =?UTF-8?q?3.0.11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix build for Leap Issues on the gcc side for static targets, disable sci static build for older targets, e.g Leap - Prevent use of socat in firecracker-pilot Do not shell out socat and use proper UnixListener/UnixStream to do this job. This version of the commit works but I stumbled across a few issues: 1. Permission denied when the UnixListener runs as user and the firecracker process was called as root (run_as: root in the flake). The former implementation ran socat via sudo in the same way as the firecracker process. Thus if you register the flake to run as root it can now also only be called as root, which is acceptable. 2. The behavior in interactive sessions differs compared to socat. When sci in the guest is called it creates a pty and all data is copied to the vsock stream. The host connects via an UDS socket to this data and we multiplex stdin->stream and stream->stdout. When doing this with socat the behavior is different in a way that e.g tabs are effectively interpreted and the pty prompt allows for input on the same line when my code now always needs a newline to renew the prompt. I did not debug further what is needed to make this look nicer. This Fixes #8 OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=11 --- flake-pilot.changes | 42 ++++++++++++++++++++++++++++++++++++++++++ flake-pilot.spec | 12 ++++++------ flake-pilot.tar.gz | 4 ++-- 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/flake-pilot.changes b/flake-pilot.changes index 852a6fa..78aacd6 100644 --- a/flake-pilot.changes +++ b/flake-pilot.changes @@ -1,3 +1,45 @@ +------------------------------------------------------------------- +Mon Apr 08 12:59:48 CEST 2024 - Marcus Schäfer + +- Bump version: 3.0.10 → 3.0.11 + +------------------------------------------------------------------- +Mon Apr 08 12:58:58 CEST 2024 - Marcus Schäfer + +- Fix build for Leap + + Issues on the gcc side for static targets, disable + sci static build for older targets, e.g Leap + +------------------------------------------------------------------- +Wed Apr 03 22:48:44 CEST 2024 - Marcus Schäfer + +- Prevent use of socat in firecracker-pilot + + Do not shell out socat and use proper UnixListener/UnixStream + to do this job. This version of the commit works but I stumbled + across a few issues: + + 1. Permission denied when the UnixListener runs as user and the + firecracker process was called as root (run_as: root in the flake). + The former implementation ran socat via sudo in the same way as + the firecracker process. Thus if you register the flake to + run as root it can now also only be called as root, which is + acceptable. + + 2. The behavior in interactive sessions differs compared to socat. + When sci in the guest is called it creates a pty and all data + is copied to the vsock stream. The host connects via an UDS + socket to this data and we multiplex stdin->stream and + stream->stdout. When doing this with socat the behavior + is different in a way that e.g tabs are effectively interpreted + and the pty prompt allows for input on the same line when + my code now always needs a newline to renew the prompt. + I did not debug further what is needed to make this look + nicer. + + This Fixes #8 + ------------------------------------------------------------------- Wed Mar 27 14:11:25 CET 2024 - Marcus Schäfer diff --git a/flake-pilot.spec b/flake-pilot.spec index a1fc776..bfdf360 100644 --- a/flake-pilot.spec +++ b/flake-pilot.spec @@ -23,7 +23,7 @@ # SOFTWARE. # Name: flake-pilot -Version: 3.0.10 +Version: 3.0.11 Release: 0 Summary: Launcher for flake applications License: MIT @@ -86,7 +86,6 @@ Requires: rsync Requires: firecracker Requires: xz Requires: e2fsprogs -Requires: socat Requires: sudo %description -n flake-pilot-firecracker @@ -124,16 +123,17 @@ mkdir -p .cargo cp %{SOURCE1} .cargo/config make build %ifnarch ppc64le +%if 0%{?suse_version} && 0%{?suse_version} >= 1600 make compile_sci_static %endif +%endif %install make DESTDIR=%{buildroot}/ install -%ifnarch ppc64le -make DESTDIR=%{buildroot}/ install_sci_static -%else + +test -f target/*-unknown-linux-gnu/static/sci && \ +make DESTDIR=%{buildroot}/ install_sci_static || \ make DESTDIR=%{buildroot}/ install_sci -%endif mkdir -p %{buildroot}/overlayroot mkdir -p %{buildroot}/usr/lib/flake-pilot diff --git a/flake-pilot.tar.gz b/flake-pilot.tar.gz index d2cfedc..428746b 100644 --- a/flake-pilot.tar.gz +++ b/flake-pilot.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:efc98871d396578e02ca38e44a1c68ef2d5173db2dc88c168f2ea84055640efe -size 19287792 +oid sha256:95843a9f159bfa20ee5517468ffd4945f173ac4569b4efa7934a506a89e80e44 +size 19301415 From 6f22100a69cd8ad33f2cc9ff0c042a0fcd8e0ac2be5f0b826557b1867378d48e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Wed, 10 Apr 2024 07:55:48 +0000 Subject: [PATCH 2/3] =?UTF-8?q?-=20Bump=20version:=203.0.11=20=E2=86=92=20?= =?UTF-8?q?3.0.12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix race condition on connection check - set PS1 prompt via sci env - Add terminal settings for pty stdout in sci disable ECHO - Fix invalid early exit condition OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=12 --- flake-pilot.changes | 27 +++++++++++++++++++++++++++ flake-pilot.spec | 2 +- flake-pilot.tar.gz | 4 ++-- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/flake-pilot.changes b/flake-pilot.changes index 78aacd6..9ec403f 100644 --- a/flake-pilot.changes +++ b/flake-pilot.changes @@ -1,3 +1,30 @@ +------------------------------------------------------------------- +Wed Apr 10 09:54:28 CEST 2024 - Marcus Schäfer + +- Bump version: 3.0.11 → 3.0.12 + +------------------------------------------------------------------- +Tue Apr 09 18:43:42 CEST 2024 - Marcus Schäfer + +- Fix race condition on connection check + +------------------------------------------------------------------- +Tue Apr 09 16:53:26 CEST 2024 - Marcus Schäfer + +- set PS1 prompt via sci env + +------------------------------------------------------------------- +Tue Apr 09 16:41:34 CEST 2024 - Marcus Schäfer + +- Add terminal settings for pty stdout in sci + + disable ECHO + +------------------------------------------------------------------- +Tue Apr 09 12:35:08 CEST 2024 - Marcus Schäfer + +- Fix invalid early exit condition + ------------------------------------------------------------------- Mon Apr 08 12:59:48 CEST 2024 - Marcus Schäfer diff --git a/flake-pilot.spec b/flake-pilot.spec index bfdf360..8b9cd82 100644 --- a/flake-pilot.spec +++ b/flake-pilot.spec @@ -23,7 +23,7 @@ # SOFTWARE. # Name: flake-pilot -Version: 3.0.11 +Version: 3.0.12 Release: 0 Summary: Launcher for flake applications License: MIT diff --git a/flake-pilot.tar.gz b/flake-pilot.tar.gz index 428746b..3f75b79 100644 --- a/flake-pilot.tar.gz +++ b/flake-pilot.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:95843a9f159bfa20ee5517468ffd4945f173ac4569b4efa7934a506a89e80e44 -size 19301415 +oid sha256:f7d24aa39ac96888a41ced9d2a4b13badca28ec9c5bb7ee75b4277522e2e6640 +size 19327490 From c1badaa77669e0396b6796fa0296fb883f053cf471e4ac07e982e0e7985ec03f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Wed, 10 Apr 2024 10:55:55 +0000 Subject: [PATCH 3/3] - Turn terminal flag setup into function OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=13 --- flake-pilot.changes | 5 +++++ flake-pilot.tar.gz | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/flake-pilot.changes b/flake-pilot.changes index 9ec403f..20ff716 100644 --- a/flake-pilot.changes +++ b/flake-pilot.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 10 12:13:56 CEST 2024 - Marcus Schäfer + +- Turn terminal flag setup into function + ------------------------------------------------------------------- Wed Apr 10 09:54:28 CEST 2024 - Marcus Schäfer diff --git a/flake-pilot.tar.gz b/flake-pilot.tar.gz index 3f75b79..278e65e 100644 --- a/flake-pilot.tar.gz +++ b/flake-pilot.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f7d24aa39ac96888a41ced9d2a4b13badca28ec9c5bb7ee75b4277522e2e6640 -size 19327490 +oid sha256:521541a36c648fa50e4df879cd0a03f72cf308aad71aa0ab9d1f18997818a217 +size 19329341