[systemd-commits] 4 commits - Makefile.am shell-completion/zsh

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Sat May 16 09:04:56 PDT 2015


 Makefile.am                           |    1 
 shell-completion/zsh/_machinectl      |   84 ++++++++++++++++++++++++++++------
 shell-completion/zsh/_systemd-analyze |    2 
 shell-completion/zsh/_systemd-nspawn  |   22 +++++---
 4 files changed, 84 insertions(+), 25 deletions(-)

New commits:
commit 0dfb89d3c29163e17d081ac10237aa55d2a95d85
Author: Cristian Rodríguez <crrodriguez at opensuse.org>
Date:   Sat May 16 12:58:15 2015 -0300

    buildsys: Remove X_SERVER from AM_CPPFLAGS
    
    It is a leftover from multi-seat-x wrapper which is long
    gone.

diff --git a/Makefile.am b/Makefile.am
index 211ce6a..4639b2f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -203,7 +203,6 @@ AM_CPPFLAGS = \
 	-DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
 	-DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
 	-DSYSTEMD_LANGUAGE_FALLBACK_MAP=\"$(pkgdatadir)/language-fallback-map\" \
-	-DX_SERVER=\"$(bindir)/X\" \
 	-DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
 	-DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
 	-DQUOTACHECK=\"$(QUOTACHECK)\" \

commit 6b85708cfd371f40ed95462cd8787ee0673ad36d
Author: Lukas Rusak <lorusak at gmail.com>
Date:   Wed Apr 22 11:07:39 2015 -0700

    zsh-completion: add missing completions for systemd-nspawn

diff --git a/shell-completion/zsh/_systemd-nspawn b/shell-completion/zsh/_systemd-nspawn
index ceedb2c..08f5696 100644
--- a/shell-completion/zsh/_systemd-nspawn
+++ b/shell-completion/zsh/_systemd-nspawn
@@ -11,34 +11,38 @@ _nspawn-caps(){
 }
 
 _arguments \
-    {-h,--help}'[Show this help]' \
+    {-h,--help}'[Show this help.]' \
+    '--version[Print a short version string and exit.]' \
+    {--quiet,-q}'[Turns off any status output by the tool itself.]' \
     {--directory=,-D+}'[Directory to use as file system root for the namespace container. If omitted the current directory will be used.]:directories:_directories' \
+    '--template=[Initialize root directory from template directory, if missing.]:template:_directories' \
+    {--ephemeral,-x}'[Run container with snapshot of root directory, and remove it after exit.]' \
     {--image=,-i+}'[Disk image to mount the root directory for the container from.]' \
     {--boot=,-b+}'[Automatically search for an init binary and invoke it instead of a shell or a user supplied program.]' \
     {--user=,-u+}'[Run the command under specified user, create home directory and cd into it.]' \
     {--machine=,-M+}'[Sets the machine name for this container.]' \
     '--uuid=[Set the specified uuid for the container.]' \
-    '--slice=[Make the container part of the specified slice, instead of the default machine.slice.]' \
-    '--private-network[Turn off networking in the container. This makes all network interfaces unavailable in the container, with the exception of the loopback device.]' \
+    {--slice=,-S+}'[Make the container part of the specified slice, instead of the default machine.slice.]' \
     '--private-network[Disconnect networking of the container from the host.]' \
     '--network-interface=[Assign the specified network interface to the container.]' \
     '--network-macvlan=[Create a "macvlan" interface of the specified Ethernet network interface and add it to the container.]' \
-    '--network-veth[Create a virtual Ethernet link (veth) between host and container.]' \
+    '--network-ipvlan=[Create a ipvlan network interface based on an existing network interface to the container.]' \
+    {--network-veth,-n}'[Create a virtual Ethernet link (veth) between host and container.]' \
     '--network-bridge=[Adds the host side of the Ethernet link created with --network-veth to the specified bridge.]' \
+    {--port=,-p+}'[Expose a container IP port on the host.]' \
     {--selinux-context=,-Z+}'[Sets the SELinux security context to be used to label processes in the container.]' \
     {--selinux-apifs-context=,-L+}'[Sets the SELinux security context to be used to label files in the virtual API file systems in the container.]' \
     '--capability=[List one or more additional capabilities to grant the container.]:capabilities:_nspawn-caps' \
