aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2005-12-07 10:44:44 +0000
committerMystery Man <unknown@mandriva.org>2005-12-07 10:44:44 +0000
commitd42426e5263b01076457675cdfda6c6c5f8a9abf (patch)
tree9fc396a8974d3f1fd098d33113c266a00619c70c
parent1c16d2812f86016cf8a1a6fa525281c644b9ab89 (diff)
downloadmgarepo-d42426e5263b01076457675cdfda6c6c5f8a9abf.tar
mgarepo-d42426e5263b01076457675cdfda6c6c5f8a9abf.tar.gz
mgarepo-d42426e5263b01076457675cdfda6c6c5f8a9abf.tar.bz2
mgarepo-d42426e5263b01076457675cdfda6c6c5f8a9abf.tar.xz
mgarepo-d42426e5263b01076457675cdfda6c6c5f8a9abf.zip
This commit was manufactured by cvs2svn to create tag 'V1_5_4_1mdk'.topic/V1_5_X@939
-rw-r--r--.cvsignore1
-rw-r--r--ChangeLog64
-rw-r--r--Makefile62
-rw-r--r--PKG-INFO4
-rw-r--r--RepSys/commands/submit.py69
-rw-r--r--RepSys/rpmutil.py2
-rwxr-xr-xcreate-srpm71
-rwxr-xr-xgetsrpm-mdk5
-rwxr-xr-xrebrand-mdk10
-rwxr-xr-xrepsys2
-rw-r--r--repsys.conf28
-rw-r--r--repsys.spec33
12 files changed, 287 insertions, 64 deletions
diff --git a/.cvsignore b/.cvsignore
new file mode 100644
index 0000000..9629990
--- /dev/null
+++ b/.cvsignore
@@ -0,0 +1 @@
+repsys-*.tar.bz2
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..77dcc22
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,64 @@
+2005-12-07 11:44 Frederic Lepied <flepied at mandriva.com>
+
+ * repsys.spec: 1.5.4-1mdk
+
+2005-12-07 11:44 Frederic Lepied <flepied at mandriva.com>
+
+ * repsys: 1.5.4
+
+2005-12-07 11:42 Frederic Lepied <flepied at mandriva.com>
+
+ * rebrand-mdk, getsrpm-mdk, create-srpm, .cvsignore, Makefile:
+ initial revision
+
+2005-12-07 11:21 Frederic Lepied <flepied at mandriva.com>
+
+ * repsys.conf: real life one
+
+2005-12-07 11:17 Frederic Lepied <flepied at mandriva.com>
+
+ * RepSys/commands/submit.py: added support for svn+ssh access
+ method.
+
+2005-12-07 11:16 Frederic Lepied <flepied at mandriva.com>
+
+ * RepSys/rpmutil.py: get_srpm: fixed a test
+
+2005-12-07 11:12 Frederic Lepied <flepied at mandriva.com>
+
+ * PKG-INFO: fixed URL
+
+2005-12-07 11:06 Frederic Lepied <flepied at mandriva.com>
+
+ * MANIFEST.in, PKG-INFO, repsys, repsys.conf, repsys.spec,
+ setup.cfg, setup.py, RepSys/ConfigParser.py, RepSys/__init__.py,
+ RepSys/cgiutil.py, RepSys/command.py, RepSys/log.py,
+ RepSys/pexpect.py, RepSys/rpm.py, RepSys/rpmutil.py,
+ RepSys/svn.py, RepSys/util.py, RepSys/cgi/__init__.py,
+ RepSys/cgi/soapserver.py, RepSys/cgi/submit.py,
+ RepSys/cgi/xmlrpcserver.py, RepSys/commands/__init__.py,
+ RepSys/commands/authoremail.py, RepSys/commands/changed.py,
+ RepSys/commands/co.py, RepSys/commands/create.py,
+ RepSys/commands/editlog.py, RepSys/commands/getspec.py,
+ RepSys/commands/getsrpm.py, RepSys/commands/markrelease.py,
+ RepSys/commands/patchspec.py, RepSys/commands/putsrpm.py,
+ RepSys/commands/rpmlog.py, RepSys/commands/submit.py: Initial
+ revision
+
+2005-12-07 11:06 Frederic Lepied <flepied at mandriva.com>
+
+ * MANIFEST.in, PKG-INFO, repsys, repsys.conf, repsys.spec,
+ setup.cfg, setup.py, RepSys/ConfigParser.py, RepSys/__init__.py,
+ RepSys/cgiutil.py, RepSys/command.py, RepSys/log.py,
+ RepSys/pexpect.py, RepSys/rpm.py, RepSys/rpmutil.py,
+ RepSys/svn.py, RepSys/util.py, RepSys/cgi/__init__.py,
+ RepSys/cgi/soapserver.py, RepSys/cgi/submit.py,
+ RepSys/cgi/xmlrpcserver.py, RepSys/commands/__init__.py,
+ RepSys/commands/authoremail.py, RepSys/commands/changed.py,
+ RepSys/commands/co.py, RepSys/commands/create.py,
+ RepSys/commands/editlog.py, RepSys/commands/getspec.py,
+ RepSys/commands/getsrpm.py, RepSys/commands/markrelease.py,
+ RepSys/commands/patchspec.py, RepSys/commands/putsrpm.py,
+ RepSys/commands/rpmlog.py, RepSys/commands/submit.py: initial
+ import
+
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..46ddead
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,62 @@
+#---------------------------------------------------------------
+# Project : Mandriva Linux
+# Module : repsys
+# File : Makefile
+# Version : $Id$
+# Author : Frederic Lepied
+# Created On : Wed Dec 7 11:33:09 2005
+#---------------------------------------------------------------
+
+PACKAGE=repsys
+VERSION:=$(shell rpm -q --qf %{VERSION} --specfile $(PACKAGE).spec)
+RELEASE:=$(shell rpm -q --qf %{RELEASE} --specfile $(PACKAGE).spec)
+TAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__')
+
+FILES = ChangeLog Makefile MANIFEST.in PKG-INFO create-srpm getsrpm-mdk rebrand-mdk \
+ repsys repsys.conf repsys.spec setup.cfg setup.py RepSys/*.py RepSys/{cgi,commands}/*.py
+
+# rules to build a test rpm
+
+localrpm: localdist buildrpm
+
+localdist: cleandist dir localcopy tar
+
+cleandist:
+ rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.bz2
+
+dir:
+ mkdir $(PACKAGE)-$(VERSION)
+
+localcopy:
+ tar c $(FILES) | tar x -C $(PACKAGE)-$(VERSION)
+
+tar:
+ tar cvf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION)
+ bzip2 -9vf $(PACKAGE)-$(VERSION).tar
+ rm -rf $(PACKAGE)-$(VERSION)
+
+buildrpm:
+ rpm -ta $(RPMOPT) $(PACKAGE)-$(VERSION).tar.bz2
+
+# rules to build a distributable rpm
+
+rpm: changelog cvstag dist buildrpm
+
+dist: cleandist dir export tar
+
+export:
+ cvs export -d $(PACKAGE)-$(VERSION) -r $(TAG) $(PACKAGE)
+
+cvstag:
+ cvs tag $(CVSTAGOPT) $(TAG)
+
+changelog: ../common/username
+ cvs2cl -U ../common/username -I ChangeLog
+ rm -f ChangeLog.bak
+ cvs commit -m "Generated by cvs2cl the `date '+%d_%b'`" ChangeLog
+
+# Local variables:
+# mode: makefile
+# End:
+#
+# Makefile ends here
diff --git a/PKG-INFO b/PKG-INFO
index 59af750..32a444d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,8 +1,8 @@
Metadata-Version: 1.0
Name: repsys
-Version: 1.5.2
+Version: 1.5.3
Summary: Tools for Mandriva Linux repository access and management
-Home-page: http://qa.mandrakesoft.com/twiki/bin/view/Main/RepositorySystem
+Home-page: http://qa.mandriva.com/twiki/bin/view/Main/RepositorySystem
Author: Gustavo Niemeyer
Author-email: gustavo@niemeyer.net
License: GPL
diff --git a/RepSys/commands/submit.py b/RepSys/commands/submit.py
index ff442c1..1c3bf8b 100644
--- a/RepSys/commands/submit.py
+++ b/RepSys/commands/submit.py
@@ -1,6 +1,7 @@
#!/usr/bin/python
from RepSys import Error, config
from RepSys.command import *
+from RepSys.util import execcmd
from RepSys.rpmutil import get_spec, get_submit_info
from RepSys.util import get_auth
import urllib
@@ -33,7 +34,7 @@ Examples:
def parse_options():
parser = OptionParser(help=HELP)
parser.defaults["revision"] = ""
- parser.add_option("-t", dest="target", default="Snapshot")
+ parser.add_option("-t", dest="target", default="Cooker")
parser.add_option("-l", dest="list", action="store_true")
opts, args = parser.parse_args()
if not args:
@@ -63,41 +64,49 @@ def submit(pkgdirurl, revision, target, list=0):
host, path = urllib.splithost(rest)
user, host = urllib.splituser(host)
host, port = urllib.splitport(host)
- if type != "https":
- raise Error, "you must use https:// urls"
+ if type != "https" and type != "svn+ssh":
+ raise Error, "you must use https:// or svn+ssh:// urls"
if user:
user, passwd = urllib.splitpasswd(user)
if passwd:
raise Error, "do not use a password in your command line"
- user, passwd = get_auth(username=user)
- #soap = NINZ.client.Binding(host=host,
- # url="https://%s/scripts/cnc/soap" % host,
- # ssl=1,
- # auth=(NINZ.client.AUTH.httpbasic,
- # user, passwd))
- if port:
- port = ":"+port
- else:
- port = ""
- iface = xmlrpclib.ServerProxy("https://%s:%s@%s%s/scripts/cnc/xmlrpc"
- % (user, passwd, host, port))
- try:
- if list:
- targets = iface.submit_targets()
- if not targets:
- raise Error, "no targets available"
- sys.stdout.writelines(['"%s"\n' % x for x in targets])
+
+ if type == "https":
+ user, passwd = get_auth(username=user)
+ #soap = NINZ.client.Binding(host=host,
+ # url="https://%s/scripts/cnc/soap" % host,
+ # ssl=1,
+ # auth=(NINZ.client.AUTH.httpbasic,
+ # user, passwd))
+ if port:
+ port = ":"+port
else:
- iface.submit_package(pkgdirurl, revision, target)
+ port = ""
+ iface = xmlrpclib.ServerProxy("https://%s:%s@%s%s/scripts/cnc/xmlrpc"
+ % (user, passwd, host, port))
+ try:
+ if list:
+ targets = iface.submit_targets()
+ if not targets:
+ raise Error, "no targets available"
+ sys.stdout.writelines(['"%s"\n' % x for x in targets])
+ else:
+ iface.submit_package(pkgdirurl, revision, target)
+ print "Package submitted!"
+ #except NINZ.client.SoapError, e:
+ except xmlrpclib.ProtocolError, e:
+ raise Error, "remote error: "+str(e.errmsg)
+ except xmlrpclib.Fault, e:
+ raise Error, "remote error: "+str(e.faultString)
+ except xmlrpclib.Error, e:
+ raise Error, "remote error: "+str(e)
+ else:
+ status, output = execcmd("ssh %s /usr/share/repsys/create-srpm '%s' %s %s" % (host, pkgdirurl, revision, target))
+ if status == 0:
print "Package submitted!"
- #except NINZ.client.SoapError, e:
- except xmlrpclib.ProtocolError, e:
- raise Error, "remote error: "+str(e.errmsg)
- except xmlrpclib.Fault, e:
- raise Error, "remote error: "+str(e.faultString)
- except xmlrpclib.Error, e:
- raise Error, "remote error: "+str(e)
-
+ else:
+ sys.exit(status)
+
def main():
do_command(parse_options, submit)
diff --git a/RepSys/rpmutil.py b/RepSys/rpmutil.py
index 3df9818..7b6446f 100644
--- a/RepSys/rpmutil.py
+++ b/RepSys/rpmutil.py
@@ -67,7 +67,7 @@ def get_srpm(pkgdirurl,
packager = " --define 'packager %s'" % packager
execcmd("rpm -bs --nodeps --define '_topdir %s'%s %s" %
(tmpdir, packager, spec))
- if revname:
+ if revision:
srpm = glob.glob(os.path.join(srpmsdir, "*.src.rpm"))[0]
srpmbase = os.path.basename(srpm)
os.rename(srpm, "%s/@%i:%s" % (srpmsdir, revision, srpmbase))
diff --git a/create-srpm b/create-srpm
new file mode 100755
index 0000000..cdf8e26
--- /dev/null
+++ b/create-srpm
@@ -0,0 +1,71 @@
+#!/usr/bin/python
+
+from RepSys import Error, config
+from RepSys.rpmutil import get_srpm
+from RepSys.cgiutil import get_targets
+import sys
+import os
+import pwd
+
+class CmdError(Error): pass
+
+class CmdIface:
+ def author_email(self, author):
+ return config.get("users", author)
+
+ def submit_package(self, packageurl, packagerev, targetname):
+ pw = pwd.getpwuid(os.getuid())
+ username = pw[0]
+ packager = config.get("users", username) or pw[4]
+ if not packager:
+ raise CmdError, "your email was not found"
+ elif not packagerev:
+ raise CmdError, "no revision provided"
+ elif not targetname:
+ raise CmdError, "no target provided"
+ else:
+ targetname = targetname.lower()
+ for target in get_targets():
+ if target.name.lower() == targetname:
+ break
+ else:
+ raise CmdError, "target not found"
+ try:
+ tmp = int(packagerev)
+ except ValueError:
+ raise CmdError, "invalid revision provided"
+ for allowed in target.allowed:
+ if packageurl.startswith(allowed):
+ break
+ else:
+ raise CmdError, "%s is not allowed for this target" \
+ % packageurl
+ get_srpm(packageurl,
+ revision=packagerev,
+ targetdirs=target.target,
+ packager=packager,
+ revname=1,
+ svnlog=1,
+ scripts=target.scripts)
+ return 1
+
+ def submit_targets(self):
+ return [x.name for x in get_targets()]
+
+
+def main():
+
+ iface = CmdIface()
+
+ print sys.argv
+
+ if len(sys.argv) == 3:
+ rev = None
+ target = sys.argv[2]
+ else:
+ rev = sys.argv[2]
+ target = sys.argv[3]
+
+ iface.submit_package(sys.argv[1], rev, target)
+
+main()
diff --git a/getsrpm-mdk b/getsrpm-mdk
new file mode 100755
index 0000000..2dcf530
--- /dev/null
+++ b/getsrpm-mdk
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+PACKAGE=$1
+
+repsys getsrpm -l $PACKAGE
diff --git a/rebrand-mdk b/rebrand-mdk
new file mode 100755
index 0000000..d94d173
--- /dev/null
+++ b/rebrand-mdk
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+TOPDIR=$1
+SPEC=$2
+REV=$3
+
+if [ -x $TOPDIR/build_sources ]; then
+ cd $TOPDIR
+ ./build_sources "$@"
+fi
diff --git a/repsys b/repsys
index 99ff1e6..20be09e 100755
--- a/repsys
+++ b/repsys
@@ -4,7 +4,7 @@ from RepSys.command import *
import getopt
import sys
-VERSION="1.5.3"
+VERSION="1.5.4"
HELP = """\
Usage: repsys COMMAND [COMMAND ARGUMENTS]
diff --git a/repsys.conf b/repsys.conf
index 05b4890..a5812bf 100644
--- a/repsys.conf
+++ b/repsys.conf
@@ -1,22 +1,22 @@
-
[global]
-#verbose = true
-default_parent = svn+ssh://cvs.mandriva.com/svn/mdv/cooker/
-
-[auth]
-#username = foo
-#password = bar
+verbose = no
+default_parent = svn+ssh://svn.mandriva.com/svn/mdv/cooker
[log]
-concat = mapi2
-oldurl = svn+ssh://cvs.mandriva.com/svn/mdv/misc
+oldurl = svn+ssh://svn.mandriva.com/svn/mdv/misc
[users]
+andreas = Andreas Hasenack <andreas@mandriva.com>
+boiko = Gustavo Pichorim Boiko <boiko@mandriva.com>
+cavassin = Wanderlei Cavassin <cavassin@mandriva.com>
+fcrozat = Frederic Crozat <fcrozat@mandriva.com>
+flepied = Frederic Lepied <flepied@mandriva.com>
helio = Helio Chissini de Castro <helio@mandriva.com>
+lmontel = Laurent Montel <lmontel@mandriva.com>
+oden = Oden Eriksson <oeriksson@mandriva.com>
[submit]
-name = cooker
-target = /teste-root/testadora/entrada/
-allowed = svn+ssh://cvs.mandriva.com/svn/mdv/cooker/
-# scripts = /svnroot/cnc.admin/rebrand-cl
-
+name = Cooker
+target = /export/home/repsys
+allowed = svn+ssh://svn.mandriva.com/svn/mdv/cooker
+scripts = /usr/share/repsys/rebrand-mdk
diff --git a/repsys.spec b/repsys.spec
index 9805508..45636f0 100644
--- a/repsys.spec
+++ b/repsys.spec
@@ -5,23 +5,18 @@
%define py_libdir %{py_prefix}/%{_lib}/python%{py_ver}
%define py_sitedir %{py_libdir}/site-packages
-%define repsys_version 1.5.3
+%define repsys_version 1.5.4
Name: repsys
-Version: 1.5.3.1
-Release: 4mdk
+Version: 1.5.4
+Release: 1mdk
Summary: Tools for Mandriva Linux repository access and management
Group: Development/Other
-Source: %{name}-%{repsys_version}.tar.gz
-Source1: mdk-repsys.conf
-Source2: mdk-rebrand-mdk
-# Direct wrapper for get srpm with release based on svn number
-Source3: getsrpm-mdk
-Patch0: repsys-mdk.patch
-Patch1: mdk-changelog-repsys-1.5.3.patch
+Source: %{name}-%{repsys_version}.tar.bz2
License: GPL
URL: http://qa.mandriva.com/twiki/bin/view/Main/RepositorySystem
Prefix: %{_prefix}
+BuildArch: noarch
Buildrequires: python-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: python
@@ -32,8 +27,6 @@ Tools for Mandriva Linux repository access and management.
%prep
%setup -q -n %{name}-%{repsys_version}
-%patch0 -p1
-%patch1 -p1
%build
python setup.py build
@@ -50,9 +43,10 @@ python -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir
mkdir -p %{buildroot}%{_sysconfdir}
mkdir -p %{buildroot}%{_datadir}/repsys/
mkdir -p %{buildroot}%{_bindir}/
-cp %{SOURCE1} %{buildroot}%{_sysconfdir}/repsys.conf
-cp %{SOURCE2} %{buildroot}%{_datadir}/repsys/rebrand-mdk
-cp %{SOURCE3} %{buildroot}%{_bindir}/getsrpm-mdk
+install -m 0644 repsys.conf %{buildroot}%{_sysconfdir}/repsys.conf
+install -m 0755 rebrand-mdk %{buildroot}%{_datadir}/repsys/rebrand-mdk
+install -m 0755 getsrpm-mdk %{buildroot}%{_bindir}/getsrpm-mdk
+install -m 0755 create-srpm %{buildroot}%{_datadir}/repsys/create-srpm
%clean
rm -rf %{buildroot}
@@ -65,11 +59,18 @@ rm -rf %{buildroot}
%{_bindir}/repsys
%{_bindir}/getsrpm-mdk
%{_datadir}/repsys/rebrand-mdk
+%{_datadir}/repsys/create-srpm
%{py_sitedir}/RepSys
-
+# MAKE THE CHANGES IN CVS: NO PATCH OR SOURCE ALLOWED
%changelog
+* Wed Dec 7 2005 Frederic Lepied <flepied@mandriva.com> 1.5.4-1mdk
+- switch to cvs
+
+* Fri Oct 21 2005 Frederic Lepied <flepied@mandriva.com> 1.5.3.1-4.1mdk
+- add svn+ssh access method
+
* Fri Sep 30 2005 Andreas Hasenack <andreas@mandriva.com>
+ 2005-09-30 18:25:48 (979)
- releasing 1.5.3.1-4mdk