45 Commits

Author SHA256 Message Date
Ana Guerrero
68a59d43b2 Accepting request 1245362 from Virtualization:Appliances:Builder
- Bump version: 3.1.17 → 3.1.18

- Style fixes

- Fix error handling for container check methods
  The condition to setup permissions and redo the call
  was done when the exec of the call was not possible.
  But this is not the right place to check for a permission
  denied error. This commit fixes the evaluation of the
  error data

- Bump version: 3.1.16 → 3.1.17

- Don't use perform for bool status methods
  The perform() call checks the status code and raises an
  ExecutionError. This does not allow us to return a
  false boolean. Use output() call instead

- Bump version: 3.1.15 → 3.1.16

- No error return for bool method

- Bump version: 3.1.14 → 3.1.15

- Fix call for podman_setup_permissions
  Make sure podman_setup_permissions is only called if there
  is a permission problem detected.

OBS-URL: https://build.opensuse.org/request/show/1245362
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/flake-pilot?expand=0&rev=10
2025-02-12 20:38:26 +00:00
dc32226a2c - Bump version: 3.1.17 → 3.1.18
- Style fixes

- Fix error handling for container check methods
  The condition to setup permissions and redo the call
  was done when the exec of the call was not possible.
  But this is not the right place to check for a permission
  denied error. This commit fixes the evaluation of the
  error data

- Bump version: 3.1.16 → 3.1.17

- Don't use perform for bool status methods
  The perform() call checks the status code and raises an
  ExecutionError. This does not allow us to return a
  false boolean. Use output() call instead

- Bump version: 3.1.15 → 3.1.16

- No error return for bool method

- Bump version: 3.1.14 → 3.1.15

- Fix call for podman_setup_permissions
  Make sure podman_setup_permissions is only called if there
  is a permission problem detected.

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=44
2025-02-11 20:46:04 +00:00
e8f198f535 - Bump version: 3.1.16 → 3.1.17
- Don't use perform for bool status methods
  The perform() call checks the status code and raises an
  ExecutionError. This does not allow us to return a
  false boolean. Use output() call instead

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=43
2025-02-11 18:18:14 +00:00
5544fe4bbd - Bump version: 3.1.15 → 3.1.16
- No error return for bool method

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=42
2025-02-11 17:39:00 +00:00
b0d5b923e3 - Bump version: 3.1.14 → 3.1.15
- Fix call for podman_setup_permissions
  Make sure podman_setup_permissions is only called if there
  is a permission problem detected.

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=41
2025-02-11 17:06:13 +00:00
Dominique Leuenberger
1b69298382 Accepting request 1244418 from Virtualization:Appliances:Builder
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1244418
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/flake-pilot?expand=0&rev=9
2025-02-09 19:06:51 +00:00
7f10286c0a - Bump version: 3.1.13 → 3.1.14
- Use actions/upload-artifact: v4

- Make clippy happy

- Fix building runtime arguments
  Use get_run_cmdline method everywhere

- Fix container cleanup
  A flake configured to be attached can also be re-started
  using the same container storage. However, the container
  was always removed when the command exited. This commit
  fixes it to avoid removing the container of attach type
  flakes. In addition a flake option %remove was added to
  allow removing the container created for resume and attach
  type flakes

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=39
2025-02-01 22:02:56 +00:00
Ana Guerrero
78a00d73fa Accepting request 1233259 from Virtualization:Appliances:Builder
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1233259
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/flake-pilot?expand=0&rev=8
2024-12-26 11:23:40 +00:00
f0be430f1f - Bump version: 3.1.12 → 3.1.13
- Allow env placeholders for the podman pilot
  The podman runtime arguments allows to set environment
  variable placeholders starting with '%' and followed by
  the name of the environment variable. For example %HOME
  will be replaced to the value of $HOME of the calling user.
  If the given placeholder cannot be translated into an
  existing environment variable it will be turned into the
  variable name, $HOME in the above example.

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=37
2024-12-17 13:46:54 +00:00
9c88d64f23 - Bump version: 3.1.11 → 3.1.12
- Automatically detect terminal mode

- Drop superfluous comment

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=36
2024-12-16 13:40:51 +00:00
99a9382f06 - Bump version: 3.1.10 → 3.1.11
- Update system files provisioning
  Expect systemfiles to be a callable that produces the
  list of host files to sync

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=35
2024-12-16 11:38:40 +00:00
1a20063e22 - Bump version: 3.1.9 → 3.1.10
- Include systemfiles.libs for host provisioning
  Only use copy-links for the files mentioned in
  systemfiles.libs. The other systemfiles are synced in the
  usual way.

- Make sure interactive processes can run

