summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/attachments/20110104/71eaa748/attachment.html
diff options
context:
space:
mode:
Diffstat (limited to 'zarb-ml/mageia-sysadm/attachments/20110104/71eaa748/attachment.html')
-rw-r--r--zarb-ml/mageia-sysadm/attachments/20110104/71eaa748/attachment.html1411
1 files changed, 1411 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/attachments/20110104/71eaa748/attachment.html b/zarb-ml/mageia-sysadm/attachments/20110104/71eaa748/attachment.html
new file mode 100644
index 000000000..08cb75cdc
--- /dev/null
+++ b/zarb-ml/mageia-sysadm/attachments/20110104/71eaa748/attachment.html
@@ -0,0 +1,1411 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<title>[205] version 1.9.1</title>
+</head>
+<body>
+
+<style type="text/css"><!--
+#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
+#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
+#msg dt:after { content:':';}
+#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
+#msg dl a { font-weight: bold}
+#msg dl a:link { color:#fc3; }
+#msg dl a:active { color:#ff0; }
+#msg dl a:visited { color:#cc6; }
+h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
+#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
+#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
+#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
+#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
+#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
+#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
+#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
+#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
+#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
+#logmsg pre { background: #eee; padding: 1em; }
+#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
+#logmsg dl { margin: 0; }
+#logmsg dt { font-weight: bold; }
+#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
+#logmsg dd:before { content:'\00bb';}
+#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
+#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
+#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
+#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
+#logmsg table th.Corner { text-align: left; }
+#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
+#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
+#patch { width: 100%; }
+--></style>
+<div id="msg">
+<dl class="meta">
+<dt>Revision</dt> <dd>205</dd>
+<dt>Author</dt> <dd>boklm</dd>
+<dt>Date</dt> <dd>2011-01-04 17:17:04 +0100 (Tue, 04 Jan 2011)</dd>
+</dl>
+
+<h3>Log Message</h3>
+<pre>version 1.9.1</pre>
+
+<h3>Added Paths</h3>
+<ul>
+<li>build_system/repsys/tags/1.9.1/</li>
+<li><a href="#build_systemrepsystags191CHANGES">build_system/repsys/tags/1.9.1/CHANGES</a></li>
+<li><a href="#build_systemrepsystags191RepSysbinrepopy">build_system/repsys/tags/1.9.1/RepSys/binrepo.py</a></li>
+<li><a href="#build_systemrepsystags191repsys">build_system/repsys/tags/1.9.1/repsys</a></li>
+</ul>
+
+<h3>Removed Paths</h3>
+<ul>
+<li><a href="#build_systemrepsystags191CHANGES">build_system/repsys/tags/1.9.1/CHANGES</a></li>
+<li><a href="#build_systemrepsystags191RepSysbinrepopy">build_system/repsys/tags/1.9.1/RepSys/binrepo.py</a></li>
+<li><a href="#build_systemrepsystags191repsys">build_system/repsys/tags/1.9.1/repsys</a></li>
+</ul>
+
+</div>
+<div id="patch"><pre>
+<a id="build_systemrepsystags191CHANGES">Deleted: build_system/repsys/tags/1.9.1/CHANGES</a>
+===================================================================
+--- build_system/repsys/trunk/CHANGES 2011-01-04 16:09:44 UTC (rev 202)
++++ build_system/repsys/tags/1.9.1/CHANGES 2011-01-04 16:17:04 UTC (rev 205)
+@@ -1,163 +0,0 @@
+-* Development
+-- added support to &quot;binary repository&quot;
+-- added new commands upload, up and del to help handling tarballs in the
+- binaries repository
+-
+-* 1.9
+-- really fixed -M
+-- new command log: shows the svn log for a given package
+-- added option -s to co, to allow checking out only SPECS
+-- use a better message when checking out from the mirror
+-- show the path where getspec wrote the spec file
+-
+-* 1.8
+-- make the -M option work again
+-- sync now adds the spec file (pointed by blino)
+-- fixed putsrpm to not create old log files for packages without changelog
+-- submit now can fetch the revision number if not specified (it also shows
+- the author and the first line of the commit)
+-- allow submitting many packages at once, even without support on server
+- side (the same behavior as running repsys submit for each package)
+-- append a parameter sid=UUID for every set of packages submitted
+-- strip username from package URL on submit (#53939)
+-- clearer error message when svn co fails
+-- svn authentication errors are handled, pointing to the wiki page on
+- configuration
+-- svn commands will not be shown on error messages, unless using --debug
+-- repsys uses the wrapper repsys-ssh for svn, to handle signals and also
+- set BatchMode
+-- added the configuration option svn-env
+-- show the error from rpm when fetching the version from a spec fails
+-
+-* 1.7
+-- dropped all authenticated access support: subversion authentication has
+- been broken for a long time and the workarounds weren't decent. It will
+- be back in 1.7.x.
+-- added configuration option svn-command in the global section, allowing
+- to replace the default svn command
+-- force svn+ssh:// URLs to be in BatchMode, in order to not have any
+- interactivity at all with ssh
+-- fixed incompatibility with Python-2.4 on urlparse
+-- fixed emptylog message, which was not being shown when needed
+-- distributions can be specified by using &lt;distro&gt;/&lt;package&gt; in all
+- commands
+-- allow submitting many packages at once (#28352)
+-- package revisions in submit are now specified with name@nnn
+-- the user can define groups of packages to be submitted in the section
+- &quot;submit-groups&quot;
+-- make 'repsys submit' without package name or revision number work again
+-- added option --distro to submit
+-- make putsrpm work again
+-- added subcommand import as an alias to putsrpm
+-- template: hide the first release when it has only invisible lines
+-- added initial man page
+-- allow resorting changelog entries through the config option sort in the
+- log section
+-- added rpmlog options: -o to append the old changelog, -p to append the
+- changelog found in the spec, and -s to resort all changelog entries
+-- rpmlog, getsrpm, getspec and changed will use the mirror if enabled
+-- don't hide authors with only the first revision SILENTed (#41117)
+-- fixed bad url used when using -v in getsrpm
+-- if REPSYS_CONF is set, /etc/repsys.conf and ~/.repsys/config will not be
+- readed anymore
+-- sort the final changelog by enabling the option sort in the log section
+-- merge the changelog found in the spec by enabling the option merge-spec
+- in the log section
+-- changed the built-in template to the current default.chlog
+-- added option -d to repsys sync, to download the missing source files
+-- added option -F to repsys ci to set a log message file
+-- added option --strict to getsrpm to check if the revision provided
+- matches the package URL;
+-- changed the default command to build SRPMs to rpmbuild
+-- added configuration option rpmbuild to the section helper, to define the
+- command used to build packages
+-- added boolean configuration option strict-revision in the submit
+- section, to allow forcing the use of --strict
+-- added option --list in create-srpm to list the available targets
+-- make submit -l work on svn+ssh:// targets
+-- the fix for the unreleased commits problem in the previous release was
+- wrong, really fixed it
+-- moved all configuration options that will hardly be changed to
+- repsys-example.conf; we now have a shorter repsys.conf
+-- fixed the use of file:/// URLs when using just the package name
+-- allow using submit with package URLs having usernames
+-- don't give the wrong message &quot;invalid command 'CMD'&quot; when this is not
+- the case
+-- added more help messages in subcommands
+-
+-* 1.6.19
+-- added complement for SILENT: CLOG, which hides everything that does not
+- start with this token
+-- fixed generation of unreleased commits, it was using the previous
+- markrelease revision as reference
+-- added option -o to 'co' to disable the use of mirror when checking out
+-
+-* 1.6.18
+-- added the subcommand &quot;switch&quot; to help with mirrors support
+-- initialize plugins in create-srpm too
+-- changelog: perform less svn calls to obtain release number and oldlog
+-- changelog: show epoch even in the entry not released
+-- changelog: make default.chlog compatible with cheetah-2
+-- make &quot;sync&quot; compatible with rpm-4.4.8 behavior
+-- &quot;co&quot; don't use mirror when URL is provided
+-- &quot;ci&quot; don't relocate back to mirrors after commit (should use switch)
+-- ldapusers: added options ldap-uri and ldap-starttls
+-- fixed use of __import__, incompatible with python2.4 in plugin support
+-- fixed bug of wrong paths when using mirrors
+-
+-* 1.6.17
+-- brought from mdvsys world the sync command
+-- ldapusers: the configuration format has changed, now it uses python
+- template strings
+-- ldapusers: many fixes: better error messages, ldap-port working, results
+- contain only the fields needed, unbinding after search, filters are
+- escaped
+-
+-* 1.6.16
+-- introduced the plugin ldapusers: repsys user data obtained from LDAP;
+- this plugin is builtin
+-- added support to plugins, and the hability to wrap configuration sections
+-- added workaround in the template to ignore empty releases
+-- added initial support to mirrors, as requested by mrl; it required the
+- new subcommand &quot;ci&quot;
+-- changelogs from misc/ will come from HEAD and should be escaped (%%)
+-
+-* 1.6.15
+-- empty changelog entries are now shown, with a EMPTYLOG tag to allow
+- rpmlint warn the developer about it
+-- check (and warn) if a temporary package has already been removed before
+- trying to remove it
+-
+-* 1.6.2b
+-- make submit pass --define options to create-srpm script
+-- print error message when create-srpm fails
+-- make get_srpm return the srpms list
+-- add upload-srpm support in create-srpm
+-
+-* 1.6.2a
+-- moved revision-offset to [log] section and added a comment
+-
+-* 1.6.2
+-- reimplemented the option -n for rpmlog, which now uses the svn option
+- --limit.
+-- added the option revision-offset, for the Zero Day Revision issue.
+-- small fix in main repsys help message
+-
+-* 1.6.1
+-- added option url-map, as an workaround for svn+ssh:// urls problems
+-- added configuration sectiom &quot;helper&quot;
+-- added getsrpm-mdk and create-srpm to setup.py
+-- added option -r to submit
+-
+-* 1.6.0
+-- improved markrelease command line parsing
+-- changelogs entries are now groupped by author, and sorted by revision
+- number
+-- the changelog now is generated using the Cheetah Template Engine, to
+- allow quick modifications without spending time reading code and
+- introducing new bugs
+-- consequently, was added an option &quot;-T &lt;file&gt;&quot; to rpmlog and getsrpm to
+- allow choosing the path of the template to be used
+-- added options noauth=0, and baseurl=None in order to disable the
+- authentication in some url schemes (http:// and file://)
+-- replaced some &quot;cl&quot; references to &quot;mdv&quot;
+
+<a id="build_systemrepsystags191CHANGESfromrev204build_systemrepsystrunkCHANGES">Copied: build_system/repsys/tags/1.9.1/CHANGES (from rev 204, build_system/repsys/trunk/CHANGES)</a>
+===================================================================
+--- build_system/repsys/tags/1.9.1/CHANGES (rev 0)
++++ build_system/repsys/tags/1.9.1/CHANGES 2011-01-04 16:17:04 UTC (rev 205)
+@@ -0,0 +1,166 @@
++* 1.9.1-binrepo
++- fix problem with python threads on 2010.1
++
++* 1.9-binrepo
++- added support to &quot;binary repository&quot;
++- added new commands upload, up and del to help handling tarballs in the
++ binaries repository
++
++* 1.9
++- really fixed -M
++- new command log: shows the svn log for a given package
++- added option -s to co, to allow checking out only SPECS
++- use a better message when checking out from the mirror
++- show the path where getspec wrote the spec file
++
++* 1.8
++- make the -M option work again
++- sync now adds the spec file (pointed by blino)
++- fixed putsrpm to not create old log files for packages without changelog
++- submit now can fetch the revision number if not specified (it also shows
++ the author and the first line of the commit)
++- allow submitting many packages at once, even without support on server
++ side (the same behavior as running repsys submit for each package)
++- append a parameter sid=UUID for every set of packages submitted
++- strip username from package URL on submit (#53939)
++- clearer error message when svn co fails
++- svn authentication errors are handled, pointing to the wiki page on
++ configuration
++- svn commands will not be shown on error messages, unless using --debug
++- repsys uses the wrapper repsys-ssh for svn, to handle signals and also
++ set BatchMode
++- added the configuration option svn-env
++- show the error from rpm when fetching the version from a spec fails
++
++* 1.7
++- dropped all authenticated access support: subversion authentication has
++ been broken for a long time and the workarounds weren't decent. It will
++ be back in 1.7.x.
++- added configuration option svn-command in the global section, allowing
++ to replace the default svn command
++- force svn+ssh:// URLs to be in BatchMode, in order to not have any
++ interactivity at all with ssh
++- fixed incompatibility with Python-2.4 on urlparse
++- fixed emptylog message, which was not being shown when needed
++- distributions can be specified by using &lt;distro&gt;/&lt;package&gt; in all
++ commands
++- allow submitting many packages at once (#28352)
++- package revisions in submit are now specified with name@nnn
++- the user can define groups of packages to be submitted in the section
++ &quot;submit-groups&quot;
++- make 'repsys submit' without package name or revision number work again
++- added option --distro to submit
++- make putsrpm work again
++- added subcommand import as an alias to putsrpm
++- template: hide the first release when it has only invisible lines
++- added initial man page
++- allow resorting changelog entries through the config option sort in the
++ log section
++- added rpmlog options: -o to append the old changelog, -p to append the
++ changelog found in the spec, and -s to resort all changelog entries
++- rpmlog, getsrpm, getspec and changed will use the mirror if enabled
++- don't hide authors with only the first revision SILENTed (#41117)
++- fixed bad url used when using -v in getsrpm
++- if REPSYS_CONF is set, /etc/repsys.conf and ~/.repsys/config will not be
++ readed anymore
++- sort the final changelog by enabling the option sort in the log section
++- merge the changelog found in the spec by enabling the option merge-spec
++ in the log section
++- changed the built-in template to the current default.chlog
++- added option -d to repsys sync, to download the missing source files
++- added option -F to repsys ci to set a log message file
++- added option --strict to getsrpm to check if the revision provided
++ matches the package URL;
++- changed the default command to build SRPMs to rpmbuild
++- added configuration option rpmbuild to the section helper, to define the
++ command used to build packages
++- added boolean configuration option strict-revision in the submit
++ section, to allow forcing the use of --strict
++- added option --list in create-srpm to list the available targets
++- make submit -l work on svn+ssh:// targets
++- the fix for the unreleased commits problem in the previous release was
++ wrong, really fixed it
++- moved all configuration options that will hardly be changed to
++ repsys-example.conf; we now have a shorter repsys.conf
++- fixed the use of file:/// URLs when using just the package name
++- allow using submit with package URLs having usernames
++- don't give the wrong message &quot;invalid command 'CMD'&quot; when this is not
++ the case
++- added more help messages in subcommands
++
++* 1.6.19
++- added complement for SILENT: CLOG, which hides everything that does not
++ start with this token
++- fixed generation of unreleased commits, it was using the previous
++ markrelease revision as reference
++- added option -o to 'co' to disable the use of mirror when checking out
++
++* 1.6.18
++- added the subcommand &quot;switch&quot; to help with mirrors support
++- initialize plugins in create-srpm too
++- changelog: perform less svn calls to obtain release number and oldlog
++- changelog: show epoch even in the entry not released
++- changelog: make default.chlog compatible with cheetah-2
++- make &quot;sync&quot; compatible with rpm-4.4.8 behavior
++- &quot;co&quot; don't use mirror when URL is provided
++- &quot;ci&quot; don't relocate back to mirrors after commit (should use switch)
++- ldapusers: added options ldap-uri and ldap-starttls
++- fixed use of __import__, incompatible with python2.4 in plugin support
++- fixed bug of wrong paths when using mirrors
++
++* 1.6.17
++- brought from mdvsys world the sync command
++- ldapusers: the configuration format has changed, now it uses python
++ template strings
++- ldapusers: many fixes: better error messages, ldap-port working, results
++ contain only the fields needed, unbinding after search, filters are
++ escaped
++
++* 1.6.16
++- introduced the plugin ldapusers: repsys user data obtained from LDAP;
++ this plugin is builtin
++- added support to plugins, and the hability to wrap configuration sections
++- added workaround in the template to ignore empty releases
++- added initial support to mirrors, as requested by mrl; it required the
++ new subcommand &quot;ci&quot;
++- changelogs from misc/ will come from HEAD and should be escaped (%%)
++
++* 1.6.15
++- empty changelog entries are now shown, with a EMPTYLOG tag to allow
++ rpmlint warn the developer about it
++- check (and warn) if a temporary package has already been removed before
++ trying to remove it
++
++* 1.6.2b
++- make submit pass --define options to create-srpm script
++- print error message when create-srpm fails
++- make get_srpm return the srpms list
++- add upload-srpm support in create-srpm
++
++* 1.6.2a
++- moved revision-offset to [log] section and added a comment
++
++* 1.6.2
++- reimplemented the option -n for rpmlog, which now uses the svn option
++ --limit.
++- added the option revision-offset, for the Zero Day Revision issue.
++- small fix in main repsys help message
++
++* 1.6.1
++- added option url-map, as an workaround for svn+ssh:// urls problems
++- added configuration sectiom &quot;helper&quot;
++- added getsrpm-mdk and create-srpm to setup.py
++- added option -r to submit
++
++* 1.6.0
++- improved markrelease command line parsing
++- changelogs entries are now groupped by author, and sorted by revision
++ number
++- the changelog now is generated using the Cheetah Template Engine, to
++ allow quick modifications without spending time reading code and
++ introducing new bugs
++- consequently, was added an option &quot;-T &lt;file&gt;&quot; to rpmlog and getsrpm to
++ allow choosing the path of the template to be used
++- added options noauth=0, and baseurl=None in order to disable the
++ authentication in some url schemes (http:// and file://)
++- replaced some &quot;cl&quot; references to &quot;mdv&quot;
+
+<a id="build_systemrepsystags191RepSysbinrepopy">Deleted: build_system/repsys/tags/1.9.1/RepSys/binrepo.py</a>
+===================================================================
+--- build_system/repsys/trunk/RepSys/binrepo.py 2011-01-04 16:09:44 UTC (rev 202)
++++ build_system/repsys/tags/1.9.1/RepSys/binrepo.py 2011-01-04 16:17:04 UTC (rev 205)
+@@ -1,393 +0,0 @@
+-from RepSys import Error, config, mirror, layout
+-from RepSys.util import execcmd, rellink
+-from RepSys.svn import SVN
+-
+-import sys
+-import os
+-import string
+-import stat
+-import shutil
+-import re
+-import tempfile
+-import hashlib
+-import urlparse
+-import threading
+-from cStringIO import StringIO
+-
+-DEFAULT_TARBALLS_REPO = &quot;/tarballs&quot;
+-BINARIES_DIR_NAME = &quot;SOURCES&quot;
+-BINARIES_CHECKOUT_NAME = &quot;SOURCES-bin&quot;
+-
+-PROP_USES_BINREPO = &quot;mdv:uses-binrepo&quot;
+-PROP_BINREPO_REV = &quot;mdv:binrepo-rev&quot;
+-
+-BINREPOS_SECTION = &quot;binrepos&quot;
+-
+-SOURCES_FILE = &quot;sha1.lst&quot;
+-
+-class ChecksumError(Error):
+- pass
+-
+-def svn_baseurl(target):
+- svn = SVN()
+- info = svn.info2(target)
+- if info is None:
+- # unversioned resource
+- newtarget = os.path.dirname(target)
+- info = svn.info2(newtarget)
+- assert info is not None, &quot;svn_basedir should not be used with a &quot;\
+- &quot;non-versioned directory&quot;
+- root = info[&quot;Repository Root&quot;]
+- url = info[&quot;URL&quot;]
+- kind = info[&quot;Node Kind&quot;]
+- path = url[len(root):]
+- if kind == &quot;directory&quot;:
+- return url
+- basepath = os.path.dirname(path)
+- baseurl = mirror.normalize_path(url + &quot;/&quot; + basepath)
+- return baseurl
+-
+-def svn_root(target):
+- svn = SVN()
+- info = svn.info2(target)
+- if info is None:
+- newtarget = os.path.dirname(target)
+- info = svn.info2(newtarget)
+- assert info is not None
+- return info[&quot;Repository Root&quot;]
+-
+-def enabled(url):
+- #TODO use information from url to find out whether we have a binrepo
+- # available for this url
+- use = config.getbool(&quot;global&quot;, &quot;use-binaries-repository&quot;, False)
+- return use
+-
+-def default_repo():
+- base = config.get(&quot;global&quot;, &quot;binaries-repository&quot;, None)
+- if base is None:
+- default_parent = config.get(&quot;global&quot;, &quot;default_parent&quot;, None)
+- if default_parent is None:
+- raise Error, &quot;no binaries-repository nor default_parent &quot;\
+- &quot;configured&quot;
+- comps = urlparse.urlparse(default_parent)
+- base = comps[1] + &quot;:&quot; + DEFAULT_TARBALLS_REPO
+- return base
+-
+-def translate_url(url):
+- url = mirror.normalize_path(url)
+- main = mirror.normalize_path(layout.repository_url())
+- subpath = url[len(main)+1:]
+- # [binrepos]
+- # updates/2009.0 = svn+ssh://svn.mandriva.com/svn/binrepo/20090/
+- ## svn+ssh://svn.mandriva.com/svn/packages/2009.0/trafshow/current
+- ## would translate to
+- ## svn+ssh://svn.mandriva.com/svn/binrepo/20090/updates/trafshow/current/
+- binbase = None
+- if BINREPOS_SECTION in config.sections():
+- for option, value in config.walk(BINREPOS_SECTION):
+- if subpath.startswith(option):
+- binbase = value
+- break
+- binurl = mirror._joinurl(binbase or default_repo(), subpath)
+- return binurl
+-
+-def translate_topdir(path):
+- &quot;&quot;&quot;Returns the URL in the binrepo from a given path inside a SVN
+- checkout directory.
+-
+- @path: if specified, returns a URL in the binrepo whose path is the
+- same as the path inside the main repository.
+- &quot;&quot;&quot;
+- baseurl = svn_baseurl(path)
+- binurl = translate_url(baseurl)
+- target = mirror.normalize_path(binurl)
+- return target
+-
+-def is_binary(path):
+- raw = config.get(&quot;binrepo&quot;, &quot;upload-match&quot;,
+- &quot;\.(7z|Z|bin|bz2|cpio|db|deb|egg|gem|gz|jar|jisp|lzma|&quot;\
+- &quot;pdf|pgn\\.gz|pk3|rpm|rpm|run|sdz|smzip|tar|tbz|&quot;\
+- &quot;tbz2|tgz|ttf|uqm|wad|war|xar|xpi|zip)$&quot;)
+- maxsize = config.getint(&quot;binrepo&quot;, &quot;upload-match-size&quot;, &quot;1048576&quot;) # 1MiB
+- expr = re.compile(raw)
+- name = os.path.basename(path)
+- if expr.search(name):
+- return True
+- st = os.stat(path)
+- if st[stat.ST_SIZE] &gt;= maxsize:
+- return True
+- return False
+-
+-def find_binaries(paths):
+- new = []
+- for path in paths:
+- if os.path.isdir(path):
+- for name in os.listdir(path):
+- fpath = os.path.join(path, name)
+- if is_binary(fpath):
+- new.append(fpath)
+- else:
+- if is_binary(path):
+- new.append(path)
+- return new
+-
+-def make_symlinks(source, dest):
+- todo = []
+- tomove = []
+- for name in os.listdir(source):
+- path = os.path.join(source, name)
+- if not os.path.isdir(path) and not name.startswith(&quot;.&quot;):
+- destpath = os.path.join(dest, name)
+- linkpath = rellink(path, destpath)
+- if os.path.exists(destpath):
+- if (os.path.islink(destpath) and
+- os.readlink(destpath) == linkpath):
+- continue
+- movepath = destpath + &quot;.repsys-moved&quot;
+- if os.path.exists(movepath):
+- raise Error, &quot;cannot create symlink, %s already &quot;\
+- &quot;exists (%s too)&quot; % (destpath, movepath)
+- tomove.append((destpath, movepath))
+- todo.append((destpath, linkpath))
+- for destpath, movepath in tomove:
+- os.rename(destpath, movepath)
+- for destpath, linkpath in todo:
+- os.symlink(linkpath, destpath)
+-
+-def download(targetdir, pkgdirurl=None, export=False, show=True,
+- revision=None, symlinks=True, check=False):
+- assert not export or (export and pkgdirurl)
+- svn = SVN()
+- sourcespath = os.path.join(targetdir, &quot;SOURCES&quot;)
+- binpath = os.path.join(targetdir, BINARIES_CHECKOUT_NAME)
+- if pkgdirurl:
+- topurl = translate_url(pkgdirurl)
+- else:
+- topurl = translate_topdir(targetdir)
+- binrev = None
+- if revision:
+- if pkgdirurl:
+- binrev = mapped_revision(pkgdirurl, revision)
+- else:
+- binrev = mapped_revision(targetdir, revision, wc=True)
+- binurl = mirror._joinurl(topurl, BINARIES_DIR_NAME)
+- if export:
+- svn.export(binurl, binpath, rev=binrev, show=show)
+- else:
+- svn.checkout(binurl, binpath, rev=binrev, show=show)
+- if symlinks:
+- make_symlinks(binpath, sourcespath)
+- if check:
+- check_sources(targetdir)
+-
+-def import_binaries(topdir, pkgname):
+- &quot;&quot;&quot;Import all binaries from a given package checkout
+-
+- (with pending svn adds)
+-
+- @topdir: the path to the svn checkout
+- &quot;&quot;&quot;
+- svn = SVN()
+- topurl = translate_topdir(topdir)
+- sourcesdir = os.path.join(topdir, &quot;SOURCES&quot;)
+- bintopdir = tempfile.mktemp(&quot;repsys&quot;)
+- try:
+- svn.checkout(topurl, bintopdir)
+- checkout = True
+- except Error:
+- bintopdir = tempfile.mkdtemp(&quot;repsys&quot;)
+- checkout = False
+- try:
+- bindir = os.path.join(bintopdir, BINARIES_DIR_NAME)
+- if not os.path.exists(bindir):
+- if checkout:
+- svn.mkdir(bindir)
+- else:
+- os.mkdir(bindir)
+- binaries = find_binaries([sourcesdir])
+- update = update_sources_threaded(topdir, added=binaries)
+- for path in binaries:
+- name = os.path.basename(path)
+- binpath = os.path.join(bindir, name)
+- os.rename(path, binpath)
+- try:
+- svn.remove(path)
+- except Error:
+- # file not tracked
+- svn.revert(path)
+- if checkout:
+- svn.add(binpath)
+- log = &quot;imported binaries for %s&quot; % pkgname
+- if checkout:
+- rev = svn.commit(bindir, log=log)
+- else:
+- rev = svn.import_(bintopdir, topurl, log=log)
+- svn.propset(PROP_USES_BINREPO, &quot;yes&quot;, topdir)
+- svn.propset(PROP_BINREPO_REV, str(rev), topdir)
+- update.join()
+- svn.add(sources_path(topdir))
+- finally:
+- shutil.rmtree(bintopdir)
+-
+-def create_package_dirs(bintopdir):
+- svn = SVN()
+- binurl = mirror._joinurl(bintopdir, BINARIES_DIR_NAME)
+- silent = config.get(&quot;log&quot;, &quot;ignore-string&quot;, &quot;SILENT&quot;)
+- message = &quot;%s: created binrepo package structure&quot; % silent
+- svn.mkdir(binurl, log=message, parents=True)
+-
+-def parse_sources(path):
+- entries = {}
+- f = open(path)
+- for rawline in f:
+- line = rawline.strip()
+- try:
+- sum, name = line.split(None, 1)
+- except ValueError:
+- # failed to unpack, line format error
+- raise Error, &quot;invalid line in sources file: %s&quot; % rawline
+- entries[name] = sum
+- return entries
+-
+-def check_hash(path, sum):
+- newsum = file_hash(path)
+- if newsum != sum:
+- raise ChecksumError, &quot;different checksums for %s: expected %s, &quot;\
+- &quot;but %s was found&quot; % (path, sum, newsum)
+-
+-def check_sources(topdir):
+- spath = sources_path(topdir)
+- if not os.path.exists(spath):
+- raise Error, &quot;'%s' was not found&quot; % spath
+- entries = parse_sources(spath)
+- for name, sum in entries.iteritems():
+- fpath = os.path.join(topdir, &quot;SOURCES&quot;, name)
+- check_hash(fpath, sum)
+-
+-def file_hash(path):
+- sum = hashlib.sha1()
+- f = open(path)
+- while True:
+- block = f.read(4096)
+- if not block:
+- break
+- sum.update(block)
+- f.close()
+- return sum.hexdigest()
+-
+-def sources_path(topdir):
+- path = os.path.join(topdir, &quot;SOURCES&quot;, SOURCES_FILE)
+- return path
+-
+-def update_sources(topdir, added=[], removed=[]):
+- path = sources_path(topdir)
+- entries = {}
+- if os.path.isfile(path):
+- entries = parse_sources(path)
+- f = open(path, &quot;w&quot;) # open before calculating hashes
+- for name in removed:
+- entries.pop(removed)
+- for added_path in added:
+- name = os.path.basename(added_path)
+- entries[name] = file_hash(added_path)
+- for name in sorted(entries):
+- f.write(&quot;%s %s\n&quot; % (entries[name], name))
+- f.close()
+-
+-def update_sources_threaded(*args, **kwargs):
+- t = threading.Thread(target=update_sources, args=args, kwargs=kwargs)
+- t.start()
+- return t
+-
+-def upload(path, message=None):
+- from RepSys.rpmutil import getpkgtopdir
+- svn = SVN()
+- if not os.path.exists(path):
+- raise Error, &quot;not found: %s&quot; % path
+- # XXX check if the path is under SOURCES/
+- paths = find_binaries([path])
+- if not paths:
+- raise Error, &quot;'%s' does not seem to have any tarballs&quot; % path
+- topdir = getpkgtopdir()
+- bintopdir = translate_topdir(topdir)
+- binurl = mirror._joinurl(bintopdir, BINARIES_DIR_NAME)
+- sourcesdir = os.path.join(topdir, &quot;SOURCES&quot;)
+- bindir = os.path.join(topdir, BINARIES_CHECKOUT_NAME)
+- silent = config.get(&quot;log&quot;, &quot;ignore-string&quot;, &quot;SILENT&quot;)
+- if not os.path.exists(bindir):
+- try:
+- download(topdir, show=False)
+- except Error:
+- # possibly the package does not exist
+- # (TODO check whether it is really a 'path not found' error)
+- pass
+- if not os.path.exists(bindir):
+- create_package_dirs(bintopdir)
+- svn.propset(PROP_USES_BINREPO, &quot;yes&quot;, topdir)
+- svn.commit(topdir, log=&quot;%s: created binrepo structure&quot; % silent)
+- download(topdir, show=False)
+- for path in paths:
+- if svn.info2(path):
+- sys.stderr.write(&quot;'%s' is already tracked by svn, ignoring\n&quot; %
+- path)
+- continue
+- name = os.path.basename(path)
+- binpath = os.path.join(bindir, name)
+- os.rename(path, binpath)
+- svn.add(binpath)
+- if not message:
+- message = &quot;%s: new binary files %s&quot; % (silent, &quot; &quot;.join(paths))
+- make_symlinks(bindir, sourcesdir)
+- update = update_sources_threaded(topdir, added=paths)
+- rev = svn.commit(binpath, log=message)
+- svn.propset(PROP_BINREPO_REV, str(rev), topdir)
+- sources = sources_path(topdir)
+- svn.add(sources)
+- update.join()
+- svn.commit(topdir + &quot; &quot; + sources, log=message, nonrecursive=True)
+-
+-def mapped_revision(target, revision, wc=False):
+- &quot;&quot;&quot;Maps a txtrepo revision to a binrepo datespec
+-
+- This datespec can is intended to be used by svn .. -r DATE.
+-
+- @target: a working copy path or a URL
+- @revision: if target is a URL, the revision number used when fetching
+- svn info
+- @wc: if True indicates that 'target' must be interpreted as a
+- the path of a svn working copy, otherwise it is handled as a URL
+- &quot;&quot;&quot;
+- svn = SVN()
+- binrev = None
+- if wc:
+- spath = sources_path(target)
+- if os.path.exists(spath):
+- infolines = svn.info(spath, xml=True)
+- if infolines:
+- rawinfo = &quot;&quot;.join(infolines) # arg!
+- found = re.search(&quot;&lt;date&gt;(.*?)&lt;/date&gt;&quot;, rawinfo).groups()
+- date = found[0]
+- else:
+- raise Error, &quot;bogus 'svn info' for '%s'&quot; % spath
+- else:
+- raise Error, &quot;'%s' was not found&quot; % spath
+- else:
+- url = mirror._joinurl(target, sources_path(&quot;&quot;))
+- date = svn.propget(&quot;svn:date&quot;, url, rev=revision, revprop=True)
+- if not date:
+- raise Error, &quot;no valid date available for '%s'&quot; % url
+- binrev = &quot;{%s}&quot; % date
+- return binrev
+-
+-def markrelease(sourceurl, releasesurl, version, release, revision):
+- svn = SVN()
+- binrev = mapped_revision(sourceurl, revision)
+- binsource = translate_url(sourceurl)
+- binreleases = translate_url(releasesurl)
+- versiondir = mirror._joinurl(binreleases, version)
+- dest = mirror._joinurl(versiondir, release)
+- svn.mkdir(binreleases, noerror=1, log=&quot;created directory for releases&quot;)
+- svn.mkdir(versiondir, noerror=1, log=&quot;created directory for version %s&quot; % version)
+- svn.copy(binsource, dest, rev=binrev,
+- log=&quot;%%markrelease ver=%s rel=%s rev=%s binrev=%s&quot; % (version, release,
+- revision, binrev))
+
+<a id="build_systemrepsystags191RepSysbinrepopyfromrev204build_systemrepsystrunkRepSysbinrepopy">Copied: build_system/repsys/tags/1.9.1/RepSys/binrepo.py (from rev 204, build_system/repsys/trunk/RepSys/binrepo.py)</a>
+===================================================================
+--- build_system/repsys/tags/1.9.1/RepSys/binrepo.py (rev 0)
++++ build_system/repsys/tags/1.9.1/RepSys/binrepo.py 2011-01-04 16:17:04 UTC (rev 205)
+@@ -0,0 +1,394 @@
++from RepSys import Error, config, mirror, layout
++from RepSys.util import execcmd, rellink
++from RepSys.svn import SVN
++
++import sys
++import os
++import string
++import stat
++import shutil
++import re
++import tempfile
++import hashlib
++import urlparse
++import threading
++from cStringIO import StringIO
++
++DEFAULT_TARBALLS_REPO = &quot;/tarballs&quot;
++BINARIES_DIR_NAME = &quot;SOURCES&quot;
++BINARIES_CHECKOUT_NAME = &quot;SOURCES-bin&quot;
++
++PROP_USES_BINREPO = &quot;mdv:uses-binrepo&quot;
++PROP_BINREPO_REV = &quot;mdv:binrepo-rev&quot;
++
++BINREPOS_SECTION = &quot;binrepos&quot;
++
++SOURCES_FILE = &quot;sha1.lst&quot;
++
++class ChecksumError(Error):
++ pass
++
++def svn_baseurl(target):
++ svn = SVN()
++ info = svn.info2(target)
++ if info is None:
++ # unversioned resource
++ newtarget = os.path.dirname(target)
++ info = svn.info2(newtarget)
++ assert info is not None, &quot;svn_basedir should not be used with a &quot;\
++ &quot;non-versioned directory&quot;
++ root = info[&quot;Repository Root&quot;]
++ url = info[&quot;URL&quot;]
++ kind = info[&quot;Node Kind&quot;]
++ path = url[len(root):]
++ if kind == &quot;directory&quot;:
++ return url
++ basepath = os.path.dirname(path)
++ baseurl = mirror.normalize_path(url + &quot;/&quot; + basepath)
++ return baseurl
++
++def svn_root(target):
++ svn = SVN()
++ info = svn.info2(target)
++ if info is None:
++ newtarget = os.path.dirname(target)
++ info = svn.info2(newtarget)
++ assert info is not None
++ return info[&quot;Repository Root&quot;]
++
++def enabled(url):
++ #TODO use information from url to find out whether we have a binrepo
++ # available for this url
++ use = config.getbool(&quot;global&quot;, &quot;use-binaries-repository&quot;, False)
++ return use
++
++def default_repo():
++ base = config.get(&quot;global&quot;, &quot;binaries-repository&quot;, None)
++ if base is None:
++ default_parent = config.get(&quot;global&quot;, &quot;default_parent&quot;, None)
++ if default_parent is None:
++ raise Error, &quot;no binaries-repository nor default_parent &quot;\
++ &quot;configured&quot;
++ comps = urlparse.urlparse(default_parent)
++ base = comps[1] + &quot;:&quot; + DEFAULT_TARBALLS_REPO
++ return base
++
++def translate_url(url):
++ url = mirror.normalize_path(url)
++ main = mirror.normalize_path(layout.repository_url())
++ subpath = url[len(main)+1:]
++ # [binrepos]
++ # updates/2009.0 = svn+ssh://svn.mandriva.com/svn/binrepo/20090/
++ ## svn+ssh://svn.mandriva.com/svn/packages/2009.0/trafshow/current
++ ## would translate to
++ ## svn+ssh://svn.mandriva.com/svn/binrepo/20090/updates/trafshow/current/
++ binbase = None
++ if BINREPOS_SECTION in config.sections():
++ for option, value in config.walk(BINREPOS_SECTION):
++ if subpath.startswith(option):
++ binbase = value
++ break
++ binurl = mirror._joinurl(binbase or default_repo(), subpath)
++ return binurl
++
++def translate_topdir(path):
++ &quot;&quot;&quot;Returns the URL in the binrepo from a given path inside a SVN
++ checkout directory.
++
++ @path: if specified, returns a URL in the binrepo whose path is the
++ same as the path inside the main repository.
++ &quot;&quot;&quot;
++ baseurl = svn_baseurl(path)
++ binurl = translate_url(baseurl)
++ target = mirror.normalize_path(binurl)
++ return target
++
++def is_binary(path):
++ raw = config.get(&quot;binrepo&quot;, &quot;upload-match&quot;,
++ &quot;\.(7z|Z|bin|bz2|cpio|db|deb|egg|gem|gz|jar|jisp|lzma|&quot;\
++ &quot;pdf|pgn\\.gz|pk3|rpm|rpm|run|sdz|smzip|tar|tbz|&quot;\
++ &quot;tbz2|tgz|ttf|uqm|wad|war|xar|xpi|zip)$&quot;)
++ maxsize = config.getint(&quot;binrepo&quot;, &quot;upload-match-size&quot;, &quot;1048576&quot;) # 1MiB
++ expr = re.compile(raw)
++ name = os.path.basename(path)
++ if expr.search(name):
++ return True
++ st = os.stat(path)
++ if st[stat.ST_SIZE] &gt;= maxsize:
++ return True
++ return False
++
++def find_binaries(paths):
++ new = []
++ for path in paths:
++ if os.path.isdir(path):
++ for name in os.listdir(path):
++ fpath = os.path.join(path, name)
++ if is_binary(fpath):
++ new.append(fpath)
++ else:
++ if is_binary(path):
++ new.append(path)
++ return new
++
++def make_symlinks(source, dest):
++ todo = []
++ tomove = []
++ for name in os.listdir(source):
++ path = os.path.join(source, name)
++ if not os.path.isdir(path) and not name.startswith(&quot;.&quot;):
++ destpath = os.path.join(dest, name)
++ linkpath = rellink(path, destpath)
++ if os.path.exists(destpath):
++ if (os.path.islink(destpath) and
++ os.readlink(destpath) == linkpath):
++ continue
++ movepath = destpath + &quot;.repsys-moved&quot;
++ if os.path.exists(movepath):
++ raise Error, &quot;cannot create symlink, %s already &quot;\
++ &quot;exists (%s too)&quot; % (destpath, movepath)
++ tomove.append((destpath, movepath))
++ todo.append((destpath, linkpath))
++ for destpath, movepath in tomove:
++ os.rename(destpath, movepath)
++ for destpath, linkpath in todo:
++ os.symlink(linkpath, destpath)
++
++def download(targetdir, pkgdirurl=None, export=False, show=True,
++ revision=None, symlinks=True, check=False):
++ assert not export or (export and pkgdirurl)
++ svn = SVN()
++ sourcespath = os.path.join(targetdir, &quot;SOURCES&quot;)
++ binpath = os.path.join(targetdir, BINARIES_CHECKOUT_NAME)
++ if pkgdirurl:
++ topurl = translate_url(pkgdirurl)
++ else:
++ topurl = translate_topdir(targetdir)
++ binrev = None
++ if revision:
++ if pkgdirurl:
++ binrev = mapped_revision(pkgdirurl, revision)
++ else:
++ binrev = mapped_revision(targetdir, revision, wc=True)
++ binurl = mirror._joinurl(topurl, BINARIES_DIR_NAME)
++ if export:
++ svn.export(binurl, binpath, rev=binrev, show=show)
++ else:
++ svn.checkout(binurl, binpath, rev=binrev, show=show)
++ if symlinks:
++ make_symlinks(binpath, sourcespath)
++ if check:
++ check_sources(targetdir)
++
++def import_binaries(topdir, pkgname):
++ &quot;&quot;&quot;Import all binaries from a given package checkout
++
++ (with pending svn adds)
++
++ @topdir: the path to the svn checkout
++ &quot;&quot;&quot;
++ svn = SVN()
++ topurl = translate_topdir(topdir)
++ sourcesdir = os.path.join(topdir, &quot;SOURCES&quot;)
++ bintopdir = tempfile.mktemp(&quot;repsys&quot;)
++ try:
++ svn.checkout(topurl, bintopdir)
++ checkout = True
++ except Error:
++ bintopdir = tempfile.mkdtemp(&quot;repsys&quot;)
++ checkout = False
++ try:
++ bindir = os.path.join(bintopdir, BINARIES_DIR_NAME)
++ if not os.path.exists(bindir):
++ if checkout:
++ svn.mkdir(bindir)
++ else:
++ os.mkdir(bindir)
++ binaries = find_binaries([sourcesdir])
++ update = update_sources_threaded(topdir, added=binaries)
++ for path in binaries:
++ name = os.path.basename(path)
++ binpath = os.path.join(bindir, name)
++ os.rename(path, binpath)
++ try:
++ svn.remove(path)
++ except Error:
++ # file not tracked
++ svn.revert(path)
++ if checkout:
++ svn.add(binpath)
++ log = &quot;imported binaries for %s&quot; % pkgname
++ if checkout:
++ rev = svn.commit(bindir, log=log)
++ else:
++ rev = svn.import_(bintopdir, topurl, log=log)
++ svn.propset(PROP_USES_BINREPO, &quot;yes&quot;, topdir)
++ svn.propset(PROP_BINREPO_REV, str(rev), topdir)
++ update.join()
++ svn.add(sources_path(topdir))
++ finally:
++ shutil.rmtree(bintopdir)
++
++def create_package_dirs(bintopdir):
++ svn = SVN()
++ binurl = mirror._joinurl(bintopdir, BINARIES_DIR_NAME)
++ silent = config.get(&quot;log&quot;, &quot;ignore-string&quot;, &quot;SILENT&quot;)
++ message = &quot;%s: created binrepo package structure&quot; % silent
++ svn.mkdir(binurl, log=message, parents=True)
++
++def parse_sources(path):
++ entries = {}
++ f = open(path)
++ for rawline in f:
++ line = rawline.strip()
++ try:
++ sum, name = line.split(None, 1)
++ except ValueError:
++ # failed to unpack, line format error
++ raise Error, &quot;invalid line in sources file: %s&quot; % rawline
++ entries[name] = sum
++ return entries
++
++def check_hash(path, sum):
++ newsum = file_hash(path)
++ if newsum != sum:
++ raise ChecksumError, &quot;different checksums for %s: expected %s, &quot;\
++ &quot;but %s was found&quot; % (path, sum, newsum)
++
++def check_sources(topdir):
++ spath = sources_path(topdir)
++ if not os.path.exists(spath):
++ raise Error, &quot;'%s' was not found&quot; % spath
++ entries = parse_sources(spath)
++ for name, sum in entries.iteritems():
++ fpath = os.path.join(topdir, &quot;SOURCES&quot;, name)
++ check_hash(fpath, sum)
++
++def file_hash(path):
++ sum = hashlib.sha1()
++ f = open(path)
++ while True:
++ block = f.read(4096)
++ if not block:
++ break
++ sum.update(block)
++ f.close()
++ return sum.hexdigest()
++
++def sources_path(topdir):
++ path = os.path.join(topdir, &quot;SOURCES&quot;, SOURCES_FILE)
++ return path
++
++def update_sources(topdir, added=[], removed=[]):
++ path = sources_path(topdir)
++ entries = {}
++ if os.path.isfile(path):
++ entries = parse_sources(path)
++ f = open(path, &quot;w&quot;) # open before calculating hashes
++ for name in removed:
++ entries.pop(removed)
++ for added_path in added:
++ name = os.path.basename(added_path)
++ entries[name] = file_hash(added_path)
++ for name in sorted(entries):
++ f.write(&quot;%s %s\n&quot; % (entries[name], name))
++ f.close()
++
++def update_sources_threaded(*args, **kwargs):
++ t = threading.Thread(target=update_sources, args=args, kwargs=kwargs)
++ t.start()
++ t.join()
++ return t
++
++def upload(path, message=None):
++ from RepSys.rpmutil import getpkgtopdir
++ svn = SVN()
++ if not os.path.exists(path):
++ raise Error, &quot;not found: %s&quot; % path
++ # XXX check if the path is under SOURCES/
++ paths = find_binaries([path])
++ if not paths:
++ raise Error, &quot;'%s' does not seem to have any tarballs&quot; % path
++ topdir = getpkgtopdir()
++ bintopdir = translate_topdir(topdir)
++ binurl = mirror._joinurl(bintopdir, BINARIES_DIR_NAME)
++ sourcesdir = os.path.join(topdir, &quot;SOURCES&quot;)
++ bindir = os.path.join(topdir, BINARIES_CHECKOUT_NAME)
++ silent = config.get(&quot;log&quot;, &quot;ignore-string&quot;, &quot;SILENT&quot;)
++ if not os.path.exists(bindir):
++ try:
++ download(topdir, show=False)
++ except Error:
++ # possibly the package does not exist
++ # (TODO check whether it is really a 'path not found' error)
++ pass
++ if not os.path.exists(bindir):
++ create_package_dirs(bintopdir)
++ svn.propset(PROP_USES_BINREPO, &quot;yes&quot;, topdir)
++ svn.commit(topdir, log=&quot;%s: created binrepo structure&quot; % silent)
++ download(topdir, show=False)
++ for path in paths:
++ if svn.info2(path):
++ sys.stderr.write(&quot;'%s' is already tracked by svn, ignoring\n&quot; %
++ path)
++ continue
++ name = os.path.basename(path)
++ binpath = os.path.join(bindir, name)
++ os.rename(path, binpath)
++ svn.add(binpath)
++ if not message:
++ message = &quot;%s: new binary files %s&quot; % (silent, &quot; &quot;.join(paths))
++ make_symlinks(bindir, sourcesdir)
++ update = update_sources_threaded(topdir, added=paths)
++ rev = svn.commit(binpath, log=message)
++ svn.propset(PROP_BINREPO_REV, str(rev), topdir)
++ sources = sources_path(topdir)
++ svn.add(sources)
++ update.join()
++ svn.commit(topdir + &quot; &quot; + sources, log=message, nonrecursive=True)
++
++def mapped_revision(target, revision, wc=False):
++ &quot;&quot;&quot;Maps a txtrepo revision to a binrepo datespec
++
++ This datespec can is intended to be used by svn .. -r DATE.
++
++ @target: a working copy path or a URL
++ @revision: if target is a URL, the revision number used when fetching
++ svn info
++ @wc: if True indicates that 'target' must be interpreted as a
++ the path of a svn working copy, otherwise it is handled as a URL
++ &quot;&quot;&quot;
++ svn = SVN()
++ binrev = None
++ if wc:
++ spath = sources_path(target)
++ if os.path.exists(spath):
++ infolines = svn.info(spath, xml=True)
++ if infolines:
++ rawinfo = &quot;&quot;.join(infolines) # arg!
++ found = re.search(&quot;&lt;date&gt;(.*?)&lt;/date&gt;&quot;, rawinfo).groups()
++ date = found[0]
++ else:
++ raise Error, &quot;bogus 'svn info' for '%s'&quot; % spath
++ else:
++ raise Error, &quot;'%s' was not found&quot; % spath
++ else:
++ url = mirror._joinurl(target, sources_path(&quot;&quot;))
++ date = svn.propget(&quot;svn:date&quot;, url, rev=revision, revprop=True)
++ if not date:
++ raise Error, &quot;no valid date available for '%s'&quot; % url
++ binrev = &quot;{%s}&quot; % date
++ return binrev
++
++def markrelease(sourceurl, releasesurl, version, release, revision):
++ svn = SVN()
++ binrev = mapped_revision(sourceurl, revision)
++ binsource = translate_url(sourceurl)
++ binreleases = translate_url(releasesurl)
++ versiondir = mirror._joinurl(binreleases, version)
++ dest = mirror._joinurl(versiondir, release)
++ svn.mkdir(binreleases, noerror=1, log=&quot;created directory for releases&quot;)
++ svn.mkdir(versiondir, noerror=1, log=&quot;created directory for version %s&quot; % version)
++ svn.copy(binsource, dest, rev=binrev,
++ log=&quot;%%markrelease ver=%s rel=%s rev=%s binrev=%s&quot; % (version, release,
++ revision, binrev))
+
+<a id="build_systemrepsystags191repsys">Deleted: build_system/repsys/tags/1.9.1/repsys</a>
+===================================================================
+--- build_system/repsys/trunk/repsys 2011-01-04 16:09:44 UTC (rev 202)
++++ build_system/repsys/tags/1.9.1/repsys 2011-01-04 16:17:04 UTC (rev 205)
+@@ -1,93 +0,0 @@
+-#!/usr/bin/python
+-from RepSys import Error, plugins, config
+-from RepSys.command import *
+-import getopt
+-import sys
+-
+-VERSION=&quot;1.9-binrepo&quot;
+-
+-HELP = &quot;&quot;&quot;\
+-Usage: repsys COMMAND [COMMAND ARGUMENTS]
+-
+-Tool to access and manage a package repository structure.
+-
+-http://wiki.mandriva.com/en/Development/Packaging/RepositorySystem/Quickstart
+-
+-Useful commands:
+- co checkout a package
+- ci commit changes
+- sync add-remove all file changes from the .spec
+- submit submit a package for build
+- putsrpm import a source package to the repository
+- getspec prints the spec
+- rpmlog prints the RPM changelog
+- getsrpm creates the source RPM
+- create create the structure of a new package
+- changed shows changes not submitted
+- authoremail prints the e-mail of a given author
+- switch relocate to mirror or upstream repository
+-
+-Run &quot;repsys COMMAND --help&quot; and &quot;man 8 repsys&quot; for more information.
+-
+-Written by Gustavo Niemeyer &lt;gustavo@niemeyer.net&gt;
+-&quot;&quot;&quot;
+-
+-command_aliases = {&quot;import&quot;: &quot;putsrpm&quot;}
+-
+-def plugin_help(opt, val, parser, mode):
+- if parser is None:
+- prog = sys.argv[0]
+- print &quot;Use %s --help-plugin &lt;plugin name&gt;&quot; % prog
+- print &quot;Available plugins:&quot;
+- print
+- for name in plugins.list():
+- print name
+- else:
+- print plugins.help(parser)
+- raise SystemExit
+-
+-def parse_options():
+- parser = OptionParser(help=HELP, version=&quot;%prog &quot;+VERSION)
+- parser.disable_interspersed_args()
+- parser.add_option(&quot;--debug&quot;, action=&quot;store_true&quot;)
+- parser.add_option(&quot;--help-plugins&quot;, action=&quot;callback&quot;, callback=plugin_help)
+- parser.add_option(&quot;--help-plugin&quot;, type=&quot;string&quot;, dest=&quot;__ignore&quot;,
+- action=&quot;callback&quot;, callback=plugin_help)
+- opts, args = parser.parse_args()
+- del opts.__ignore
+- if len(args) &lt; 1:
+- parser.print_help(sys.stderr)
+- sys.exit(1)
+- opts.command = args[0]
+- opts.argv = args
+- return opts
+-
+-def dispatch_command(command, argv, debug=0):
+- sys.argv = argv
+- try:
+- command = command_aliases[command]
+- except KeyError:
+- pass
+- if debug:
+- config.set(&quot;global&quot;, &quot;verbose&quot;, &quot;yes&quot;)
+- try:
+- repsys_module = __import__(&quot;RepSys.commands.&quot;+command)
+- commands_module = getattr(repsys_module, &quot;commands&quot;)
+- command_module = getattr(commands_module, command)
+- except (ImportError, AttributeError):
+- etype, exc, tb = sys.exc_info()
+- if tb.tb_next is None and not debug:
+- raise Error, &quot;invalid command '%s'&quot; % command
+- raise
+- command_module.main()
+-
+-if __name__ == &quot;__main__&quot;:
+- try:
+- plugins.load()
+- except Error, e:
+- sys.stderr.write(&quot;plugin initialization error: %s\n&quot; % e)
+- sys.exit(1)
+- config.set(&quot;global&quot;, &quot;repsys-cmd&quot;, sys.argv[0])
+- do_command(parse_options, dispatch_command)
+-
+-# vim:et:ts=4:sw=4
+
+<a id="build_systemrepsystags191repsysfromrev204build_systemrepsystrunkrepsys">Copied: build_system/repsys/tags/1.9.1/repsys (from rev 204, build_system/repsys/trunk/repsys)</a>
+===================================================================
+--- build_system/repsys/tags/1.9.1/repsys (rev 0)
++++ build_system/repsys/tags/1.9.1/repsys 2011-01-04 16:17:04 UTC (rev 205)
+@@ -0,0 +1,93 @@
++#!/usr/bin/python
++from RepSys import Error, plugins, config
++from RepSys.command import *
++import getopt
++import sys
++
++VERSION=&quot;1.9.1-binrepo&quot;
++
++HELP = &quot;&quot;&quot;\
++Usage: repsys COMMAND [COMMAND ARGUMENTS]
++
++Tool to access and manage a package repository structure.
++
++http://wiki.mandriva.com/en/Development/Packaging/RepositorySystem/Quickstart
++
++Useful commands:
++ co checkout a package
++ ci commit changes
++ sync add-remove all file changes from the .spec
++ submit submit a package for build
++ putsrpm import a source package to the repository
++ getspec prints the spec
++ rpmlog prints the RPM changelog
++ getsrpm creates the source RPM
++ create create the structure of a new package
++ changed shows changes not submitted
++ authoremail prints the e-mail of a given author
++ switch relocate to mirror or upstream repository
++
++Run &quot;repsys COMMAND --help&quot; and &quot;man 8 repsys&quot; for more information.
++
++Written by Gustavo Niemeyer &lt;gustavo@niemeyer.net&gt;
++&quot;&quot;&quot;
++
++command_aliases = {&quot;import&quot;: &quot;putsrpm&quot;}
++
++def plugin_help(opt, val, parser, mode):
++ if parser is None:
++ prog = sys.argv[0]
++ print &quot;Use %s --help-plugin &lt;plugin name&gt;&quot; % prog
++ print &quot;Available plugins:&quot;
++ print
++ for name in plugins.list():
++ print name
++ else:
++ print plugins.help(parser)
++ raise SystemExit
++
++def parse_options():
++ parser = OptionParser(help=HELP, version=&quot;%prog &quot;+VERSION)
++ parser.disable_interspersed_args()
++ parser.add_option(&quot;--debug&quot;, action=&quot;store_true&quot;)
++ parser.add_option(&quot;--help-plugins&quot;, action=&quot;callback&quot;, callback=plugin_help)
++ parser.add_option(&quot;--help-plugin&quot;, type=&quot;string&quot;, dest=&quot;__ignore&quot;,
++ action=&quot;callback&quot;, callback=plugin_help)
++ opts, args = parser.parse_args()
++ del opts.__ignore
++ if len(args) &lt; 1:
++ parser.print_help(sys.stderr)
++ sys.exit(1)
++ opts.command = args[0]
++ opts.argv = args
++ return opts
++
++def dispatch_command(command, argv, debug=0):
++ sys.argv = argv
++ try:
++ command = command_aliases[command]
++ except KeyError:
++ pass
++ if debug:
++ config.set(&quot;global&quot;, &quot;verbose&quot;, &quot;yes&quot;)
++ try:
++ repsys_module = __import__(&quot;RepSys.commands.&quot;+command)
++ commands_module = getattr(repsys_module, &quot;commands&quot;)
++ command_module = getattr(commands_module, command)
++ except (ImportError, AttributeError):
++ etype, exc, tb = sys.exc_info()
++ if tb.tb_next is None and not debug:
++ raise Error, &quot;invalid command '%s'&quot; % command
++ raise
++ command_module.main()
++
++if __name__ == &quot;__main__&quot;:
++ try:
++ plugins.load()
++ except Error, e:
++ sys.stderr.write(&quot;plugin initialization error: %s\n&quot; % e)
++ sys.exit(1)
++ config.set(&quot;global&quot;, &quot;repsys-cmd&quot;, sys.argv[0])
++ do_command(parse_options, dispatch_command)
++
++# vim:et:ts=4:sw=4
+
+</pre></div>
+
+</body>
+</html> \ No newline at end of file