Code Monkey home page Code Monkey logo

vanilla-system-operator's Introduction

Vanilla System Operator

Translation Status

VSO is a utility which allows you to perform maintenance tasks on your Vanilla OS installation.


Help

The Vanilla System Operator is a package manager, a system updater and a task automator.

Usage:
  vso [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  config      Manage the system configuration.
  export      Export an application or binary from the subsystem
  help        Help about any command
  install     Install an application inside the subsystem
  pico-init   Initialize the Pico subsystem, used for package management
  remove      Remove an application from the subsystem
  run         Run an application from the subsystem
  search      Search for an application to install inside the subsystem
  shell       Enter the subsystem environment
  sys-upgrade Upgrade the system
  tasks       Create and manage tasks
  unexport    Unexport an application or binary from the subsystem
  update      Update the subsystem's package repository
  upgrade     Upgrade the packages inside the subsystem

Flags:
  -h, --help      help for vso
  -v, --version   version for vso

Use "vso [command] --help" for more information about a command.

Documentation

The official documentation and manpage for vso are available at https://docs.vanillaos.org/docs/en/vso.

VSO as system Shell

To use VSO as your system shell, you can copy the usr/bin/vso-os-shell script to your system's /usr/bin directory and set it as your default shell. Your image needs to implement the usr/bin/os-shell script, which will expand the $SHELL environment variable, this is much needed for login shells and other flags, this also ensures that the user's default shell is respected.

Our vso-image already implements this script.

vanilla-system-operator's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vanilla-system-operator's Issues

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

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

"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

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"

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

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

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

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

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.

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.

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.

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.

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

Waydroid support

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

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

Add translations

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

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.

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# 

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"

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# 

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 !

bug: Installed application doesn't launch, desktop entry isn't exported during it's installation

#80 (comment)

kbdharun@apx-vso-pico:~/Downloads$ vso android install newpipe
1) PipePipe - A FLOSS Android app to let you browse YouTube, NicoNico and BiliBili freely. [FDroid]
2) NewPipe - Lightweight YouTube frontend [FDroid]
3) NewPipe Legacy - Lightweight YouTube frontend for OS versions 4.x [FDroid]
4) PipePipe - A FLOSS Android app to let you browse YouTube, NicoNico and BiliBili freely. [izzyondroid]
5) NewPipe preunified - NewPipe with the old UI [izzyondroid]

Pick an application to install (1): 2
Install application NewPipe? [Y/n]: y
 INFO  Downloading apk from https://f-droid.org/repo/org.schabi.newpipe
/usr/bin/ewaydroid: line 7: /home/kbdharun/.config/waydroid-props: No such file or directory
/usr/bin/ewaydroid: line 7: /home/kbdharun/.config/waydroid-props: No such file or directory
/usr/bin/ewaydroid: line 7: /home/kbdharun/.config/waydroid-props: No such file or directory
ERROR: WayDroid is not initialized, run "waydroid init"
ERROR: WayDroid is not initialized, run "waydroid init"
ERROR: WayDroid is not initialized, run "waydroid init"
ERROR: WayDroid is not initialized, run "waydroid init"
ERROR: WayDroid is not initialized, run "waydroid init"
ERROR: WayDroid is not initialized, run "waydroid init"
ERROR: WayDroid is not initialized, run "waydroid init"
 INFO  Installation successful

And

kbdharun@apx-vso-pico:~/Downloads$ vso android launch NewPipe
/usr/bin/ewaydroid: line 7: /home/kbdharun/.config/waydroid-props: No such file or directory
/usr/bin/ewaydroid: line 7: /home/kbdharun/.config/waydroid-props: No such file or directory
/usr/bin/ewaydroid: line 7: /home/kbdharun/.config/waydroid-props: No such file or directory
ERROR: WayDroid is not initialized, run "waydroid init"
ERROR: WayDroid is not initialized, run "waydroid init"
ERROR: WayDroid is not initialized, run "waydroid init"
ERROR: WayDroid is not initialized, run "waydroid init"
ERROR: WayDroid is not initialized, run "waydroid init"
ERROR: WayDroid is not initialized, run "waydroid init"
ERROR: WayDroid is not initialized, run "waydroid init"

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.