-    '--drop-capability=[Specify one or more additional capabilities to drop for the container]' \
-    "--link-journal=[Control whether the container's journal shall be made visible to the host system.]:options:(no, host, guest, auto)" \
+    '--drop-capability=[Specify one or more additional capabilities to drop for the containerm]:capabilities:_nspawn-caps' \
+    "--link-journal=[Control whether the container's journal shall be made visible to the host system.]:options:(no host guest auto)" \
     '-j[Equivalent to --link-journal=guest.]' \
     '--read-only[Mount the root file system read only for the container.]' \
     '--bind=[Bind mount a file or directory from the host into the container.]' \
     '--bind-ro=[Bind mount a file or directory from the host into the container (read-only).]' \
+    '--tmpfs=[Mount an empty tmpfs to the specified directory.]' \
     '--setenv=[Specifies an environment variable assignment to pass to the init process in the container, in the format "NAME=VALUE".]' \
     '--share-system[Allows the container to share certain system facilities with the host.]' \
     '--register=[Controls whether the container is registered with systemd-machined(8).]' \
     '--keep-unit[Instead of creating a transient scope unit to run the container in, simply register the service or scope unit systemd-nspawn has been invoked in with systemd-machined(8).]' \
     '--personality=[Control the architecture ("personality") reported by uname(2) in the container.]' \
-    {--quiet,-q}'[Turns off any status output by the tool itself.]' \
-    {--help,-h}'[Print a short help text and exit.]' \
-    '--version[Print a short version string and exit.]'
+    '--volatile=[Run the system in volatile mode.]:volatile:(no yes state)'

commit b93f15cd056ca71b7e0aa0560992da345e87f974
Author: Lukas Rusak <lorusak at gmail.com>
Date:   Wed Apr 22 11:07:38 2015 -0700

    zsh-completion: update -M completion for systemd-analyze

diff --git a/shell-completion/zsh/_systemd-analyze b/shell-completion/zsh/_systemd-analyze
index 2c0e543..efafddc 100644
--- a/shell-completion/zsh/_systemd-analyze
+++ b/shell-completion/zsh/_systemd-analyze
@@ -54,5 +54,5 @@ _arguments \
     '--from-pattern=[When generating a dependency graph, filter only origins]:GLOB' \
     '--to-pattern=[When generating a dependency graph, filter only destinations]:GLOB' \
     {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \
-    {-M+,--machine=}'[Operate on local container]:machine' \
+    {-M+,--machine=}'[Operate on local container]:machine:_sd_machines' \
     '*::systemd-analyze commands:_systemd_analyze_command'

commit b3b9282d0c79b108ed87abff5de6891617fe0602
Author: Lukas Rusak <lorusak at gmail.com>
Date:   Wed Apr 22 15:52:59 2015 -0700

    zsh-completion: add missing completions for machinectl
    
    Appologies, I'm still getting used to this mailing list thing and using git send-email

diff --git a/shell-completion/zsh/_machinectl b/shell-completion/zsh/_machinectl
index c666b7e..7898d7c 100644
--- a/shell-completion/zsh/_machinectl
+++ b/shell-completion/zsh/_machinectl
@@ -1,5 +1,20 @@
 #compdef machinectl
 
+__get_available_machines () {
+    machinectl --no-legend list-images | {while read -r a b; do echo $a; done;}
+}
+
+_available_machines() {
+    local -a _machines
+    _machines=("${(fo)$(__get_available_machines)}")
+    typeset -U _machines
+    if [[ -n "$_machines" ]]; then
+        _describe 'machines' _machines
+    else
+        _message 'no machines'
+    fi
+}
+
 (( $+functions[_machinectl_command] )) || _machinectl_command()
 {
   local -a _machinectl_cmds
@@ -7,23 +22,55 @@
     "list:List currently running VMs/containers"
     "status:Show VM/container status"
     "show:Show properties of one or more VMs/containers"
+    "start:Start container as a service"
     "login:Get a login prompt on a VM/container"
+    "enable:Enable automatic container start at boot"
+    "disable:Disable automatic container start at boot"
     "poweroff:Power off one or more VMs/containers"
     "reboot:Reboot one or more VMs/containers"
     "terminate:Terminate one or more VMs/containers"
     "kill:Send signal to process or a VM/container"
+    "copy-to:Copy files from the host to a container"
+    "copy-from:Copy files from a container to the host"
+    "bind:Bind mount a path from the host into a container"
+
+    "list-images:Show available container and VM images"
+    "image-status:Show image details"
+    "show-image:Show properties of image"
+    "clone:Clone an image"
+    "rename:Rename an image"
+    "read-only:Mark or unmark image read-only"
+    "remove:Remove an image"
+
+    "pull-tar:Download a TAR container image"
+    "pull-raw:Download a RAW container or VM image"
+    "pull-dkr:Download a DKR container image"
+    "list-transfers:Show list of downloads in progress"
+    "cancel-transfer:Cancel a download"
   )
+
   if (( CURRENT == 1 )); then
     _describe -t commands 'machinectl command' _machinectl_cmds || compadd "$@"
   else
     local curcontext="$curcontext"
     cmd="${${_machinectl_cmds[(r)$words[1]:*]%%:*}}"
     if (( $#cmd )); then
-      case $cmd in
-        list) msg="no options" ;;
-        *)
-          _sd_machines
-      esac
+      if (( CURRENT == 2 )); then
+        case $cmd in
+          list*|cancel-transfer|pull-tar|pull-raw|pull-dkr)
+            msg="no options" ;;
+          start)
+            _available_machines ;;
+          *)
+            _sd_machines
+        esac
+      else
+        case $cmd in
+          copy-to|copy-from|bind)
+            _files ;;
+          *) msg="no options"
+        esac
+      fi
     else
       _message "no more options"
     fi
