SHA256
1
0
forked from pool/flake-pilot

Accepting request 1166791 from Virtualization:Appliances:Builder

- Turn terminal flag setup into function

- Bump version: 3.0.11 → 3.0.12

- 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

- Bump version: 3.0.10 → 3.0.11

- 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.

OBS-URL: https://build.opensuse.org/request/show/1166791
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/flake-pilot?expand=0&rev=3
This commit is contained in:
Ana Guerrero 2024-04-11 17:41:36 +00:00 committed by Git OBS Bridge
commit 74d69ba927
3 changed files with 82 additions and 8 deletions

View File

@ -1,3 +1,77 @@
-------------------------------------------------------------------
Wed Apr 10 12:13:56 CEST 2024 - Marcus Schäfer <marcus.schaefer@gmail.com>
- Turn terminal flag setup into function
-------------------------------------------------------------------
Wed Apr 10 09:54:28 CEST 2024 - Marcus Schäfer <marcus.schaefer@gmail.com>
- Bump version: 3.0.11 → 3.0.12
-------------------------------------------------------------------
Tue Apr 09 18:43:42 CEST 2024 - Marcus Schäfer <marcus.schaefer@gmail.com>
- Fix race condition on connection check
-------------------------------------------------------------------
Tue Apr 09 16:53:26 CEST 2024 - Marcus Schäfer <marcus.schaefer@gmail.com>
- set PS1 prompt via sci env
-------------------------------------------------------------------
Tue Apr 09 16:41:34 CEST 2024 - Marcus Schäfer <marcus.schaefer@gmail.com>
- Add terminal settings for pty stdout in sci
disable ECHO
-------------------------------------------------------------------
Tue Apr 09 12:35:08 CEST 2024 - Marcus Schäfer <marcus.schaefer@gmail.com>
- Fix invalid early exit condition
-------------------------------------------------------------------
Mon Apr 08 12:59:48 CEST 2024 - Marcus Schäfer <marcus.schaefer@gmail.com>
- Bump version: 3.0.10 → 3.0.11
-------------------------------------------------------------------
Mon Apr 08 12:58:58 CEST 2024 - Marcus Schäfer <marcus.schaefer@gmail.com>
- 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 <marcus.schaefer@gmail.com>
- 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 <marcus.schaefer@gmail.com> Wed Mar 27 14:11:25 CET 2024 - Marcus Schäfer <marcus.schaefer@gmail.com>

View File

@ -23,7 +23,7 @@
# SOFTWARE. # SOFTWARE.
# #
Name: flake-pilot Name: flake-pilot
Version: 3.0.10 Version: 3.0.12
Release: 0 Release: 0
Summary: Launcher for flake applications Summary: Launcher for flake applications
License: MIT License: MIT
@ -86,7 +86,6 @@ Requires: rsync
Requires: firecracker Requires: firecracker
Requires: xz Requires: xz
Requires: e2fsprogs Requires: e2fsprogs
Requires: socat
Requires: sudo Requires: sudo
%description -n flake-pilot-firecracker %description -n flake-pilot-firecracker
@ -124,16 +123,17 @@ mkdir -p .cargo
cp %{SOURCE1} .cargo/config cp %{SOURCE1} .cargo/config
make build make build
%ifnarch ppc64le %ifnarch ppc64le
%if 0%{?suse_version} && 0%{?suse_version} >= 1600
make compile_sci_static make compile_sci_static
%endif %endif
%endif
%install %install
make DESTDIR=%{buildroot}/ install make DESTDIR=%{buildroot}/ install
%ifnarch ppc64le
make DESTDIR=%{buildroot}/ install_sci_static test -f target/*-unknown-linux-gnu/static/sci && \
%else make DESTDIR=%{buildroot}/ install_sci_static || \
make DESTDIR=%{buildroot}/ install_sci make DESTDIR=%{buildroot}/ install_sci
%endif
mkdir -p %{buildroot}/overlayroot mkdir -p %{buildroot}/overlayroot
mkdir -p %{buildroot}/usr/lib/flake-pilot mkdir -p %{buildroot}/usr/lib/flake-pilot

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:efc98871d396578e02ca38e44a1c68ef2d5173db2dc88c168f2ea84055640efe oid sha256:521541a36c648fa50e4df879cd0a03f72cf308aad71aa0ab9d1f18997818a217
size 19287792 size 19329341