- Fixed podman call dead lock
  When calling the flake and stdout/stderr gets redirected into
  a pipe like `flake | grep ... | cut ...` the pilot binary runs
  in a dead lock because there is no reader/writer to feed the
  pipe from the child process (podman) executed via the pilot.
  This commit fixes it by making sure all data from the child
  gets read first and then passed along to stdout/stderr of the
  caller.

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=34
2024-12-13 09:47:47 +00:00
f973364b26 - Bump version: 3.1.8 → 3.1.9
- Copy symlinks for host dependencies
  For provisioning of host dependencies copy symlinks such
  that they appear under their name as a file and not as a
  symlink. We use this logic for the host dependency sync
  only to be less strict on versioned library syncing

- Clippy fix
  elide the lifetimes for User instances

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=33
2024-12-12 10:02:23 +00:00
Ana Guerrero
2d91ccc875 Accepting request 1230121 from Virtualization:Appliances:Builder
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1230121
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/flake-pilot?expand=0&rev=7
2024-12-11 20:05:06 +00:00
57307bbcfb - Bump version: 3.1.7 → 3.1.8
- Fixed the runroot permission fixup
  podman differentiates the runroot between root and rootless
  calls. If you initially call a flake as a user the initial
  podman database gets setup as rootless variant which also
  allows root based workloads without permission issues.
  However, if you do it the other way round the runroot is
  setup for root only which prevents the flake to be called
  as normal user. To handle this permission issues we have
  fix methods in the flake common code to change the
  permissions according to the calling user via sudo. The
  code to handle permissions for the runroot target has to
  apply for all users as we can't predict if the storage
  will be setup initially as rootless or for root only

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=31
2024-12-04 13:17:37 +00:00
8fd8813058 - Bump version: 3.1.6 → 3.1.7
- Follow symlinks for mkdir

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=30
2024-11-29 11:14:14 +00:00
5d11b5c336 - Bump version: 3.1.5 → 3.1.6
- Add support for systemfiles provisioning
  If the base container comes with a systemfiles metadata file
  it will be used to transfer all the data mentioned in the file
  from the host to the instance. In contrast to the removed files
  the systemfiles sync will not continue when failed and this
  can only be overwritten via the %ignore_sync_error flake option

- Doc clarification
  Using the term "container name" can be confusing and interpreted as simply
  the name of the container itself. What we really need to make registration
  work is the path of the container in the local registry. Clarify the
  documentation by adding a not ethat points out this potential pitfall.

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=29
2024-11-28 10:57:20 +00:00
c7f8d2733f - Bump version: 3.1.4 → 3.1.5
- Add provision of systemfiles

- Fix initialization of CID dir
  chmod to the wrong path

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=28
2024-11-27 21:22:45 +00:00
4b59a8b3b7 - Bump version: 3.1.3 → 3.1.4
- Handle incomplete container path
  If the given oci path does not match a file, the value is treated
  as a glob pattern. From the possible match of the pattern the
  last match will be used as the file to load. This Fixes #51

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=27
2024-11-26 15:05:53 +00:00
ef40cfa3f5 - Bump version: 3.1.2 → 3.1.3
- Handle the removal of containers in the pilot

- Fix cleanup
  Only modify permissions of the run state for the calling user.
  Make sure to remove non resume/attach type app containers after
  the call

- suppress podman exists output

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=26
2024-11-24 13:33:45 +00:00
bc2d74e5ec - Bump version: 3.1.1 → 3.1.2
- Fix spec file
  Do not create /usr/share/flakes as part of the
  package. Let the tooling create the directory
  if not present

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=25
2024-11-23 21:37:36 +00:00
194b250fd4 - Bump version: 3.1.0 → 3.1.1
- Provide error message for unknown command
  If the target_app_path is set to / this means the
  container configured entry point is called. Such a
  setup cannot be used as resume flake because we
  don't know the entry point command to exec

- Update flake-ctl-podman-register man page

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=24
2024-11-23 21:25:04 +00:00
5892d18e9f - Bump version: 3.0.15 → 3.1.0
- Use custom registry for the podman pilot
  Use podman in a way that it references a custom registry
  only for the flakes and independent of any other registry
  setup on the system. This Fixes #48

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=23
2024-11-23 17:38:14 +00:00
Ana Guerrero
114733956d Accepting request 1223706 from Virtualization:Appliances:Builder
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1223706
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/flake-pilot?expand=0&rev=6
2024-11-12 18:24:16 +00:00
97c9e2d82a - Bump version: 3.0.14 → 3.0.15
- Fix vendoring
  Use cargo-vendor-filterer crate

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=21
2024-11-05 13:46:08 +00:00
820fe5685d OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=20 2024-11-05 13:37:19 +00:00
9140c8937c - Bump version: 3.0.13 → 3.0.14
- Fixed code still not using flakes config file

