File: ADP-0.3

package info (click to toggle)
apt-dater-host 1.0.1-6
  • links: PTS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 280 kB
  • sloc: perl: 1,202; sh: 151; makefile: 26
file content (185 lines) | stat: -rw-r--r-- 4,278 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
apt-dater protocol 0.6
======================

This file documents the protocol between apt-dater and the apt-dater-host
command called via ssh on remote hosts. The protocol is designed to be a
generic package management interface and cover most common GNU/Linux based
package manager philosophies.


Hosts managed by apt-dater musst have the apt-dater-host command in
the search path.

User interactive commands (see below) will be shown to the user
unfiltered. Non-user interactive commands are parse by apt-dater.

Non-user interactive sessions should start with the protocol version:

    ADPROTO: ${ProtoVersion}

The current protocol version is 0.3. Example:

    ADPROTO: 0.3


Calling syntax
==============

An apt-dater-host script must accept the following command parameters:


refresh
-------

Updates the package list (i.e. apt-get update) and retrieve status
informations (see next command). This command is called none user
interactive.


status
------

Prints status informations about installed distribution and packages.
This command is non user interactive.

There should be an LSB release line of the format:

    LSBREL: ${Distri}|{Version}|${Codename}

Example for Debian Etch:

    LSBREL: Debian|4.0|etch


There sould be an VIRTualization line of the format:

    VIRT: ${Name}

This will only work if the remote host has the imvirt script
installed. Detected virtualizations:

  Microsoft Corporation / Virtual Machine:
    VIRT: Virtual Machine

  VMware, Inc. / VMware Virtual Platform:
    VIRT: VMware Virtual Platform

  QEMU or KVM:
    VIRT: QEMU

  Xen:
    VIRT: Xen

  non detected:
    VIRT: Physical

  imvirt not installed:
    VIRT: Unknown


There sould be an UNAME line of the format:

    UNAME: ${KERNEL-NAME}|${MACHINE}

The values are taken from the uname command:

    KERNEL-NAME: uname -s
    MACHINE    : uname -m


There might be a FORBID line of the format:

    FORBID: ${Operations}

This is a mask of forbidded apt-dater-host operations.
An single operation is represented by the following values:

    1:	refresh
    2:	upgrade
    4:	install

These values are binary ORed. Default value is 0 if no
there is no FORBID line (allows all operations).

The apt-dater-host executable on the client will refused
operations marked as forbidden.


For each installed package there must be a status line:

    STATUS: ${Package}|${InstVersion}|${Status}...

    Supported status values:
	i		: installed
	h		: hold back
	u=${NewVersion}	: update available
	x		: extra (no version found in any repository, this
			  might be an obsoleted package)
	b=${AddInfo}	: package is installed but broken
			  (i.e. not configured)

Example for an installed package:

    STATUS: g++-4.1|4.1.1-21|i

Example for an installed package with an update available:

    STATUS: dnsutils|1:9.3.4-2etch1|u=1:9.3.4-2etch3

There should be a kernel info line (see also 'kernel' command).


upgrade
-------

Install all available upgrades, this is user interactive.


install
-------

Install package(s) given as parameters to this command. This command
is user interactive.


kernel
------

Retrieves informations about the running kernel. This command is non user
interactive.

The result line has the following format:

    KERNELINFO: ${Code} ${Release}

The following codes are supported:
    0 - The running kernel is the latest distri kernel. No reboot required.
    1 - The running kernel is an distri kernel but it's older then the latest
        installed. A reboot is recommended.
    2 - No distri kernel is running.
    9 - Unknown.

The release field should be the output of `uname -r`.


Example
=======

The following lines show an example output of the 'status' command for a
Debian Etch installation (the 'STATUS:' lines are truncated):

ADPROTO: 0.3
LSBREL: Debian|4.0|etch
VIRT: Physical
UNAME: Linux|i686
STATUS: groff-base|1.18.1.1-12|i
STATUS: libgnome2-0|2.16.0-2|i
STATUS: m4|1.4.8-2|i
STATUS: liblwres9|1:9.3.4-2etch1|u=1:9.3.4-2etch3
STATUS: linux-image-2.6-686|2.6.24+13|h
STATUS: apache2-mpm-prefork|2.2.3-4+etch4|i
STATUS: iceweasel-l10n-de|2.0.0.3+debian-1etch1|i
STATUS: mutt|1.5.17+20080114-1~bpo40+1|u=1.5.18-2~bpo40+1
STATUS: libperl5.8|5.8.8-7etch3|i
STATUS: autoconf|2.61-4|i
KERNELINFO: 2 2.6.18-028stab053.5-openvz