diff --git a/man/apt-dater.8 b/man/apt-dater.8 index f64c6059..a6cd3e1d 100644 --- a/man/apt-dater.8 +++ b/man/apt-dater.8 @@ -39,7 +39,7 @@ This manual page documents briefly the command\&. .PP \fBapt\-dater\fR -is a program to manage package updats on a large number of remote hosts using SSH\&. +is a program to manage package updates on a large number of remote hosts using SSH\&. .SH "OPTIONS" .PP \fBapt\-dater\fR diff --git a/man/apt-dater.html b/man/apt-dater.html index a771b0af..6f9d61af 100644 --- a/man/apt-dater.html +++ b/man/apt-dater.html @@ -1,4 +1,4 @@ APT-DATER

Name

apt-dater — terminal-based remote package update manager

Synopsis

apt-dater [[-(c config|v|[n]r)]]

DESCRIPTION

This manual page documents briefly the - apt-dater command.

apt-dater is a program to manage package updats on a large + apt-dater command.

apt-dater is a program to manage package updates on a large number of remote hosts using SSH.

OPTIONS

apt-dater accepts the following command parameters:

-c config

Use alternative config file. Default is $XDG_CONFIG_HOME/apt-dater/apt-dater.xml.

-v

Show apt-dater version and copyright statement.

-r

Refresh hosts and create XML report on stdout. apt-dater must be compiled with XMLREPORT feature.

-n

Prevent hosts to be refreshed before create XML report (useful for cronjobs which do not have access to SSH key(s)).

ENVIRONMENT

MAINTAINER

The maintainer's name (i.e. used by debtrack). If not set, the GECOS entry for the current user will be used. This environment variable could be forwarded to remote hosts with the ssh(1) SendEnv+AcceptEnv options.

FILES

~/.config/apt-dater/apt-dater.xml

The configuration file of apt-dater

~/.config/apt-dater/hosts.xml

Contains all hosts you would like to manage

SEE ALSO

apt-dater.xml(5), apt-get(1), debtrack, ssh(1), XDG Base Directory Specification.

diff --git a/man/apt-dater.xml b/man/apt-dater.xml index 6b4a9645..0ddd7b3f 100644 --- a/man/apt-dater.xml +++ b/man/apt-dater.xml @@ -92,7 +92,7 @@ and docbook-xsl in your Build-Depends control field. This manual page documents briefly the &dhpackage; command. - &dhpackage; is a program to manage package updats on a large + &dhpackage; is a program to manage package updates on a large number of remote hosts using SSH. diff --git a/src/apt-dater.h b/src/apt-dater.h index 7eda3555..642ceb6f 100644 --- a/src/apt-dater.h +++ b/src/apt-dater.h @@ -143,6 +143,7 @@ typedef struct _update { gchar *version; gint flag; gchar *data; + gchar *security_update_version; } PkgNode; typedef struct _session { @@ -181,6 +182,7 @@ typedef enum { #ifdef FEAT_CLUSTERS #define HOST_STATUS_CLUSTERED 512 #endif +#define HOST_STATUS_PKGSECUPDATE 1024 #define HOST_FORBID_REFRESH 1 #define HOST_FORBID_UPGRADE 2 diff --git a/src/stats.c b/src/stats.c index 5d32027f..ce35cf6f 100644 --- a/src/stats.c +++ b/src/stats.c @@ -169,6 +169,8 @@ void freePkgNode(PkgNode *n) g_free(n->version); if(n->data) g_free(n->data); + if(n->security_update_version) + g_free(n->security_update_version); g_free(n); } } @@ -347,6 +349,19 @@ gboolean getUpdatesFromStat(HostNode *n) g_strfreev(argv); continue; } + + if(i > 3) { /* read SecurityUpdateVersion */ + switch(argv[3][0]) { + case 's': + pkgnode->security_update_version = g_strdup(&argv[3][2]); + n->status = n->status | HOST_STATUS_PKGSECUPDATE; + pkgnode->flag = pkgnode->flag | HOST_STATUS_PKGSECUPDATE; + break; + default: + /* unknow SecurityUpdateVersion content - ignore */ + g_warning("ignoring unknown SecurityUpdateVersion contents '%s'", argv[3]); + } + } g_strfreev(argv); n->packages = g_list_insert_sorted(n->packages, pkgnode, cmpPackages); diff --git a/src/ui.c b/src/ui.c index 23769390..379ddcd1 100644 --- a/src/ui.c +++ b/src/ui.c @@ -1469,6 +1469,14 @@ void drawHostEntry (DrawNode *n) } } +int snprintf_statusln(char* statusln, char* format, DrawNode *n) +{ + return snprintf(statusln, BUF_MAX_LEN, format, + ((PkgNode *) n->p)->version, + ((PkgNode *) n->p)->data ? ((PkgNode *) n->p)->data : "none", + ((PkgNode *) n->p)->security_update_version ? ((PkgNode *) n->p)->security_update_version : "none"); +} + void drawPackageEntry (DrawNode *n) { char statusln[BUF_MAX_LEN]; @@ -1476,7 +1484,9 @@ void drawPackageEntry (DrawNode *n) attron(n->attrs); mvremln(n->scrpos, 0, COLS); - if(((PkgNode *) n->p)->flag & HOST_STATUS_PKGUPDATE) + if(((PkgNode *) n->p)->flag & HOST_STATUS_PKGSECUPDATE) + mvaddstr(n->scrpos, 7, "s:"); + else if(((PkgNode *) n->p)->flag & HOST_STATUS_PKGUPDATE) mvaddstr(n->scrpos, 7, "u:"); else if(((PkgNode *) n->p)->flag & HOST_STATUS_PKGKEPTBACK) mvaddstr(n->scrpos, 7, "h:"); @@ -1491,13 +1501,13 @@ void drawPackageEntry (DrawNode *n) attroff(A_BOLD); attroff(n->attrs); if(n->selected == TRUE) { - if(((PkgNode *) n->p)->data) { + if((((PkgNode *) n->p)->data) || (((PkgNode *) n->p)->security_update_version)) { if (((PkgNode *) n->p)->flag & HOST_STATUS_PKGBROKEN) - snprintf(statusln, BUF_MAX_LEN, "%s (%s)", ((PkgNode *) n->p)->version, ((PkgNode *) n->p)->data); + snprintf_statusln(statusln, "%s (%s) (security: %s)", n); else - snprintf(statusln, BUF_MAX_LEN, "%s -> %s", ((PkgNode *) n->p)->version, ((PkgNode *) n->p)->data); + snprintf_statusln(statusln, "%s -> %s (security: %s)", n); } else - snprintf(statusln, BUF_MAX_LEN, "%s", ((PkgNode *) n->p)->version); + snprintf_statusln( statusln, "%s", n); drawMenu(VK_INSTALL); drawStatus(statusln, TRUE); }