Code Monkey home page Code Monkey logo

vanilla-system-operator's Issues

VSO tasks not running on boot

Issue Description

image

The above task was created to automatically start syncthing, installed via apx, on boot. However, it never gets started.

Steps to Reproduce

$ apx install syncthing
$ vso create-task -n "Syncthing" -d "start syncthing on boot" --on-boot -c "apx run syncthing"
$ reboot

after boot:

$ pgrep syncthing

On what version of Vanilla OS this happens?

22.10

Additional Information

No response

bug: `vso android info` command fails with index out of range runtime error

Log.

kbdharun@apx-vso-pico:~$ vso android info
Downloading index for repository FDroid
Downloading index for repository izzyondroid
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/vanilla-os/vanilla-system-operator/cmd.wayInfo(0xc000133d00?, {0xe49740, 0x0, 0x0})
	/__w/vanilla-system-operator/vanilla-system-operator/cmd/waydroid.go:222 +0x1bf
github.com/spf13/cobra.(*Command).execute(0xc000376000, {0xe49740, 0x0, 0x0})
	/__w/vanilla-system-operator/vanilla-system-operator/vendor/github.com/spf13/cobra/command.go:983 +0xabc
github.com/spf13/cobra.(*Command).ExecuteC(0xc000004300)
	/__w/vanilla-system-operator/vanilla-system-operator/vendor/github.com/spf13/cobra/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
	/__w/vanilla-system-operator/vanilla-system-operator/vendor/github.com/spf13/cobra/command.go:1039
github.com/vanilla-os/orchid/cmdr.(*App).Run(0xc000004300?)
	/__w/vanilla-system-operator/vanilla-system-operator/vendor/github.com/vanilla-os/orchid/cmdr/app.go:108 +0x6d
main.main()
	/__w/vanilla-system-operator/vanilla-system-operator/main.go:62 +0x753

Manage device permissions

Programs that require full device access like adb are unable to work correctly because of missing permissions. It would make running some applications unreasonably difficult.

See here for a possible solution:
89luca89/distrobox#762 (comment)

Another (easier) solution would be using a rootful distrobox container, though that would have other downsides.

Add an Update Indicator

Many users reboot while an update is currently happening, we should make an indicator which shows them that an update is going on.

Waydroid support

This issue is here as a placeholder. We are discussing this in other development channels.

VSO Doesn't Accept Command Args

VSO won't run commands with additional command arguments, i.e. vso run htop -h. It instead prompts you with the "correct" way to use VSO.

Apx commands should run through the host shell instead of the vso container

In many scenarios in particular workflows it will be better to keep containers independent which was the case in vso v1.
In my testing vso 2.0 seems to break some of this workflow let me explain with an example

  • You are using tmux which gets automatically invoked in your default vso container.
  • Now you create more apx containers
  • tmux gets called in those containers as well as you are auto invoking a tmux session
  • So what happens is you invoke a tmux session inside a tmux session which ends up being a loop

This was not the case in in the alpha releases. As all the apx containers were invoked through the host shell.. so containers ran independent of each other despite having same config. Which in my opinion should be the better way otherwise this might conflict with many workflows.

A good thing that can be done is that what apx command inside a vso container does is -> call the host-shell -> which will then invoke the apx container you are trying to enter and exits out of the vso container.

Example -

if you are in a vso-container -> apx enter devbox -> calls the host-shell to invoke the apx enter devbox command and exits the vso container -> devbox container is called from the host-shell which then runs as intended.

I can always do this myself in my configs to check if its an apx container then dont invoke tmux and other things, however this can be considered.

I hope i was able to explain the niche !

Smart Update

If this feature is turned On, the update will be postponed when the resource usage is too high.

Checks:

  • connection usage
  • memory usage
  • cpu usage
  • disk usage
  • battery level

acpi battery checks don't account for multiple batteries

my Surface Laptop 3 reports two batteries, one of which is probably a bug, but the other is valid and fully charged.

vso's acpi check doesn't account for multiple batteries, which are common in surface devices, and other laptops.

Battery 0: Discharging, 0%, rate information unavailable
Battery 1: Full, 100%
root@vanilla:/etc/vso# 

go.mod and repo name dont match

The go.mod defines the project as github.com/vanilla-os/vso, but the repo is under github.com/vanilla-os/vanilla-system-operator.

Trying to go get this repository as vanilla-os/vso fails because that repository doesn't exist, and using vanilla-os/vanilla-system-operator returns an error since the user "wanted" vanilla-system-operator but go.mod returned vso.

VSO Always Exits With "exit status 1"

This happens both when you run a binary, i.e. vso run git, and when you exit vso shell. The exact error is:

Error: exit status 1
Usage:
  vso shell [flags]
  
Flags:
  -h, --help   help for shell
  
  ERROR exit status 1

Update the vso container alongside with host

With VSO being the main shell in Vanilla OS 2 Orchid, the utility must be able to upgrade the vso container alongside with the host, perhaps following the smart update logic.

bug: `vso android launcher` says Waydroid not initialized even when it is initialized

Log