@@ -33,13 +80,22 @@
 _arguments \
   {-h,--help}'[Prints a short help text and exits.]' \
   '--version[Prints a short version string and exits.]' \
-  \*{-p+,--property=}'[Limit output to specified property.]:property:(Name Id Timestamp TimestampMonotonic Service Scope Leader Class State RootDirectory)' \
-  {-a,--all}'[Show all proerties]' \
-  (-l,--full)'[Do not ellipsize cgroup members]' \
-  '--no-pager[Do not pipe output into a pager]' \
-  '--no-ask-password[Do not ask for system passwords]' \
-  '--kill-who=[Who to send signal to]:killwho:(leader all)' \
-  {-s+,--signal=}'[Which signal to send]:signal:_signals' \
-  {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \
-  {-P,--privileged}'[Acquire privileges before execution]' \
+  '--no-pager[Do not pipe output into a pager.]' \
+  '--no-legend[Do not show the headers and footers.]' \
+  '--no-ask-password[Do not ask for system passwords.]' \
+  {-H+,--host=}'[Operate on remote host.]:userathost:_sd_hosts_or_user_at_host' \
+  {-M+,--machine=}'[Operate on local container.]:machine:_sd_machines' \
+  {-p+,--property=}'[Limit output to specified property.]:property:(Name Id Timestamp TimestampMonotonic Service Scope Leader Class State RootDirectory)' \
+  {-a,--all}'[Show all proerties.]' \
+  {-q,--quiet}'[Suppress output.]' \
+  {-l,--full}'[Do not ellipsize cgroup members.]' \
+  '--kill-who=[Who to send signal to.]:killwho:(leader all)' \
+  {-s+,--signal=}'[Which signal to send.]:signal:_signals' \
+  '--read-only[Create read-only bind mount.]' \
+  '--mkdir[Create directory before bind mounting, if missing.]' \
+  {-n+,--lines=}'[Number of journal entries to show.]:integer' \
+  {-o+,--output=}'[Change journal output mode.]:output modes:_sd_outputmodes' \
+  '--verify=[Verification mode for downloaded images.]:verify:(no checksum signature)' \
+  '--force[Download image even if already exists.]' \
+  '--dkr-index-url=[Specify the index URL to use for DKR image downloads.]' \
   '*::machinectl command:_machinectl_command'



More information about the systemd-commits mailing list