- Allow to mount podman storage in rootless mode
  Temporary gain root permissions via sudo for mounting
  and modifying instance storage. This allows for provisioning
  transparent containers also for non root users but still
  requires sudo to be configured properly.

- Make sure flake-ctl also reads /etc/flakes.yml
  The system wide configuration file was not read by flake-ctl
  only by the pilots. This commit fixes it

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=19
2024-11-05 10:17:42 +00:00
Ana Guerrero
291111fe9e Accepting request 1181265 from Virtualization:Appliances:Builder
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1181265
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/flake-pilot?expand=0&rev=5
2024-06-17 17:33:33 +00:00
f8fca86318 - Make clippy happy
assigning the result of `ToOwned::to_owned()` may be inefficient

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=17
2024-06-10 08:47:56 +00:00
Ana Guerrero
2788cb298b Accepting request 1179039 from Virtualization:Appliances:Builder
- Bump version: 3.0.12 → 3.0.13

- Rebuild with rustls fix
  The crate index was updated and the vendor source seems to have
  fixed the rustls security issue. This fixes bsc#1223217

OBS-URL: https://build.opensuse.org/request/show/1179039
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/flake-pilot?expand=0&rev=4
2024-06-07 13:03:33 +00:00
1d8b394fc7 - Bump version: 3.0.12 → 3.0.13
- Rebuild with rustls fix
  The crate index was updated and the vendor source seems to have
  fixed the rustls security issue. This fixes bsc#1223217

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=15
2024-06-06 15:03:19 +00:00
Ana Guerrero
74d69ba927 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
2024-04-11 17:41:36 +00:00
c1badaa776 - Turn terminal flag setup into function
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=13
2024-04-10 10:55:55 +00:00
6f22100a69 - 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

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=12
2024-04-10 07:55:48 +00:00
a2ab376241 - 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.
  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
2024-04-08 11:03:01 +00:00
Ana Guerrero
9edac9ec5f Accepting request 1164042 from Virtualization:Appliances:Builder
- Bump version: 3.0.9 → 3.0.10

- Clippy fixes

- sudo is required

- Fix error handling
  Make sure the real command that is called through sudo is
  displayed. Also fix that the runas information is really used

- Exit on remove if there is an error
  The remove sequence when used with --container or --vm deregisters
  all apps associated with the container or VM first. If there is
  an error on this deregistration, exit early and do not try to
  delete the container/vm

- Update URL in spec file
  Point to OSInside Organisation

OBS-URL: https://build.opensuse.org/request/show/1164042
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/flake-pilot?expand=0&rev=2
2024-04-02 14:43:51 +00:00
92808c383a - Bump version: 3.0.9 → 3.0.10
- Clippy fixes

- sudo is required

- Fix error handling
  Make sure the real command that is called through sudo is
  displayed. Also fix that the runas information is really used

- Exit on remove if there is an error
  The remove sequence when used with --container or --vm deregisters
  all apps associated with the container or VM first. If there is
  an error on this deregistration, exit early and do not try to
  delete the container/vm

- Update URL in spec file
  Point to OSInside Organisation

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=9
2024-03-27 13:13:15 +00:00
Ana Guerrero
634af0dc17 Accepting request 1161365 from Virtualization:Appliances:Builder
flake-pilot - Semi Transparent Container/VM instances

I'd like to add this little rust based utility to the SUSE
distribution as an addition to the container and VM stack. For
more details and a quick start please take a look into the
documentation at:

https://github.com/OSInside/flake-pilot?tab=readme-ov-file#flake-pilot

OBS-URL: https://build.opensuse.org/request/show/1161365
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/flake-pilot?expand=0&rev=1
2024-03-25 20:12:33 +00:00
7d4240b30b - Bump version: 3.0.8 → 3.0.9
- Fix spec file
  Several changes according to the SUSE regulations

- Fix robot tests

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=7
2024-03-25 10:59:50 +00:00
4b7a008748 - Add missing %changelog line in spec
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=6
2024-03-25 09:41:01 +00:00
4fe4e714f2 - Allow non static sci
Build sci non static for ppc64le which doesn't support
  the rust static target yet

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=5
2024-03-25 09:27:57 +00:00
f67ae2667d OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=4 2024-03-25 09:00:01 +00:00
aa5c87a102 - Drop upx binary compression
Startup time seems more important than binary size on
  target. The original reason for the compression was due
  to very limited size constraints from a former customer
  who no longer sticks to them.

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=3
2024-03-25 08:52:32 +00:00
45cdd6e28e - Drop obsolete gcc static fix
- Break long commandline for better readability

- Update documentation
  Added a delta container example registration

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=2
2024-03-25 08:35:02 +00:00
0e5c7ada62 osc copypac from project:home:marcus.schaefer:EOS package:flake-pilot revision:13
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/flake-pilot?expand=0&rev=1
2024-03-25 08:21:03 +00:00