kbdharun@apx-vso-pico:~$ vso android init
Config loaded from /etc/vso/config.json
Trying to pull ghcr.io/vanilla-os/waydroid:main...
Getting image source signatures
Copying blob 4f4fb700ef54 done  
Copying blob 12139c1b9ec5 done  
Copying blob 4f4fb700ef54 done  
Copying blob 48c19c37ed9e done  
Copying blob 1da2c33c2e6c done  
Copying blob 5c7c5f8610fb done  
Copying blob fe198750a2bb done  
Copying blob 5d32925ff897 done  
Copying blob 7aa922ba585e done  
Copying blob 3e3c9348720c done  
Copying config 16f14858f8 done  
Writing manifest to image destination
Storing signatures
16f14858f8e5f21bdc9cba08fca6c5627a23891378ca8e63f4234ae152a336b3
Creating 'apx-vso-waydroid' using image ghcr.io/vanilla-os/waydroid:main	 [ OK ]
Distrobox 'apx-vso-waydroid' successfully created.
To enter, run:

distrobox enter --root apx-vso-waydroid

Starting container...                   	 [ OK ]
Installing basic packages...            	 [ OK ]
Setting up devpts mounts...             	 [ OK ]
Setting up read-only mounts...          	 [ OK ]
Setting up read-write mounts...         	 [ OK ]
Setting up host's sockets integration...	 [ OK ]
Integrating host's themes, icons, fonts...	 [ OK ]
Setting up distrobox profile...         	 [ OK ]
Setting up sudo...                      	 [ OK ]
Setting up groups...                    	 [ OK ]
Setting up users...                     	 [ OK ]
Setting up skel...                      	 [ OK ]
Setting up init system...               	 [ OK ]
Firing up init system...                	 [ OK ]
Checking if Waydroid was initialized...
1.4.2
 SUCCESS  The waydroid subsystem has been initialized.


kbdharun@apx-vso-pico:~$ vso android launcher
Config loaded from /etc/vso/config.json
Checking if Waydroid was initialized...
ERROR: WayDroid is not initialized, run "waydroid init"

Add gnome software updates

I propose the support for checking system updates from the gnome software center for making the system more centered and easy to use like fedora

VSO Update removes ABroot

When performing an Update via sudo vso trigger-update --now it runs the apt update, apt upgrade routine and asks for the reboot to make the transaction.

After rebooting the abroot command is missing. VSO becomes version 1.2.0 (if i remember correctly)
Console gives and error: Unknown command: abroot

Triggering an update again via VSO leads to:

Triggering update now...
Smart update is disabled, skipping check.
An error occurred while trying to update the system.
    Please try again later and report the issue if it persists.

    ERR_CODE: %s CMD_TR_UP_NOW
Error: exec: "abroot": executable file not found in $PATH

VSO -v: 1.1.4
ABroot -v: 1.2.2

Add translations

  • populate en.yml with the apx.Trans(..) strings in the cmd package
  • add to weblate

"It is impossible to reach the VSO shell" after exiting

Sometimes, after exiting the vso shell, it complains that it is not reachable and suggest deleting the container.

This happens whenever the shell exits with a non zero error code. This could happen for example when pressing Ctrl+D after a failed command.

To replicate

  • vso shell
  • exit 1

Waydroid/binder module not working

Issue Description

I can't use Waydroid at all, setup fails complaining /dev/binderfs/binder-control doesn't exist.

Steps to Reproduce

As far as I can tell, it is caused by using Orchid with IBT enabled (11th gen intel or newer)

On what version of Vanilla OS this happens?

Unreleased

Additional Information

Attempting to mount /dev/binderfs mount crashes with a segfault, dmesg shows a missing endbr instruction. This is a security feature being triggered caused by the binder module not being compiled with the right options, see https://lwn.net/Articles/889475/

At a glance, it would appear the module should be compiled with -fcf-protection=branch, but i'm not sure how that needs to happen, nor if it's anbox's issue or an issue with dkms.

Bug: Export, Unexport errors and options not implemented in `pico.go`

While I was working on updating the strings, I noticed that there are strings to display errors when exporting or unexporting binaries and applications. But, it doesn't seem to be implemented in pico.go.

Reference (from Pico in en.yml)

error:
    exportingApp: "An error occurred while exporting the application: %s"
    exportingBin: "An error occurred while exporting the binary: %s"
    unexportingApp: "An error occurred while unexporting the application: %s"
    unexportingBin: "An error occurred while unexporting the binary: %s"

Hook error

When I try to install anything it gives error message:
E: Problem executing scripts DPkg::Post-Invoke '/usr/share/vso/hooks/apt-post'
E: Sub process returned an error code
Error: exit status 100
Usage: vso install [flags]
Flags: -h --help help for install

Propose to rollback after boot

When the user choose the other root partition on boot, propose the rollback via GUI.
VSO has not a GUI but this is the project which best suits the feature.

To do so, use abroot rollback --check-only, it will return 0 if it is possible to rollback, then 1 if not.

vso ignores smart config

with smart updates turned off, vso trigger-update --now still refuses to update because checks failed.

root@vanilla:/etc/vso# cat config.json 
{
  "updates": {
    "schedule": "weekly",
    "smart": false
  }
}root@vanilla:/etc/vso# acpi
Battery 0: Discharging, 0%, rate information unavailable
Battery 1: Full, 100%
root@vanilla:/etc/vso# vso trigger-update --now
Triggering update now...
Starting smart update check...
Low battery detected, skipping update.
Smart update detected device is being used, skipping update.
root@vanilla:/etc/vso# 

outdated error message

If you use vso export something, it will output --app-name or --bin must be specified..

This is not correct, since the flag should be --app, not --app-name

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.