[Pkg-debile-commits] [debile-master] 01/02: Massive renaming from lucy to debile-master.
Léo Cavaillé
leo.cavaille-guest at alioth.debian.org
Thu Aug 22 21:42:30 UTC 2013
This is an automated email from the git hooks/post-receive script.
leo.cavaille-guest pushed a commit to branch master
in repository debile-master.
commit 1f024a5f05d770e3a34c5417c384f1e110d97162
Author: Léo Cavaillé <leo at cavaille.net>
Date: Thu Aug 22 15:38:04 2013 +0200
Massive renaming from lucy to debile-master.
Adding some documentation to ORM.
---
{lucy/cli => debile}/__init__.py | 0
debile/master/__init__.py | 2 ++
{lucy => debile/master}/archive.py | 22 +++++++-------
{lucy => debile/master}/changes.py | 0
{lucy => debile/master}/cli/__init__.py | 0
{lucy => debile/master}/cli/init.py | 0
{lucy => debile/master}/cli/nuke.py | 0
{lucy => debile/master}/config.py | 2 +-
{lucy => debile/master}/incoming.py | 20 ++++++-------
{lucy => debile/master}/mail.py | 0
{lucy => debile/master}/orm.py | 15 +++++-----
{lucy => debile/master}/server.py | 30 +++++++++++---------
.../master}/templates/dput-ng/profile-user.json | 0
{lucy => debile/master}/templates/mails/failed | 0
.../master}/templates/reprepro/distributions | 2 +-
{lucy => debile/master}/utils.py | 0
lucy/__init__.py | 2 --
scripts/{lucy-processd => debile-processd} | 0
setup.py | 15 +++++-----
skel/{lucy.ini => debile-master.ini} | 14 ++++-----
20 files changed, 62 insertions(+), 62 deletions(-)
diff --git a/lucy/cli/__init__.py b/debile/__init__.py
similarity index 100%
copy from lucy/cli/__init__.py
copy to debile/__init__.py
diff --git a/debile/master/__init__.py b/debile/master/__init__.py
new file mode 100644
index 0000000..ccee50e
--- /dev/null
+++ b/debile/master/__init__.py
@@ -0,0 +1,2 @@
+__appname__ = "debile-master"
+__version__ = "0.0.1"
diff --git a/lucy/archive.py b/debile/master/archive.py
similarity index 96%
rename from lucy/archive.py
rename to debile/master/archive.py
index 0e0c420..601ebbc 100644
--- a/lucy/archive.py
+++ b/debile/master/archive.py
@@ -1,6 +1,6 @@
-from lucy.config import Config
-from lucy.orm import User, Source, Binary, Package
-from lucy.utils import run_command
+from debile.master.config import Config
+from debile.master.orm import User, Source, Binary, Package
+from debile.master.utils import run_command
from debian import deb822
import shutil
import os
@@ -40,7 +40,7 @@ def generate_builders_dputcf():
u.login,
compiler)
l += "method = scp\n"
- l += "login = lucy\n"
+ l += "login = debile\n"
dputcf += l
dputcf += "\n"
return dputcf
@@ -50,7 +50,7 @@ class UserRepository:
"""
We call a UserRepository the set incoming + pool
debile-master repository is structured as :
-
+
<incoming_debile_dir>
/ <user_login>
/ source -> for dputting from the user
@@ -59,7 +59,7 @@ class UserRepository:
tar_1.26+dfsg-8_source.changes
tar_1.26+dfsg.orig.tar.xz
/ <compiler_type> -> for dputting from a builder
-
+
<pool_debile_dir>
/ <user_login>
/ source -> the source packages in a pool
@@ -171,10 +171,10 @@ class UserRepository:
os.makedirs(os.path.join(path, 'conf'))
# Create the distributions configuration file
jinjafile = os.path.join(
- os.path.dirname(__file__),
- "templates",
- "reprepro",
- "distributions")
+ os.path.dirname(__file__),
+ "templates",
+ "reprepro",
+ "distributions")
template = Template(open(jinjafile).read())
distribution_file = os.path.join(path, 'conf', 'distributions')
with open(distribution_file, 'w') as f:
@@ -254,7 +254,7 @@ def move_to_pool_binary(package, bfilename, root=None):
if not os.path.exists(path):
os.makedirs(path)
-
+
dest = os.path.join(path, bfilename)
source = os.path.join(incoming, bfilename)
os.rename(source, dest)
diff --git a/lucy/changes.py b/debile/master/changes.py
similarity index 100%
rename from lucy/changes.py
rename to debile/master/changes.py
diff --git a/lucy/cli/__init__.py b/debile/master/cli/__init__.py
similarity index 100%
rename from lucy/cli/__init__.py
rename to debile/master/cli/__init__.py
diff --git a/lucy/cli/init.py b/debile/master/cli/init.py
similarity index 100%
rename from lucy/cli/init.py
rename to debile/master/cli/init.py
diff --git a/lucy/cli/nuke.py b/debile/master/cli/nuke.py
similarity index 100%
rename from lucy/cli/nuke.py
rename to debile/master/cli/nuke.py
diff --git a/lucy/config.py b/debile/master/config.py
similarity index 88%
rename from lucy/config.py
rename to debile/master/config.py
index 90674ac..62ffa19 100644
--- a/lucy/config.py
+++ b/debile/master/config.py
@@ -8,7 +8,7 @@ class Config(ConfigParser.ConfigParser):
cls._instance = super(Config, cls).__new__(cls, *args, **kwargs)
return cls._instance
- def __init__(self, location="/etc/lucy.ini"):
+ def __init__(self, location="/etc/debile-master.ini"):
ConfigParser.ConfigParser.__init__(self)
self.read(location)
diff --git a/lucy/incoming.py b/debile/master/incoming.py
similarity index 93%
rename from lucy/incoming.py
rename to debile/master/incoming.py
index bd8f33b..46dc055 100644
--- a/lucy/incoming.py
+++ b/debile/master/incoming.py
@@ -1,11 +1,11 @@
from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
-from lucy.orm import User, Source, Machine, Binary, Job, Group
-from lucy.archive import move_to_pool_source, move_to_pool_binary, UserRepository
+from debile.master.orm import User, Source, Machine, Binary, Job, Group
+from debile.master.archive import move_to_pool_source, move_to_pool_binary, UserRepository
-from lucy.changes import parse_changes_file, ChangesFileException
-from lucy.utils import cd, fglob
-from lucy.config import Config
-from lucy.server import Session
+from debile.master.changes import parse_changes_file, ChangesFileException
+from debile.master.utils import cd, fglob
+from debile.master.config import Config
+from debile.master.server import Session
#from lucy.mail import send_mail
import os
@@ -161,8 +161,8 @@ def accept_binary(changes):
binaries = changes.get_files()
try:
- job_id = changes['x-lucy-job']
- print "Binary acceptance : produced by lucy job %s" % str(job_id)
+ job_id = changes['X-Debile-Job']
+ print "Binary acceptance : produced by debile job %s" % str(job_id)
except KeyError:
return reject(changes, 'no-job')
@@ -187,7 +187,7 @@ def accept_binary(changes):
return reject(changes, 'youre-not-a-machine')
print "Binary acceptance : originating debile-slave %s" % buildd.name
- for bfile in binaries:
+ for bfile in binaries:
print "Binary acceptance : processing %s" % bfile
# From the deb filemname, get the package name
bfilename=os.path.basename(bfile)
@@ -219,7 +219,7 @@ def accept_binary(changes):
b.compiler_type)
os.unlink(changes.get_filename())
-# This method looks at lucy's configuration to see what jobs we need to run on
+# This method looks at debile's configuration to see what jobs we need to run on
# either a source/binary package.
def add_jobs(package):
config = Config()
diff --git a/lucy/mail.py b/debile/master/mail.py
similarity index 100%
rename from lucy/mail.py
rename to debile/master/mail.py
diff --git a/lucy/orm.py b/debile/master/orm.py
similarity index 99%
rename from lucy/orm.py
rename to debile/master/orm.py
index 8cb836f..7e14d67 100644
--- a/lucy/orm.py
+++ b/debile/master/orm.py
@@ -1,4 +1,3 @@
-
# This ORM is the declaration of all the entities we are using in debile-master
# as well as the relations between these entities.
@@ -141,12 +140,6 @@ class Source(Package):
__mapper_args__ = {'polymorphic_identity': 'source'}
source_id = Column(Integer, ForeignKey('packages.package_id'), primary_key=True)
- # Creation time of the Source, meaning when it was processed via incoming/
- created_at = Column(DateTime)
- # Relation with the User entity, representing the uploader of the package
- user_id = Column(Integer, ForeignKey('users.id'))
- user = relationship("User", backref=backref('sources', order_by=name))
-
### FROM the .changes file
# The package name
name = Column(String(100))
@@ -168,6 +161,12 @@ class Source(Package):
# package again
run = Column(Integer)
+ # Creation time of the Source, meaning when it was processed via incoming/
+ created_at = Column(DateTime)
+ # Relation with the User entity, representing the uploader of the package
+ user_id = Column(Integer, ForeignKey('users.id'))
+ user = relationship("User", backref=backref('sources', order_by=name))
+
def serialize(self):
source_dict = row2dict(self)
source_dict['type'] = 'source'
@@ -226,7 +225,7 @@ class Binary(Package):
binary_dict = row2dict(self)
binary_dict['type'] = 'binary'
return binary_dict
-
+
class Job(Base):
"""
diff --git a/lucy/server.py b/debile/master/server.py
similarity index 93%
rename from lucy/server.py
rename to debile/master/server.py
index d6722f3..1faa756 100644
--- a/lucy/server.py
+++ b/debile/master/server.py
@@ -3,10 +3,10 @@ from sqlalchemy.orm import sessionmaker, scoped_session, with_polymorphic, conta
from sqlalchemy.orm.util import aliased
from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
-from lucy.orm import Machine, Job, Source, Binary, User, Package
-from lucy.config import Config
-from lucy.mail import send_mail
-from lucy.archive import UserRepository
+from debile.master.orm import Machine, Job, Source, Binary, User, Package
+from debile.master.config import Config
+#from debile.master.mail import send_mail
+from debile.master.archive import UserRepository
from SimpleXMLRPCServer import SimpleXMLRPCServer
from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler
@@ -42,7 +42,7 @@ def row2dict(row):
def send_failed_email(job, package, report):
- return # fixme
+ return # FIXME
source = package
if package._type == 'binaries':
@@ -88,7 +88,7 @@ def admin_method(fn):
raise Exception("You can't do that")
return _
-class LucyInterface(object):
+class DebileMasterInterface(object):
@admin_method
def get_paused_status(self):
global PAUSED
@@ -114,7 +114,7 @@ class LucyInterface(object):
admin = "(admin)"
else:
admin = ""
- success = "Connected successfully to lucy server, authenticated as %s %s" % (get_user().name, admin)
+ success = "Connected successfully to debileserver, authenticated as %s %s" % (get_user().name, admin)
return success
@admin_method
@@ -170,7 +170,7 @@ class LucyInterface(object):
def create_machine(self, name, password, ascii_armored_key):
"""
Only for administrators.
- Create a machine in lucy system and import its GPG key in the local keyring.
+ Create a machine in debile system and import its GPG key in the local keyring.
"""
session = Session()
# Validate first by creating an entity that login/name/email are valid
@@ -295,7 +295,7 @@ class LucyInterface(object):
* a list of suites supported
* a list of arches supported
* a list of job types supported
- If lucy is paused, return nothing.
+ If debile is paused, return nothing.
"""
global PAUSED
if PAUSED:
@@ -382,10 +382,12 @@ def get_user():
return NAMESPACE.user
-class LucyAuthMixIn(SimpleXMLRPCRequestHandler):
+class DebileMasterAuthMixIn(SimpleXMLRPCRequestHandler):
def authenticate(self):
NAMESPACE.machine = None
NAMESPACE.user = None
+ # TODO: use hashes instead of plain text passwords
+ # FIXME: potential problem if a machine and a user have the same name
(basic, _, encoded) = self.headers.get('Authorization').partition(' ')
if basic.lower() != 'basic':
self.send_error(401, 'Only allowed basic type thing')
@@ -429,7 +431,7 @@ class LucyAuthMixIn(SimpleXMLRPCRequestHandler):
return False
-class AsyncXMLRPCServer(SocketServer.ThreadingMixIn, LucyAuthMixIn):
+class AsyncXMLRPCServer(SocketServer.ThreadingMixIn, DebileMasterAuthMixIn):
pass
@@ -439,13 +441,13 @@ def serve(server, port):
requestHandler=AsyncXMLRPCServer,
allow_none=True)
server.register_introspection_functions()
- server.register_instance(LucyInterface())
+ server.register_instance(DebileMasterInterface())
server.serve_forever()
def main():
- logging.basicConfig(format='%(asctime)s - %(levelname)8s - [lucy] %(message)s', level=logging.DEBUG)
- logging.info("Booting lucy daemon")
+ logging.basicConfig(format='%(asctime)s - %(levelname)8s - [debile-master] %(message)s', level=logging.DEBUG)
+ logging.info("Booting debile-masterd daemon")
serve("0.0.0.0", 20017)
diff --git a/lucy/templates/dput-ng/profile-user.json b/debile/master/templates/dput-ng/profile-user.json
similarity index 100%
rename from lucy/templates/dput-ng/profile-user.json
rename to debile/master/templates/dput-ng/profile-user.json
diff --git a/lucy/templates/mails/failed b/debile/master/templates/mails/failed
similarity index 100%
rename from lucy/templates/mails/failed
rename to debile/master/templates/mails/failed
diff --git a/lucy/templates/reprepro/distributions b/debile/master/templates/reprepro/distributions
similarity index 76%
rename from lucy/templates/reprepro/distributions
rename to debile/master/templates/reprepro/distributions
index dada394..af86fe8 100644
--- a/lucy/templates/reprepro/distributions
+++ b/debile/master/templates/reprepro/distributions
@@ -1,5 +1,5 @@
Origin: {{username}} debile repository for {{description}}
-Label: {{username}} debile repository for {{description}}
+Label: {{username}} debile repository for {{description}}
Codename: sid
Architectures: {{arches|join(' ')}}
Components: main
diff --git a/lucy/utils.py b/debile/master/utils.py
similarity index 100%
rename from lucy/utils.py
rename to debile/master/utils.py
diff --git a/lucy/__init__.py b/lucy/__init__.py
deleted file mode 100644
index c6034dc..0000000
--- a/lucy/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-__appname__ = "lucy"
-__version__ = "0.0.1"
diff --git a/scripts/lucy-processd b/scripts/debile-processd
similarity index 100%
rename from scripts/lucy-processd
rename to scripts/debile-processd
diff --git a/setup.py b/setup.py
index 89e7d58..a805986 100755
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-from lucy import __appname__, __version__
+from debile.master import __appname__, __version__
from setuptools import setup
@@ -9,21 +9,20 @@ setup(
version=__version__,
scripts=[],
packages=[
- 'lucy',
+ 'debile.master',
],
author="Paul Tagliamonte",
author_email="tag at pault.ag",
long_description=long_description,
- description='Lucy!',
+ description='Master server of debile suite',
license="Expat",
- url="http://deb.io/",
+ url="http://debile.debian.net/",
platforms=['any'],
entry_points={
'console_scripts': [
- 'lucy-nuke = lucy.cli.nuke:main',
- 'lucy-process-incoming = lucy.incoming:process',
- 'lucy-init = lucy.cli.init:main',
- 'lucyd = lucy.server:main',
+ 'debile-incoming = debile.master.incoming:process',
+ 'debile-init = debile.master.cli.init:main',
+ 'debile-masterd = debile.master.server:main',
],
}
)
diff --git a/skel/lucy.ini b/skel/debile-master.ini
similarity index 84%
rename from skel/lucy.ini
rename to skel/debile-master.ini
index 27d2932..ebb0f43 100644
--- a/skel/lucy.ini
+++ b/skel/debile-master.ini
@@ -1,19 +1,19 @@
-; LUCY daemon configuration
+; debile-master daemon configuration
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Database configuration used by SQLAlchemy
; please refer to SQLAlchemy engine doc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[db]
-engine=postgresql://lucy:adamngoodpassword@localhost/lucy
+engine=postgresql://debile:adamngoodpassword@localhost/lucy
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; In this section you are to define what kind of jobs lucy will
+; In this section you are to define what kind of jobs debile will
; create or accept
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[jobs]
suites=unstable
-; Define the type of jobs you want to run with source package (comma separated
+; Define the type of jobs you want to run with source package (comma separated
; list). This must be ethel.commands module names
source=lintian,clanganalyzer,perlcritic,cppcheck,pep8,coccinelle
; Flag to disable the build jobs
@@ -22,13 +22,13 @@ build-enabled=1
build-flavors=gcc-4.8,clang-3.3
; Idem for binary packages
binary=lintian,piuparts,adequate
-; For the arches listed here by commas, lucy will create build
+; For the arches listed here by commas, debile will create build
; jobs for source packages
; It will also execute binary jobs for all of the architectures
arches=amd64,i386
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Different paths needed to access or to store lucy files
+; Different paths needed to access or to store debile files
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[paths]
; debile URL to send links to the clients
@@ -40,7 +40,7 @@ debile_fqdn=debile.debian.net
#keyring=
; This has to be the dput target of ricky
; Here will be received the incoming packages to process, this folder will be
-; watched by lucy-processd
+; watched by debile-processd
incoming=/srv/local-mirror/incoming
; The pool meaning that packages are moved here like in an archive to be downloaded
; elsewhere (dget by ethel for instance)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-master.git
More information about the Pkg-debile-commits
mailing list