--- /dev/null
+Seth Vidal
+Luke Macken
+James Antill
+Paul Nasrat
run createrepo -h for usage syntax
-http://linux.duke.edu/createrepo/
+http://createrepo.baseurl.org/
+
License: GPL
Group: System Environment/Base
Source: %{name}-%{version}.tar.gz
-URL: http://linux.duke.edu/metadata/
+URL: http://createrepo.baseurl.org/
BuildRoot: %{_tmppath}/%{name}-%{version}root
BuildArchitectures: noarch
Requires: python >= 2.1, rpm-python, rpm >= 0:4.1.1, libxml2-python
self.changelog_limit = None # needs to be an int or None
self.unique_md_filenames = False
self.additional_metadata = {} # dict of 'type':'filename'
-
-
+ self.revision = str(int(time.time()))
+ self.content_tags = [] # flat list of strings (like web 2.0 tags)
+ self.distro_tags = []# [(cpeid(None allowed), human-readable-string)]
class SimpleMDCallBack(object):
def errorlog(self, thing):
rpmns = reporoot.newNs("http://linux.duke.edu/metadata/rpm", 'rpm')
repopath = os.path.join(self.conf.outputdir, self.conf.tempdir)
repofilepath = os.path.join(repopath, self.conf.repomdfile)
+
+ revision = reporoot.newChild(None, 'revision', self.conf.revision)
+ if self.conf.content_tags or self.conf.distro_tags:
+ tags = reporoot.newChild(None, 'tags', None)
+ for item in self.conf.content_tags:
+ c_tags = tags.newChild(None, 'content', item)
+ for (cpeid,item) in self.conf.distro_tags:
+ d_tags = tags.newChild(None, 'distro', item)
+ if cpeid:
+ d_tags.newProp('cpeid', cpeid)
sumtype = self.conf.sumtype
if self.conf.database_only:
Only import the last N changelog entries, from each rpm, into the metadata
.IP "\fB\--unique-md-filenames\fP"
Include the file's checksum in the metadata filename, helps HTTP caching
-
-.IP "\fB\--database-only\fP"
-Generate only the sqlite dbs. Do not create the xml metadata at all.
+.IP "\--distro\fP"
+Specify distro tags. Can be specified more than once. Optional syntax specifying a
+cpeid(http://cpe.mitre.org/) --distro=cpeid,distrotag
+.IP "\--content\fP"
+Specify keyword/tags about the content of the repository. Can be specified more than once.
+.IP "\--revision\fP"
+Arbitrary string for a repository revision.
.SH "EXAMPLES"
Here is an example of a repository with a groups file. Note that the
.PP
.SH "AUTHORS"
.nf
-Seth Vidal <skvidal@phy.duke.edu>
+See the Authors file
.fi
.PP
.SH "BUGS"
Any bugs which are found should be emailed to the mailing list:
-rpm-metadata@linux.duke.edu
+rpm-metadata@lists.baseurl.org
+or reported in trac at: http://createrepo.baseurl.org
.fi
default=False, action="store_true",
help="include the file's checksum in the filename, helps" \
"with proxies")
-
+ parser.add_option("--distro", default=[], action="append",
+ help="distro tag and optional cpeid: --distro 'cpeid,textname'")
+ parser.add_option("--content", default=[], dest='content_tags', action="append",
+ help="tags for the content in the repository")
+ parser.add_option("--revision", default=None,
+ help="user-specified revision for this repository")
+
(opts, argsleft) = parser.parse_args(args)
if len(argsleft) > 1 and not opts.split:
errorprint(_('Error: Only one directory allowed per run.'))
conf.directory = directory
conf.directories = directories
+ # distro tag parsing
+
+ for spec in opts.distro:
+ if spec.find(',') == -1:
+ conf.distro_tags.append((None,spec))
+ else:
+ splitspec = spec.split(',')
+ conf.distro_tags.append((splitspec[0], splitspec[1]))
+
lst = []
if conf.pkglist:
pfo = open(conf.pkglist, 'r')