[yum-git] 4 commits - docs/Makefile docs/yum-filter-data.1 docs/yum-list-data.1 docs/yum-security.8 plugins/filter-data yum-utils.spec
James Antill
james at linux.duke.edu
Mon Feb 4 17:43:42 UTC 2008
docs/Makefile | 3
docs/yum-filter-data.1 | 108 ++++++++++++++++++++++++++++
docs/yum-list-data.1 | 138 +++++++++++++++++++++++++++++++++++++
docs/yum-security.8 | 4 -
plugins/filter-data/filter-data.py | 16 +++-
yum-utils.spec | 2
6 files changed, 264 insertions(+), 7 deletions(-)
New commits:
commit b133d6d937f81c07819784d3f2e6d6938f9b6054
Author: James Antill <james at and.org>
Date: Mon Feb 4 12:43:19 2008 -0500
Add yum-filter-data man page
diff --git a/docs/Makefile b/docs/Makefile
index 291ea5e..9de4a14 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -1,4 +1,4 @@
-DOCS = repoquery package-cleanup repo-rss yumdownloader yum-builddep yum-changelog reposync yum-complete-transaction yum-list-data
+DOCS = repoquery package-cleanup repo-rss yumdownloader yum-builddep yum-changelog reposync yum-complete-transaction yum-list-data yum-filter-data
DOCS5 = yum-changelog.conf
DOCS8 = yum-security
diff --git a/docs/yum-filter-data.1 b/docs/yum-filter-data.1
new file mode 100644
index 0000000..8173154
--- /dev/null
+++ b/docs/yum-filter-data.1
@@ -0,0 +1,108 @@
+.\" yum filter data plugin
+.TH "yum-filter-data" "1" "2008 Feb 4" "James Antill" ""
+.SH "NAME"
+yum filter data plugin
+.SH "SYNOPSIS"
+\fByum\fP [options] [command] [package ...]
+.SH "DESCRIPTION"
+.PP
+This plugin extends \fByum\fP with some options, currently just for "update"
+and "list update" type commands, to allow filters to be placed on which
+packages should be used based on the data in those packages. Note that due to
+some of the data being unknown, and thus could possibly match, all unknown data
+is treated as a match.
+.PP
+.SH "GENERAL OPTIONS"
+These are the options added to yum that are available in the "list updates",
+"info updates", "check-update" and "update" commands. They are:
+.PP
+.IP "\fB\--filter-vendors\fP"
+This option includes packages which have a vendor which matches one of the
+passed vendor wildcard strings, or is unknown. Note that vendors can have
+spaces in their value, so "," is the only way to specify multiple groups as one
+option argument.
+.IP "\fB\--filter-groups\fP"
+This option includes packages which have a group which matches one of the
+passed group wildcard strings, or is unknown. Note that groups can have
+spaces in their value, so "," is the only way to specify multiple groups as one
+option argument.
+.IP "\fB\--filter-packagers\fP"
+This option includes packages which have a packager which matches one of the
+passed packager wildcard strings, or is unknown. Note that vendors can have
+spaces in their value, so "," is the only way to specify multiple groups as one
+option argument.
+.IP "\fB\--filter-licenses\fP"
+This option includes packages which have a license which matches one of the
+passed license wildcard strings, or is unknown. Note that licenses can have
+spaces in their value, so "," is the only way to specify multiple groups as one
+option argument.
+.IP "\fB\--filter-arches\fP"
+This option includes packages which have a arch which matches one of the
+passed arch wildcard strings, or is unknown.
+.IP "\fB\--filter-committers\fP"
+This option includes packages which have a committer which matches one of the
+passed committer wildcard strings, or is unknown. Note that committers can have
+spaces in their value, so "," is the only way to specify multiple groups as one
+option argument. Also, committer values are so loosely formed that they could
+contain commas too, it is recommeneded to not do that but you can work around it
+by using "?".
+.IP "\fB\--filter-buildhosts\fP"
+This option includes packages which have a buildhost which matches one of the
+passed buildhost wildcard strings, or is unknown.
+.IP "\fB\--filter-urls\fP"
+This option includes packages which have a url which matches one of the
+passed url wildcard strings, or is unknown.
+.IP "\fB\--filter-package-sizes\fP"
+This option includes packages which have a packagesize which is within one of
+the passed packagesize ranges, or is unknown.
+.IP "\fB\--filter-archive-sizes\fP"
+This option includes packages which have a archivesize which is within one of
+the passed archivesize ranges, or is unknown.
+.IP "\fB\--filter-installed-sizes\fP"
+This option includes packages which have a installedsize which is within one of
+the passed installedsize ranges, or is unknown.
+.PP
+.PP
+
+.SH "EXAMPLES"
+.PP
+To list all updates that are 1 MB or less use:
+.IP
+yum --filter-package-sizes=-1m check-update
+.PP
+To apply updates that Dan Walsh has committed use:
+.IP
+yum --filter-committer='Dan Walsh *' update
+.PP
+To get a list of all BZs that are fixed for packages you have installed use:
+.IP
+yum list-sec bugzillas
+.PP
+To get the information on advisory FEDORA-2707-4567 use:
+.IP
+yum info-sec FEDORA-2707-4567
+.PP
+To apply updates for Bugzillas 123, 456 and 789; and all security updates use:
+.IP
+yum --bz 123 --bz 456 --bz 789 --security update
+.PP
+To get an info list of updates for Bugzilla 123; CVEs CVE-2207-0123 and CVE-2207-3210; and Fedora advisories FEDORA-2707-4567 and FEDORA-2707-7654 use:
+.IP
+yum --bz 123 --cve CVE-2207-0123 --cve CVE-2207-3210 --advisory FEDORA-2707-4567 --advisory FEDORA-2707-7654 info updates
+
+
+.SH "SEE ALSO"
+.nf
+.I yum-list-data (1)
+.I yum (8)
+.I yum.conf (5)
+.fi
+
+.SH "AUTHORS"
+.nf
+James Antill <james.antill at redhat.com>.
+.fi
+
+.SH "BUGS"
+Currently yum can't filter packages in all of the commands, so for instance
+"yum list 'yum*'" doesn't get the results filtered.
diff --git a/docs/yum-list-data.1 b/docs/yum-list-data.1
index 4346dea..d97b816 100644
--- a/docs/yum-list-data.1
+++ b/docs/yum-list-data.1
@@ -127,6 +127,7 @@ yum list-package-sizes
.SH "SEE ALSO"
.nf
+.I yum-filter-data (1)
.I yum (8)
.I yum.conf (5)
.fi
diff --git a/yum-utils.spec b/yum-utils.spec
index 9fb5ebb..509ff15 100644
--- a/yum-utils.spec
+++ b/yum-utils.spec
@@ -407,6 +407,7 @@ fi
%defattr(-, root, root)
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/filter-data.conf
/usr/lib/yum-plugins/filter-data.*
+%{_mandir}/man8/yum-filter-data.8.*
%files -n yum-tmprepo
%defattr(-, root, root)
commit 6904e4b29bcc5b7a09c2f242859456c445c5edb4
Author: James Antill <james at and.org>
Date: Mon Feb 4 12:29:38 2008 -0500
Don't split values with spaces in their names, on spaces
diff --git a/plugins/filter-data/filter-data.py b/plugins/filter-data/filter-data.py
index a18e1e5..585d4c9 100644
--- a/plugins/filter-data/filter-data.py
+++ b/plugins/filter-data/filter-data.py
@@ -338,6 +338,11 @@ def config_hook(conduit):
parser.values.filter_installed_sizes = []
def ogroups(opt, key, val, parser):
parser.values.filter_groups.extend(str(val).split(","))
+ def make_sopt(attrs):
+ def func(opt, key, val, parser):
+ vals = str(val).split(",")
+ getattr(parser.values, 'filter_' + attrs).extend(vals)
+ return func
def make_nopt(attrs):
def func(opt, key, val, parser):
vals = str(val).replace(",", " ").split()
@@ -368,13 +373,18 @@ def config_hook(conduit):
getattr(parser.values, 'filter_' + attrs).append(rang)
return func
-
+
+ # These have spaces in their values, so we can't split on space
for (attrs, attr) in [('vendors', 'vendor'),
('groups', 'group'),
('packagers', 'packager'),
('licenses', 'license'),
- ('arches', 'arch'),
- ('committers', 'committer'),
+ ('committers', 'committer')]:
+ parser.add_option('--filter-' + attrs, action="callback",
+ callback=make_sopt(attrs), default=[], type="string",
+ help='Filter to packages with a matching ' + attr)
+
+ for (attrs, attr) in [('arches', 'arch'),
('buildhosts', 'buildhost'),
('urls', 'url')]:
parser.add_option('--filter-' + attrs, action="callback",
commit bd01f5215ec6da49e58ed17cc8c9c377fd67d9fb
Author: James Antill <james at and.org>
Date: Mon Feb 4 12:08:54 2008 -0500
Man page for yum-list-data plugin, apparently less /usr/lib/yum-plugins/*.py is not enough for everyone :)
diff --git a/docs/Makefile b/docs/Makefile
index a86386e..291ea5e 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -1,4 +1,4 @@
-DOCS = repoquery package-cleanup repo-rss yumdownloader yum-builddep yum-changelog reposync yum-complete-transaction
+DOCS = repoquery package-cleanup repo-rss yumdownloader yum-builddep yum-changelog reposync yum-complete-transaction yum-list-data
DOCS5 = yum-changelog.conf
DOCS8 = yum-security
@@ -21,4 +21,3 @@ install:
for doc in $(DOCS8); do \
install -m 644 $$doc.8 $(DESTDIR)/usr/share/man/man8/; \
done
-
\ No newline at end of file
diff --git a/docs/yum-list-data.1 b/docs/yum-list-data.1
new file mode 100644
index 0000000..4346dea
--- /dev/null
+++ b/docs/yum-list-data.1
@@ -0,0 +1,137 @@
+.\" yum list-data plugin
+.TH "yum-list-data" "1" "2008 Feb 4" "James Antill" ""
+.SH "NAME"
+yum list data plugin
+.SH "SYNOPSIS"
+\fByum\fP [options] [command] [package ...]
+.SH "DESCRIPTION"
+.PP
+This plugin extends \fByum\fP for some commands that give aggregate package data based on lists of packages
+.PP
+added yum \fIcommand\fPs are:
+.br
+.I \fR * list-vendors
+.br
+.I \fR * info-vendors
+.br
+.I \fR * list-groups
+.br
+.I \fR * info-groups
+.br
+.I \fR * list-packagers
+.br
+.I \fR * info-packagers
+.br
+.I \fR * list-licenses
+.br
+.I \fR * info-licenses
+.br
+.I \fR * list-arches
+.br
+.I \fR * info-arches
+.br
+.I \fR * list-committers
+.br
+.I \fR * info-committers
+.br
+.I \fR * list-buildhosts
+.br
+.I \fR * info-buildhosts
+.br
+.I \fR * list-baseurls
+.br
+.I \fR * info-baseurls
+.br
+.I \fR * list-package-sizes
+.br
+.I \fR * info-package-sizes
+.br
+.I \fR * list-archive-sizes
+.br
+.I \fR * info-archive-sizes
+.br
+.I \fR * list-installed-sizes
+.br
+.I \fR * info-installed-sizes
+.br
+.PP
+all of which take the same arguments as the list and info yum commands. The
+difference between the list and info varieties is that the info versions lists
+all the packages under each agregation.
+.PP
+.br
+.br
+.PP
+.IP "\fBlist-vendors\fP" "\fBinfo-vendors\fP"
+Is used to list the aggregate of the vendor attribute on the packages, examples
+are "Fedora Project" and "Red Hat, Inc.".
+.IP
+.IP "\fBlist-groups\fP" "\fBinfo-groups\fP"
+Is used to list the aggregate of the group attribute on the packages, examples
+are "Applications/System", "Development/Tools" and "System Environment/Base"
+.IP
+.IP "\fBlist-packagers\fP" "\fBinfo-packagers\fP"
+Is used to list the aggregate of the packager attribute on the packages,
+examples are "Fedora Project" and "Red Hat, Inc.".
+.IP
+.IP "\fBlist-licenses\fP" "\fBinfo-licenses\fP"
+Is used to list the aggregate of the license attribute on the packages,
+examples are "GPL" and "MIT"
+.IP
+.IP "\fBlist-arches\fP" "\fBinfo-arches\fP"
+Is used to list the aggregate of the arch attribute on the packages,
+examples are "i386" and "x86_64"
+.IP
+.IP "\fBlist-committers\fP" "\fBinfo-committers\fP"
+Is used to list the aggregate of the committer attribute on the packages, this
+is taken from the most recent changelog entry of the package.
+.IP
+.IP "\fBlist-buildhosts\fP" "\fBinfo-buildhosts\fP"
+Is used to list the aggregate of the buildhost attribute on the packages,
+examples are "mybuilder.example.com" and "xenbuilder1.fedora.redhat.com"
+.IP
+.IP "\fBlist-baseurls\fP" "\fBinfo-baseurls\fP"
+Is used to list the aggregate of the url attribute on the packages after
+discarding the path of the URL, examples are "http://linux.duke.edu/" and
+"http://www.and.org/"
+.IP
+.IP "\fBlist-package-sizes\fP" "\fBinfo-package-sizes\fP"
+Is used to list the aggregate of specified ranges the packagesize attribute on
+the packages, examples are "[ 1B - 10KB ]" and "[ 750KB - 1MB ]".
+.IP
+.IP "\fBlist-archive-sizes\fP" "\fBinfo-archive-sizes\fP"
+Is used to list the aggregate of specified ranges the archivesize attribute on
+the packages, examples are "[ 1B - 10KB ]" and "[ 750KB - 1MB ]".
+.IP
+.IP "\fBlist-installed-sizes\fP" "\fBinfo-installed-sizes\fP"
+Is used to list the aggregate of specified ranges the installedsize attribute on
+the packages, examples are "[ 1B - 10KB ]" and "[ 750KB - 1MB ]".
+.IP
+.PP
+It is worth noting that some of the above data can be "unknown", to yum, at
+which point a seperate aggregation called "-- Unknown --" is listed.
+.SH "EXAMPLES"
+.PP
+To list all the groups that have an update, along with the number of packages in each group, use:
+.IP
+yum list-groups updates
+.PP
+To list all the committers to packages that have yum in their name, use:
+.IP
+yum list-committers 'yum*'
+.PP
+To list ranges of the sizes of pacakges installed or available, use:
+.IP
+yum list-package-sizes
+
+
+.SH "SEE ALSO"
+.nf
+.I yum (8)
+.I yum.conf (5)
+.fi
+
+.SH "AUTHORS"
+.nf
+James Antill <james.antill at redhat.com>.
+.fi
diff --git a/yum-utils.spec b/yum-utils.spec
index 3bf8bdc..9fb5ebb 100644
--- a/yum-utils.spec
+++ b/yum-utils.spec
@@ -401,6 +401,7 @@ fi
%defattr(-, root, root)
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/list-data.conf
/usr/lib/yum-plugins/list-data.*
+%{_mandir}/man8/yum-list-data.8.*
%files -n yum-filter-data
%defattr(-, root, root)
commit 41ac5f1dfa1f80bb0a0ed80ef6ce83e34f4fec45
Author: James Antill <james at and.org>
Date: Mon Feb 4 11:40:12 2008 -0500
Use full command name
diff --git a/docs/yum-security.8 b/docs/yum-security.8
index 9448bbd..7121ec4 100644
--- a/docs/yum-security.8
+++ b/docs/yum-security.8
@@ -10,9 +10,9 @@ This plugin extends \fByum\fP to allow lists and updates to be limited using sec
.PP
added yum \fIcommand\fPs are:
.br
-.I \fR * info-sec
+.I \fR * info-security
.br
-.I \fR * list-sec
+.I \fR * list-security
.PP
both of which take these \fIsub-commands\fPs are:
.br
More information about the Yum-cvs-commits
mailing list