From fe119144bf938646c34b83f5c2121cc9687e3daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Thu, 8 Sep 2011 12:41:31 -0400 Subject: [PATCH 01/16] Allow udebs to be uploaded --- debexpo/lib/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debexpo/lib/utils.py b/debexpo/lib/utils.py index 90a7e769..ee1ad4ea 100644 --- a/debexpo/lib/utils.py +++ b/debexpo/lib/utils.py @@ -53,7 +53,7 @@ def allowed_upload(filename): ``filename`` File to test. """ - for suffix in ['.changes', '.dsc', '.tar.gz', '.diff.gz', '.deb', '.tar.bz2', ".tar.xz"]: + for suffix in ['.changes', '.dsc', '.tar.gz', '.diff.gz', '.deb', '.udeb', '.tar.bz2', ".tar.xz"]: if filename.endswith(suffix): return True -- GitLab From d27dd3559cf4b1bd52a20daacbc9f3bdcfd59a8b Mon Sep 17 00:00:00 2001 From: Daniel Schaal Date: Sun, 11 Sep 2011 13:30:25 +0200 Subject: [PATCH 02/16] also check for .debian.tar.bz2 and .xz in native.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Arno Töll --- debexpo/plugins/native.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debexpo/plugins/native.py b/debexpo/plugins/native.py index 5082850b..e2103820 100644 --- a/debexpo/plugins/native.py +++ b/debexpo/plugins/native.py @@ -54,7 +54,7 @@ class NativePlugin(BasePlugin): for file in self.changes['Files']: if file['name'].endswith('.diff.gz'): native = False - if file['name'].endswith('.debian.tar.gz'): + if file['name'].endswith(('.debian.tar.gz','.debian.tar.bz2','.debian.tar.xz')): native = False if native: -- GitLab From b1914defcfed1e6dd9376b32367f937aae893e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Sun, 11 Sep 2011 08:14:42 -0400 Subject: [PATCH 03/16] Accept native packages. Those have erroneously rejected as they don't contain a orig.tar.gz --- debexpo/lib/filesystem.py | 16 ++++++++++++++++ debexpo/plugins/native.py | 10 +++------- debexpo/scripts/debexpo_importer.py | 4 ++-- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/debexpo/lib/filesystem.py b/debexpo/lib/filesystem.py index 9e032501..332ed91f 100644 --- a/debexpo/lib/filesystem.py +++ b/debexpo/lib/filesystem.py @@ -87,6 +87,22 @@ class CheckFiles(object): return True + def is_native_package(self, changes_file): + """ + Guess based on the changes file and files being uploaded, whether a package + is considered native of not + + ```changes_file``` + The changes file to parse for the orig.tar (note the dsc file referenced must exist) + """ + + for file in changes_file['Files']: + if file['name'].endswith('.diff.gz'): + return False + if file['name'].endswith(('.debian.tar.gz','.debian.tar.bz2','.debian.tar.xz')): + return False + return True + def find_orig_tarball(self, changes_file): """ Look to see whether there is an orig tarball present, if the dsc refers to one. diff --git a/debexpo/plugins/native.py b/debexpo/plugins/native.py index e2103820..491d6c42 100644 --- a/debexpo/plugins/native.py +++ b/debexpo/plugins/native.py @@ -37,7 +37,7 @@ __license__ = 'MIT' import logging -from debexpo.lib import constants +from debexpo.lib import constants, filesystem from debexpo.plugins import BasePlugin log = logging.getLogger(__name__) @@ -49,13 +49,9 @@ class NativePlugin(BasePlugin): Test to see whether the package is a native package. """ log.debug('Checking whether the package is native or not') + filecheck = filesystem.CheckFiles() - native = True - for file in self.changes['Files']: - if file['name'].endswith('.diff.gz'): - native = False - if file['name'].endswith(('.debian.tar.gz','.debian.tar.bz2','.debian.tar.xz')): - native = False + native = filecheck.is_native_package(self.changes) if native: # Most uploads will not be native, and especially on mentors, a native diff --git a/debexpo/scripts/debexpo_importer.py b/debexpo/scripts/debexpo_importer.py index 6141ac3a..d24b7be0 100755 --- a/debexpo/scripts/debexpo_importer.py +++ b/debexpo/scripts/debexpo_importer.py @@ -442,11 +442,11 @@ class Importer(object): sys.exit(1) # Check whether a post-upload plugin has got the orig tarball from somewhere. - if not orig_file_found: + if not orig_file_found and not filecheck.is_native_package(self.changes): (orig, orig_file_found) = filecheck.find_orig_tarball(self.changes) if not orig_file_found: # When coming here it means: - # a) The uploaded did not include a orig.tar.gz in his upload + # a) The uploader did not include a orig.tar.gz in his upload # b) We couldn't find a orig.tar.gz in our repository # c) No plugin could get the orig.tar.gz # ... time to give up -- GitLab From d6773392ba3bfb22d80d33c7883eecc268cc323f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Wed, 21 Sep 2011 21:01:56 -0400 Subject: [PATCH 04/16] Fix a nasty CSRF vulnerability. An attacker could be phishing account data by spoofed URLs from our legit sender relay --- debexpo/controllers/password_recover.py | 2 +- debexpo/controllers/register.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debexpo/controllers/password_recover.py b/debexpo/controllers/password_recover.py index a71761c5..b8143240 100644 --- a/debexpo/controllers/password_recover.py +++ b/debexpo/controllers/password_recover.py @@ -77,7 +77,7 @@ class PasswordRecoverController(BaseController): meta.session.commit() recipient = u.email - password_reset_url = 'http://' + request.host + url.current( + password_reset_url = 'http://' + config['debexpo.sitename'] + url.current( action='actually_reset_password', id=password_reset_data.temporary_auth_key) email.send([recipient], password_reset_url=password_reset_url) diff --git a/debexpo/controllers/register.py b/debexpo/controllers/register.py index e3b945d7..05c1c770 100644 --- a/debexpo/controllers/register.py +++ b/debexpo/controllers/register.py @@ -84,7 +84,7 @@ class RegisterController(BaseController): """ log.debug('Sending activation email') email = Email('register_activate') - activate_url = 'http://' + request.host + url.current(action='activate', id=key) + activate_url = 'http://' + config['debexpo.sitename'] + url.current(action='activate', id=key) email.send([recipient], activate_url=activate_url) @validate(schema=RegisterForm(), form='register') -- GitLab From 0fdb672f04e5d3cf0c9bf5dc3ce9e7deaa03d7cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Wed, 21 Sep 2011 21:17:38 -0400 Subject: [PATCH 05/16] Unbreak things I broke: add config to imports --- debexpo/controllers/password_recover.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debexpo/controllers/password_recover.py b/debexpo/controllers/password_recover.py index b8143240..ee566ba4 100644 --- a/debexpo/controllers/password_recover.py +++ b/debexpo/controllers/password_recover.py @@ -39,7 +39,7 @@ __license__ = 'MIT' import logging -from debexpo.lib.base import BaseController, validate, c, _, request, render, url, abort +from debexpo.lib.base import BaseController, validate, c, _, request, render, url, abort, config from debexpo.lib.schemas import PasswordResetForm from debexpo.lib.email import Email from debexpo.model import meta -- GitLab From 58a0e3c886de98b0449aaed9b23c22fe2b64c6cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Fri, 30 Sep 2011 10:48:07 -0400 Subject: [PATCH 06/16] Fix table type for many-to-many helper table --- debexpo/model/sponsor_metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debexpo/model/sponsor_metrics.py b/debexpo/model/sponsor_metrics.py index dadeb6eb..80dfda6b 100644 --- a/debexpo/model/sponsor_metrics.py +++ b/debexpo/model/sponsor_metrics.py @@ -68,7 +68,7 @@ t_sponsor_tags = sa.Table( t_sponsor_metrics_tags = sa.Table( 'sponsor_metrics_tags', meta.metadata, - sa.Column('tag', sa.Integer, sa.ForeignKey('sponsor_tags.tag'), primary_key=True), + sa.Column('tag', sa.Text, sa.ForeignKey('sponsor_tags.tag'), primary_key=True), sa.Column('user_id', sa.Integer, sa.ForeignKey('sponsor_metrics.user_id'), primary_key=True), sa.Column('weight', sa.Integer), ) -- GitLab From e2cfc0cf91cb67608e00cbae365e18101c863f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Wed, 7 Mar 2012 11:55:55 -0500 Subject: [PATCH 07/16] * Refactor scripts into bin/ * Change copyright header * Remove PPA controller * Remove static HTML hooks we don't use anyway --- bin/ddc.py | 163 ------------------ {debexpo/scripts => bin}/debexpo_importer.py | 2 +- {debexpo/scripts => bin}/debexpo_worker.py | 2 +- {debexpo/scripts => bin}/key_importer.py | 2 +- {debexpo/scripts => bin}/mass-reimporter.sh | 2 +- {debexpo/scripts => bin}/user_importer.py | 2 +- debexpo/config/environment.py | 2 +- debexpo/config/middleware.py | 2 +- debexpo/config/routing.py | 4 +- debexpo/controllers/debian.py | 2 +- debexpo/controllers/error.py | 2 +- debexpo/controllers/index.py | 15 +- debexpo/controllers/login.py | 2 +- debexpo/controllers/my.py | 2 +- debexpo/controllers/package.py | 2 +- debexpo/controllers/packages.py | 2 +- debexpo/controllers/password_recover.py | 2 +- debexpo/controllers/ppa.py | 132 -------------- debexpo/controllers/register.py | 2 +- debexpo/controllers/soap.py | 2 +- debexpo/controllers/sponsor.py | 9 +- debexpo/controllers/template.py | 2 +- debexpo/controllers/upload.py | 2 +- debexpo/cronjobs/__init__.py | 2 +- debexpo/cronjobs/importcomments.py | 2 +- debexpo/cronjobs/importuploads.py | 2 +- debexpo/cronjobs/removeolduploads.py | 2 +- debexpo/lib/app_globals.py | 2 +- debexpo/lib/base.py | 2 +- debexpo/lib/changes.py | 2 +- debexpo/lib/constants.py | 2 +- debexpo/lib/email.py | 2 +- debexpo/lib/filesystem.py | 2 +- debexpo/lib/filters.py | 2 +- debexpo/lib/form.py | 2 +- debexpo/lib/gnupg.py | 2 +- debexpo/lib/helpers.py | 2 +- debexpo/lib/plugins.py | 2 +- debexpo/lib/repository.py | 2 +- debexpo/lib/schemas.py | 2 +- debexpo/lib/utils.py | 2 +- debexpo/lib/validators.py | 2 +- debexpo/model/__init__.py | 2 +- debexpo/model/binary_packages.py | 2 +- debexpo/model/data_store.py | 2 +- debexpo/model/meta.py | 2 +- debexpo/model/package_comments.py | 2 +- debexpo/model/package_files.py | 2 +- debexpo/model/package_info.py | 2 +- debexpo/model/package_subscriptions.py | 2 +- debexpo/model/package_versions.py | 2 +- debexpo/model/packages.py | 2 +- debexpo/model/password_reset.py | 2 +- debexpo/model/source_packages.py | 2 +- debexpo/model/sponsor_metrics.py | 2 +- debexpo/model/user_countries.py | 2 +- debexpo/model/user_metrics.py | 2 +- debexpo/model/user_upload_key.py | 2 +- debexpo/model/users.py | 2 +- debexpo/plugins/__init__.py | 2 +- debexpo/plugins/buildsystem.py | 2 +- debexpo/plugins/changeslist.py | 2 +- debexpo/plugins/closedbugs.py | 2 +- debexpo/plugins/controlfields.py | 2 +- debexpo/plugins/debianqa.py | 2 +- debexpo/plugins/diffclean.py | 2 +- debexpo/plugins/distribution.py | 2 +- debexpo/plugins/getorigtarball.py | 2 +- debexpo/plugins/lintian.py | 2 +- debexpo/plugins/maintaineremail.py | 2 +- debexpo/plugins/native.py | 2 +- debexpo/plugins/notuploader.py | 2 +- debexpo/plugins/removepackage.py | 2 +- debexpo/plugins/ubuntuversion.py | 2 +- debexpo/plugins/watchfile.py | 2 +- debexpo/public/debexpo.js | 4 +- debexpo/public/frontpage.html | 31 ---- debexpo/scripts/__init__.py | 0 debexpo/scripts/forge-changes.pl | 138 --------------- debexpo/templates/index/index.mako | 1 - .../templates/index/intro-maintainers.mako | 2 - debexpo/templates/ppa/index.mako | 23 --- debexpo/templates/sponsor/index.mako | 1 - debexpo/tests/__init__.py | 2 +- debexpo/tests/functional/test_debian.py | 2 +- debexpo/tests/functional/test_upload.py | 2 +- debexpo/tests/test_changes.py | 2 +- debexpo/tests/test_gnupg.py | 2 +- debexpo/tests/test_utils.py | 2 +- debexpo/websetup.py | 2 +- development.ini | 13 -- setup.py | 5 +- 92 files changed, 85 insertions(+), 610 deletions(-) delete mode 100755 bin/ddc.py rename {debexpo/scripts => bin}/debexpo_importer.py (99%) rename {debexpo/scripts => bin}/debexpo_worker.py (98%) rename {debexpo/scripts => bin}/key_importer.py (97%) rename {debexpo/scripts => bin}/mass-reimporter.sh (97%) rename {debexpo/scripts => bin}/user_importer.py (98%) delete mode 100644 debexpo/controllers/ppa.py delete mode 100644 debexpo/public/frontpage.html delete mode 100644 debexpo/scripts/__init__.py delete mode 100644 debexpo/scripts/forge-changes.pl delete mode 100644 debexpo/templates/ppa/index.mako diff --git a/bin/ddc.py b/bin/ddc.py deleted file mode 100755 index f2549d65..00000000 --- a/bin/ddc.py +++ /dev/null @@ -1,163 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# ddc.py — debian-devel-changes mail parser -# -# This file is part of debexpo - http://debexpo.workaround.org -# -# Copyright © 2008 Jonny Lamb -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -""" -Executable script to parse debian-devel-changes emails and perform -appropriate action. -""" - -__author__ = 'Jonny Lamb' -__copyright__ = 'Copyright © 2008 Jonny Lamb' -__license__ = 'MIT' - -from optparse import OptionParser -import ConfigParser -import logging -import logging.config -import os -import sys - -log = None - -class DdcParser(object): - """ - Class to handle a package uploaded to Debian. - """ - - def __init__(self, ini, email): - """ - Object constructor. Sets class fields to sane values. - - ``ini`` - .ini configuration file. - - ``email`` - Email sent to d-d-c. - """ - self.ini_file = ini - self.email = email - - def _fail(self, message): - if log is not None: - log.critical(message) - else: - print >> sys.stderr, message - - sys.exit(1) - - def _setup_logging(self): - """ - Parse the config file and create the ``log`` object for other methods to log their - actions. - """ - global log - - # Parse the ini file to validate it - parser = ConfigParser.ConfigParser() - parser.read(self.ini_file) - - # Check for the presence of [loggers] in self.ini_file - if not parser.has_section('loggers'): - print >> sys.stderr, 'Config file does not have [loggers] section' - return - - logging.config.fileConfig(self.ini_file) - - # Use "name.pid" to avoid parser confusions in the logs - logger_name = '%s.%s' % (__name__, os.getpid()) - log = logging.getLogger(logger_name) - - def _setup(self): - """ - Set up logging, import pylons/paste/debexpo modules, parse config file and create config - """ - # Look for ini file - if not os.path.isfile(self.ini_file): - self._fail('Cannot find ini file %s' % self.ini_file) - - self._setup_logging() - - # Import debexpo root directory - sys.path.append(os.path.dirname(self.ini_file)) - - # Import debexpo modules - from paste.deploy import appconfig - from pylons import config - from debexpo.config.environment import load_environment - - # Save app config for later - self.config = config - - # Initialize Pylons app - conf = appconfig('config:' + options.ini) - load_environment(conf.global_conf, conf.local_conf) - - def main(self): - """ - Parse the d-d-c email and take action. - """ - # Set up - self._setup() - - if log is not None: - log.debug('d-d-c parser started with arguments: %s' % sys.argv[1:]) - - from debexpo.lib.changes import Changes - from debexpo.lib.repository import Repository - from debexpo.lib.plugins import Plugins - - changes = Changes(string=self.email) - - Plugins('post-upload-to-debian', changes, None) - - # Refresh the Sources/Packages files. - log.debug('Updating Sources and Packages files') - r = Repository(self.config['debexpo.repository']) - r.update() - - log.debug('Done') - -if __name__ == '__main__': - - parser = OptionParser(usage="%prog -i FILE") - parser.add_option('-i', '--ini', dest='ini', - help='Configuration file to user', - metavar='FILE', default=None) - (options, args) = parser.parse_args() - - if not options.ini: - parser.print_help() - sys.exit(0) - - email = sys.stdin.read() - - p = DdcParser(options.ini, email) - - p.main() diff --git a/debexpo/scripts/debexpo_importer.py b/bin/debexpo_importer.py similarity index 99% rename from debexpo/scripts/debexpo_importer.py rename to bin/debexpo_importer.py index 5d36b0e1..03a62fad 100755 --- a/debexpo/scripts/debexpo_importer.py +++ b/bin/debexpo_importer.py @@ -3,7 +3,7 @@ # # debexpo-importer — executable script to import new packages # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/scripts/debexpo_worker.py b/bin/debexpo_worker.py similarity index 98% rename from debexpo/scripts/debexpo_worker.py rename to bin/debexpo_worker.py index b0ed4323..87d8506f 100755 --- a/debexpo/scripts/debexpo_worker.py +++ b/bin/debexpo_worker.py @@ -3,7 +3,7 @@ # # debexpo_worker.py — Worker task # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2011 Arno Töll # diff --git a/debexpo/scripts/key_importer.py b/bin/key_importer.py similarity index 97% rename from debexpo/scripts/key_importer.py rename to bin/key_importer.py index c182df0e..8f4f20d8 100755 --- a/debexpo/scripts/key_importer.py +++ b/bin/key_importer.py @@ -3,7 +3,7 @@ # # key_importer.py — Regenerate the mentors keyring from scratch # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2012 Arno Töll # diff --git a/debexpo/scripts/mass-reimporter.sh b/bin/mass-reimporter.sh similarity index 97% rename from debexpo/scripts/mass-reimporter.sh rename to bin/mass-reimporter.sh index a58cf44e..f9c8fed0 100755 --- a/debexpo/scripts/mass-reimporter.sh +++ b/bin/mass-reimporter.sh @@ -2,7 +2,7 @@ # # mass-reimporter.sh - Reimport all the packages from a pool into debexpo # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2012 Nicolas Dandrimont # diff --git a/debexpo/scripts/user_importer.py b/bin/user_importer.py similarity index 98% rename from debexpo/scripts/user_importer.py rename to bin/user_importer.py index e27de947..ec2ec66c 100644 --- a/debexpo/scripts/user_importer.py +++ b/bin/user_importer.py @@ -2,7 +2,7 @@ # # debexpo-importer — executable script to import new packages # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2011 Asheesh Laroia # diff --git a/debexpo/config/environment.py b/debexpo/config/environment.py index 1e4b704a..2cda3ab7 100644 --- a/debexpo/config/environment.py +++ b/debexpo/config/environment.py @@ -2,7 +2,7 @@ # # environment.py — Pylons environment configuration # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/config/middleware.py b/debexpo/config/middleware.py index 88bb0daa..b92788ff 100644 --- a/debexpo/config/middleware.py +++ b/debexpo/config/middleware.py @@ -2,7 +2,7 @@ # # middleware.py — Pylons middleware initialization # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyrithg © 2010 Jan Dittberner diff --git a/debexpo/config/routing.py b/debexpo/config/routing.py index 26b3d2d8..132dd467 100644 --- a/debexpo/config/routing.py +++ b/debexpo/config/routing.py @@ -2,7 +2,7 @@ # # routing.py — Routes configuration # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner @@ -96,8 +96,6 @@ def make_map(config): action='index') map.connect('/upload/{filename}', controller='upload', action='index') - map.connect('ppa', '/ppa/{email}', controller='ppa', action='index') - #map.connect('/ppa/{email}/*filename', controller='ppa', action='file') map.connect('/soap.wsdl', controller='soap') map.connect('/{controller}/{action}') diff --git a/debexpo/controllers/debian.py b/debexpo/controllers/debian.py index 1a63ba04..7d80299f 100644 --- a/debexpo/controllers/debian.py +++ b/debexpo/controllers/debian.py @@ -2,7 +2,7 @@ # # debian.py — Debian controller for accessing the repository # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/controllers/error.py b/debexpo/controllers/error.py index c4f89c23..d8905a0c 100644 --- a/debexpo/controllers/error.py +++ b/debexpo/controllers/error.py @@ -2,7 +2,7 @@ # # error.py — The application's ErrorController object # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/controllers/index.py b/debexpo/controllers/index.py index 65cc3c33..14dd7586 100644 --- a/debexpo/controllers/index.py +++ b/debexpo/controllers/index.py @@ -2,7 +2,7 @@ # # index.py — index controller # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner @@ -56,13 +56,6 @@ class IndexController(BaseController): def index(self): pkg_controller = PackagesController() - if 'debexpo.html.frontpage' in config: - f = open(config['debexpo.html.frontpage']) - c.custom_html = literal(f.read()) - f.close() - else: - c.custom_html = '' - c.config = config c.packages = pkg_controller._get_packages( package_version_filter=(PackageVersion.uploaded >= (datetime.today() - timedelta(days=30))), @@ -86,12 +79,6 @@ class IndexController(BaseController): def intro_maintainers(self): """Return an introduction page for package maintainers""" - if 'debexpo.html.maintainer_intro' in config: - f = open(config['debexpo.html.maintainer_intro']) - c.custom_html = literal(f.read()) - f.close() - else: - c.custom_html = '' # The template will need to look at the user details. if 'user_id' in session: diff --git a/debexpo/controllers/login.py b/debexpo/controllers/login.py index d34bbf96..8ee07cdb 100644 --- a/debexpo/controllers/login.py +++ b/debexpo/controllers/login.py @@ -2,7 +2,7 @@ # # login.py — Login controller # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/controllers/my.py b/debexpo/controllers/my.py index ca9142bf..9bca89e0 100644 --- a/debexpo/controllers/my.py +++ b/debexpo/controllers/my.py @@ -2,7 +2,7 @@ # # my.py — My Controller # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/controllers/package.py b/debexpo/controllers/package.py index 066533f3..5dca7838 100644 --- a/debexpo/controllers/package.py +++ b/debexpo/controllers/package.py @@ -2,7 +2,7 @@ # # package.py — Package controller # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/controllers/packages.py b/debexpo/controllers/packages.py index c55afeb3..48404ef1 100644 --- a/debexpo/controllers/packages.py +++ b/debexpo/controllers/packages.py @@ -2,7 +2,7 @@ # # packages.py — Packages controller # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/controllers/password_recover.py b/debexpo/controllers/password_recover.py index ee566ba4..0aa9ec5e 100644 --- a/debexpo/controllers/password_recover.py +++ b/debexpo/controllers/password_recover.py @@ -2,7 +2,7 @@ # # password_recover.py -- controller for doing web-based password recovery # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/controllers/ppa.py b/debexpo/controllers/ppa.py deleted file mode 100644 index 79f3df5e..00000000 --- a/debexpo/controllers/ppa.py +++ /dev/null @@ -1,132 +0,0 @@ -# -*- coding: utf-8 -*- -# -# ppa.py — ppa controller -# -# This file is part of debexpo - http://debexpo.workaround.org -# -# Copyright © 2008 Jonny Lamb -# Copyright © 2010 Jan Dittberner -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -""" -Holds the PPA controller. -""" - -__author__ = 'Jonny Lamb' -__copyright__ = 'Copyright © 2008 Jonny Lamb, Copyright © 2010 Jan Dittberner' -__license__ = 'MIT' - -import bz2 -import logging -import paste.fileapp -import os -import zlib - -from debexpo.lib.base import * -from debexpo.lib.repository import Repository - -from debexpo.model import meta -from debexpo.model.users import User -from debexpo.model.packages import Package -from debexpo.model.package_versions import PackageVersion -from debexpo.model.source_packages import SourcePackage -from debexpo.model.binary_packages import BinaryPackage -from debexpo.model.package_files import PackageFile - -log = logging.getLogger(__name__) - -class PpaController(BaseController): - - def index(self, email): - """ - Displays information on accessing a user's PPA. - - ``email`` - Email address of user. - """ - c.user = meta.session.query(User).filter_by(email=email).first() - c.config = config - return render('/ppa/index.mako') - - def _create_dists(self, email, filename): - """ - Create a /dists/... file and return it in the appropraite format. - - ``email`` - Email address to filter on. - - ``filename`` - Filename requested. This should be something like: - "dists/unstable/main/source/Sources". - """ - splitfilename = filename.split('/') - if not len(splitfilename) == 5: - log.error('File not found') - abort(404, 'File not found') - - dists, dist, component, arch, type = filename.split('/') - - if arch.startswith('binary-'): - arch = arch[7:] - - user = meta.session.query(User).filter_by(email=email).first() - if user is None: - log.error('User not found') - abort(404, 'User not found') - - repo = Repository(config['debexpo.repository']) - - if type.startswith('Sources'): - out_file = repo.get_sources_file(dist, component, user.id) - elif type.startswith('Packages'): - out_file = repo.get_packages_file(dist, component, arch, user.id) - - else: - log.error('File not found') - abort(404, 'File not found') - - if type.endswith('.gz'): - return zlib.compress(out_file) - elif type.endswith('.bz2'): - return bz2.compress(out_file) - else: - return out_file - - def file(self, email, filename): - """ - Opens a file in the repository using Paste's FileApp. - """ - log.debug('%s requested' % filename) - - if filename.startswith('dists/'): - return self._create_dists(email, filename) - - file = os.path.join(config['debexpo.repository'], filename) - - if os.path.isfile(file): - fapp = paste.fileapp.FileApp(file) - else: - log.error('File not found') - abort(404, 'File not found') - - return fapp(request.environ, self.start_response) diff --git a/debexpo/controllers/register.py b/debexpo/controllers/register.py index 05c1c770..98a8e62f 100644 --- a/debexpo/controllers/register.py +++ b/debexpo/controllers/register.py @@ -2,7 +2,7 @@ # # register.py — Register Controller # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/controllers/soap.py b/debexpo/controllers/soap.py index 58b38e65..ffafabaf 100644 --- a/debexpo/controllers/soap.py +++ b/debexpo/controllers/soap.py @@ -2,7 +2,7 @@ # # soap.py — soap controller # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/controllers/sponsor.py b/debexpo/controllers/sponsor.py index fb1caceb..33133ca2 100644 --- a/debexpo/controllers/sponsor.py +++ b/debexpo/controllers/sponsor.py @@ -2,7 +2,7 @@ # # index.py — index controller # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2011 Arno Töll # @@ -220,13 +220,6 @@ class SponsorController(BaseController): This page honors filters configured in the user session """ - if 'debexpo.html.sponsors_intro' in config: - f = open(config['debexpo.html.sponsors_intro']) - c.custom_html = literal(f.read()) - f.close() - else: - c.custom_html = '' - return render('/sponsor/index.mako') diff --git a/debexpo/controllers/template.py b/debexpo/controllers/template.py index cf546d18..c59f1c34 100644 --- a/debexpo/controllers/template.py +++ b/debexpo/controllers/template.py @@ -2,7 +2,7 @@ # # template.py — The application's TemplateController object # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/controllers/upload.py b/debexpo/controllers/upload.py index d8a4a5d5..95d34337 100644 --- a/debexpo/controllers/upload.py +++ b/debexpo/controllers/upload.py @@ -2,7 +2,7 @@ # # upload.py — Upload controller # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/cronjobs/__init__.py b/debexpo/cronjobs/__init__.py index 4767f66d..dff54b65 100644 --- a/debexpo/cronjobs/__init__.py +++ b/debexpo/cronjobs/__init__.py @@ -2,7 +2,7 @@ # # cronjobs module — Base class for all cronjobs # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2011 Arno Töll # diff --git a/debexpo/cronjobs/importcomments.py b/debexpo/cronjobs/importcomments.py index 98244d21..d4db5c5f 100644 --- a/debexpo/cronjobs/importcomments.py +++ b/debexpo/cronjobs/importcomments.py @@ -2,7 +2,7 @@ # # importcomments.py — Import RFS comments from debian-mentors # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2011 Arno Töll # diff --git a/debexpo/cronjobs/importuploads.py b/debexpo/cronjobs/importuploads.py index 3deedad2..32064b0c 100644 --- a/debexpo/cronjobs/importuploads.py +++ b/debexpo/cronjobs/importuploads.py @@ -2,7 +2,7 @@ # # importuploads.py — Import FTP uploads to Debexpo # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2011 Arno Töll # diff --git a/debexpo/cronjobs/removeolduploads.py b/debexpo/cronjobs/removeolduploads.py index 3e1888ff..a1962908 100644 --- a/debexpo/cronjobs/removeolduploads.py +++ b/debexpo/cronjobs/removeolduploads.py @@ -2,7 +2,7 @@ # # removeolduploads.py -- remove old and uploaded packages from Debexpo # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2011 Arno Töll # diff --git a/debexpo/lib/app_globals.py b/debexpo/lib/app_globals.py index 58c82611..2ac82637 100644 --- a/debexpo/lib/app_globals.py +++ b/debexpo/lib/app_globals.py @@ -2,7 +2,7 @@ # # app_globals.py — The application's Globals object # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/lib/base.py b/debexpo/lib/base.py index 49a30d39..18f39546 100644 --- a/debexpo/lib/base.py +++ b/debexpo/lib/base.py @@ -2,7 +2,7 @@ # # base.py — The base Controller API # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/lib/changes.py b/debexpo/lib/changes.py index 0517e6bb..0d3fa6eb 100644 --- a/debexpo/lib/changes.py +++ b/debexpo/lib/changes.py @@ -2,7 +2,7 @@ # # changes.py — .changes file handling class # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/lib/constants.py b/debexpo/lib/constants.py index 987b3379..665ec03e 100644 --- a/debexpo/lib/constants.py +++ b/debexpo/lib/constants.py @@ -2,7 +2,7 @@ # # constants.py — Application constants # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/lib/email.py b/debexpo/lib/email.py index 88bcb9ef..63cc4854 100644 --- a/debexpo/lib/email.py +++ b/debexpo/lib/email.py @@ -2,7 +2,7 @@ # # email.py — Helper class for sending and receiving email # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/lib/filesystem.py b/debexpo/lib/filesystem.py index 81ea7e30..016ee447 100644 --- a/debexpo/lib/filesystem.py +++ b/debexpo/lib/filesystem.py @@ -2,7 +2,7 @@ # # checkfiles.py — checkfiles plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # © 2011 Arno Töll diff --git a/debexpo/lib/filters.py b/debexpo/lib/filters.py index 1b72899a..0236a913 100644 --- a/debexpo/lib/filters.py +++ b/debexpo/lib/filters.py @@ -2,7 +2,7 @@ # # filter.py — Output filters for the template engine # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2011 Arno Töll # diff --git a/debexpo/lib/form.py b/debexpo/lib/form.py index 9ad37cef..3cd5a92f 100644 --- a/debexpo/lib/form.py +++ b/debexpo/lib/form.py @@ -2,7 +2,7 @@ # # form.py — Helpers for more complex formencode forms # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/lib/gnupg.py b/debexpo/lib/gnupg.py index 7171914a..7b17bb4d 100644 --- a/debexpo/lib/gnupg.py +++ b/debexpo/lib/gnupg.py @@ -2,7 +2,7 @@ # # utils.py — Debexpo utility functions # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Serafeim Zanikolas # 2011 Arno Töll diff --git a/debexpo/lib/helpers.py b/debexpo/lib/helpers.py index 4604b53f..fe6d6ba4 100644 --- a/debexpo/lib/helpers.py +++ b/debexpo/lib/helpers.py @@ -2,7 +2,7 @@ # # helpers.py — Helper functions # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/lib/plugins.py b/debexpo/lib/plugins.py index 6aba75e1..ccfb5031 100644 --- a/debexpo/lib/plugins.py +++ b/debexpo/lib/plugins.py @@ -2,7 +2,7 @@ # # plugins.py — Plugin loader # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/lib/repository.py b/debexpo/lib/repository.py index 02cc6fe5..21739b0f 100644 --- a/debexpo/lib/repository.py +++ b/debexpo/lib/repository.py @@ -2,7 +2,7 @@ # # repository.py — Class to handle the repository # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/lib/schemas.py b/debexpo/lib/schemas.py index fc71e794..cea9836e 100644 --- a/debexpo/lib/schemas.py +++ b/debexpo/lib/schemas.py @@ -2,7 +2,7 @@ # # schemas.py — Form schemas # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/lib/utils.py b/debexpo/lib/utils.py index 1d8757a8..62758f09 100644 --- a/debexpo/lib/utils.py +++ b/debexpo/lib/utils.py @@ -2,7 +2,7 @@ # # utils.py — Debexpo utility functions # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/lib/validators.py b/debexpo/lib/validators.py index 3d4b5f15..021b4ddd 100644 --- a/debexpo/lib/validators.py +++ b/debexpo/lib/validators.py @@ -2,7 +2,7 @@ # # validators.py — formencode validators for debexpo # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/model/__init__.py b/debexpo/model/__init__.py index 2f2ba225..c7b9f917 100644 --- a/debexpo/model/__init__.py +++ b/debexpo/model/__init__.py @@ -2,7 +2,7 @@ # # __init__.py — Model initialisation code # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/model/binary_packages.py b/debexpo/model/binary_packages.py index 0ddb035f..cb51686d 100644 --- a/debexpo/model/binary_packages.py +++ b/debexpo/model/binary_packages.py @@ -2,7 +2,7 @@ # # binary_packages.py — binary_packages table model # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/model/data_store.py b/debexpo/model/data_store.py index 452d6b87..79eae6d3 100644 --- a/debexpo/model/data_store.py +++ b/debexpo/model/data_store.py @@ -2,7 +2,7 @@ # # data_store.py - Generic, general purpose data store # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2011 Arno Töll # diff --git a/debexpo/model/meta.py b/debexpo/model/meta.py index 9a11b215..ec552652 100644 --- a/debexpo/model/meta.py +++ b/debexpo/model/meta.py @@ -2,7 +2,7 @@ # # meta.py — SQLAlchemy Metadata and Session object # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/model/package_comments.py b/debexpo/model/package_comments.py index e010cc9e..e084b9ce 100644 --- a/debexpo/model/package_comments.py +++ b/debexpo/model/package_comments.py @@ -2,7 +2,7 @@ # # package_comments.py — package_comments table model # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/model/package_files.py b/debexpo/model/package_files.py index ccff045e..5d334c5e 100644 --- a/debexpo/model/package_files.py +++ b/debexpo/model/package_files.py @@ -2,7 +2,7 @@ # # package_files.py — package_files table model # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/model/package_info.py b/debexpo/model/package_info.py index e0b4948a..dfa9918f 100644 --- a/debexpo/model/package_info.py +++ b/debexpo/model/package_info.py @@ -2,7 +2,7 @@ # # package_info.py — package_info table model # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/model/package_subscriptions.py b/debexpo/model/package_subscriptions.py index 287b3172..3fa424fb 100644 --- a/debexpo/model/package_subscriptions.py +++ b/debexpo/model/package_subscriptions.py @@ -2,7 +2,7 @@ # # package_subscriptions.py — package_subscriptions table model # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/model/package_versions.py b/debexpo/model/package_versions.py index c90621e5..33ee57ba 100644 --- a/debexpo/model/package_versions.py +++ b/debexpo/model/package_versions.py @@ -2,7 +2,7 @@ # # package_versions.py — package_versions table model # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/model/packages.py b/debexpo/model/packages.py index ebd9416c..f1e541b9 100644 --- a/debexpo/model/packages.py +++ b/debexpo/model/packages.py @@ -2,7 +2,7 @@ # # packages.py — packages table model # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/model/password_reset.py b/debexpo/model/password_reset.py index 13b477f4..d098db48 100644 --- a/debexpo/model/password_reset.py +++ b/debexpo/model/password_reset.py @@ -2,7 +2,7 @@ # # password_reset.py — model for temporary passwords related to password resets # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2011 Asheesh Laroia # diff --git a/debexpo/model/source_packages.py b/debexpo/model/source_packages.py index cdbf07f7..aabf119e 100644 --- a/debexpo/model/source_packages.py +++ b/debexpo/model/source_packages.py @@ -2,7 +2,7 @@ # # source_packages.py — source_packages table model # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/model/sponsor_metrics.py b/debexpo/model/sponsor_metrics.py index 80dfda6b..0ec911c2 100644 --- a/debexpo/model/sponsor_metrics.py +++ b/debexpo/model/sponsor_metrics.py @@ -2,7 +2,7 @@ # # sponsor_metrics.py — rudimentary model for sponsor metrics # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2011 Arno Töll # diff --git a/debexpo/model/user_countries.py b/debexpo/model/user_countries.py index f417a6b0..7e339b7b 100644 --- a/debexpo/model/user_countries.py +++ b/debexpo/model/user_countries.py @@ -2,7 +2,7 @@ # # user_countries.py — user_counties table model # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/model/user_metrics.py b/debexpo/model/user_metrics.py index b0b771d6..88c5a333 100644 --- a/debexpo/model/user_metrics.py +++ b/debexpo/model/user_metrics.py @@ -2,7 +2,7 @@ # # user_metrics.py — user_metrics table model # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/model/user_upload_key.py b/debexpo/model/user_upload_key.py index 0e5dbb68..a991919e 100644 --- a/debexpo/model/user_upload_key.py +++ b/debexpo/model/user_upload_key.py @@ -2,7 +2,7 @@ # # user_upload_key.py — model for upload keys # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2011 Asheesh Laroia # diff --git a/debexpo/model/users.py b/debexpo/model/users.py index 0de391b4..0cc851a3 100644 --- a/debexpo/model/users.py +++ b/debexpo/model/users.py @@ -2,7 +2,7 @@ # # users.py — users table model # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/plugins/__init__.py b/debexpo/plugins/__init__.py index e8916f7f..d1d2dfba 100644 --- a/debexpo/plugins/__init__.py +++ b/debexpo/plugins/__init__.py @@ -2,7 +2,7 @@ # # __init__.py — Helpful classes for plugins # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/plugins/buildsystem.py b/debexpo/plugins/buildsystem.py index 637236be..7da43e78 100644 --- a/debexpo/plugins/buildsystem.py +++ b/debexpo/plugins/buildsystem.py @@ -2,7 +2,7 @@ # # buildsystem.py — buildsystem plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/plugins/changeslist.py b/debexpo/plugins/changeslist.py index 18a08d3d..d9a17a27 100644 --- a/debexpo/plugins/changeslist.py +++ b/debexpo/plugins/changeslist.py @@ -2,7 +2,7 @@ # # changeslist.py — changeslist plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/plugins/closedbugs.py b/debexpo/plugins/closedbugs.py index 363a0ece..4f3995d6 100644 --- a/debexpo/plugins/closedbugs.py +++ b/debexpo/plugins/closedbugs.py @@ -2,7 +2,7 @@ # # closedbugs.py — closedbugs plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # 2011 Arno Töll diff --git a/debexpo/plugins/controlfields.py b/debexpo/plugins/controlfields.py index 26af55f1..ccc9cc72 100644 --- a/debexpo/plugins/controlfields.py +++ b/debexpo/plugins/controlfields.py @@ -2,7 +2,7 @@ # # controlfields.py — controlfields plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/plugins/debianqa.py b/debexpo/plugins/debianqa.py index 24d765c0..18b6b944 100644 --- a/debexpo/plugins/debianqa.py +++ b/debexpo/plugins/debianqa.py @@ -2,7 +2,7 @@ # # debian.py — debian plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2012 Nicolas Dandrimont diff --git a/debexpo/plugins/diffclean.py b/debexpo/plugins/diffclean.py index db38291d..232e81e0 100644 --- a/debexpo/plugins/diffclean.py +++ b/debexpo/plugins/diffclean.py @@ -2,7 +2,7 @@ # # diffclean.py — diffclean plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2012 Nicolas Dandrimont diff --git a/debexpo/plugins/distribution.py b/debexpo/plugins/distribution.py index 569ee632..aec988b0 100644 --- a/debexpo/plugins/distribution.py +++ b/debexpo/plugins/distribution.py @@ -2,7 +2,7 @@ # # distribution.py — distribution check plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2012 Nicolas Dandrimont # diff --git a/debexpo/plugins/getorigtarball.py b/debexpo/plugins/getorigtarball.py index bcc2eda7..e39f715d 100644 --- a/debexpo/plugins/getorigtarball.py +++ b/debexpo/plugins/getorigtarball.py @@ -2,7 +2,7 @@ # # getorigtarball.py — getorigtarball plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/plugins/lintian.py b/debexpo/plugins/lintian.py index ba2991e4..7ca5398b 100644 --- a/debexpo/plugins/lintian.py +++ b/debexpo/plugins/lintian.py @@ -2,7 +2,7 @@ # # lintian.py — lintian plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2012 Nicolas Dandrimont diff --git a/debexpo/plugins/maintaineremail.py b/debexpo/plugins/maintaineremail.py index 873f1352..cade31b8 100644 --- a/debexpo/plugins/maintaineremail.py +++ b/debexpo/plugins/maintaineremail.py @@ -2,7 +2,7 @@ # # maintaineremail.py — maintaineremail plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2012 Nicolas Dandrimont diff --git a/debexpo/plugins/native.py b/debexpo/plugins/native.py index 1fcd9bab..595ae78b 100644 --- a/debexpo/plugins/native.py +++ b/debexpo/plugins/native.py @@ -2,7 +2,7 @@ # # native.py — native QA plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2012 Nicolas Dandrimont diff --git a/debexpo/plugins/notuploader.py b/debexpo/plugins/notuploader.py index f6b53399..a027fea0 100644 --- a/debexpo/plugins/notuploader.py +++ b/debexpo/plugins/notuploader.py @@ -2,7 +2,7 @@ # # notuploader.py — notuploader plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/plugins/removepackage.py b/debexpo/plugins/removepackage.py index bfacd894..f9c265be 100644 --- a/debexpo/plugins/removepackage.py +++ b/debexpo/plugins/removepackage.py @@ -2,7 +2,7 @@ # # removepackage.py — removepackage plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/plugins/ubuntuversion.py b/debexpo/plugins/ubuntuversion.py index b221d7a3..94a51e0c 100644 --- a/debexpo/plugins/ubuntuversion.py +++ b/debexpo/plugins/ubuntuversion.py @@ -2,7 +2,7 @@ # # ubuntuversion.py — ubuntuversion plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2009 Jonny Lamb # diff --git a/debexpo/plugins/watchfile.py b/debexpo/plugins/watchfile.py index a157d5b1..7376aba0 100644 --- a/debexpo/plugins/watchfile.py +++ b/debexpo/plugins/watchfile.py @@ -2,7 +2,7 @@ # # watchfile.py — watchfile plugin # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2012 Nicolas Dandrimont diff --git a/debexpo/public/debexpo.js b/debexpo/public/debexpo.js index af204ca7..164f35ad 100644 --- a/debexpo/public/debexpo.js +++ b/debexpo/public/debexpo.js @@ -1,7 +1,7 @@ /* * debexpo.js – Javascript utility functions for the debexpo web interface * - * This file is part of debexpo - http://debexpo.workaround.org + * This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ * * Copyright © 2012 Nicolas Dandrimont * @@ -125,4 +125,4 @@ $(document).ready(function() { $(".qa-toggle-all").css("cursor", "pointer"); $(".qa-toggle-info").css("cursor", "pointer"); -}); \ No newline at end of file +}); diff --git a/debexpo/public/frontpage.html b/debexpo/public/frontpage.html deleted file mode 100644 index d2870368..00000000 --- a/debexpo/public/frontpage.html +++ /dev/null @@ -1,31 +0,0 @@ -

What is mentors.debian.net?

-

- Only approved members of the Debian project - so-called Debian - Developers - are granted the permission to upload software packages - into the Debian distribution. Still a large number of packages is - maintained by non-official developers. How do they get their work into - Debian when they are not allowed to upload their own packages directly? - By means of a process called sponsorship. Don't worry - it does - not deal with money. Sponsorship means that a Debian developer uploads - the package on behalf of the actual maintainer. The Debian developer - will also check the package for technical correctness and help the - maintainer to improve the package if necessary. Therefore the sponsor is - sometimes also called a mentor. -

- -

I want to have my package uploaded to Debian

-

- Thank you for your contribution to Debian. This service is - dedicated to get your package into Debian quickly and without much fuss. - Please go to our introductory - page for maintainers and learn how to use mentors.debian.net. -

- -

I am a Debian developer and want to offer sponsorship

-

- Do you remember how hard it was to get your packages into Debian - before you were accepted as a Debian developer? Sponsorees depend on your - help to get their packages into good shape and upload them to Debian. - Please go to our introductory page - for sponsors to learn how you can help best. -

diff --git a/debexpo/scripts/__init__.py b/debexpo/scripts/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/debexpo/scripts/forge-changes.pl b/debexpo/scripts/forge-changes.pl deleted file mode 100644 index 8006c15e..00000000 --- a/debexpo/scripts/forge-changes.pl +++ /dev/null @@ -1,138 +0,0 @@ -#! /usr/bin/perl - -# -*- coding: utf-8 -*- -# -# forge-changes.pl - -# Forge a changes file for the mentors -> expo transition -# -# This file is part of debexpo - http://debexpo.workaround.org -# -# This file is /so/ ugly code I refuse to declare any authors or -# copyright on it. Do whatever you want with it! -# Perhaps get rid of it, as soon as you don't need it anymore. - - -use File::Find; -use File::Basename; - -our @directories_to_search = ("/tmp/pkg/"); -if ($directories_to_search[0] eq '/CHANGE/ME') -{ - die(); -} -our @binaries = ( ["sha1sum", "Checksums-Sha1"], ["sha256sum", "Checksums-Sha256"], ["md5sum", "Files"]); -find(\&wanted, @directories_to_search); - - -sub wanted -{ - - my $package = $_; - if ($File::Find::name !~ /\.dsc/) - { - return; - } - - my $changes = $File::Find::name; - $changes =~ s/\.dsc/_source.changes/; - my $version; - my $maintainer; - my $changed_by; - my %tarballs; - - if($package =~ m/(.*?)_(.*?)\.dsc/) - { - $package = $1; - $version = $2; - } - else - { - return; - } - - open(DSC, "< $File::Find::name") || die "$!"; - while() - { - if (/Maintainer:/) - { - chomp; - (undef, $maintainer) = split(/:/, $_, 2); - ($maintainer, undef) = split(/,/, $maintainer, 2) - } - if (/Uploaders:/) - { - # overwrite maintainer - chomp; - (undef, $maintainer) = split(/:/, $_, 2); - ($maintainer, undef) = split(/,/, $maintainer, 2) - } - if (/[a-f0-9] \d+? (.*?)$/) - { - $archive = $1; - chomp($archive); - $tarballs{$archive} = 1; - #print("--> $archive\n"); - } - } - close(DSC); - $changed_by = $maintainer; - print("Processing $File::Find::name -> $changes\n"); - - open(CH, "> $changes") || die "$1"; - print CH "Format: 1.8\n"; - print CH "Date: Tue, 26 Jul 2011 17:40:04 +0200\n"; - print CH "Source: $package\n"; - print CH "Binary: $package\n"; - print CH "Architecture: source\n"; - print CH "Version: $version\n"; - print CH "Distribution: unstable\n"; - print CH "Urgency: low\n"; - print CH "Maintainer: $maintainer\n"; - print CH "Changed-By: $changed_by\n"; - print CH "Description:\n"; - print CH " $package - Automatically imported during mentors.debian.net migration -- re-upload to get fresh data here\n"; - print CH "Changes:\n"; - print CH " $package ($version) unstable; urgency=low\n"; - print CH " .\n"; - print CH " Changelogs are overrated\n"; - - foreach $tuple (@binaries) - { - print CH "$tuple->[1]:\n"; - print CH checksum($tuple->[0], $File::Find::name, ($tuple->[1] eq "Files") ? 1 : 0); - foreach $key (keys %tarballs) - { - if (! -e $File::Find::dir . "/" . $key ) - { - print("Incomplete upload " . $File::Find::dir . "/" . $key . "\n"); - close(CH); - unlink($changes); - return; - } - print CH checksum($tuple->[0], $File::Find::dir . "/" . $key, ($tuple->[1] eq "Files") ? 1 : 0); - } - } - - close(CH); - -} - - -sub checksum -{ - my ($cmd, $file, $section) = @_; - #print("$file\n"); - $size = -s $file; - $r = `$cmd $file`; - chomp($r); - ($checksum, $file) = split(/ /, $r, 2); - $file = basename($file); - if ($section == 0) - { - return " $checksum $size $file\n"; - } - else - { - return " $checksum $size web extra $file\n"; - } -} diff --git a/debexpo/templates/index/index.mako b/debexpo/templates/index/index.mako index 436b217a..9364733c 100644 --- a/debexpo/templates/index/index.mako +++ b/debexpo/templates/index/index.mako @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- <%inherit file="/base.mako"/> -${ c.custom_html }

Welcome to ${ c.config['debexpo.sitename'] }

diff --git a/debexpo/templates/index/intro-maintainers.mako b/debexpo/templates/index/intro-maintainers.mako index 9a0c15e9..22c82770 100644 --- a/debexpo/templates/index/intro-maintainers.mako +++ b/debexpo/templates/index/intro-maintainers.mako @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- <%inherit file="/base.mako"/> -${ c.custom_html } -

Introduction for maintainers: How will my package get into Debian

We are glad that you found your way to our web site. Honestly the whole web site is just there to get your work into Debian. Your contribution is appreciated and it would be a pity if you did not find a sponsor to upload your packages. Read on to see in what ways we will be helping you find a sponsor.

diff --git a/debexpo/templates/ppa/index.mako b/debexpo/templates/ppa/index.mako deleted file mode 100644 index e3265de0..00000000 --- a/debexpo/templates/ppa/index.mako +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -<%inherit file="../base.mako"/> - -% if c.user is not None: - -

${ _('''%s's personal package archive''') % c.user.name }

- -

${ _('''To access these personal package archives, insert the following lines into your /etc/apt/sources.list:''') | n }

- -
-deb ${ c.config['debexpo.server'] }/ppa/${ c.user.email } distribution component1 [component2 ...]
-deb-src ${ c.config['debexpo.server'] }/ppa/${ c.user.email } distribution component1 [component2 ...]
-
- -

${ _('Note: Make sure you replace the distribution and component variables in the above lines.') | n }

- -% else: - -

${ _('Personal package archives') }

- -

${ _('The user you have requested PPA details on cannot be found.') }

- -% endif diff --git a/debexpo/templates/sponsor/index.mako b/debexpo/templates/sponsor/index.mako index 6063467c..9d7ec5e1 100644 --- a/debexpo/templates/sponsor/index.mako +++ b/debexpo/templates/sponsor/index.mako @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- <%inherit file="/base.mako"/> -${ c.custom_html }

The sponsoring process

diff --git a/debexpo/tests/__init__.py b/debexpo/tests/__init__.py index 3e52f19b..4c8129d2 100644 --- a/debexpo/tests/__init__.py +++ b/debexpo/tests/__init__.py @@ -2,7 +2,7 @@ # # __init__.py — Pylons application test package # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/tests/functional/test_debian.py b/debexpo/tests/functional/test_debian.py index 53b4a82d..b0a7192f 100644 --- a/debexpo/tests/functional/test_debian.py +++ b/debexpo/tests/functional/test_debian.py @@ -2,7 +2,7 @@ # # test_debian.py — DebianController test cases # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/tests/functional/test_upload.py b/debexpo/tests/functional/test_upload.py index d238df0e..baff7b83 100644 --- a/debexpo/tests/functional/test_upload.py +++ b/debexpo/tests/functional/test_upload.py @@ -2,7 +2,7 @@ # # test_upload.py — UploadController test cases # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/debexpo/tests/test_changes.py b/debexpo/tests/test_changes.py index 43e5b1f4..0d5e7381 100644 --- a/debexpo/tests/test_changes.py +++ b/debexpo/tests/test_changes.py @@ -2,7 +2,7 @@ # # test_changes.py — Changes class test cases # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/tests/test_gnupg.py b/debexpo/tests/test_gnupg.py index 0b2594c6..c73f02c1 100644 --- a/debexpo/tests/test_gnupg.py +++ b/debexpo/tests/test_gnupg.py @@ -2,7 +2,7 @@ # # utils.py — Debexpo utility functions # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Serafeim Zanikolas # diff --git a/debexpo/tests/test_utils.py b/debexpo/tests/test_utils.py index 13720f5e..097d7259 100644 --- a/debexpo/tests/test_utils.py +++ b/debexpo/tests/test_utils.py @@ -2,7 +2,7 @@ # # test_utils.py — Test cases for debexpo.lib.utils # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # diff --git a/debexpo/websetup.py b/debexpo/websetup.py index fa981683..c2e2f3be 100644 --- a/debexpo/websetup.py +++ b/debexpo/websetup.py @@ -2,7 +2,7 @@ # # websetup.py — Setup the debexpo application # -# This file is part of debexpo - http://debexpo.workaround.org +# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner diff --git a/development.ini b/development.ini index b289e4ad..1c9b69de 100644 --- a/development.ini +++ b/development.ini @@ -109,19 +109,6 @@ debexpo.cronjob_delay = 60 # NNTP server to connect to fetch mailing list comments/changes debexpo.nntp_server = news.gmane.org -# DEBEXPO -# The folling configuration settings allow you to customize the looks -# of your web site. You can either comment it out or specify a path -# to a file contaning HTML for the respective page. The path is supposed -# to be either absolute in your file system or relative to the location -# of this INI file. -# -# Additional HTML on the starting page. Use it for your own introduction. -# debexpo.html.frontpage = html/frontpage.html -# -# Additional HTML on the maintainer's introduction page -# debexpo.html.maintainer_intro = html/frontpage.html - # Logging configuration [loggers] keys = root, debexpo diff --git a/setup.py b/setup.py index a130e1b0..a51be870 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,8 @@ setup( main = pylons.util:PylonsInstaller [console_scripts] - debexpo-importer = debexpo.scripts.debexpo_importer:main - debexpo-user-importer = debexpo.scripts.user_importer:main + debexpo-importer = debexpo.bin.debexpo_importer:main + debexpo-worker = debexpo.bin.debexpo_worker + debexpo-user-importer = debexpo.bin.user_importer:main """, ) -- GitLab From 04888cb5535b302c1fc9a7c9510485450cbce269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Thu, 15 Mar 2012 19:27:54 -0400 Subject: [PATCH 08/16] Fix broken link --- debexpo/config/routing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debexpo/config/routing.py b/debexpo/config/routing.py index 132dd467..6a76a1bd 100644 --- a/debexpo/config/routing.py +++ b/debexpo/config/routing.py @@ -80,7 +80,7 @@ def make_map(config): map.connect('sponsor', '/package/{packagename}/needs_sponsor/{key}', controller='package', action='sponsor') map.connect('subscribe', '/package/{packagename}/subscribe', controller='package', action='subscribe') map.connect('delete', '/package/{packagename}/delete/{key}', controller='package', action='delete') - map.connect('rfs', '/sponsors/rfs-howto', controller='sponsor', action='rfs_howto') + map.connect('rfs-howto', '/sponsors/rfs-howto', controller='sponsor', action='rfs_howto') map.connect('rfs', '/sponsors/rfs-howto/{packagename}', controller='sponsor', action='rfs_howto') map.connect('packages', '/packages/{action}', controller='packages', action='index') map.connect('all-packages', '/packages', controller='packages', action='index') -- GitLab From 171829edbe44d8759e10c367e49cd40e20c81dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Tue, 17 Apr 2012 15:13:23 -0400 Subject: [PATCH 09/16] Don't raise an exception on socket errors, try it again next time. The code is robust enough to catch that error --- debexpo/cronjobs/removeolduploads.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/debexpo/cronjobs/removeolduploads.py b/debexpo/cronjobs/removeolduploads.py index a769e5f8..7b9aff67 100644 --- a/debexpo/cronjobs/removeolduploads.py +++ b/debexpo/cronjobs/removeolduploads.py @@ -45,6 +45,7 @@ from debexpo.model.data_store import DataStore from debexpo.model import meta from debian import deb822 +import socket import re import apt_pkg import datetime @@ -124,7 +125,12 @@ class RemoveOldUploads(BaseCronjob): self.mailer.disconnect_from_server() def invoke(self): - self._remove_uploaded_packages() + try: + self._remove_uploaded_packages() + except socket.error as e: + # better luck next time + self.log.debug("Socket error %s: skipping removals his time" % (e)) + pass # We don't need to run our garbage collection of old cruft that often # It's ok if we purge old packages once a day. -- GitLab From ce83a43f23139fcc2a7e3569dfcc02829954776d Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Wed, 18 Apr 2012 18:37:46 +0200 Subject: [PATCH 10/16] Remove stale files if their mtime is older than 6 hours --- debexpo/cronjobs/importuploads.py | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/debexpo/cronjobs/importuploads.py b/debexpo/cronjobs/importuploads.py index 0561d40a..ef457b16 100644 --- a/debexpo/cronjobs/importuploads.py +++ b/debexpo/cronjobs/importuploads.py @@ -40,6 +40,7 @@ import glob import os import os.path import subprocess +import time import datetime import shutil @@ -53,7 +54,6 @@ class ImportUpload(BaseCronjob): """ This method does nothing in this cronjob """ - self.stale_files = [] self.files = debexpo.lib.filesystem.CheckFiles() self.log.debug("%s loaded successfully" % (__name__)) @@ -111,31 +111,18 @@ class ImportUpload(BaseCronjob): # 2) Mark unprocessed files and get rid of them after some time pub = os.path.join(self.config['debexpo.upload.incoming'], "pub") - filenames = [name for (name, _) in self.stale_files] - file_to_check = [] for file in glob.glob( os.path.join(pub, '*') ): if self.files.allowed_upload(file): self.log.debug("Incomplete upload: %s" % (file)) - if not file in filenames: - self.stale_files.append((file,datetime.datetime.now())) - else: - file_to_check.append(file) + last_change = time.time() - os.stat(file).st_mtime + # the file was uploaded more than 6 hours ago + if last_change > 6 * 60 * 60: + self.log.warning("Remove old file: %s (last modified %.2f hours ago)" % (file, last_change / 3600.)) + os.remove(file) else: if os.path.isfile(file): self.log.warning("Remove unknown file: %s" % (file)) os.remove(file) - new_file_list = [] - for file in file_to_check: - for (file_known, last_check) in self.stale_files: - if file == file_known and (datetime.datetime.now() - last_check) > datetime.timedelta(hours = 6): - if os.path.isfile(file): - self.log.warning("Remove incomplete upload: %s" % (file)) - os.remove(file) - continue - new_file_list.append((file_known, last_check)) - - self.stale_files = new_file_list - cronjob = ImportUpload schedule = datetime.timedelta(minutes = 10) -- GitLab From b5696c218572a3a8f13ae46c8eef2034b5bac75e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Sat, 5 May 2012 04:27:24 -0400 Subject: [PATCH 11/16] Spelling fix for templates/index/intro-maintainers.mako --- debexpo/templates/index/intro-maintainers.mako | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debexpo/templates/index/intro-maintainers.mako b/debexpo/templates/index/intro-maintainers.mako index 22c82770..99cb74d6 100644 --- a/debexpo/templates/index/intro-maintainers.mako +++ b/debexpo/templates/index/intro-maintainers.mako @@ -13,7 +13,7 @@

2. File a WNPP bug

-

Work-Needing and Prospective Packages (WNPP) is our system of announcing your intent to markup packages being worked on. In particular it is a bug against the WNPP pseudo package (or use a nice frontend to browse WNPP bugs). If you want to package package something not currently available in Debian, the very first step should be to file an "Intent to package" (ITP) bug against WNPP. You may want to use the reportbug tool to achieve that by selecting "wnpp" as package to report a bug to.

+

Work-Needing and Prospective Packages (WNPP) is our system of announcing your intent to markup packages being worked on. In particular it is a bug against the WNPP pseudo package (or use a nice frontend to browse WNPP bugs). If you want to package something not currently available in Debian, the very first step should be to file an "Intent to package" (ITP) bug against WNPP. You may want to use the reportbug tool to achieve that by selecting "wnpp" as package to report a bug to.

3. Make the package

-- GitLab From 5a95a448cc69cb1e94619b00c9adc7bc3f827ca5 Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Sat, 23 Jun 2012 22:08:25 +0200 Subject: [PATCH 12/16] Add methods to find and remove files for a single packageversion object --- debexpo/lib/filesystem.py | 48 +++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/debexpo/lib/filesystem.py b/debexpo/lib/filesystem.py index 016ee447..8f0ad8e7 100644 --- a/debexpo/lib/filesystem.py +++ b/debexpo/lib/filesystem.py @@ -145,6 +145,26 @@ class CheckFiles(object): return (orig_name, constants.ORIG_TARBALL_LOCATION_NOT_FOUND) + def find_files_for_packageversion(self, packageversion, absolute_path=False): + """ + Returns all unique paths for files associated with the supplied + package version + + ```packageversion``` The package version to be scanned + + ```absolute_path``` if set to True, returns the absolute path + instead of a path relative to the repository root + """ + package_files = [] + for attr in ('binary_packages', 'source_packages'): + if hasattr(packageversion, attr): + for bp in getattr(packageversion, attr): + for files in bp.package_files: + if not files.filename in package_files: + package_files.append(files.filename if not absolute_path + else pylons.config['debexpo.repository'] + files.filename) + return package_files + def find_files_for_package(self, package, absolute_path=False): """ Returns all unique paths for files associated with the supplied @@ -157,16 +177,30 @@ class CheckFiles(object): """ package_files = [] for p in package.package_versions: - for attr in ('binary_packages', 'source_packages'): - if hasattr(p, attr): - for bp in getattr(p, attr): - for files in bp.package_files: - if not files.filename in package_files: - package_files.append(files.filename if not absolute_path - else pylons.config['debexpo.repository'] + files.filename) + package_files.extend(self.find_files_for_packageversion(p, absolute_path)) return package_files + + def delete_files_for_packageversion(self, packageversion): + """ + Removes all files associated with the package version supplied + + ```packageversion``` PackageVersion object whose files are supposed to be removed + """ + files = self.find_files_for_packageversion(packageversion, absolute_path=True) + if not files: + return + path = os.path.dirname(files[0]) + for file in files: + if os.path.exists(file): + log.debug("Removing file '%s'" % (file)) + os.unlink(file) + if os.path.isdir(path) and os.listdir(path) == []: + log.debug("Remove empty package repository '%s'" % (path)) + os.rmdir(path) + + def delete_files_for_package(self, package): """ Removes all files associated with the package supplied -- GitLab From 439fdf38131257e37dbf3d1abf9ef0815e96e71b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Sun, 1 Jul 2012 09:15:28 -0400 Subject: [PATCH 13/16] Mention the freeze --- debexpo/templates/index/index.mako | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/debexpo/templates/index/index.mako b/debexpo/templates/index/index.mako index 9364733c..bb65ff20 100644 --- a/debexpo/templates/index/index.mako +++ b/debexpo/templates/index/index.mako @@ -3,13 +3,11 @@

Welcome to ${ c.config['debexpo.sitename'] }

-

Only approved members of the Debian project (Debian Developers) are granted the permission to upload software packages into the Debian distribution. Still a large number of packages is maintained by non-official developers. How do they get their work into Debian when they are not allowed to upload their own packages directly? By means of a process called sponsorship. Sponsorship means that a Debian Developer uploads the package on behalf of the actual maintainer. The Debian Developer will also check the package for technical correctness and help the maintainer to improve the package if necessary. Therefore the sponsor is sometimes also called a mentor.

-- GitLab From 729e3bce7017bf94cd6b5bc6cebc436e2dcf207c Mon Sep 17 00:00:00 2001 From: Debexpo Live User Date: Fri, 24 Aug 2012 09:14:26 +0000 Subject: [PATCH 14/16] Add a link to the freeze policy. --- debexpo/templates/index/index.mako | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debexpo/templates/index/index.mako b/debexpo/templates/index/index.mako index bb65ff20..4cbfa25a 100644 --- a/debexpo/templates/index/index.mako +++ b/debexpo/templates/index/index.mako @@ -5,7 +5,7 @@

- In preparation of the upcoming Debian Wheezy release Testing migration has been frozen. Do not expect much sponsoring activity regarding NEW packages or packages not fixing important bugs. + In preparation of the upcoming Debian Wheezy release Testing migration has been frozen. Do not expect much sponsoring activity regarding NEW packages or packages not fixing important bugs. Please refer to the Wheezy Freeze Policy for more information on what package updates are acceptable during the freeze, and on how to get them into the upcoming release.

-- GitLab From 00d38486e3ca1f0652dc441b2191086326886e68 Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Fri, 18 May 2012 12:45:07 +0800 Subject: [PATCH 15/16] Do not force the intro-maintainers page to be widened --- debexpo/public/style.css | 1 - 1 file changed, 1 deletion(-) diff --git a/debexpo/public/style.css b/debexpo/public/style.css index 287f2295..0da02dca 100644 --- a/debexpo/public/style.css +++ b/debexpo/public/style.css @@ -419,7 +419,6 @@ pre { white-space: pre; color: black; white-space: normal; - width: 600px; } pre { white-space: pre-wrap; } -- GitLab