From 0ea37ccef04430bf070530ffcf38914654d956cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Mon, 5 Sep 2011 15:53:48 -0400 Subject: [PATCH 01/49] Implement rudimentary sponsor metrics. This allows sponsors to publish their personal requirements and rules, maintainers can lookup to find out, whether a sponsor matches their package type. Besides, no automated correlation check is performed --- debexpo/controllers/index.py | 7 + debexpo/controllers/my.py | 57 +++++++- debexpo/lib/constants.py | 29 ++++ debexpo/lib/schemas.py | 36 ++++- debexpo/lib/validators.py | 15 ++ debexpo/model/__init__.py | 2 +- debexpo/model/sponsor_metrics.py | 145 ++++++++++++++++++++ debexpo/templates/index/intro-sponsors.mako | 47 +++++++ debexpo/templates/my/index.mako | 102 ++++++++++++-- 9 files changed, 420 insertions(+), 20 deletions(-) create mode 100644 debexpo/model/sponsor_metrics.py diff --git a/debexpo/controllers/index.py b/debexpo/controllers/index.py index bab00c18..0259c3f0 100644 --- a/debexpo/controllers/index.py +++ b/debexpo/controllers/index.py @@ -39,11 +39,16 @@ __license__ = 'MIT' import logging from debexpo.lib.base import BaseController, c, config, render +from debexpo.lib import constants from debexpo.controllers.packages import PackagesController, PackageGroups from webhelpers.html import literal from datetime import datetime, timedelta from debexpo.model.package_versions import PackageVersion from debexpo.model.packages import Package +from debexpo.model.sponsor_metrics import SponsorMetrics +from debexpo.model.users import User + +from debexpo.model import meta log = logging.getLogger(__name__) @@ -101,4 +106,6 @@ class IndexController(BaseController): else: c.custom_html = '' + c.constants = constants + c.sponsors = meta.session.query(SponsorMetrics).filter(SponsorMetrics.availability >= constants.SPONSOR_METRICS_RESTRICTED).join(User).all() return render('/index/intro-sponsors.mako') diff --git a/debexpo/controllers/my.py b/debexpo/controllers/my.py index 2b579d70..307b85e1 100644 --- a/debexpo/controllers/my.py +++ b/debexpo/controllers/my.py @@ -40,12 +40,13 @@ import logging from debexpo.lib.base import * from debexpo.lib import constants, form -from debexpo.lib.schemas import DetailsForm, GpgForm, PasswordForm, OtherDetailsForm +from debexpo.lib.schemas import DetailsForm, GpgForm, PasswordForm, OtherDetailsForm, MetricsForm from debexpo.lib.gnupg import GnuPG from debexpo.model import meta from debexpo.model.users import User from debexpo.model.user_countries import UserCountry +from debexpo.model.sponsor_metrics import SponsorMetrics import debexpo.lib.utils @@ -152,6 +153,40 @@ class MyController(BaseController): redirect(url('my')) + @validate(schema=MetricsForm(), form='index') + def _metrics(self): + """ + Handles a user submitting the metrics form. + """ + log.debug('Metrics form validated successfully') + + if 'user_id' not in session: + log.debug('Requires authentication') + session['path_before_login'] = request.path_info + session.save() + redirect(url('login')) + + sm = SponsorMetrics(user_id=session['user_id']) + sm.contact = int(self.form_result['preferred_contact_method']) + #XXX TODO: WTF?! Find out why on earth package_types is no string + sm.types = str(self.form_result['package_types']) + sm.guidelines_text = self.form_result['packaging_guideline_text'] + sm.social_requirements = self.form_result['social_requirements'] + sm.technical_requirements_to_database(self.form_result['package_technical_requirements']) + sm.availability = self.form_result['availability'] + + if self.form_result['packaging_guidelines'] == constants.SPONSOR_GUIDELINES_TYPE_URL: + sm.guidelines = constants.SPONSOR_GUIDELINES_TYPE_URL + elif self.form_result['packaging_guidelines'] == constants.SPONSOR_GUIDELINES_TYPE_TEXT: + sm.guidelines = constants.SPONSOR_GUIDELINES_TYPE_TEXT + else: + sm.guidelines = constants.SPONSOR_GUIDELINES_TYPE_NONE + + meta.session.merge(sm) + meta.session.commit() + + redirect(url('my')) + def index(self, get=False): """ Controller entry point. Displays forms to change user details. @@ -178,7 +213,8 @@ class MyController(BaseController): return { 'details' : self._details, 'gpg' : self._gpg, 'password' : self._password, - 'other_details' : self._other_details + 'other_details' : self._other_details, + 'metrics' : self._metrics, }[request.params['form']]() except KeyError: log.error('Could not find form name; defaulting to main page') @@ -216,8 +252,23 @@ class MyController(BaseController): # Enable the form to show information on the user's GPG key. if self.user.gpg is not None: c.currentgpg = c.user.gpg_id - else: + else: c.currentgpg = None + if self.user.status == constants.USER_STATUS_DEVELOPER: + # Fill in various sponsor metrics + c.constants = constants + c.contact_methods = [ + (constants.SPONSOR_CONTACT_METHOD_NONE, _('None')), + (constants.SPONSOR_CONTACT_METHOD_EMAIL, _('Email')), + (constants.SPONSOR_CONTACT_METHOD_IRC, _('IRC')), + (constants.SPONSOR_CONTACT_METHOD_JABBER, _('Jabber')), + ] + + self.metrics = meta.session.query(SponsorMetrics).filter_by(user_id=session['user_id']).first() + if not self.metrics: + self.metrics = SponsorMetrics() + c.metrics = self.metrics + log.debug('Rendering page') return render('/my/index.mako') diff --git a/debexpo/lib/constants.py b/debexpo/lib/constants.py index 03134ab0..15549fc6 100644 --- a/debexpo/lib/constants.py +++ b/debexpo/lib/constants.py @@ -35,6 +35,7 @@ __author__ = 'Jonny Lamb' __copyright__ = 'Copyright © 2008 Jonny Lamb' __license__ = 'MIT' + # User constants USER_TYPE_NORMAL = 1 USER_TYPE_ADMIN = 2 @@ -76,3 +77,31 @@ PACKAGE_COMMENT_STATUS_UPLOADED = 2 # Package subscriptions SUBSCRIPTION_LEVEL_UPLOADS = 1 SUBSCRIPTION_LEVEL_COMMENTS = 2 + +#Sponsor metrics +SPONSOR_METRICS_PRIVATE = 0 +SPONSOR_METRICS_RESTRICTED = 1 +SPONSOR_METRICS_PUBLIC = 2 + + +SPONSOR_CONTACT_METHOD_NONE = 0 +SPONSOR_CONTACT_METHOD_EMAIL = 1 +SPONSOR_CONTACT_METHOD_IRC = 2 +SPONSOR_CONTACT_METHOD_JABBER = 3 + +SPONSOR_GUIDELINES_TYPE_NONE = 0 +SPONSOR_GUIDELINES_TYPE_URL = 1 +SPONSOR_GUIDELINES_TYPE_TEXT = 2 + +SPONSOR_TECHNICAL_REQUIREMENTS = [ + ('CDBS','cdbs'), + ('debhelper','debhelper'), + ('custom debian/rules','debhelper'), + ('NMUs','nmu'), + ('QA uploads','qa'), + ('Backports','backports'), + ('Modified Tarballs','tarballs'), + ('VCS snapshot tarballs','vcs_tarballs'), + ('contrib/non-free packages', 'non_free'), + ] + diff --git a/debexpo/lib/schemas.py b/debexpo/lib/schemas.py index 09587110..6cf39a71 100644 --- a/debexpo/lib/schemas.py +++ b/debexpo/lib/schemas.py @@ -42,7 +42,8 @@ from pylons import config from debexpo.lib import constants from debexpo.lib.validators import NewEmailToSystem, GpgKey, \ - CurrentPassword, CheckBox, NewNameToSystem, ValidateSponsorEmail + CurrentPassword, CheckBox, NewNameToSystem, ValidateSponsorEmail, \ + ValidatePackagingGuidelines, DummyValidator class LoginForm(formencode.Schema): """ @@ -97,6 +98,39 @@ class OtherDetailsForm(MyForm): jabber = formencode.validators.String() status = CheckBox() +class MetricsForm(MyForm): + """ + Schema for updating the metrics in the controller + """ + preferred_contact_method = formencode.compound.All( + formencode.validators.OneOf([ + constants.SPONSOR_CONTACT_METHOD_NONE, + constants.SPONSOR_CONTACT_METHOD_EMAIL, + constants.SPONSOR_CONTACT_METHOD_IRC, + constants.SPONSOR_CONTACT_METHOD_JABBER + ]), formencode.validators.Int(not_empty=True)) + package_types = formencode.validators.String() + packaging_guidelines = formencode.compound.All( + formencode.validators.OneOf([ + constants.SPONSOR_GUIDELINES_TYPE_NONE, + constants.SPONSOR_GUIDELINES_TYPE_URL, + constants.SPONSOR_GUIDELINES_TYPE_TEXT]), formencode.validators.Int(not_empty=True)) + + availability = formencode.compound.All( + formencode.validators.OneOf([ + constants.SPONSOR_METRICS_PRIVATE, + constants.SPONSOR_METRICS_RESTRICTED, + constants.SPONSOR_METRICS_PUBLIC]), formencode.validators.Int(not_empty=True)) + package_technical_requirements = formencode.validators.Set + social_requirements = formencode.validators.String() + + # Postpone validation of packaging_guideline_text, as its validation + # depends on the value of packaging_guidelines + packaging_guideline_text = DummyValidator + chained_validators = [ + formencode.schema.SimpleFormValidator(ValidatePackagingGuidelines) + ] + class RegisterForm(formencode.Schema): """ Schema for the general fields in the register controller. The maintainer diff --git a/debexpo/lib/validators.py b/debexpo/lib/validators.py index b6d470ae..3d4b5f15 100644 --- a/debexpo/lib/validators.py +++ b/debexpo/lib/validators.py @@ -43,6 +43,7 @@ from debexpo.lib.gnupg import GnuPG from debexpo.model import meta from debexpo.model.users import User +from debexpo.lib import constants import debexpo.lib.utils @@ -173,3 +174,17 @@ def ValidateSponsorEmail(values, state, validator): if values['sponsor'] == '1' and not values['email'].endswith('@debian.org'): return {'sponsor': 'A sponsor account must be registered with your @debian.org address' } +class DummyValidator(formencode.FancyValidator): + pass + +def ValidatePackagingGuidelines(values, state, validator): + try: + if values['packaging_guidelines'] == constants.SPONSOR_GUIDELINES_TYPE_TEXT: + formencode.validators.String(min=1).to_python(values['packaging_guideline_text']) + elif values['packaging_guidelines'] == constants.SPONSOR_GUIDELINES_TYPE_URL: + formencode.validators.URL(add_http=True).to_python(values['packaging_guideline_text']) + else: + formencode.validators.Empty().to_python(values['packaging_guideline_text']) + except Exception as e: + return {'packaging_guideline_text': e} + return None diff --git a/debexpo/model/__init__.py b/debexpo/model/__init__.py index 61ec34de..4883ab67 100644 --- a/debexpo/model/__init__.py +++ b/debexpo/model/__init__.py @@ -61,7 +61,7 @@ def import_all_models(): from debexpo.model import binary_packages, package_files, packages, source_packages, \ user_metrics, package_comments, package_info, package_versions, user_countries, \ - users, package_subscriptions, user_upload_key, password_reset + users, package_subscriptions, user_upload_key, password_reset, sponsor_metrics class OrmObject(object): """ diff --git a/debexpo/model/sponsor_metrics.py b/debexpo/model/sponsor_metrics.py new file mode 100644 index 00000000..3b9ca584 --- /dev/null +++ b/debexpo/model/sponsor_metrics.py @@ -0,0 +1,145 @@ +# -*- coding: utf-8 -*- +# +# sponsor_metrics.py — rudimentary model for sponsor metrics +# +# This file is part of debexpo - http://debexpo.workaround.org +# +# Copyright © 2011 Arno Töll +# +# 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 Sponsor Metrics Model +""" + +__author__ = 'Arno Töll' +__copyright__ = 'Copyright © 2011 Arno Töll' +__license__ = 'MIT' + +import os +import datetime + +import sqlalchemy as sa +from sqlalchemy import orm + +from debexpo.model import meta, OrmObject +from debexpo.model.users import User +from debexpo.lib import constants +import debexpo.lib.utils + +t_sponsor_metrics = sa.Table( + 'sponsor_metrics', meta.metadata, + sa.Column('user_id', sa.types.Integer, sa.ForeignKey('users.id'), primary_key=True), + sa.Column('availability', sa.types.Integer, nullable=False), + sa.Column('contact', sa.types.Integer, nullable=False), + sa.Column('types', sa.types.Text, nullable=True), + sa.Column('guidelines', sa.types.Integer, nullable=True), + sa.Column('guidelines_text', sa.types.Text, nullable=True), + sa.Column('technical_requirements', sa.types.Text, nullable=True), + sa.Column('social_requirements', sa.types.Text, nullable=True) + ) + +class SponsorMetrics(OrmObject): + foreign = ['user'] + + def technical_requirements_to_database(self, requirements): + """ + Takes a list of technical requirements and converts them in + the internal database representation which is a bit map. + The internal structure is considered an implementation detail + + ```requirements``` A list of SPONSOR_TECHNICAL_REQUIREMENTS which shall + be stored in this object + """ + indexed_requirements = [y for x,y in constants.SPONSOR_TECHNICAL_REQUIREMENTS] + for i in indexed_requirements: + if i in requirements: + indexed_requirements[indexed_requirements.index(i)] = '1' + else: + indexed_requirements[indexed_requirements.index(i)] = '0' + self.technical_requirements = ''.join(indexed_requirements) + + def database_to_technical_requirements(self): + """ + Returns a list of SPONSOR_TECHNICAL_REQUIREMENTS which have been stored + in the database object + """ + if not self.technical_requirements: + return (None, ) + requirements = [] + i = 0 + indexed_requirements = [y for x,y in constants.SPONSOR_TECHNICAL_REQUIREMENTS] + for numreq in self.technical_requirements: + if numreq == '1': + requirements.append(indexed_requirements[i]) + i += 1 + return requirements + + def get_guidelines(self): + """ + Return a formatted and sanitized string of the guidelines the sponsor + configured + """ + + if self.guidelines == constants.SPONSOR_GUIDELINES_TYPE_TEXT: + s = self.guidelines_text + s = s.replace('<', '<') + s = s.replace('>', '>') + s = s.replace('\n', '
') + return s + elif self.guidelines == constants.SPONSOR_GUIDELINES_TYPE_URL: + return "%s" % (self.guidelines_text, self.guidelines_text) + else: + return "None" + + def get_social_requirements(self): + """ + Return a formatted and sanitized string of the social requirements the sponsor + configured + """ + + if self.social_requirements: + s = self.social_requirements + s = s.replace('<', '<') + s = s.replace('>', '>') + s = s.replace('\n', '
') + return s + else: + return "None" + + def allowed(self, flag): + """ + Returns true if the user associated with this object allowed to display a + contact address. This method also honors the SPONSOR_METRICS_RESTRICTED flag + + ```flag``` A SPONSOR_CONTACT_METHOD_* flag which should be checked + """ + if self.availability == constants.SPONSOR_METRICS_RESTRICTED and self.contact == flag: + return True + elif self.availability == constants.SPONSOR_METRICS_PUBLIC: + return True + return False + + +orm.mapper(SponsorMetrics, t_sponsor_metrics, properties={ + 'user' : orm.relation(User, backref='sponsor_metrics') +}) diff --git a/debexpo/templates/index/intro-sponsors.mako b/debexpo/templates/index/intro-sponsors.mako index 63399a7b..b9a412e7 100644 --- a/debexpo/templates/index/intro-sponsors.mako +++ b/debexpo/templates/index/intro-sponsors.mako @@ -16,3 +16,50 @@ ${ c.custom_html }

What to do for sponsoring

Look for packages that you would like to sponsor on this website. Once you have found some you should download, build and test them. Please notify your sponsoree of every problem that you find in order to give him a chance to fix them. We believe that it is of uttermost importance to stay in contact with your sponsorees to keep them interested in working on Debian. Moreover, they will also learn how to maintain packages within a team and will learn skills that are crucial for Debian Developers more easily.

+ + + + + + + + + +<% + def preferred(flag): + if flag: + return "(preferred)" + else: + return "" +%> +% for sponsor in c.sponsors: + + + + + + + +% endfor +
Sponsor nameContact dataSponsor GuidelinesTechnical RequirementsSocial Requirements
${ sponsor.user.name } +
    + % if sponsor.user.email and sponsor.allowed(c.constants.SPONSOR_CONTACT_METHOD_EMAIL): +
  • Email: ${ sponsor.user.email } ${ preferred(sponsor.contact == c.constants.SPONSOR_CONTACT_METHOD_EMAIL) }
  • + % endif + % if sponsor.user.ircnick and sponsor.allowed(c.constants.SPONSOR_CONTACT_METHOD_IRC): +
  • IRC: ${ sponsor.user.ircnick } ${ preferred(sponsor.contact == c.constants.SPONSOR_CONTACT_METHOD_IRC) }
  • + % endif + % if sponsor.user.jabber and sponsor.allowed(c.constants.SPONSOR_CONTACT_METHOD_JABBER): +
  • Jabber: ${ sponsor.user.jabber } ${ preferred(sponsor.contact == c.constants.SPONSOR_CONTACT_METHOD_JABBER) }
  • + % endif +
+
${ sponsor.get_guidelines() | n} +
    + <% requirements = sponsor.database_to_technical_requirements() %> + % for requirement in c.constants.SPONSOR_TECHNICAL_REQUIREMENTS: + % if requirement[1] in requirements: +
  • ${ requirement[0] }
  • + % endif + % endfor +
+
${ sponsor.get_social_requirements() | n}
diff --git a/debexpo/templates/my/index.mako b/debexpo/templates/my/index.mako index 6597db46..b3d6d684 100644 --- a/debexpo/templates/my/index.mako +++ b/debexpo/templates/my/index.mako @@ -19,10 +19,10 @@ allow_unsigned_uploads = 0 ${ h.html.tags.form(h.url.current()) } ${ h.html.tags.hidden('form', 'details') } - +
- - + + @@ -38,20 +38,20 @@ allow_unsigned_uploads = 0 ${ h.html.tags.end_form() } - +
${ _('Change GPG key') } ${ h.html.tags.form(h.url.current(), multipart=True) } ${ h.html.tags.hidden('form', 'gpg') } -
${ _('Name') }:${ h.html.tags.text('name', value=c.user.name) }${ _('Name') }:${ h.html.tags.text('name', value=c.user.name) }
+
% if c.currentgpg: - - + + @@ -79,17 +79,17 @@ allow_unsigned_uploads = 0 ${ h.html.tags.end_form() } - +
${ _('Change password') } ${ h.html.tags.form(h.url.current()) } ${ h.html.tags.hidden('form', 'password') } -
${ _('Current GPG key') }:${ c.currentgpg }${ _('Current GPG key') }:${ c.currentgpg }
+
- - + + @@ -110,17 +110,17 @@ allow_unsigned_uploads = 0 ${ h.html.tags.end_form() } - +
${ _('Change other details') } ${ h.html.tags.form(h.url.current()) } ${ h.html.tags.hidden('form', 'other_details') } -
${ _('Current password') }:${ h.html.tags.password('password_current') }${ _('Current password') }:${ h.html.tags.password('password_current') }
+
- - + + @@ -162,7 +162,79 @@ allow_unsigned_uploads = 0
${ _('Country') }:${ h.html.tags.select('country', c.current_country, sorted(c.countries.iteritems(), key=lambda x: x[1])) }${ _('Country') }:${ h.html.tags.select('country', c.current_country, sorted(c.countries.iteritems(), key=lambda x: x[1])) }
${ h.html.tags.submit('commit', _('Submit')) }
+ ${ h.html.tags.end_form() } + +% if c.debian_developer: +
+
+ ${ _('Sponsor metrics') } + + ${ h.html.tags.form(h.url.current()) } + ${ h.html.tags.hidden('form', 'metrics') } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
${ _('Visibility of your profile to sponsored maintainer') }: + % for availability,label in [(c.constants.SPONSOR_METRICS_PRIVATE, _("None")), \ + (c.constants.SPONSOR_METRICS_RESTRICTED, _("Restricted")), \ + (c.constants.SPONSOR_METRICS_PUBLIC, _("Full")) ]: + ${ h.html.tags.radio('availability', value=availability, label=label, checked=(c.metrics.availability == availability)) } + % endfor +
${ _('Preferred contact method') }:${ h.html.tags.select('preferred_contact_method', c.metrics.contact, c.contact_methods)}
+ ${ _('Type of packages you are interested in') }: + ${ h.html.tags.textarea('package_types', c.metrics.types, cols=82, rows=10) }
${ _('You personal package guidelines') }: + % for guideline,label in [(c.constants.SPONSOR_GUIDELINES_TYPE_NONE, _("None")), \ + (c.constants.SPONSOR_GUIDELINES_TYPE_TEXT, _("Free text")), \ + (c.constants.SPONSOR_GUIDELINES_TYPE_URL, _("URL reference")) ]: + ${ h.html.tags.radio('packaging_guidelines', value=guideline, label=label, checked=(c.metrics.guidelines == guideline)) } + % endfor +
 ${ h.html.tags.textarea('packaging_guideline_text', c.metrics.guidelines_text, cols=82, rows=10) }
${ _('Packaging types you accept') }: + <% requirements = c.metrics.database_to_technical_requirements() %> + % for requirement in c.constants.SPONSOR_TECHNICAL_REQUIREMENTS: + ${ h.html.tags.checkbox('package_technical_requirements', value=requirement[1], label=requirement[0], checked=(requirement[1] in requirements)) } +
+ % endfor +
${ _('Social requirements for maintainers') }:${ h.html.tags.textarea('social_requirements', c.metrics.social_requirements, cols=82, rows=10) }
${ h.html.tags.submit('commit', _('Submit')) }
+
${ h.html.tags.end_form() } +% endif -- GitLab From c4e63a23451909f34b2711c225fe47b921cf16b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Mon, 5 Sep 2011 16:17:46 -0400 Subject: [PATCH 02/49] Display the type column, which was forgotten to be displayed --- debexpo/model/sponsor_metrics.py | 14 ++++++++++++++ debexpo/templates/index/intro-sponsors.mako | 14 +++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/debexpo/model/sponsor_metrics.py b/debexpo/model/sponsor_metrics.py index 3b9ca584..d17f4a8f 100644 --- a/debexpo/model/sponsor_metrics.py +++ b/debexpo/model/sponsor_metrics.py @@ -111,6 +111,20 @@ class SponsorMetrics(OrmObject): else: return "None" + + def get_types(self): + """ + Return a formatted and sanitized string of the packages the sponsor + is interested in + """ + + if self.types: + s = self.types + s = s.replace('<', '<') + s = s.replace('>', '>') + s = s.replace('\n', '
') + return s + def get_social_requirements(self): """ Return a formatted and sanitized string of the social requirements the sponsor diff --git a/debexpo/templates/index/intro-sponsors.mako b/debexpo/templates/index/intro-sponsors.mako index b9a412e7..459bf391 100644 --- a/debexpo/templates/index/intro-sponsors.mako +++ b/debexpo/templates/index/intro-sponsors.mako @@ -19,11 +19,12 @@ ${ c.custom_html } - - - - - + + + + + + <% def preferred(flag): @@ -48,6 +49,9 @@ ${ c.custom_html } % endif +
Sponsor nameContact dataSponsor GuidelinesTechnical RequirementsSocial RequirementsSponsor nameContact dataPackages interested inSponsor GuidelinesTechnical RequirementsSocial Requirements
+ ${ sponsor.get_types() | n} + ${ sponsor.get_guidelines() | n}
    -- GitLab From 0a73f59422ec53cc9c809b81a484c3b27fdc52f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Mon, 5 Sep 2011 18:29:11 -0400 Subject: [PATCH 03/49] Refactor templates. Move some documentation to QA, be more helpful on maintainer's intro, describe metrics on sponsor's intro --- debexpo/controllers/index.py | 11 ++++- .../templates/index/intro-maintainers.mako | 45 ++++++++++--------- debexpo/templates/index/intro-sponsors.mako | 45 +++++++++++++++---- debexpo/templates/index/qa.mako | 27 +++++++++++ 4 files changed, 99 insertions(+), 29 deletions(-) diff --git a/debexpo/controllers/index.py b/debexpo/controllers/index.py index 0259c3f0..ad419d7c 100644 --- a/debexpo/controllers/index.py +++ b/debexpo/controllers/index.py @@ -38,7 +38,7 @@ __license__ = 'MIT' import logging -from debexpo.lib.base import BaseController, c, config, render +from debexpo.lib.base import BaseController, c, config, render, session from debexpo.lib import constants from debexpo.controllers.packages import PackagesController, PackageGroups from webhelpers.html import literal @@ -94,6 +94,15 @@ class IndexController(BaseController): else: c.custom_html = '' + # The template will need to look at the user details. + if 'user_id' in session: + log.debug('Getting user object for user_id = "%s"' % session['user_id']) + self.user = meta.session.query(User).get(session['user_id']) + c.user = self.user + c.logged_in = True + else: + c.logged_in = False + return render('/index/intro-maintainers.mako') diff --git a/debexpo/templates/index/intro-maintainers.mako b/debexpo/templates/index/intro-maintainers.mako index 9fa0efde..69ed6be8 100644 --- a/debexpo/templates/index/intro-maintainers.mako +++ b/debexpo/templates/index/intro-maintainers.mako @@ -12,37 +12,42 @@ ${ c.custom_html }

    How will my package get into Debian?

    -

    This web site is a public package repository of source packages. You can upload your package to this server (through special tools like 'dupload' or 'dput') and after a few checks it will be stored in our repository. Interested sponsors can then download the package and upload it to Debian. So the basic procedure is:

    - -
      -
    • ${ h.tags.link_to("Sign up for an account", h.url(controller='register', action='register')) }. Getting an account on this server is an automatic process and will just take a moment. We require registration so we have a valid email address where sponsors can reach you.
    • -
    • Upload your package to mentors.debian.net. You don not need to put your packages into any other web space on the Internet. Everybody will be able to download your package using either the web browser, the 'dget' tools or even through a simple run of apt-get source ....
    • -
    • Your package is on display on the main page of ${ c.config['debexpo.sitetitle'] } so interested sponsors will see it and hopefully check it out.
    • -
    • You will be shown a RFS (request-for-sponsorship) template that you can send to the debian-mentors mailing list to draw attention to your package.
    • +

      This web site is a public package repository of source packages. You can upload your package to this server (through special tools like 'dupload' or 'dput') and after a few checks it will be stored in our repository. ${ h.tags.link_to("Interested sponsors", h.url(controller='index', action='intro-sponsors')) } can then download the package and upload it to Debian. So the basic procedure is:

      + +
        +
      1. ${ h.tags.link_to("Sign up for an account", h.url(controller='register', action='register')) }. Getting an account on this server is an automatic process and will just take a moment. We require registration so we have a valid email address where sponsors can reach you.
      2. +
      3. Upload your package to mentors.debian.net. You do not need to put your packages into any other web space on the Internet. Everybody will be able to download your package using either the web browser, the 'dget' tools or even through a simple run of apt-get source ....
      4. +
      5. Have a look to your ${ h.tags.link_to("personal package page", h.url(controller='package', action='my')) }. Your uploaded package should show up there. From there you can toggle several settings and retrieve the RFS (request-for-sponsorship) template
      6. +
      7. Your package is on display on the main page of ${ c.config['debexpo.sitetitle'] }, if you enable the "Needs a Sponsor" button, so interested sponsors will see it and hopefully check it out.
      8. +
      9. You will be shown a RFS (request-for-sponsorship) template that you should send to the debian-mentors mailing list to draw attention to your package.
      10. Finally a sponsor will hopefully pick up your package and upload it on your behalf. Bingo - your package is publicly available in Debian. And this server will automatically send you an email in case you did not notice the upload.
      11. -
    + -

    Is my package technically okay?

    +

    How to upload packages?

    -

    When you upload your package to ${ c.config['debexpo.sitename'] } it will automatically be checked for common mistakes. You will get an information email after the upload. Either your package contains bugs and will be rejected, or the package is clean except for some minor technical issues. You will get hints about how to fix the package. If the email tells you that your package is fine then a sponsor will still do further checks. Don't worry too much. If your package is accepted by mentors.debian.net then let the sponsor help you with the rest. +

    You need to use dput to upload packages. +% if c.logged_in: -

    How to upload packages?

    +See your ${ h.tags.link_to("account page", h.url('my')) } to see how to configure it, or put the following content to your ~/.dput.cf file:

    -

    You need to use dput to upload packages. -See your ${ h.tags.link_to("account page", h.url('my')) } to see how to configure it.

    -

    Once you have it set up, you can run it from your shell like this:

    -dput debexpo yourpackage_yourversion_arch.changes
    +[debexpo]
    +fqdn = ${ config['debexpo.sitename'] }
    +incoming = /upload/${ c.user.email }/${ c.user.get_upload_key() }
    +method = http
    +allow_unsigned_uploads = 0
     
    +% else: +You need to configure dput. Please ${ h.tags.link_to("login", h.url(controller='login', action='index')) } to see your personal ~/.dput.cf here. -

    How long will it take until my upload is available to sponsors?

    +% endif -

    If you upload via HTTP, which is what we recommend, then it will take between 0 and 2 minutes.

    - -

    If you upload via FTP, which you must do if a package is too large for the HTTP uploader, then there can be up to a 30 minute delay before your package gets processed.

    +

    Once you have it set up, you can run it from your shell like this:

    -

    During those 0-2 minutes, the server does quality assurance and other checks on your package. You will receive an email when it is ready.

    +
    +$ dput debexpo your_sourcepackage_1.0.changes
    +

    Will my name stay visible on the package?

    diff --git a/debexpo/templates/index/intro-sponsors.mako b/debexpo/templates/index/intro-sponsors.mako index 459bf391..ac7c639f 100644 --- a/debexpo/templates/index/intro-sponsors.mako +++ b/debexpo/templates/index/intro-sponsors.mako @@ -3,27 +3,56 @@ ${ c.custom_html } -

    Introduction for sponsors

    +

    The sponsoring process

    -

    What is a sponsor?

    +

    People willing to sponsor packages

    -

    Someone who uploads the package and is responsible for the package in the archive. The sponsor is responsible for the quality of the package and checks the work of the package maintainer to improve his skills.

    +

    Below is an incomplete list of sponsors, willing to upload your package. Send your filled out RFS (request-for-sponsorship) template to the debian-mentors mailing list to draw attention to your package. If you don't get any feedback, or you think your package would perfectly fit to the requirements of one or more of the sponsors below, contact them directly: -

    Motivation

    +

    Please don't be offensed if a sponsor you wrote won't reply you in time. He might be busy or short of time, as you write your mail

    -

    Thanks for helping. There are a lot of sponsorees waiting for a Developer to help them with their packages, and if you want to help with the New Maintainer process this is a good step to get involved.

    +

    Sponsor metrics

    +

    Packages interested in

    -

    What to do for sponsoring

    +

    Sponsors typically are not interested to upload any package for you. They could, however, be interested if your package matches their area of interest. Please compare those package types with your package. Such categories eventually are certain programming languages your program is written in, a field of endeavour, or software fulfilling a certain task.

    -

    Look for packages that you would like to sponsor on this website. Once you have found some you should download, build and test them. Please notify your sponsoree of every problem that you find in order to give him a chance to fix them. We believe that it is of uttermost importance to stay in contact with your sponsorees to keep them interested in working on Debian. Moreover, they will also learn how to maintain packages within a team and will learn skills that are crucial for Debian Developers more easily.

    +

    Sponsor guidelines

    +

    Debian allows several workflows and best practices to co-exist with each other. All packages must comply the Debian policy as bare essential minimum, but workflows beyond that are purely optional. A sponsor may have certain other requirements your package must comply to, for example some sponsors mandate a watch file, DEP-5 copyright files, and pedantic Lintian cleanness. Have a look to those individual guidelines if applicable, before sending your mail.

    + +

    Technical requirements

    + +

    +

    + Not every sponsor likes every type of package or way to do things. Please hesitate to ask sponsors for uploading your package, if the sponsor does not explicitly allow the type of package you are trying to upload. We know about those tags: +
    CDBS
    Your package makes use of the The Common Debian Build System
    +
    debhelper
    Your package makes use of the debhelper build system
    +
    custom debian/rules
    Your package is using a completely customized, yet policy compliant debian/rules file
    +
    NMUs
    Your package is a NMU
    +
    QA uploads
    Your package is a QA upload
    +
    Backports
    Your package is a backported package
    +
    Modified Tarballs
    Your package modified the original source tarball somehow in a way, it does not match the original checksum anymore
    +
    VCS snapshot tarballs
    Your package is not based on a original source tarball at all, but is based on a VCS snapshot
    +
    contrib/non-free packages
    Your package it targetting the contrib or non-free branches (Information)
    +
    +

    + +

    Social requirements

    + +

    Some sponsors prefer to upload only packages from people, that fulfill certain social criterias. Such examples can be, but are not limited to:

    +
      +
    • Place and time zone you are living
    • +
    • You are willing to become a DM/DD some day
    • +
    • You have packages in Debian already.
    • +
    • Your future plans regarding Debian.
    • +
    - + <% diff --git a/debexpo/templates/index/qa.mako b/debexpo/templates/index/qa.mako index 8843de31..67e0b458 100644 --- a/debexpo/templates/index/qa.mako +++ b/debexpo/templates/index/qa.mako @@ -20,6 +20,10 @@ ${ c.config['debexpo.sitename'] } is a rather complex service. Things can go wro

    Every package must comply with the Debian policy before it can enter the Debian distribution. This is a document which describes the structure and contents of the Debian archive and several design issues of the operating system, as well as technical requirements that each package must satisfy to be included in the distribution.

    +

    Is my package technically okay?

    + +

    When you upload your package to ${ c.config['debexpo.sitename'] } it will automatically be checked for common mistakes. You will get an information email after the upload. Either your package contains bugs and will be rejected, or the package is clean except for some minor technical issues. You will get hints about how to fix the package. If the email tells you that your package is fine then a sponsor will still do further checks. Don't worry too much. If your package is accepted by mentors.debian.net then let the sponsor help you with the rest. +

    What is Lintian?

    Lintian is a Debian package checker (and available as Debian package so you can run it yourself). It can be used to check binary and source packages for compliance with the Debian policy and for other common packaging errors.

    @@ -35,3 +39,26 @@ ${ c.config['debexpo.sitename'] } is a rather complex service. Things can go wro

    My binary packages do not show up

    The current policy on ${ c.config['debexpo.sitename'] } is to deliberately throw away the binary packages. This is done for two main reasons. First, it saves a lot of disk space. And second, in the past Debian users downloaded the packages and used them carelessly to get brand-new versions. This led to a lot of support questions. So we decided to just keep the source packages.

    + +

    How long will it take until my upload is available to sponsors?

    + +

    If you upload via HTTP, which is what we recommend, then it will take between 0 and 2 minutes.

    + +

    If you upload via FTP, which you must do if a package is too large for the HTTP uploader, then there can be up to a 30 minute delay before your package gets processed.

    + +

    During those 0-2 minutes, the server does quality assurance and other checks on your package. You will receive an email when it is ready.

    + +

    Information for sponsors

    + +

    What is a sponsor?

    + +

    Someone who uploads the package and is responsible for the package in the archive. The sponsor is responsible for the quality of the package and checks the work of the package maintainer to improve his skills.

    + +

    Why should I sponsor uploads

    + +

    Thanks for your interest. There are a lot of sponsorees waiting for a Developer to help them with their packages, and if you want to help with the New Maintainer process this is a good step to get involved.

    + +

    What to do for sponsoring?

    + +

    Look for packages that you would like to sponsor on this website. Once you have found some you should download, build and test them. Please notify your sponsoree of every problem that you find in order to give him a chance to fix them. We believe that it is of uttermost importance to stay in contact with your sponsorees to keep them interested in working on Debian. Moreover, they will also learn how to maintain packages within a team and will learn skills that are crucial for Debian Developers more easily.

    + -- GitLab From 4347537533b2e917542369df48ff8bc0989589d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Mon, 5 Sep 2011 20:05:15 -0400 Subject: [PATCH 04/49] Extend list of supported distribution to allow every branch known in Debian. This might be a bit more flexible in future --- debexpo/scripts/debexpo_importer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debexpo/scripts/debexpo_importer.py b/debexpo/scripts/debexpo_importer.py index 6141ac3a..072c8976 100755 --- a/debexpo/scripts/debexpo_importer.py +++ b/debexpo/scripts/debexpo_importer.py @@ -382,7 +382,10 @@ class Importer(object): self.files = self.changes.get_files() distribution = self.changes['Distribution'].lower() - allowed_distributions = ('unstable', 'stable-backports', 'oldstable-backports', 'stable-backports-sloppy', 'oldstable-backports') + allowed_distributions = ('oldstable', 'stable', 'unstable', 'experimental', 'stable-backports', 'oldstable-backports', + 'oldstable-backports-sloppy', 'stable-security', 'testing-security', 'stable-proposed-updates', + 'testing-proposed-updates', 'sid', 'wheezy', 'squeeze', 'lenny', 'squeeze-backports', 'lenny-backports', + 'lenny-security', 'lenny-backports-sloppy', 'lenny-volatile', 'squeeze-security', 'squeeze-updates', 'wheezy-security') if distribution not in allowed_distributions: self._remove_changes() self._reject("You are not uploading to one of those Debian distributions: %s" % -- GitLab From 74e19a2d0b14274f51428d23ccd10cac44916037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Tue, 6 Sep 2011 05:26:51 -0400 Subject: [PATCH 05/49] Add social metrics, redesign control panel layout --- debexpo/controllers/my.py | 1 + debexpo/lib/constants.py | 15 +++++ debexpo/lib/schemas.py | 1 + debexpo/model/sponsor_metrics.py | 44 ++++++++++++- debexpo/templates/index/intro-sponsors.mako | 31 +++++---- debexpo/templates/my/index.mako | 72 +++++++++++++-------- 6 files changed, 121 insertions(+), 43 deletions(-) diff --git a/debexpo/controllers/my.py b/debexpo/controllers/my.py index 307b85e1..4beb69e8 100644 --- a/debexpo/controllers/my.py +++ b/debexpo/controllers/my.py @@ -173,6 +173,7 @@ class MyController(BaseController): sm.guidelines_text = self.form_result['packaging_guideline_text'] sm.social_requirements = self.form_result['social_requirements'] sm.technical_requirements_to_database(self.form_result['package_technical_requirements']) + sm.social_requirements_to_database(self.form_result['social_requirements_tags']) sm.availability = self.form_result['availability'] if self.form_result['packaging_guidelines'] == constants.SPONSOR_GUIDELINES_TYPE_URL: diff --git a/debexpo/lib/constants.py b/debexpo/lib/constants.py index 15549fc6..91ab7b8c 100644 --- a/debexpo/lib/constants.py +++ b/debexpo/lib/constants.py @@ -103,5 +103,20 @@ SPONSOR_TECHNICAL_REQUIREMENTS = [ ('Modified Tarballs','tarballs'), ('VCS snapshot tarballs','vcs_tarballs'), ('contrib/non-free packages', 'non_free'), + ('1.0 format packages', '10_format'), + ('3.0 format packages', '30_format'), + ('Embedded code copies', 'code_copies'), + ('DEP-5 copyright', 'dep5'), + ('non-DEP5 copyright', 'nodep5'), ] +SPONSOR_SOCIAL_REQUIREMENTS = [ + ('prospective DM/DD', 'dmdd'), + ('(willing to be) DM', 'dm'), + ('(willing to enter) NM', 'nm'), + ('signed GPG key', 'gpg'), + ('no one time uploads', '1time'), + ('sharing a time zone', 'tz'), + ('possibility to meet-up', 'meetup'), + ('having already packages in Debian', 'maintainer') + ] diff --git a/debexpo/lib/schemas.py b/debexpo/lib/schemas.py index 6cf39a71..c28f6943 100644 --- a/debexpo/lib/schemas.py +++ b/debexpo/lib/schemas.py @@ -122,6 +122,7 @@ class MetricsForm(MyForm): constants.SPONSOR_METRICS_RESTRICTED, constants.SPONSOR_METRICS_PUBLIC]), formencode.validators.Int(not_empty=True)) package_technical_requirements = formencode.validators.Set + social_requirements_tags = formencode.validators.Set social_requirements = formencode.validators.String() # Postpone validation of packaging_guideline_text, as its validation diff --git a/debexpo/model/sponsor_metrics.py b/debexpo/model/sponsor_metrics.py index d17f4a8f..7beb2c59 100644 --- a/debexpo/model/sponsor_metrics.py +++ b/debexpo/model/sponsor_metrics.py @@ -55,12 +55,49 @@ t_sponsor_metrics = sa.Table( sa.Column('guidelines', sa.types.Integer, nullable=True), sa.Column('guidelines_text', sa.types.Text, nullable=True), sa.Column('technical_requirements', sa.types.Text, nullable=True), - sa.Column('social_requirements', sa.types.Text, nullable=True) + sa.Column('social_requirements', sa.types.Text, nullable=True), + sa.Column('social_requirements_tags', sa.types.Text, nullable=True) ) class SponsorMetrics(OrmObject): foreign = ['user'] + + def social_requirements_to_database(self, requirements): + """ + Takes a list of technical requirements and converts them in + the internal database representation which is a bit map. + The internal structure is considered an implementation detail + + ```requirements``` A list of SPONSOR_SOCIAL_REQUIREMENTS which shall + be stored in this object + """ + indexed_requirements = [y for x,y in constants.SPONSOR_SOCIAL_REQUIREMENTS] + for i in indexed_requirements: + if i in requirements: + indexed_requirements[indexed_requirements.index(i)] = '1' + else: + indexed_requirements[indexed_requirements.index(i)] = '0' + self.social_requirements_tags = ''.join(indexed_requirements) + + def database_to_social_requirements(self): + """ + Returns a list of SPONSOR_SOCIAL_REQUIREMENTS] which have been stored + in the database object + """ + if not self.social_requirements_tags: + return (None, ) + requirements = [] + i = 0 + indexed_requirements = [y for x,y in constants.SPONSOR_SOCIAL_REQUIREMENTS] + for numreq in self.social_requirements_tags: + if numreq == '1': + requirements.append(indexed_requirements[i]) + i += 1 + return requirements + + + def technical_requirements_to_database(self, requirements): """ Takes a list of technical requirements and converts them in @@ -109,7 +146,7 @@ class SponsorMetrics(OrmObject): elif self.guidelines == constants.SPONSOR_GUIDELINES_TYPE_URL: return "%s" % (self.guidelines_text, self.guidelines_text) else: - return "None" + return "" def get_types(self): @@ -124,6 +161,7 @@ class SponsorMetrics(OrmObject): s = s.replace('>', '>') s = s.replace('\n', '
    ') return s + return "" def get_social_requirements(self): """ @@ -138,7 +176,7 @@ class SponsorMetrics(OrmObject): s = s.replace('\n', '
    ') return s else: - return "None" + return "" def allowed(self, flag): """ diff --git a/debexpo/templates/index/intro-sponsors.mako b/debexpo/templates/index/intro-sponsors.mako index ac7c639f..5edf9b93 100644 --- a/debexpo/templates/index/intro-sponsors.mako +++ b/debexpo/templates/index/intro-sponsors.mako @@ -48,12 +48,9 @@ ${ c.custom_html }
    Sponsor name Contact data Packages interested in Sponsor GuidelinesTechnical RequirementsAcceptable packaging styles and types Social Requirements
    - - - - - - + + + <% def preferred(flag): @@ -64,8 +61,9 @@ ${ c.custom_html } %> % for sponsor in c.sponsors: - - - + - % endfor
    Sponsor nameContact dataPackages interested inSponsor GuidelinesAcceptable packaging styles and typesSocial RequirementsSponsor name and contact dataSponsor guidelinesSocial Requirements
    ${ sponsor.user.name } + ${ sponsor.user.name } +
      % if sponsor.user.email and sponsor.allowed(c.constants.SPONSOR_CONTACT_METHOD_EMAIL):
    • Email: ${ sponsor.user.email } ${ preferred(sponsor.contact == c.constants.SPONSOR_CONTACT_METHOD_EMAIL) }
    • @@ -77,11 +75,9 @@ ${ c.custom_html }
    • Jabber: ${ sponsor.user.jabber } ${ preferred(sponsor.contact == c.constants.SPONSOR_CONTACT_METHOD_JABBER) }
    • % endif
    + Packages interested in +

    ${ sponsor.get_types() | n}

    - ${ sponsor.get_types() | n} - ${ sponsor.get_guidelines() | n}
      <% requirements = sponsor.database_to_technical_requirements() %> @@ -91,8 +87,19 @@ ${ c.custom_html } % endif % endfor
    +

    ${ sponsor.get_guidelines() | n}

    +
    +
      + <% social_requirements = sponsor.database_to_social_requirements() %> + % for requirement in c.constants.SPONSOR_SOCIAL_REQUIREMENTS: + % if requirement[1] in social_requirements: +
    • ${ requirement[0] }
    • + % endif + % endfor +
    + ${ sponsor.get_social_requirements() | n}
    ${ sponsor.get_social_requirements() | n}
    diff --git a/debexpo/templates/my/index.mako b/debexpo/templates/my/index.mako index b3d6d684..e943b3b2 100644 --- a/debexpo/templates/my/index.mako +++ b/debexpo/templates/my/index.mako @@ -14,7 +14,7 @@ allow_unsigned_uploads = 0
    - ${ _('Change details') } + ${ _('Change details') } ${ h.html.tags.form(h.url.current()) } ${ h.html.tags.hidden('form', 'details') } @@ -40,7 +40,7 @@ allow_unsigned_uploads = 0

    - ${ _('Change GPG key') } + ${ _('Change GPG key') } ${ h.html.tags.form(h.url.current(), multipart=True) } ${ h.html.tags.hidden('form', 'gpg') } @@ -81,7 +81,7 @@ allow_unsigned_uploads = 0

    - ${ _('Change password') } + ${ _('Change password') } ${ h.html.tags.form(h.url.current()) } ${ h.html.tags.hidden('form', 'password') } @@ -112,7 +112,7 @@ allow_unsigned_uploads = 0

    - ${ _('Change other details') } + ${ _('Change other details') } ${ h.html.tags.form(h.url.current()) } ${ h.html.tags.hidden('form', 'other_details') } @@ -167,64 +167,80 @@ allow_unsigned_uploads = 0 % if c.debian_developer:
    - ${ _('Sponsor metrics') } + ${ _('Sponsor metrics') } ${ h.html.tags.form(h.url.current()) } ${ h.html.tags.hidden('form', 'metrics') } +

    If you are unsure about the implications and meanings of fields, have a look to ${ h.tags.link_to("the sponsoring page", h.url('intro-sponsors')) }

    - - + - - + + - - - - - - - - - +
    + ${ h.html.tags.textarea('package_types', c.metrics.types, cols=82, rows=10) } + - + - - + + -- GitLab From 7afe96b7dea85dea48dd56393b8d3cb7e56a955a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Tue, 6 Sep 2011 06:55:29 -0400 Subject: [PATCH 06/49] More stylistic fixes in the templates --- debexpo/lib/constants.py | 21 +-- .../templates/index/intro-maintainers.mako | 11 +- debexpo/templates/index/intro-sponsors.mako | 143 ++++++++++++++---- 3 files changed, 137 insertions(+), 38 deletions(-) diff --git a/debexpo/lib/constants.py b/debexpo/lib/constants.py index 91ab7b8c..60006363 100644 --- a/debexpo/lib/constants.py +++ b/debexpo/lib/constants.py @@ -105,18 +105,19 @@ SPONSOR_TECHNICAL_REQUIREMENTS = [ ('contrib/non-free packages', 'non_free'), ('1.0 format packages', '10_format'), ('3.0 format packages', '30_format'), - ('Embedded code copies', 'code_copies'), + ('No embedded code copies', 'code_copies'), ('DEP-5 copyright', 'dep5'), - ('non-DEP5 copyright', 'nodep5'), + ('Non-DEP5 copyright', 'nodep5'), + ('Lintian cleanness', 'lintian') ] SPONSOR_SOCIAL_REQUIREMENTS = [ - ('prospective DM/DD', 'dmdd'), - ('(willing to be) DM', 'dm'), - ('(willing to enter) NM', 'nm'), - ('signed GPG key', 'gpg'), - ('no one time uploads', '1time'), - ('sharing a time zone', 'tz'), - ('possibility to meet-up', 'meetup'), - ('having already packages in Debian', 'maintainer') + ('Prospective DM/DD', 'dmdd'), + ('(Willing to be) DM', 'dm'), + ('(Willing to enter) NM', 'nm'), + ('Signed GPG key', 'gpg'), + ('No one time uploads', '1time'), + ('Sharing a time zone', 'tz'), + ('Possibility to meet-up', 'meetup'), + ('Having already packages in Debian', 'maintainer') ] diff --git a/debexpo/templates/index/intro-maintainers.mako b/debexpo/templates/index/intro-maintainers.mako index 69ed6be8..e85d960a 100644 --- a/debexpo/templates/index/intro-maintainers.mako +++ b/debexpo/templates/index/intro-maintainers.mako @@ -20,7 +20,7 @@ ${ c.custom_html }
  • Have a look to your ${ h.tags.link_to("personal package page", h.url(controller='package', action='my')) }. Your uploaded package should show up there. From there you can toggle several settings and retrieve the RFS (request-for-sponsorship) template
  • Your package is on display on the main page of ${ c.config['debexpo.sitetitle'] }, if you enable the "Needs a Sponsor" button, so interested sponsors will see it and hopefully check it out.
  • You will be shown a RFS (request-for-sponsorship) template that you should send to the debian-mentors mailing list to draw attention to your package.
  • -
  • Finally a sponsor will hopefully pick up your package and upload it on your behalf. Bingo - your package is publicly available in Debian. And this server will automatically send you an email in case you did not notice the upload.
  • +
  • Your package will hopefully be reviewed by a sponsor and either acknowledge your work and upload your package to Debian, or ask you to address some problems.
  • How to upload packages?

    @@ -52,3 +52,12 @@ $ dput debexpo your_sourcepackage_1.0.changes

    Will my name stay visible on the package?

    Yes. The Debian project appreciates the work you do. So you will be named as the official maintainer of the package in Debian. You will even get the bug reports if people discover problems in your package. Besides from not being able to upload the package directly into Debian you are treated as a full member of the community.

    + +

    What can I do if I don't find a sponsor?

    + +

    Don't become desperate. Sponsoring can take a while. Nonetheless, here are a few hints:

    + +
      +
    • Ask again on the debian-mentors mailing list. Its common practice to ask again after a few weeks.
    • +
    • Offer your package directly to developers. We made a ${ h.tags.link_to("a list of sponsors", h.url(controller='index', action='intro-sponsors')) }, eventually willing to upload packages for you. Please don't contact every sponsor listed there. Instead, read their individual requirements and choose the sponsor which matches you and your package best. +
    diff --git a/debexpo/templates/index/intro-sponsors.mako b/debexpo/templates/index/intro-sponsors.mako index 5edf9b93..659bda9a 100644 --- a/debexpo/templates/index/intro-sponsors.mako +++ b/debexpo/templates/index/intro-sponsors.mako @@ -5,47 +5,136 @@ ${ c.custom_html }

    The sponsoring process

    -

    People willing to sponsor packages

    +As sponsored maintainer you don't have upload permissions to the Debian repository. Therefore you have three possibilities to get your package into Debian: -

    Below is an incomplete list of sponsors, willing to upload your package. Send your filled out RFS (request-for-sponsorship) template to the debian-mentors mailing list to draw attention to your package. If you don't get any feedback, or you think your package would perfectly fit to the requirements of one or more of the sponsors below, contact them directly: +

      +
    • Join a packaging team
    • +
    • Ask the debian-mentors mailing list
    • +
    • Talk directly to people willing to sponsor your package
    • +
    + +

    Join a packaging team

    + +

    There are teams in Debian who maintain packages collaboratively. If your package deals with libraries for programming langauges, or is about an ecosystem of associated packages, think of KDE or Gnome packages for example, you may want to join that team. Have a look to list of packaging teams in Debian.

    + +

    Please note, each of those teams may have their own workflows and policies. Contact their respective mailing lists to learn more.

    + +

    Ask the debian-mentors mailing list

    + +

    If your package does not match the interests of any team, or you are not sure whether a team could be interested in your package, please write to the debian-mentors mailing list to draw attention to your package. Your request should be formatted according to our RFS ("request for sponsorship") template. If you uploaded your package to ${ config['debexpo.sitename'] }, a RFS template can be shown on your package page.

    -

    Please don't be offensed if a sponsor you wrote won't reply you in time. He might be busy or short of time, as you write your mail

    +

    Don't worry if you get no answer: It does not mean your package is bad. Ask again after a few weeks if you did not find a sponsor by other means yet.

    + +

    Finding a sponsor

    + +

    If you want, you can write sponsors willing to upload packages to other maintainers directly. Don't contact them blindly! Instead watch out for their requirements and guidelines. Contact them only if your package is compatible to their individual requirements and matches their area of interest. To tell apart sponsors who are interested in your package and who are not, they can formulate their own sponsor metrics.

    Sponsor metrics

    + +To help you finding a sponsor interested in your package, they can formulate sponsor metrics: +

    Packages interested in

    Sponsors typically are not interested to upload any package for you. They could, however, be interested if your package matches their area of interest. Please compare those package types with your package. Such categories eventually are certain programming languages your program is written in, a field of endeavour, or software fulfilling a certain task.

    -

    Sponsor guidelines

    -

    Debian allows several workflows and best practices to co-exist with each other. All packages must comply the Debian policy as bare essential minimum, but workflows beyond that are purely optional. A sponsor may have certain other requirements your package must comply to, for example some sponsors mandate a watch file, DEP-5 copyright files, and pedantic Lintian cleanness. Have a look to those individual guidelines if applicable, before sending your mail.

    +
    ${ _('Visibility of your profile to sponsored maintainer') }: + ${ _('Public visibility of your profile') }: % for availability,label in [(c.constants.SPONSOR_METRICS_PRIVATE, _("None")), \ (c.constants.SPONSOR_METRICS_RESTRICTED, _("Restricted")), \ (c.constants.SPONSOR_METRICS_PUBLIC, _("Full")) ]: ${ h.html.tags.radio('availability', value=availability, label=label, checked=(c.metrics.availability == availability)) } % endfor +
      +
    • None - Do not show up in the list of willing sponsors.
    • +
    • Restricted - Show only your preferred contact method publicly.
    • +
    • Full - Show full contact details publicly.
    • +
    ${ _('Preferred contact method') }:${ h.html.tags.select('preferred_contact_method', c.metrics.contact, c.contact_methods)}${ _('Preferred contact method for sponsored maintainer') }:${ h.html.tags.select('preferred_contact_method', c.metrics.contact, c.contact_methods)}
    - ${ _('Type of packages you are interested in') }: +
    + ${ _('Type of packages you are interested in') }:
    ${ h.html.tags.textarea('package_types', c.metrics.types, cols=82, rows=10) }
    ${ _('You personal package guidelines') }: - % for guideline,label in [(c.constants.SPONSOR_GUIDELINES_TYPE_NONE, _("None")), \ - (c.constants.SPONSOR_GUIDELINES_TYPE_TEXT, _("Free text")), \ - (c.constants.SPONSOR_GUIDELINES_TYPE_URL, _("URL reference")) ]: - ${ h.html.tags.radio('packaging_guidelines', value=guideline, label=label, checked=(c.metrics.guidelines == guideline)) } - % endfor -
     ${ h.html.tags.textarea('packaging_guideline_text', c.metrics.guidelines_text, cols=82, rows=10) }
    ${ _('Packaging types you accept') }:${ _('Packaging types and workflows you are accepting') }: <% requirements = c.metrics.database_to_technical_requirements() %> % for requirement in c.constants.SPONSOR_TECHNICAL_REQUIREMENTS: ${ h.html.tags.checkbox('package_technical_requirements', value=requirement[1], label=requirement[0], checked=(requirement[1] in requirements)) }
    % endfor +
    + % for guideline,label in [(c.constants.SPONSOR_GUIDELINES_TYPE_NONE, _("None")), \ + (c.constants.SPONSOR_GUIDELINES_TYPE_TEXT, _("Free text")), \ + (c.constants.SPONSOR_GUIDELINES_TYPE_URL, _("URL reference")) ]: + ${ h.html.tags.radio('packaging_guidelines', value=guideline, label=label, checked=(c.metrics.guidelines == guideline)) } + % endfor +
      +
    • ${_("None")} - You don't have any additional notes.
    • +
    • ${_("Free text")} - You have additional notes you can enter below as free text.
    • +
    • ${_("URL reference")} - You have your own website for sponsoring guidelines. Enter the address below.
    • +
    +
    + ${ h.html.tags.textarea('packaging_guideline_text', c.metrics.guidelines_text, cols=82, rows=10) }
    ${ _('Social requirements for maintainers') }:${ h.html.tags.textarea('social_requirements', c.metrics.social_requirements, cols=82, rows=10) }${ _('Social requirements for sponsored maintainers') }: + <% social_requirements = c.metrics.database_to_social_requirements() %> + % for requirement in c.constants.SPONSOR_SOCIAL_REQUIREMENTS: + ${ h.html.tags.checkbox('social_requirements_tags', value=requirement[1], label=requirement[0], checked=(requirement[1] in social_requirements)) } +
    + % endfor +
    + ${ h.html.tags.textarea('social_requirements', c.metrics.social_requirements, cols=82, rows=10) } +
    + + + + + + + + + + + + +
    Technical requirementsSocial requirements
    + Debian allows several workflows and best practices to co-exist with each other. All packages must comply the Debian policy as bare essential minimum, but some workflows and best practices beyond that are optional, but nonetheless mandatory for you asking that person to sponsor your upload. + + Some sponsors prefer to upload only packages from people, that fulfill certain social criterias. Please don't ask an uploader to sponsor your request if you don't match them. +
    +
    +
    CDBS
    +
    Your package makes use of the The Common Debian Build System
    + +
    Debhelper
    +
    Your package makes use of the debhelper build system
    + +
    Custom debian/rules
    +
    Your package is using a completely customized, yet policy compliant debian/rules file
    + +
    NMUs
    +
    Your package is a NMU
    + +
    QA uploads
    +
    Your package is a QA upload
    + +
    Backports
    +
    Your package is a backported package
    + +
    Modified Tarballs
    +
    Your package modified the original source tarball somehow in a way, it does not match the original checksum anymore
    + +
    VCS snapshot tarballs
    +
    Your package is not based on a original source tarball at all, but is based on a VCS snapshot
    + +
    contrib/non-free packages
    +
    Your package it targetting the contrib or non-free branches (Information)
    + +
    1.0 format packages
    +
    Your package is using the 1.0 format (the traditional source format that is).
    + +
    3.0 format packages
    +
    Your package is using the 3.0/quilt format.
    + +
    No embedded code copies
    +
    Your package does not make use of embedded code copies.
    + +
    DEP-5 copyright
    +
    Your package does make use of DEP-5 copyright files.
    + +
    Non-DEP5 copyright
    +
    Your package does not make use of DEP-5 copyright files.
    + +
    Lintian cleanness
    +
    Your package is Lintian clean down to the informational level.
    +
    +
    + +
    +
    Prospective DM/DD
    +
    You are willing to become a Debian Maintainer/Debian Developer some day.
    + +
    (Willing to be) DM
    +
    You are a Debian Maintainer already, or you plan to become one soon.
    + +
    (Willing to enter) NM
    +
    You are in the New Maintainer process to become a developer already, or you plan to apply soon.
    + +
    Signed GPG key
    +
    Your GPG matches the guidelines of the Debian keyring maintainers and/or is signed by any Debian developer.
    + +
    No one time uploads
    +
    You want to maintain the package you want to have sponsored in the forseeable future. Your package is not a single shot.
    + +
    Sharing a time zone
    +
    You share a time zone with your sponsors. This can be useful to get together more easily.
    + +
    Possibility to meet-up
    +
    You are living close to your sponsor and you are willing to meet him eventually
    + +
    Having already packages in Debian
    +
    You are already maintaining packages in Debian
    +
    +
    -

    Technical requirements

    -

    -

    - Not every sponsor likes every type of package or way to do things. Please hesitate to ask sponsors for uploading your package, if the sponsor does not explicitly allow the type of package you are trying to upload. We know about those tags: -
    CDBS
    Your package makes use of the The Common Debian Build System
    -
    debhelper
    Your package makes use of the debhelper build system
    -
    custom debian/rules
    Your package is using a completely customized, yet policy compliant debian/rules file
    -
    NMUs
    Your package is a NMU
    -
    QA uploads
    Your package is a QA upload
    -
    Backports
    Your package is a backported package
    -
    Modified Tarballs
    Your package modified the original source tarball somehow in a way, it does not match the original checksum anymore
    -
    VCS snapshot tarballs
    Your package is not based on a original source tarball at all, but is based on a VCS snapshot
    -
    contrib/non-free packages
    Your package it targetting the contrib or non-free branches (Information)
    -
    -

    Social requirements

    -

    Some sponsors prefer to upload only packages from people, that fulfill certain social criterias. Such examples can be, but are not limited to:

    -
      -
    • Place and time zone you are living
    • -
    • You are willing to become a DM/DD some day
    • -
    • You have packages in Debian already.
    • -
    • Your future plans regarding Debian.
    • -
    -- GitLab From b29ce48b5299fda1895d835fcbe6abe15108e239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Tue, 6 Sep 2011 07:12:46 -0400 Subject: [PATCH 07/49] Small fix in the sponsor template: Don't show redundant social metrics --- debexpo/templates/index/intro-sponsors.mako | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/debexpo/templates/index/intro-sponsors.mako b/debexpo/templates/index/intro-sponsors.mako index 659bda9a..109f9898 100644 --- a/debexpo/templates/index/intro-sponsors.mako +++ b/debexpo/templates/index/intro-sponsors.mako @@ -131,9 +131,7 @@ To help you finding a sponsor interested in your package, they can formulate spo
    Sponsor name and contact data
    - - -

    Social requirements

    +
    -- GitLab From aa880cfe4267a1723f2112593a52531b1eb89703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Tue, 6 Sep 2011 09:39:03 -0400 Subject: [PATCH 08/49] Create tag descriptions dynamically, fix some usability issues --- debexpo/lib/constants.py | 47 ++++++------ debexpo/model/sponsor_metrics.py | 8 +- debexpo/templates/index/intro-sponsors.mako | 83 +++------------------ 3 files changed, 40 insertions(+), 98 deletions(-) diff --git a/debexpo/lib/constants.py b/debexpo/lib/constants.py index 60006363..f06c70ce 100644 --- a/debexpo/lib/constants.py +++ b/debexpo/lib/constants.py @@ -94,30 +94,31 @@ SPONSOR_GUIDELINES_TYPE_URL = 1 SPONSOR_GUIDELINES_TYPE_TEXT = 2 SPONSOR_TECHNICAL_REQUIREMENTS = [ - ('CDBS','cdbs'), - ('debhelper','debhelper'), - ('custom debian/rules','debhelper'), - ('NMUs','nmu'), - ('QA uploads','qa'), - ('Backports','backports'), - ('Modified Tarballs','tarballs'), - ('VCS snapshot tarballs','vcs_tarballs'), - ('contrib/non-free packages', 'non_free'), - ('1.0 format packages', '10_format'), - ('3.0 format packages', '30_format'), - ('No embedded code copies', 'code_copies'), - ('DEP-5 copyright', 'dep5'), - ('Non-DEP5 copyright', 'nodep5'), - ('Lintian cleanness', 'lintian') + ('CDBS','cdbs', 'Your package makes use of the The Common Debian Build System'), + ('(Plain) debhelper','debhelper', 'Your package makes use of the debhelper build system'), + ('(Short) dh-style debhelper', 'dh', 'Your package makes use of short dh(1) style build system'), + ('No build helper / home brewed debian/rules','yadda', 'Your package is using a completely customized, yet policy compliant debian/rules file, which does not make use of either debhelper or CDBS.'), + ('NMUs','nmu', 'Your package is a NMU'), + ('QA uploads','qa', 'Your package is a QA upload'), + ('Backports','backports', 'Your package is a backported package'), + ('Modified tarballs (but good reasons)','tarballs', 'Your package modified the original source tarball somehow in a way, it does not match the original checksum anymore, but you have a good reason to do so'), + ('VCS snapshot tarballs','vcs_tarballs', 'Your package is not based on a original source tarball at all, but is based on a VCS snapshot',), + ('contrib/non-free packages', 'non_free', 'Your package it targetting the contrib or non-free branches (Information)'), + ('1.0 format packages', '10_format', 'Your package is using the 1.0 format (the traditional source format that is).'), + ('3.0 format packages', '30_format', 'Your package is using the 3.0/quilt format.'), + ('Allow embedded code copies', 'code_copies', 'Your package can makes use of embedded code copies in a reasonable way.'), + ('DEP-5 copyright', 'dep5', 'Your package does make use of DEP-5 copyright files.'), + ('Non-DEP5 copyright', 'nodep5', 'Your package does not make use of DEP-5 copyright files.'), + ('No Lintian cleanliness (but good reasons)', 'lintian', 'Your package is not Lintian clean down to the informational level, but you have a good reason why not.') ] SPONSOR_SOCIAL_REQUIREMENTS = [ - ('Prospective DM/DD', 'dmdd'), - ('(Willing to be) DM', 'dm'), - ('(Willing to enter) NM', 'nm'), - ('Signed GPG key', 'gpg'), - ('No one time uploads', '1time'), - ('Sharing a time zone', 'tz'), - ('Possibility to meet-up', 'meetup'), - ('Having already packages in Debian', 'maintainer') + ('Prospective DM/DD', 'dmdd', 'You are willing to become a Debian Maintainer/Debian Developer some day.'), + ('(Willing to be) DM', 'dm', 'You are a Debian Maintainer already, or you plan to become one soon.'), + ('(Willing to enter) NM', 'nm', 'You are in the New Maintainer process to become a developer already, or you plan to apply soon.'), + ('Signed GPG key', 'gpg', 'Your GPG matches the guidelines of the Debian keyring maintainers and/or is signed by any Debian developer.'), + ('No one time uploads', '1time', 'You want to maintain the package you want to have sponsored in the forseeable future. Your package is not a single shot.'), + ('Sharing a time zone', 'tz', 'You share a time zone with your sponsors. This can be useful to get together more easily.'), + ('Possibility to meet-up', 'meetup', 'You are living close to your sponsor and you are willing to meet him eventually'), + ('Having already packages in Debian', 'maintainer', 'You are living close to your sponsor and you are willing to meet him eventually') ] diff --git a/debexpo/model/sponsor_metrics.py b/debexpo/model/sponsor_metrics.py index 7beb2c59..ce20558b 100644 --- a/debexpo/model/sponsor_metrics.py +++ b/debexpo/model/sponsor_metrics.py @@ -72,7 +72,7 @@ class SponsorMetrics(OrmObject): ```requirements``` A list of SPONSOR_SOCIAL_REQUIREMENTS which shall be stored in this object """ - indexed_requirements = [y for x,y in constants.SPONSOR_SOCIAL_REQUIREMENTS] + indexed_requirements = [y for _,y,_ in constants.SPONSOR_SOCIAL_REQUIREMENTS] for i in indexed_requirements: if i in requirements: indexed_requirements[indexed_requirements.index(i)] = '1' @@ -89,7 +89,7 @@ class SponsorMetrics(OrmObject): return (None, ) requirements = [] i = 0 - indexed_requirements = [y for x,y in constants.SPONSOR_SOCIAL_REQUIREMENTS] + indexed_requirements = [y for _,y,_ in constants.SPONSOR_SOCIAL_REQUIREMENTS] for numreq in self.social_requirements_tags: if numreq == '1': requirements.append(indexed_requirements[i]) @@ -107,7 +107,7 @@ class SponsorMetrics(OrmObject): ```requirements``` A list of SPONSOR_TECHNICAL_REQUIREMENTS which shall be stored in this object """ - indexed_requirements = [y for x,y in constants.SPONSOR_TECHNICAL_REQUIREMENTS] + indexed_requirements = [y for _,y,_ in constants.SPONSOR_TECHNICAL_REQUIREMENTS] for i in indexed_requirements: if i in requirements: indexed_requirements[indexed_requirements.index(i)] = '1' @@ -124,7 +124,7 @@ class SponsorMetrics(OrmObject): return (None, ) requirements = [] i = 0 - indexed_requirements = [y for x,y in constants.SPONSOR_TECHNICAL_REQUIREMENTS] + indexed_requirements = [y for _,y,_ in constants.SPONSOR_TECHNICAL_REQUIREMENTS] for numreq in self.technical_requirements: if numreq == '1': requirements.append(indexed_requirements[i]) diff --git a/debexpo/templates/index/intro-sponsors.mako b/debexpo/templates/index/intro-sponsors.mako index 109f9898..1b11e8d2 100644 --- a/debexpo/templates/index/intro-sponsors.mako +++ b/debexpo/templates/index/intro-sponsors.mako @@ -33,7 +33,7 @@ As sponsored maintainer you don't have upload permissions to the Debian reposito To help you finding a sponsor interested in your package, they can formulate sponsor metrics: -

    Packages interested in

    +

    Sponsor's personal interests

    Sponsors typically are not interested to upload any package for you. They could, however, be interested if your package matches their area of interest. Please compare those package types with your package. Such categories eventually are certain programming languages your program is written in, a field of endeavour, or software fulfilling a certain task.

    @@ -53,79 +53,20 @@ To help you finding a sponsor interested in your package, they can formulate spo
    @@ -136,7 +77,7 @@ To help you finding a sponsor interested in your package, they can formulate spo
    -
    -
    CDBS
    -
    Your package makes use of the The Common Debian Build System
    - -
    Debhelper
    -
    Your package makes use of the debhelper build system
    - -
    Custom debian/rules
    -
    Your package is using a completely customized, yet policy compliant debian/rules file
    - -
    NMUs
    -
    Your package is a NMU
    - -
    QA uploads
    -
    Your package is a QA upload
    - -
    Backports
    -
    Your package is a backported package
    - -
    Modified Tarballs
    -
    Your package modified the original source tarball somehow in a way, it does not match the original checksum anymore
    - -
    VCS snapshot tarballs
    -
    Your package is not based on a original source tarball at all, but is based on a VCS snapshot
    - -
    contrib/non-free packages
    -
    Your package it targetting the contrib or non-free branches (Information)
    - -
    1.0 format packages
    -
    Your package is using the 1.0 format (the traditional source format that is).
    - -
    3.0 format packages
    -
    Your package is using the 3.0/quilt format.
    - -
    No embedded code copies
    -
    Your package does not make use of embedded code copies.
    - -
    DEP-5 copyright
    -
    Your package does make use of DEP-5 copyright files.
    - -
    Non-DEP5 copyright
    -
    Your package does not make use of DEP-5 copyright files.
    - -
    Lintian cleanness
    -
    Your package is Lintian clean down to the informational level.
    +
    + % for requirement in c.constants.SPONSOR_TECHNICAL_REQUIREMENTS: +
    ${ requirement[0] }
    +
    ${ requirement[2] | n}
    + % endfor
    -
    Prospective DM/DD
    -
    You are willing to become a Debian Maintainer/Debian Developer some day.
    - -
    (Willing to be) DM
    -
    You are a Debian Maintainer already, or you plan to become one soon.
    - -
    (Willing to enter) NM
    -
    You are in the New Maintainer process to become a developer already, or you plan to apply soon.
    - -
    Signed GPG key
    -
    Your GPG matches the guidelines of the Debian keyring maintainers and/or is signed by any Debian developer.
    - -
    No one time uploads
    -
    You want to maintain the package you want to have sponsored in the forseeable future. Your package is not a single shot.
    - -
    Sharing a time zone
    -
    You share a time zone with your sponsors. This can be useful to get together more easily.
    - -
    Possibility to meet-up
    -
    You are living close to your sponsor and you are willing to meet him eventually
    - -
    Having already packages in Debian
    -
    You are already maintaining packages in Debian
    + % for requirement in c.constants.SPONSOR_SOCIAL_REQUIREMENTS: +
    ${ requirement[0] }
    +
    ${ requirement[2] | n}
    + % endfor
    - + <% @@ -162,7 +103,7 @@ To help you finding a sponsor interested in your package, they can formulate spo
  • Jabber: ${ sponsor.user.jabber } ${ preferred(sponsor.contact == c.constants.SPONSOR_CONTACT_METHOD_JABBER) }
  • % endif - Packages interested in + Personal interests

    ${ sponsor.get_types() | n}

    @@ -108,22 +108,16 @@ To help you finding a sponsor interested in your package, they can formulate spo
    Sponsor name and contact dataSponsor guidelinesAcceptable package traits Social Requirements
    -- GitLab From 037060b9ccccd9900fdc6c3a66f7dffaf317403a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Tue, 6 Sep 2011 20:19:09 -0400 Subject: [PATCH 09/49] Normalize tags in the database, make paulproteus happy and beat the big and evil sqlalchemy --- debexpo/controllers/index.py | 8 +- debexpo/controllers/my.py | 21 +++- debexpo/lib/constants.py | 31 +----- debexpo/model/sponsor_metrics.py | 109 ++++++++------------ debexpo/tags.py | 33 ++++++ debexpo/templates/index/intro-sponsors.mako | 26 ++--- debexpo/templates/my/index.mako | 10 +- debexpo/websetup.py | 3 + 8 files changed, 116 insertions(+), 125 deletions(-) create mode 100644 debexpo/tags.py diff --git a/debexpo/controllers/index.py b/debexpo/controllers/index.py index ad419d7c..0174cb55 100644 --- a/debexpo/controllers/index.py +++ b/debexpo/controllers/index.py @@ -45,9 +45,11 @@ from webhelpers.html import literal from datetime import datetime, timedelta from debexpo.model.package_versions import PackageVersion from debexpo.model.packages import Package -from debexpo.model.sponsor_metrics import SponsorMetrics +from debexpo.model.sponsor_metrics import SponsorMetrics, SponsorTags from debexpo.model.users import User +from sqlalchemy.orm import joinedload + from debexpo.model import meta log = logging.getLogger(__name__) @@ -116,5 +118,7 @@ class IndexController(BaseController): c.custom_html = '' c.constants = constants - c.sponsors = meta.session.query(SponsorMetrics).filter(SponsorMetrics.availability >= constants.SPONSOR_METRICS_RESTRICTED).join(User).all() + c.sponsors = meta.session.query(SponsorMetrics).options(joinedload(SponsorMetrics.tags)).filter(SponsorMetrics.availability >= constants.SPONSOR_METRICS_RESTRICTED).join(User).all() + c.technical_tags = meta.session.query(SponsorTags).filter_by(tag_type=constants.SPONSOR_METRICS_TYPE_TECHNICAL).all() + c.social_tags = meta.session.query(SponsorTags).filter_by(tag_type=constants.SPONSOR_METRICS_TYPE_SOCIAL).all() return render('/index/intro-sponsors.mako') diff --git a/debexpo/controllers/my.py b/debexpo/controllers/my.py index 4beb69e8..33abe5b3 100644 --- a/debexpo/controllers/my.py +++ b/debexpo/controllers/my.py @@ -46,7 +46,9 @@ from debexpo.lib.gnupg import GnuPG from debexpo.model import meta from debexpo.model.users import User from debexpo.model.user_countries import UserCountry -from debexpo.model.sponsor_metrics import SponsorMetrics +from debexpo.model.sponsor_metrics import SponsorMetrics, SponsorTags + +from sqlalchemy.orm import joinedload import debexpo.lib.utils @@ -172,8 +174,6 @@ class MyController(BaseController): sm.types = str(self.form_result['package_types']) sm.guidelines_text = self.form_result['packaging_guideline_text'] sm.social_requirements = self.form_result['social_requirements'] - sm.technical_requirements_to_database(self.form_result['package_technical_requirements']) - sm.social_requirements_to_database(self.form_result['social_requirements_tags']) sm.availability = self.form_result['availability'] if self.form_result['packaging_guidelines'] == constants.SPONSOR_GUIDELINES_TYPE_URL: @@ -183,6 +183,17 @@ class MyController(BaseController): else: sm.guidelines = constants.SPONSOR_GUIDELINES_TYPE_NONE + + for tag_set in self.form_result['social_requirements_tags']: + metrics = SponsorTags(tag_type=constants.SPONSOR_METRICS_TYPE_SOCIAL, tag=tag_set) + sm.tags.append(metrics) + #log.debug(tag_set) + + for tag_set in self.form_result['package_technical_requirements']: + metrics = SponsorTags(tag_type=constants.SPONSOR_METRICS_TYPE_TECHNICAL, tag=tag_set) + sm.tags.append(metrics) + #log.debug(tag_set) + meta.session.merge(sm) meta.session.commit() @@ -266,7 +277,9 @@ class MyController(BaseController): (constants.SPONSOR_CONTACT_METHOD_JABBER, _('Jabber')), ] - self.metrics = meta.session.query(SponsorMetrics).filter_by(user_id=session['user_id']).first() + self.metrics = meta.session.query(SponsorMetrics).options(joinedload(SponsorMetrics.tags)).filter_by(user_id=session['user_id']).first() + c.technical_tags = meta.session.query(SponsorTags).filter_by(tag_type=constants.SPONSOR_METRICS_TYPE_TECHNICAL).all() + c.social_tags = meta.session.query(SponsorTags).filter_by(tag_type=constants.SPONSOR_METRICS_TYPE_SOCIAL).all() if not self.metrics: self.metrics = SponsorMetrics() c.metrics = self.metrics diff --git a/debexpo/lib/constants.py b/debexpo/lib/constants.py index f06c70ce..1131f80b 100644 --- a/debexpo/lib/constants.py +++ b/debexpo/lib/constants.py @@ -83,6 +83,8 @@ SPONSOR_METRICS_PRIVATE = 0 SPONSOR_METRICS_RESTRICTED = 1 SPONSOR_METRICS_PUBLIC = 2 +SPONSOR_METRICS_TYPE_TECHNICAL = 1 +SPONSOR_METRICS_TYPE_SOCIAL = 2 SPONSOR_CONTACT_METHOD_NONE = 0 SPONSOR_CONTACT_METHOD_EMAIL = 1 @@ -93,32 +95,3 @@ SPONSOR_GUIDELINES_TYPE_NONE = 0 SPONSOR_GUIDELINES_TYPE_URL = 1 SPONSOR_GUIDELINES_TYPE_TEXT = 2 -SPONSOR_TECHNICAL_REQUIREMENTS = [ - ('CDBS','cdbs', 'Your package makes use of the The Common Debian Build System'), - ('(Plain) debhelper','debhelper', 'Your package makes use of the debhelper build system'), - ('(Short) dh-style debhelper', 'dh', 'Your package makes use of short dh(1) style build system'), - ('No build helper / home brewed debian/rules','yadda', 'Your package is using a completely customized, yet policy compliant debian/rules file, which does not make use of either debhelper or CDBS.'), - ('NMUs','nmu', 'Your package is a NMU'), - ('QA uploads','qa', 'Your package is a QA upload'), - ('Backports','backports', 'Your package is a backported package'), - ('Modified tarballs (but good reasons)','tarballs', 'Your package modified the original source tarball somehow in a way, it does not match the original checksum anymore, but you have a good reason to do so'), - ('VCS snapshot tarballs','vcs_tarballs', 'Your package is not based on a original source tarball at all, but is based on a VCS snapshot',), - ('contrib/non-free packages', 'non_free', 'Your package it targetting the contrib or non-free branches (Information)'), - ('1.0 format packages', '10_format', 'Your package is using the 1.0 format (the traditional source format that is).'), - ('3.0 format packages', '30_format', 'Your package is using the 3.0/quilt format.'), - ('Allow embedded code copies', 'code_copies', 'Your package can makes use of embedded code copies in a reasonable way.'), - ('DEP-5 copyright', 'dep5', 'Your package does make use of DEP-5 copyright files.'), - ('Non-DEP5 copyright', 'nodep5', 'Your package does not make use of DEP-5 copyright files.'), - ('No Lintian cleanliness (but good reasons)', 'lintian', 'Your package is not Lintian clean down to the informational level, but you have a good reason why not.') - ] - -SPONSOR_SOCIAL_REQUIREMENTS = [ - ('Prospective DM/DD', 'dmdd', 'You are willing to become a Debian Maintainer/Debian Developer some day.'), - ('(Willing to be) DM', 'dm', 'You are a Debian Maintainer already, or you plan to become one soon.'), - ('(Willing to enter) NM', 'nm', 'You are in the New Maintainer process to become a developer already, or you plan to apply soon.'), - ('Signed GPG key', 'gpg', 'Your GPG matches the guidelines of the Debian keyring maintainers and/or is signed by any Debian developer.'), - ('No one time uploads', '1time', 'You want to maintain the package you want to have sponsored in the forseeable future. Your package is not a single shot.'), - ('Sharing a time zone', 'tz', 'You share a time zone with your sponsors. This can be useful to get together more easily.'), - ('Possibility to meet-up', 'meetup', 'You are living close to your sponsor and you are willing to meet him eventually'), - ('Having already packages in Debian', 'maintainer', 'You are living close to your sponsor and you are willing to meet him eventually') - ] diff --git a/debexpo/model/sponsor_metrics.py b/debexpo/model/sponsor_metrics.py index ce20558b..d76c0750 100644 --- a/debexpo/model/sponsor_metrics.py +++ b/debexpo/model/sponsor_metrics.py @@ -54,82 +54,38 @@ t_sponsor_metrics = sa.Table( sa.Column('types', sa.types.Text, nullable=True), sa.Column('guidelines', sa.types.Integer, nullable=True), sa.Column('guidelines_text', sa.types.Text, nullable=True), - sa.Column('technical_requirements', sa.types.Text, nullable=True), sa.Column('social_requirements', sa.types.Text, nullable=True), - sa.Column('social_requirements_tags', sa.types.Text, nullable=True) ) +t_sponsor_tags = sa.Table( + 'sponsor_tags', meta.metadata, + sa.Column('tag_type', sa.types.Integer, nullable=False), + sa.Column('tag', sa.types.Text, primary_key=True), + sa.Column('label', sa.types.Text, nullable=False), + sa.Column('long_description', sa.types.Text, nullable=False), +) + +t_sponsor_metrics_tags = sa.Table( + 'sponsor_metrics_tags', meta.metadata, + sa.Column('tag', sa.Integer, sa.ForeignKey('sponsor_tags.tag')), + sa.Column('user_id', sa.Integer, sa.ForeignKey('sponsor_metrics.user_id')), +) + class SponsorMetrics(OrmObject): foreign = ['user'] + #tags = orm.relationship('SponsorTags', secondary=t_sponsor_metrics_tags, backref=orm.backref('sponsors', lazy='dynamic')) + def get_technical_tags(self): + return [x.tag for x in self.get_technical_tags_full()] - def social_requirements_to_database(self, requirements): - """ - Takes a list of technical requirements and converts them in - the internal database representation which is a bit map. - The internal structure is considered an implementation detail - - ```requirements``` A list of SPONSOR_SOCIAL_REQUIREMENTS which shall - be stored in this object - """ - indexed_requirements = [y for _,y,_ in constants.SPONSOR_SOCIAL_REQUIREMENTS] - for i in indexed_requirements: - if i in requirements: - indexed_requirements[indexed_requirements.index(i)] = '1' - else: - indexed_requirements[indexed_requirements.index(i)] = '0' - self.social_requirements_tags = ''.join(indexed_requirements) - - def database_to_social_requirements(self): - """ - Returns a list of SPONSOR_SOCIAL_REQUIREMENTS] which have been stored - in the database object - """ - if not self.social_requirements_tags: - return (None, ) - requirements = [] - i = 0 - indexed_requirements = [y for _,y,_ in constants.SPONSOR_SOCIAL_REQUIREMENTS] - for numreq in self.social_requirements_tags: - if numreq == '1': - requirements.append(indexed_requirements[i]) - i += 1 - return requirements + def get_social_tags(self): + return [x.tag for x in self.get_social_tags_full()] + def get_technical_tags_full(self): + return [x for x in self.tags if x.tag_type == constants.SPONSOR_METRICS_TYPE_TECHNICAL] - - def technical_requirements_to_database(self, requirements): - """ - Takes a list of technical requirements and converts them in - the internal database representation which is a bit map. - The internal structure is considered an implementation detail - - ```requirements``` A list of SPONSOR_TECHNICAL_REQUIREMENTS which shall - be stored in this object - """ - indexed_requirements = [y for _,y,_ in constants.SPONSOR_TECHNICAL_REQUIREMENTS] - for i in indexed_requirements: - if i in requirements: - indexed_requirements[indexed_requirements.index(i)] = '1' - else: - indexed_requirements[indexed_requirements.index(i)] = '0' - self.technical_requirements = ''.join(indexed_requirements) - - def database_to_technical_requirements(self): - """ - Returns a list of SPONSOR_TECHNICAL_REQUIREMENTS which have been stored - in the database object - """ - if not self.technical_requirements: - return (None, ) - requirements = [] - i = 0 - indexed_requirements = [y for _,y,_ in constants.SPONSOR_TECHNICAL_REQUIREMENTS] - for numreq in self.technical_requirements: - if numreq == '1': - requirements.append(indexed_requirements[i]) - i += 1 - return requirements + def get_social_tags_full(self): + return [x for x in self.tags if x.tag_type == constants.SPONSOR_METRICS_TYPE_SOCIAL] def get_guidelines(self): """ @@ -192,6 +148,23 @@ class SponsorMetrics(OrmObject): return False +class SponsorTags(OrmObject): + pass + orm.mapper(SponsorMetrics, t_sponsor_metrics, properties={ - 'user' : orm.relation(User, backref='sponsor_metrics') + 'user' : orm.relation(User, backref='sponsor_metrics'), + 'tags' : orm.relationship(SponsorTags, secondary=t_sponsor_metrics_tags, backref=orm.backref('sponsors', lazy='joined')) }) + + +orm.mapper(SponsorTags, t_sponsor_tags) + +def create_tags(): + import debexpo.tags + import logging + for metrics_type in [constants.SPONSOR_METRICS_TYPE_TECHNICAL, constants.SPONSOR_METRICS_TYPE_SOCIAL]: + for (description, tag, long_description) in debexpo.tags.TAGS[metrics_type]: + st = SponsorTags(tag_type=metrics_type, tag=tag, label=description, long_description=long_description) + logging.info("Adding tag %s" % (tag)) + meta.session.merge(st) + meta.session.commit() diff --git a/debexpo/tags.py b/debexpo/tags.py new file mode 100644 index 00000000..da14e8b6 --- /dev/null +++ b/debexpo/tags.py @@ -0,0 +1,33 @@ +import debexpo.lib.constants + +TAGS = { + debexpo.lib.constants.SPONSOR_METRICS_TYPE_TECHNICAL: [ + ('CDBS','cdbs', 'Your package makes use of the The Common Debian Build System'), + ('(Plain) debhelper','debhelper', 'Your package makes use of the debhelper build system'), + ('(Short) dh-style debhelper', 'dh', 'Your package makes use of short dh(1) style build system'), + ('No build helper / home brewed debian/rules','yadda', 'Your package is using a completely customized, yet policy compliant debian/rules file, which does not make use of either debhelper or CDBS.'), + ('NMUs','nmu', 'Your package is a NMU'), + ('QA uploads','qa', 'Your package is a QA upload'), + ('Backports','backports', 'Your package is a backported package'), + ('Modified tarballs (but good reasons)','tarballs', 'Your package modified the original source tarball somehow in a way, it does not match the original checksum anymore, but you have a good reason to do so'), + ('VCS snapshot tarballs','vcs_tarballs', 'Your package is not based on a original source tarball at all, but is based on a VCS snapshot',), + ('contrib/non-free packages', 'non_free', 'Your package it targetting the contrib or non-free branches (Information)'), + ('1.0 format packages', '10_format', 'Your package is using the 1.0 format (the traditional source format that is).'), + ('3.0 format packages', '30_format', 'Your package is using the 3.0/quilt format.'), + ('Allow embedded code copies', 'code_copies', 'Your package can makes use of embedded code copies in a reasonable way.'), + ('DEP-5 copyright', 'dep5', 'Your package does make use of DEP-5 copyright files.'), + ('Non-DEP5 copyright', 'nodep5', 'Your package does not make use of DEP-5 copyright files.'), + ('No Lintian cleanliness (but good reasons)', 'lintian', 'Your package is not Lintian clean down to the informational level, but you have a good reason why not.') + ], + + debexpo.lib.constants.SPONSOR_METRICS_TYPE_SOCIAL: [ + ('Prospective DM/DD', 'dmdd', 'You are willing to become a Debian Maintainer/Debian Developer some day.'), + ('(Willing to be) DM', 'dm', 'You are a Debian Maintainer already, or you plan to become one soon.'), + ('(Willing to enter) NM', 'nm', 'You are in the New Maintainer process to become a developer already, or you plan to apply soon.'), + ('Signed GPG key', 'gpg', 'Your GPG matches the guidelines of the Debian keyring maintainers and/or is signed by any Debian developer.'), + ('No one time uploads', '1time', 'You want to maintain the package you want to have sponsored in the forseeable future. Your package is not a single shot.'), + ('Sharing a time zone', 'tz', 'You share a time zone with your sponsors. This can be useful to get together more easily.'), + ('Possibility to meet-up', 'meetup', 'You are living close to your sponsor and you are willing to meet him eventually'), + ('Having already packages in Debian', 'maintainer', 'You are living close to your sponsor and you are willing to meet him eventually') + ] +} diff --git a/debexpo/templates/index/intro-sponsors.mako b/debexpo/templates/index/intro-sponsors.mako index 1b11e8d2..420d4d9b 100644 --- a/debexpo/templates/index/intro-sponsors.mako +++ b/debexpo/templates/index/intro-sponsors.mako @@ -54,18 +54,18 @@ To help you finding a sponsor interested in your package, they can formulate spo
    - % for requirement in c.constants.SPONSOR_TECHNICAL_REQUIREMENTS: -
    ${ requirement[0] }
    -
    ${ requirement[2] | n}
    + % for requirement in c.technical_tags: +
    ${ requirement.label }
    +
    ${ requirement.long_description | n}
    % endfor
    - % for requirement in c.constants.SPONSOR_SOCIAL_REQUIREMENTS: -
    ${ requirement[0] }
    -
    ${ requirement[2] | n}
    + % for requirement in c.social_tags: +
    ${ requirement.label }
    +
    ${ requirement.long_description | n}
    % endfor
      - <% requirements = sponsor.database_to_technical_requirements() %> - % for requirement in c.constants.SPONSOR_TECHNICAL_REQUIREMENTS: - % if requirement[1] in requirements: -
    • ${ requirement[0] }
    • - % endif + % for requirement in sponsor.get_technical_tags_full(): +
    • ${ requirement.label }
    • % endfor

    ${ sponsor.get_guidelines() | n}

      - <% social_requirements = sponsor.database_to_social_requirements() %> - % for requirement in c.constants.SPONSOR_SOCIAL_REQUIREMENTS: - % if requirement[1] in social_requirements: -
    • ${ requirement[0] }
    • - % endif + % for requirement in sponsor.get_social_tags_full(): +
    • ${ requirement.label }
    • % endfor
    ${ sponsor.get_social_requirements() | n} diff --git a/debexpo/templates/my/index.mako b/debexpo/templates/my/index.mako index e943b3b2..b64b0469 100644 --- a/debexpo/templates/my/index.mako +++ b/debexpo/templates/my/index.mako @@ -208,9 +208,8 @@ allow_unsigned_uploads = 0
    ${ _('Packaging types and workflows you are accepting') }: - <% requirements = c.metrics.database_to_technical_requirements() %> - % for requirement in c.constants.SPONSOR_TECHNICAL_REQUIREMENTS: - ${ h.html.tags.checkbox('package_technical_requirements', value=requirement[1], label=requirement[0], checked=(requirement[1] in requirements)) } + % for requirement in c.technical_tags: + ${ h.html.tags.checkbox('package_technical_requirements', value=requirement.tag, label=requirement.label, checked=(requirement.tag in c.metrics.get_technical_tags())) }
    % endfor
    @@ -233,9 +232,8 @@ allow_unsigned_uploads = 0
    ${ _('Social requirements for sponsored maintainers') }: - <% social_requirements = c.metrics.database_to_social_requirements() %> - % for requirement in c.constants.SPONSOR_SOCIAL_REQUIREMENTS: - ${ h.html.tags.checkbox('social_requirements_tags', value=requirement[1], label=requirement[0], checked=(requirement[1] in social_requirements)) } + % for requirement in c.social_tags: + ${ h.html.tags.checkbox('social_requirements_tags', value=requirement.tag, label=requirement.label, checked=(requirement.tag in c.metrics.get_social_tags())) }
    % endfor
    diff --git a/debexpo/websetup.py b/debexpo/websetup.py index b7a7c68a..e71425e8 100644 --- a/debexpo/websetup.py +++ b/debexpo/websetup.py @@ -93,3 +93,6 @@ def setup_config(command, filename, section, vars): log.info('Making sure all ISO countries are in the database') debexpo.model.user_countries.create_iso_countries() + + log.info('Making sure all tags do exist') + debexpo.model.sponsor_metrics.create_tags() -- GitLab From 0ba6493110070383be653d5abc767d445a13241f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Tue, 6 Sep 2011 20:43:40 -0400 Subject: [PATCH 10/49] Make the __repr__ base method less suck. The former implementation was lost in a recursion loop --- debexpo/model/__init__.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/debexpo/model/__init__.py b/debexpo/model/__init__.py index 4883ab67..7619c077 100644 --- a/debexpo/model/__init__.py +++ b/debexpo/model/__init__.py @@ -85,9 +85,8 @@ class OrmObject(object): 'not column in mapped table: %s' % (key,)) def __repr__(self): - atts = [] - for key in dir(self): - if not key.startswith('_') and key is not "foreign" and key not in self.foreign: - atts.append((key, getattr(self, key))) - - return self.__class__.__name__ + '(' + ', '.join(x[0] + '=' + repr(x[1]) for x in atts) + ')' + attrs = [] + for key in self.__dict__: + if not key.startswith('_'): + attrs.append((key, getattr(self, key))) + return self.__class__.__name__ + '(' + ', '.join(x[0] + '=' + repr(x[1]) for x in attrs) + ')' -- GitLab From 9a83a3051e0df6e33c6534f60e6f24c4b7169027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Wed, 7 Sep 2011 04:13:03 -0400 Subject: [PATCH 11/49] Update schema documentation --- docs/database.dia | Bin 3499 -> 4366 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/database.dia b/docs/database.dia index a600259d1d2121123cd4cd9f7843fde4c25ecbfa..d17312f98512013910217b72e025f84cfc268c9e 100644 GIT binary patch literal 4366 zcmZvgWl$83*2d`tq(KChmhOh7OHh^&5Rev-SaNAWQfiTqlvq|kq)U*FrMp|YkzGnk zq_5t0?%e;(d(Wq5e&>8SGiRQ8<}k(JWBe^F>;uG*$EE~z z=-DnOgiPJnD22x8u|j6gDYMCv`R(zwf?HN8lS1&772})LA%&Q3)A%jU&o5e=n*IB$ zXD;gNb#!#t0<>HCw4c(HJwvbFjXh8~GL&d)y}E&j`3HtHrum^;Ps{~}l3q29-so=e z-!_*POI}w$-S8G`<1tA+uyd#3%u^R^X}&s?zi({fC-pQ1jV9VuwnQjs1ss8IbBQlE zo6JdCPm-6r1dQD2`Z?xL9V?%WxKFQEE~J#}&2yOq+#NFAG;gE~N?OEw@2Wb*y#@;! z<4hnK{9HOWl!Z2gdbfJWDmLjP>QOtHHIkBYm5o1Jc9KprA50GLXjgYXs18h?k|GHd z>TlY21IN+~d(RAq9aYjhM_lS=`fo zs}qB%ZJzkMGSuz|B|1%&`|){zuEh8C>?qL9VSVyytEK#krx=xbDS~k)UNB%H$p2+o zSY!4l8oL<@adm$#`0}SFbn`)`MfyfLVnAAw+Fj+lGvZEDT`@ViNTG%>f z52#M&dqKFrs({wiENrHxn8y?}3BQX;?S#?5Q_|zbAfDFIt`fK7mfCji6bFKok^3gD z9Bp~~zHXk9?l5S>H9G3o*Yh<%OjOwlO}?sDyr2R@+(8+Fhqut1r|)}5k3R4LWQQ}T zObv=atZ;l$ObbeZ$RH(Cvr{RS#i7n<7w_oVQiF{`)a&b*7tO^l1qr1k|w;p+m$3vxJiB8tR6ju}0 z_lK9&=~dVB{VhG8o6Z=|9t<=?H}2fX9BEXRl09u^o*0bi*H0Y78%aBV)_H5C{Qb5@S zi*kE`u>0mg5%BB{=-r|i(cK}>jsd;A;O6UdvSDe&}CbVi0rUdjC@`PAv;i~0j& z=eEq?%k{i$Tv5R`5xKV9(ZWr7c|_1$L5oeTZ0fBj%A2}!+S8*PLT3M?w>OG5@5eVY z^1aJpL%<5^$!*T2Sz6;9c0)&g%@X>2xa;4r zv3ytUGI{I+`1|S(=Yg0uc}Hg<@HMIBmGk!A5i?Qs50#x8hgLo{#O1=w)XH$^kJiY; zS&}pzh)>e!MwiWIk?&Rd;!(m6v}TfSn*!Y7eQ+*t*N(<>RZr?}@_{lJU@+9fgvY+h zBuh(juoiPhQT)hKoOeFIP%6V_F!T-cr;i(n=7XJY$W`t2$Cid}_-KC46JCV|Av1!e zh1X5O9CI=yN}h=dnih@|dtoovOpNeZs2iWiDoFtrLVZjk6_bsrhLP=Hi~~g({@T+t zNyHVw7i^TGG=Ki-E@wxe&=9!;K0a0x8)mIWss8|WgItH1ppjk(QUE{5^QI>)sYaxMWGc_#j)k|mHB<@D52<%;f~=ve#r$iD}6@$PoOCzAJ^r=J_s zhSeqW6vBG4S2iA9N?i?}YJ$f^_YV9WTDR8ijACHg_cR0Njz2_6a?HEw*PTrt`XWb5qz%1=~?^=qTD%!ITD1 zjazJ0JIjowZgC?2z)cTp^owF%^(xNLxB=3eP(i-L%wa<5;?D&u5g(>~x{ z7T>yFiG_p_K%y43HF@3rC0LHvs86+WP|L%w~S_@&<0FM@oBW5$6Yf=}hHw)HBu!-?>aOcM@`vV1~0?x@aj!vN$3$P}6hFhxGJP zQc&pHT6;%m7&ZVvLh>K5HWz6Lq+gm4lYR=AR1&I9_0gyY{$}{I1Ed&{&sm6h`6Cuc z|K}RVwxP0qQWSseDF;!v>ySXr6cWPBj9=6ma`%ga3r6_IoDTAnndDCLh$u;?vCnI~ z4LOwpX7_PnfQ`oVV$N87g$OTZhNp!G5{ackzjp5E7fF=lpCX#~r$HJ~8pG>!QyxVs zL{{Un@L@6=$Yj#JefZvRmdtn+b{x@$m@AvkZ-;!pc`e7S<+8f&QPQq2BL{ZK+99}T zo6-XPUh8@oGl?(10d#qy1sua%*Icy~+sLf>^M?I#!RT3|Qq%Xcq89FMjNJn`FHbO2 zxO_D#K`Y8x`t=kGoMhgszd%KT;h!jg)NHxGKxRkb>9(GA4rJ>^o8R+uaG`I|$Eqj{uC9ql1^= zDD*Oca=&|X)#KhQinNlnx+iA2w5fZG9UM7XJn5DMxF9+u5E9t+EefzbTb!-=5g8zk z%?Z#Z$)cA6K|R*C+6O|D{{di+I#9&g6|;dD%Zie)Z*`QT##M|(cqNVaGh1P#e{NNg zqeVt!T@|KJ)c;sY)qa4{7Uo7AT?HZQnh(D(Ub(FS?Am9M(wV{Jyo2Fl+8aPL+5BM?B5{Py(9mZ5D;w`Ui;gk zP@W8tAod&B$HXOOp$~TwXv)c5ZdRjvJiTw^RjE52>5?aLvi|gmi$m2|#g2buRI_gm zV!j%o<$S%n(^k^=WTtCJYo-S@FUY-2+1*O;lE^_nt8#4Wwnv&ZcrWlvMHIjdBp~@_ub|JAu3M=7R?T}lcYDa+K>eX~ z9fcd8rLW>;i8<2SP(z$x(T+H?at0hNl^j%RE<2tw#9c>b8&hy{(-R#LW=zuYyDp!Q{*UoulI2j8tsk6}@lbpsHQiCa^1qhibrpYcjWc7KoQx zurG@?CVTKV2`qxJ7KmOJ9a(F+dk#6zf6Q)=K9J|bFN%LdJDpZ<1|tY-&pk+mc8q!aN|pEsMFTY^&O*QAuItuJc6sKc5u|7QKI7e++UNr zM0*cWA(R-L7}^+F7*d!}tTmi=g8u`*p-?QW@}K^B-TF}{VjnEX{Ch5NjumBLHFdgU znxo|>CrVOeB;iwPQs{KD4^o`fBb|Odc%E)O`_~O!7c#i|BzKq`@aY_jbHzU4 zT1Y*+X`55p__1!Vi!Y7k;y+QteWV31S{%6({c(jYeR)v+X!egEs|DrzvPXmm;+@(6F4=3wD*bO7@glR>GUD@~27O^gbH}Mx zWR=-QlL@b$h76&c_!bSd%_!{a*3&wi+}2;eWuIk}jJHLyS94JwweZbGf<{_!L-a8U zF|;wWu%vLIglkmo-2VYVG;1#e_|`5WSAi`Mr+Lk3cT7P=Dg2hY67;6l*vlD!K1qtF z@L+Ua&+9`sUyl$NGwV;nqeLSq^8FfreL@oV%kwx}RC)E|5h+)zUPe(PI{jSjg2qwp z`%!TsFOlTz;_>)rFK3v#Y91{p{iN*B!BHT;QT>17#-T$;)qPD(cckh#hvN*g1S;askvWgucoZIOpjdYO=TV@63bBpU$ogpi6ksz9+nj}&4aq9 zn`g8jJ?;?;%3b0wk25_?y?lY6{E>?geV~s<$=zD3_e^CNf0>UNh?F>#^c~oo0o963{PMhTo#=75PkgzY|5b>xG2Ec*Zc SAcF4Bf?@mCuSS`%F#ZMV;DFTt literal 3499 zcmZvcXE+-Q7sqSVrf6$#YE^B5B0_7_rbbbFl-QdVjo7NTnxWJTQDSS2TH#V7R;=2D z*tOT&`{8}={cz8x|MNTNdCr$}e(doicm6JXf}Om-yk}+TqE3Uz(rXiJ!U+SN>(Ns4 zMuy1Ea?8QrB>=&ga0h>W18oB@$@tI{Jdu`Pfl%7V?eJVv>4+|s1HKNQHiD}&^rs-1 zGoe(;n4(h7N4=gL+&~!7D9-upGVJzzkt*!sY`4#uBUJAf^4TEq7OQ@CdoWX*J!Uz& zuWxF~gcf0t+(SwVeWbCr@{5b2r^w~E%+;B@==6@Ypm_2v;-U&w%abW2Asf?ep-9R1 z<5p60*+G&uqpHF`l%=Jo`?QUJUS#gEFVmU9W1Qg7cbLKOJm>1%jd=Nf+pP)xXFYsM zN+zfiOQ&Q+i(IniP$R>)~0OV7-uz309{Kq3%>*alX;+_066Y@ja-O za&k%6PMV6gOgI+353swPV+k$_Hfa1_l!}Z2m?SyVMu!D@${tXKD7M+E`W#dtUA;<<+Ggf;{qde`E|1~vr3~+dCOuQCP=%x5b<

    Bmj? z`e17H=%Kv=u}$Foj~lzU669G|DcEDqxQSE?nb41kdp+lSM8mdh5%AI_`H#!KobO~= zzF-9NPs(JqFg+p%;-vOtKW{D+=hsOrP8X@!LO*t4JyJ!_;8ksOUQOA3{mYN`%~?m6 z@ciT$fcaAEKuciS%QEwy>-^H}L+$owuN)yFaT4f*`z|3eyVx$Qzk5ZFdY6iVpoP$IdVLoO`pm zGqFdDB8WWitsiy%)*?Aoo?DsAY`Qh|b`=~5Mi%Sb92V9r2(be1VUb2!u~1Qzap_?H z8(EQRIWS;uY;G`C?Q1sYFkPw06i()N1wGZ zqP>J_CQ;@m9)Nf=2|6`o&T9dJ-VjtkTo&3~=mv_XWU_2gkU$Pt)Uv*?gN;0SVNSV| zpm^3@1x0fZaAep7t-HXd4A!H3iGC*K%v6E8HHB!f1^7eqtN5P68 z@5O72ileW;IxOI>YKuRn}pu{}z5 zrfrm*8FNhe{(&4g6BuCIBL>y$9a4Rg&P~sp5udpO0ORZ`*$5N!^&0}nS2n2|!iwl` zCJ!N2LP(j|Pndd?<~2h)yIOL~OYdSf%B1af3d=N>iZT!#y+&f^N%esK5ej|Zqhul{ z;Tn*G3+(BDs%*iEYg))AxM4OU_wKQAXXxYwZyi?SzS8)SKCx`3`YdNCr4VSsXHqnW z38Si&bac;!eRw@EClqn3F_?q|{UnlQUUmJ?fMcw2`nv^j-);F>d?!2T!^u2M3!R1$4s#jRlq zcCbmjb!Wd0`FUnN*f+TH6IG!u(RfYtc)6YfYBik`++Deq4#s|wzuZT#tz(Zp zPpNP|5;XWnJ9&bPrdJXcflB_)~ZuXHVVbEHi^LRks_yq3j<= zyK!IuN$^p;{uB52_N{q+Mo?3BwlYwx4x~0W1~FKsKk?WyD3`&4FKHgr=<%_)fpoja zl$Gge49qTRnxh6}3+*O~rKDx%kydy82PC|tF?j9~*-fNJMhY?5Ecv{_152b|GEi`` z70}-#zBunakoohs%{hM0p7ZJr-oYqI4|N!nvjvVvM?|yo6TiXE7ZzIrNj_{e^s?tz z7rR5!nZUi{qc6(x4snE9y%S;+9z>bH!JW?T^fC#dcjdG(xH4_DAWElNA@sFcZgct= z3H#cVh{&dk;p5y%3{uWBTg75ht+tddSCz7mMhz}3EJQ`dL#fV`B+22dH1_@ro(4e* z(f{@ zaXS%qd`yf+er9>9=Um&LW&{A``c2KhXmhxJ8>0M8<0mUqhAzk=T^%>RQwLhcIc)ru z+?ov#UFtrV%$TFGi!h4Pw#8Py+3x8H)C3*UzL4x!*{yooUI!rQBuZ-tfSBB(U+$2N2Jh3R z#WXLVTRQ3tHTRsTY$2iG?S9Qd1*4@1DA_DaEk5(Icko6c(a2fbi1+;}cS@qVBG-A$ ze}!eU81VOIKZy!!+QXzIYUQo~2BwBf)7@`mIc7WbSj0nSG0L zsLTERoOlYbsbaGk2NA@YFr0=&m4o5G!m}Fc9%T*&+VF@rkvdDB8*<}isAm$Wc{}|q z_hPOQyvK=$0RE>QJZf>@3hPr|yi~-a+o{9rcOql0q z%=S1o)o-QP`i;+rvzm;@J5eX?||x4aYB&M7$)uljT-IV(f<&_Q|h z%j-xiwN%`Q0bsC1?(P=>&)DR-8U;ZiT5LciXTLh3O*J^&wRU1L9mD*H{nbhbH#&rbI z>$+F$h)=mqXT0tVW?g^`+)?+W;t|E-Q7GjU5ayjO2wO$lK1xm88=&8Mn-O!~7jR4b NPQiCHq#Eze{{V24(Bc39 -- GitLab From 7225b6b0180128ce8d0852098085046240c5b27c 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 12/49] 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 cdc1066bbefee658252eb168a57eb3a056f3234c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Wed, 7 Sep 2011 12:37:37 -0400 Subject: [PATCH 13/49] Refactor intro sponsor. As it containts metrics now, it does not really match the semi-static index templates anymore. Hence put its stuff into its own controller as there is more to come --- debexpo/config/routing.py | 2 +- debexpo/controllers/index.py | 18 ------------------ debexpo/templates/base.mako | 2 +- debexpo/templates/index/index.mako | 2 +- debexpo/templates/index/intro-maintainers.mako | 4 ++-- debexpo/templates/my/index.mako | 2 +- .../intro-sponsors.mako => sponsor/index.mako} | 0 7 files changed, 6 insertions(+), 24 deletions(-) rename debexpo/templates/{index/intro-sponsors.mako => sponsor/index.mako} (100%) diff --git a/debexpo/config/routing.py b/debexpo/config/routing.py index 97dda420..9290a0cb 100644 --- a/debexpo/config/routing.py +++ b/debexpo/config/routing.py @@ -63,7 +63,7 @@ def make_map(config): map.connect('contact', '/contact', controller='index', action='contact') map.connect('intro-maintainers', '/intro-maintainers', controller='index', action='intro_maintainers') - map.connect('intro-sponsors', '/intro-sponsors', controller='index', action='intro_sponsors') + map.connect('sponsors', '/sponsors', controller='sponsor', action='index') map.connect('intro-reviewers', '/intro-reviewers', controller='index', action='intro_reviewers') map.connect('my', '/my', controller='my', action='index') map.connect('login', '/login', controller='login', action='index') diff --git a/debexpo/controllers/index.py b/debexpo/controllers/index.py index 0174cb55..65cc3c33 100644 --- a/debexpo/controllers/index.py +++ b/debexpo/controllers/index.py @@ -45,11 +45,8 @@ from webhelpers.html import literal from datetime import datetime, timedelta from debexpo.model.package_versions import PackageVersion from debexpo.model.packages import Package -from debexpo.model.sponsor_metrics import SponsorMetrics, SponsorTags from debexpo.model.users import User -from sqlalchemy.orm import joinedload - from debexpo.model import meta log = logging.getLogger(__name__) @@ -107,18 +104,3 @@ class IndexController(BaseController): return render('/index/intro-maintainers.mako') - - def intro_sponsors(self): - """Return an introduction page for sponsors""" - 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 = '' - - c.constants = constants - c.sponsors = meta.session.query(SponsorMetrics).options(joinedload(SponsorMetrics.tags)).filter(SponsorMetrics.availability >= constants.SPONSOR_METRICS_RESTRICTED).join(User).all() - c.technical_tags = meta.session.query(SponsorTags).filter_by(tag_type=constants.SPONSOR_METRICS_TYPE_TECHNICAL).all() - c.social_tags = meta.session.query(SponsorTags).filter_by(tag_type=constants.SPONSOR_METRICS_TYPE_SOCIAL).all() - return render('/index/intro-sponsors.mako') diff --git a/debexpo/templates/base.mako b/debexpo/templates/base.mako index 7216ecc6..9cbdd0db 100644 --- a/debexpo/templates/base.mako +++ b/debexpo/templates/base.mako @@ -41,7 +41,7 @@

  • ${ h.tags.link_to( _('Sponsors'), - h.url('intro-sponsors')) } + h.url('sponsors')) }
  • ${ h.tags.link_to( diff --git a/debexpo/templates/index/index.mako b/debexpo/templates/index/index.mako index 6e018428..d4f5326e 100644 --- a/debexpo/templates/index/index.mako +++ b/debexpo/templates/index/index.mako @@ -18,7 +18,7 @@ ${ c.custom_html }
    • I want to have my package uploaded to Debian: Please go to ${ h.tags.link_to("our introductory page", h.url('intro-maintainers')) } for maintainers and learn how to use ${ c.config['debexpo.sitename'] }.
    • -
    • I am a Debian Developer and want to offer sponsorship: Please go to ${ h.tags.link_to("our introductory page for sponsors", h.url('intro-sponsors')) } to learn how you can help best.
    • +
    • I am a Debian Developer and want to offer sponsorship: Please go to ${ h.tags.link_to("our introductory page for sponsors", h.url('sponsors')) } to learn how you can help best.
    • I am a Debian Maintainer or a skilled sponsored maintainer and want to help: Please go to ${ h.tags.link_to("our page dedicated to reviewers", h.url('intro-reviewers')) }.
    diff --git a/debexpo/templates/index/intro-maintainers.mako b/debexpo/templates/index/intro-maintainers.mako index e85d960a..10afcd07 100644 --- a/debexpo/templates/index/intro-maintainers.mako +++ b/debexpo/templates/index/intro-maintainers.mako @@ -12,7 +12,7 @@ ${ c.custom_html }

    How will my package get into Debian?

    -

    This web site is a public package repository of source packages. You can upload your package to this server (through special tools like 'dupload' or 'dput') and after a few checks it will be stored in our repository. ${ h.tags.link_to("Interested sponsors", h.url(controller='index', action='intro-sponsors')) } can then download the package and upload it to Debian. So the basic procedure is:

    +

    This web site is a public package repository of source packages. You can upload your package to this server (through special tools like 'dupload' or 'dput') and after a few checks it will be stored in our repository. ${ h.tags.link_to("Interested sponsors", h.url(controller='sponsor', action='index')) } can then download the package and upload it to Debian. So the basic procedure is:

    1. ${ h.tags.link_to("Sign up for an account", h.url(controller='register', action='register')) }. Getting an account on this server is an automatic process and will just take a moment. We require registration so we have a valid email address where sponsors can reach you.
    2. @@ -59,5 +59,5 @@ $ dput debexpo your_sourcepackage_1.0.changes
      • Ask again on the debian-mentors mailing list. Its common practice to ask again after a few weeks.
      • -
      • Offer your package directly to developers. We made a ${ h.tags.link_to("a list of sponsors", h.url(controller='index', action='intro-sponsors')) }, eventually willing to upload packages for you. Please don't contact every sponsor listed there. Instead, read their individual requirements and choose the sponsor which matches you and your package best. +
      • Offer your package directly to developers. We made a ${ h.tags.link_to("a list of sponsors", h.url(controller='sponsor', action='index')) }, eventually willing to upload packages for you. Please don't contact every sponsor listed there. Instead, read their individual requirements and choose the sponsor which matches you and your package best.
      diff --git a/debexpo/templates/my/index.mako b/debexpo/templates/my/index.mako index b64b0469..5e5a1a15 100644 --- a/debexpo/templates/my/index.mako +++ b/debexpo/templates/my/index.mako @@ -172,7 +172,7 @@ allow_unsigned_uploads = 0 ${ h.html.tags.form(h.url.current()) } ${ h.html.tags.hidden('form', 'metrics') } -

      If you are unsure about the implications and meanings of fields, have a look to ${ h.tags.link_to("the sponsoring page", h.url('intro-sponsors')) }

      +

      If you are unsure about the implications and meanings of fields, have a look to ${ h.tags.link_to("the sponsoring page", h.url('sponsors')) }

      diff --git a/debexpo/templates/index/intro-sponsors.mako b/debexpo/templates/sponsor/index.mako similarity index 100% rename from debexpo/templates/index/intro-sponsors.mako rename to debexpo/templates/sponsor/index.mako -- GitLab From 13ee811adbb5ff0a692918475708afc8cb773954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Fri, 9 Sep 2011 18:53:46 -0400 Subject: [PATCH 14/49] Make it possible to filter the sponsor list for specific tags. This data is stored in the session and therefore kept among sessions or until the browser is closed for persons not logged in --- debexpo/config/routing.py | 2 + debexpo/controllers/sponsor.py | 123 +++++++++++++++++++++++++++ debexpo/model/sponsor_metrics.py | 12 ++- debexpo/templates/sponsor/index.mako | 50 ++++++++++- 4 files changed, 181 insertions(+), 6 deletions(-) create mode 100644 debexpo/controllers/sponsor.py diff --git a/debexpo/config/routing.py b/debexpo/config/routing.py index 9290a0cb..b65b0ccf 100644 --- a/debexpo/config/routing.py +++ b/debexpo/config/routing.py @@ -64,6 +64,8 @@ def make_map(config): map.connect('intro-maintainers', '/intro-maintainers', controller='index', action='intro_maintainers') map.connect('sponsors', '/sponsors', controller='sponsor', action='index') + map.connect('sponsor_tag_toggle', '/sponsors/toggle/{tag}', controller='sponsor', action='toggle') + map.connect('sponsor_tag_clear', '/sponsors/clear', controller='sponsor', action='clear') map.connect('intro-reviewers', '/intro-reviewers', controller='index', action='intro_reviewers') map.connect('my', '/my', controller='my', action='index') map.connect('login', '/login', controller='login', action='index') diff --git a/debexpo/controllers/sponsor.py b/debexpo/controllers/sponsor.py new file mode 100644 index 00000000..c0cfa4f8 --- /dev/null +++ b/debexpo/controllers/sponsor.py @@ -0,0 +1,123 @@ +# -*- coding: utf-8 -*- +# +# index.py — index controller +# +# This file is part of debexpo - http://debexpo.workaround.org +# +# Copyright © 2011 Arno Töll +# +# 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 IndexController. +""" + +__author__ = 'Arno Töll' +__copyright__ = 'Copyright © 2011 Arno Töll' +__license__ = 'MIT' + +import logging + +from debexpo.lib.base import BaseController, c, config, render, session, \ + redirect, url, abort +from debexpo.lib import constants +from debexpo.model.sponsor_metrics import SponsorMetrics, SponsorTags, SponsorMetricsTags +from debexpo.model.users import User + +from sqlalchemy.orm import joinedload + +from debexpo.model import meta + +log = logging.getLogger(__name__) + +class SponsorController(BaseController): + + def clear(self): + """ + Clear applied filters in the session. + This method can be safely called, even if no filter was registered + """ + + if 'sponsor_filters' in session: + log.debug("Clear sponsor filter") + del(session['sponsor_filters']) + session.save() + + redirect(url('sponsors')) + + + def toggle(self, tag): + """ + Toggle a filter within the session. + This method prepares a list of filters to limit results in the sponsor list + + ```tag``` the sponsor tag to be filtered. If the tag is already in the filter + list remove it, add it otherwise. + """ + + if tag not in [x.tag for x in meta.session.query(SponsorTags).all()]: + abort(404) + + if 'sponsor_filters' not in session: + session['sponsor_filters'] = [] + + if tag in session['sponsor_filters']: + log.debug("Removing tag %s from the filter list" % (tag)) + session['sponsor_filters'].remove(tag) + else: + log.debug("Adding tag %s to the filter list" % (tag)) + session['sponsor_filters'].append(tag) + session.save() + + redirect(url('sponsors')) + + def index(self): + """ + Return an introduction page for sponsors + 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 = '' + c.constants = constants + + query = meta.session.query(SponsorMetrics).join(SponsorMetrics.tags) + if 'sponsor_filters' in session: + log.debug("Applying tag filter") + c.sponsor_filter = session['sponsor_filters'] + # This does not work for 1+ tags. Hence do the filtering + # in the template. If you happen to know a SQL query which + # allpws to filter all tags fo all developers at once, go on :) + #for filtered_tag in session['sponsor_filters']: + # query = query.filter(SponsorTags.tag == filtered_tag) + else: + c.sponsor_filter = [] + c.sponsors = query.filter(SponsorMetrics.availability >= constants.SPONSOR_METRICS_RESTRICTED) \ + .join(User) + c.technical_tags = meta.session.query(SponsorTags).filter_by(tag_type=constants.SPONSOR_METRICS_TYPE_TECHNICAL).all() + c.social_tags = meta.session.query(SponsorTags).filter_by(tag_type=constants.SPONSOR_METRICS_TYPE_SOCIAL).all() + + return render('/sponsor/index.mako') diff --git a/debexpo/model/sponsor_metrics.py b/debexpo/model/sponsor_metrics.py index d76c0750..dba63c5a 100644 --- a/debexpo/model/sponsor_metrics.py +++ b/debexpo/model/sponsor_metrics.py @@ -67,14 +67,17 @@ 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')), - sa.Column('user_id', sa.Integer, sa.ForeignKey('sponsor_metrics.user_id')), + sa.Column('tag', sa.Integer, sa.ForeignKey('sponsor_tags.tag'), primary_key=True), + sa.Column('user_id', sa.Integer, sa.ForeignKey('sponsor_metrics.user_id'), primary_key=True), ) class SponsorMetrics(OrmObject): foreign = ['user'] #tags = orm.relationship('SponsorTags', secondary=t_sponsor_metrics_tags, backref=orm.backref('sponsors', lazy='dynamic')) + def get_all_tags(self): + return [x.tag for x in self.tags] + def get_technical_tags(self): return [x.tag for x in self.get_technical_tags_full()] @@ -151,12 +154,17 @@ class SponsorMetrics(OrmObject): class SponsorTags(OrmObject): pass +class SponsorMetricsTags(OrmObject): + # We need to filter on that object, so we must instantiate the M2M class + pass + orm.mapper(SponsorMetrics, t_sponsor_metrics, properties={ 'user' : orm.relation(User, backref='sponsor_metrics'), 'tags' : orm.relationship(SponsorTags, secondary=t_sponsor_metrics_tags, backref=orm.backref('sponsors', lazy='joined')) }) +orm.mapper(SponsorMetricsTags, t_sponsor_metrics_tags) orm.mapper(SponsorTags, t_sponsor_tags) def create_tags(): diff --git a/debexpo/templates/sponsor/index.mako b/debexpo/templates/sponsor/index.mako index 420d4d9b..0348c7bf 100644 --- a/debexpo/templates/sponsor/index.mako +++ b/debexpo/templates/sponsor/index.mako @@ -37,6 +37,17 @@ To help you finding a sponsor interested in your package, they can formulate spo

      Sponsors typically are not interested to upload any package for you. They could, however, be interested if your package matches their area of interest. Please compare those package types with your package. Such categories eventually are certain programming languages your program is written in, a field of endeavour, or software fulfilling a certain task.

      +<%def name="tag_helper(requirement)"> + % if not c.sponsor_filter: +
      ${ requirement.label } (${ h.tags.link_to( _('Filter'), h.url.current(action='toggle', tag=requirement.tag)) })
      +
      ${ requirement.long_description | n}
      + % elif requirement.tag not in c.sponsor_filter: +
      ${ requirement.label } (${ h.tags.link_to( _('Add to filter'), h.url.current(action='toggle', tag=requirement.tag)) })
      + % else: +
      ${ requirement.label } (${ h.tags.link_to( _('Remove filter'), h.url.current(action='toggle', tag=requirement.tag)) })
      +
      ${ requirement.long_description | n}
      + % endif +
      ${ _('Public visibility of your profile') }:
      @@ -55,8 +66,7 @@ To help you finding a sponsor interested in your package, they can formulate spo @@ -64,8 +74,7 @@ To help you finding a sponsor interested in your package, they can formulate spo
      % for requirement in c.social_tags: -
      ${ requirement.label }
      -
      ${ requirement.long_description | n}
      + <% tag_helper(requirement) %> % endfor
      @@ -74,6 +83,16 @@ To help you finding a sponsor interested in your package, they can formulate spo
      +

      +% if c.sponsor_filter: + Applied filters: + % for filter in c.sponsor_filter: + ${ filter } + % endfor +- ${ h.tags.link_to( _('Remove all filters'), h.url.current(action='clear')) } +% endif +

      +
      % for requirement in c.technical_tags: -
      ${ requirement.label }
      -
      ${ requirement.long_description | n}
      + <% tag_helper(requirement) %> % endfor
      @@ -86,8 +105,18 @@ To help you finding a sponsor interested in your package, they can formulate spo return "(preferred)" else: return "" + + sponsors_found = False %> % for sponsor in c.sponsors: + <% + sponsor_tags = set(sponsor.get_all_tags()) + filters = set(c.sponsor_filter) + %> + % if len(filters & sponsor_tags) != len(filters): + <% continue %> + % endif + <% sponsors_found = True %> % endfor +%if not sponsors_found and c.sponsor_filter: + + + +%elif not sponsors_found: + + + +%endif
      Sponsor name and contact data
      ${ sponsor.user.name } @@ -124,4 +153,17 @@ To help you finding a sponsor interested in your package, they can formulate spo

      ${ _('No sponsor matched your criteria') }

      ${ _('No sponsors found') }
      + +% if c.sponsor_filter: +

      ${ h.tags.link_to( _('Remove all filters'), h.url.current(action='clear')) }

      +% endif -- GitLab From 961ca3249dbf6508ac4cc471a61b01fe8737b7fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Fri, 9 Sep 2011 19:42:40 -0400 Subject: [PATCH 15/49] Rename some sponsor tags, move tags initializer into model/data --- .gitignore | 2 +- debexpo/model/data/__init__.py | 0 debexpo/model/data/tags.py | 33 ++++++++++++++++++++++++++++++++ debexpo/model/sponsor_metrics.py | 4 ++-- debexpo/tags.py | 33 -------------------------------- 5 files changed, 36 insertions(+), 36 deletions(-) create mode 100644 debexpo/model/data/__init__.py create mode 100644 debexpo/model/data/tags.py delete mode 100644 debexpo/tags.py diff --git a/.gitignore b/.gitignore index 09b0d287..79ccbc19 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ *.mo docs/.build/ debexpo.db* -data/ +/data/ *~ *.kpf build diff --git a/debexpo/model/data/__init__.py b/debexpo/model/data/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/debexpo/model/data/tags.py b/debexpo/model/data/tags.py new file mode 100644 index 00000000..0a1965a2 --- /dev/null +++ b/debexpo/model/data/tags.py @@ -0,0 +1,33 @@ +import debexpo.lib.constants + +TAGS = { + debexpo.lib.constants.SPONSOR_METRICS_TYPE_TECHNICAL: [ + ('CDBS','cdbs', 'Your package makes use of the The Common Debian Build System'), + ('(Plain) debhelper','debhelper', 'Your package makes use of the debhelper build system'), + ('(Short) dh-style debhelper', 'dh', 'Your package makes use of short dh(1) style build system'), + ('No build helper / home brewed debian/rules','yada', 'Your package is using a completely customized, yet policy compliant debian/rules file, which does not make use of either debhelper or CDBS.'), + ('NMUs','nmu', 'Your package is a NMU'), + ('QA uploads','qa', 'Your package is a QA upload'), + ('Backports','backports', 'Your package is a backported package'), + ('Modified tarballs (but good reasons)','modified-tarballs', 'Your package modified the original source tarball somehow in a way, it does not match the original checksum anymore, but you have a good reason to do so'), + ('VCS snapshot tarballs','vcs-tarball', 'Your package is not based on a original source tarball at all, but is based on a VCS snapshot',), + ('contrib/non-free packages', 'non-free-package', 'Your package it targetting the contrib or non-free branches (Information)'), + ('1.0 format packages', '1.0-format', 'Your package is using the 1.0 format (the traditional source format that is).'), + ('3.0 format packages', '3.0-format', 'Your package is using the 3.0/quilt format.'), + ('Allow embedded code copies', 'embedded-code-copies', 'Your package can makes use of embedded code copies in a reasonable way.'), + ('DEP-5 copyright', 'dep5', 'Your package does make use of DEP-5 copyright files.'), + ('Non-DEP5 copyright', 'no-dep5', 'Your package does not make use of DEP-5 copyright files.'), + ('No Lintian cleanliness (but good reasons)', 'not-lintian-clean', 'Your package is not Lintian clean down to the informational level, but you have a good reason why not.') + ], + + debexpo.lib.constants.SPONSOR_METRICS_TYPE_SOCIAL: [ + ('Prospective DM/DD', 'prospective-dm-dd', 'You are willing to become a Debian Maintainer/Debian Developer some day.'), + ('(Willing to be) DM', 'dm', 'You are a Debian Maintainer already, or you plan to become one soon.'), + ('(Willing to enter) NM', 'nm', 'You are in the New Maintainer process to become a developer already, or you plan to apply soon.'), + ('Signed GPG key', 'signed-gpg-key', 'Your GPG matches the guidelines of the Debian keyring maintainers and/or is signed by any Debian developer.'), + ('No one time uploads', 'no-one-time-upload', 'You want to maintain the package you want to have sponsored in the forseeable future. Your package is not a single shot.'), + ('Sharing a time zone', 'sharing-time-zone', 'You share a time zone with your sponsors. This can be useful to get together more easily.'), + ('Possibility to meet-up', 'meetup', 'You are living close to your sponsor and you are willing to meet him eventually'), + ('Having already packages in Debian', 'maintainer-already', 'You are living close to your sponsor and you are willing to meet him eventually') + ] +} diff --git a/debexpo/model/sponsor_metrics.py b/debexpo/model/sponsor_metrics.py index dba63c5a..c34169ee 100644 --- a/debexpo/model/sponsor_metrics.py +++ b/debexpo/model/sponsor_metrics.py @@ -168,10 +168,10 @@ orm.mapper(SponsorMetricsTags, t_sponsor_metrics_tags) orm.mapper(SponsorTags, t_sponsor_tags) def create_tags(): - import debexpo.tags + import debexpo.model.data.tags import logging for metrics_type in [constants.SPONSOR_METRICS_TYPE_TECHNICAL, constants.SPONSOR_METRICS_TYPE_SOCIAL]: - for (description, tag, long_description) in debexpo.tags.TAGS[metrics_type]: + for (description, tag, long_description) in debexpo.model.data.tags.TAGS[metrics_type]: st = SponsorTags(tag_type=metrics_type, tag=tag, label=description, long_description=long_description) logging.info("Adding tag %s" % (tag)) meta.session.merge(st) diff --git a/debexpo/tags.py b/debexpo/tags.py deleted file mode 100644 index da14e8b6..00000000 --- a/debexpo/tags.py +++ /dev/null @@ -1,33 +0,0 @@ -import debexpo.lib.constants - -TAGS = { - debexpo.lib.constants.SPONSOR_METRICS_TYPE_TECHNICAL: [ - ('CDBS','cdbs', 'Your package makes use of the The Common Debian Build System'), - ('(Plain) debhelper','debhelper', 'Your package makes use of the debhelper build system'), - ('(Short) dh-style debhelper', 'dh', 'Your package makes use of short dh(1) style build system'), - ('No build helper / home brewed debian/rules','yadda', 'Your package is using a completely customized, yet policy compliant debian/rules file, which does not make use of either debhelper or CDBS.'), - ('NMUs','nmu', 'Your package is a NMU'), - ('QA uploads','qa', 'Your package is a QA upload'), - ('Backports','backports', 'Your package is a backported package'), - ('Modified tarballs (but good reasons)','tarballs', 'Your package modified the original source tarball somehow in a way, it does not match the original checksum anymore, but you have a good reason to do so'), - ('VCS snapshot tarballs','vcs_tarballs', 'Your package is not based on a original source tarball at all, but is based on a VCS snapshot',), - ('contrib/non-free packages', 'non_free', 'Your package it targetting the contrib or non-free branches (Information)'), - ('1.0 format packages', '10_format', 'Your package is using the 1.0 format (the traditional source format that is).'), - ('3.0 format packages', '30_format', 'Your package is using the 3.0/quilt format.'), - ('Allow embedded code copies', 'code_copies', 'Your package can makes use of embedded code copies in a reasonable way.'), - ('DEP-5 copyright', 'dep5', 'Your package does make use of DEP-5 copyright files.'), - ('Non-DEP5 copyright', 'nodep5', 'Your package does not make use of DEP-5 copyright files.'), - ('No Lintian cleanliness (but good reasons)', 'lintian', 'Your package is not Lintian clean down to the informational level, but you have a good reason why not.') - ], - - debexpo.lib.constants.SPONSOR_METRICS_TYPE_SOCIAL: [ - ('Prospective DM/DD', 'dmdd', 'You are willing to become a Debian Maintainer/Debian Developer some day.'), - ('(Willing to be) DM', 'dm', 'You are a Debian Maintainer already, or you plan to become one soon.'), - ('(Willing to enter) NM', 'nm', 'You are in the New Maintainer process to become a developer already, or you plan to apply soon.'), - ('Signed GPG key', 'gpg', 'Your GPG matches the guidelines of the Debian keyring maintainers and/or is signed by any Debian developer.'), - ('No one time uploads', '1time', 'You want to maintain the package you want to have sponsored in the forseeable future. Your package is not a single shot.'), - ('Sharing a time zone', 'tz', 'You share a time zone with your sponsors. This can be useful to get together more easily.'), - ('Possibility to meet-up', 'meetup', 'You are living close to your sponsor and you are willing to meet him eventually'), - ('Having already packages in Debian', 'maintainer', 'You are living close to your sponsor and you are willing to meet him eventually') - ] -} -- GitLab From 1dcb59794a3515f81955a253ecbfaef875bb73ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Fri, 9 Sep 2011 19:56:54 -0400 Subject: [PATCH 16/49] Put hyperlinks around tags, remove hard coded guidelines from the review page, but refer to the new sponsor page instead --- debexpo/templates/index/reviewers.mako | 11 +---------- debexpo/templates/sponsor/index.mako | 10 +++++----- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/debexpo/templates/index/reviewers.mako b/debexpo/templates/index/reviewers.mako index c542abe6..315b6ad0 100644 --- a/debexpo/templates/index/reviewers.mako +++ b/debexpo/templates/index/reviewers.mako @@ -32,13 +32,4 @@

      Established sponsor guidelines

      -

      Several Debian Developers published their personal sponsor guidelines. Those are rules applying for a particular person or a specific packaging team in case you want to have a package sponsored by them. Typically those rules extend the Debian policy by custom requirements, or require a particular workflow from you. You can have a look at some guidelines from different people here

      - - +

      Several Debian Developers published their personal sponsor guidelines. Those are rules applying for a particular person or a specific packaging team in case you want to have a package sponsored by them. Typically those rules extend the Debian policy by custom requirements, or require a particular workflow from you. You can have a look at some guidelines from different people on our ${ h.tags.link_to( _('sponsors side'), h.url('sponsors')) }

      diff --git a/debexpo/templates/sponsor/index.mako b/debexpo/templates/sponsor/index.mako index 0348c7bf..6c025782 100644 --- a/debexpo/templates/sponsor/index.mako +++ b/debexpo/templates/sponsor/index.mako @@ -39,12 +39,12 @@ To help you finding a sponsor interested in your package, they can formulate spo <%def name="tag_helper(requirement)"> % if not c.sponsor_filter: -
      ${ requirement.label } (${ h.tags.link_to( _('Filter'), h.url.current(action='toggle', tag=requirement.tag)) })
      +
      ${ requirement.label } (${ h.tags.link_to( _('Filter'), h.url.current(action='toggle', tag=requirement.tag)) })
      ${ requirement.long_description | n}
      % elif requirement.tag not in c.sponsor_filter: -
      ${ requirement.label } (${ h.tags.link_to( _('Add to filter'), h.url.current(action='toggle', tag=requirement.tag)) })
      +
      ${ requirement.label } (${ h.tags.link_to( _('Add to filter'), h.url.current(action='toggle', tag=requirement.tag)) })
      % else: -
      ${ requirement.label } (${ h.tags.link_to( _('Remove filter'), h.url.current(action='toggle', tag=requirement.tag)) })
      +
      ${ requirement.label } (${ h.tags.link_to( _('Remove filter'), h.url.current(action='toggle', tag=requirement.tag)) })
      ${ requirement.long_description | n}
      % endif @@ -138,7 +138,7 @@ To help you finding a sponsor interested in your package, they can formulate spo
    • % for requirement in sponsor.get_technical_tags_full(): -
    • ${ requirement.label }
    • +
    • ${ h.tags.link_to( requirement.label, h.url.current(anchor=requirement.tag) )}
    • % endfor

    ${ sponsor.get_guidelines() | n}

    @@ -146,7 +146,7 @@ To help you finding a sponsor interested in your package, they can formulate spo
      % for requirement in sponsor.get_social_tags_full(): -
    • ${ requirement.label }
    • +
    • ${ h.tags.link_to( requirement.label, h.url.current(anchor=requirement.tag) )}
    • % endfor
    ${ sponsor.get_social_requirements() | n} -- GitLab From 6f46b2b973c00fbcea30a042cacf5f56aa33ebc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Sat, 10 Sep 2011 09:20:12 -0400 Subject: [PATCH 17/49] Rename several tags, add maintainer-is-not-upstream tag --- debexpo/model/data/tags.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/debexpo/model/data/tags.py b/debexpo/model/data/tags.py index 0a1965a2..f87c5473 100644 --- a/debexpo/model/data/tags.py +++ b/debexpo/model/data/tags.py @@ -22,12 +22,13 @@ TAGS = { debexpo.lib.constants.SPONSOR_METRICS_TYPE_SOCIAL: [ ('Prospective DM/DD', 'prospective-dm-dd', 'You are willing to become a Debian Maintainer/Debian Developer some day.'), - ('(Willing to be) DM', 'dm', 'You are a Debian Maintainer already, or you plan to become one soon.'), - ('(Willing to enter) NM', 'nm', 'You are in the New Maintainer process to become a developer already, or you plan to apply soon.'), + ('(Willing to be) DM', 'applicant-is-dm', 'You are a Debian Maintainer already, or you plan to become one soon.'), + ('(Willing to enter) NM', 'applicant-is-nm', 'You are in the New Maintainer process to become a developer already, or you plan to apply soon.'), ('Signed GPG key', 'signed-gpg-key', 'Your GPG matches the guidelines of the Debian keyring maintainers and/or is signed by any Debian developer.'), ('No one time uploads', 'no-one-time-upload', 'You want to maintain the package you want to have sponsored in the forseeable future. Your package is not a single shot.'), ('Sharing a time zone', 'sharing-time-zone', 'You share a time zone with your sponsors. This can be useful to get together more easily.'), - ('Possibility to meet-up', 'meetup', 'You are living close to your sponsor and you are willing to meet him eventually'), - ('Having already packages in Debian', 'maintainer-already', 'You are living close to your sponsor and you are willing to meet him eventually') + ('Possibility to meet-up', 'possibility-to-meetup', 'You are living close to your sponsor and you are willing to meet him eventually'), + ('Having already packages in Debian', 'maintainer-already', 'You are living close to your sponsor and you are willing to meet him eventually'), + ('Maintainer is not upstream', 'maintainer-is-not-upstream', 'You are not upstream of the package you are advertising to Debian'), ] } -- GitLab From 6b32857d68602069b3803f9d0c86bf0f8ead3c8a Mon Sep 17 00:00:00 2001 From: Daniel Schaal Date: Sun, 11 Sep 2011 13:30:25 +0200 Subject: [PATCH 18/49] 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 91d753b523cf3577616aa5ab1d7775870535cb80 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 19/49] 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 072c8976..8a36df44 100755 --- a/debexpo/scripts/debexpo_importer.py +++ b/debexpo/scripts/debexpo_importer.py @@ -445,11 +445,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 431d36e95e5bc5356068aab1ff9d8c6d10257ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Sun, 11 Sep 2011 08:21:17 -0400 Subject: [PATCH 20/49] Add notable-user-base tag, reformulate the maintainer-is-not-upstream tag. Change templates for consistncy --- debexpo/model/data/tags.py | 7 +++++-- debexpo/templates/sponsor/index.mako | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/debexpo/model/data/tags.py b/debexpo/model/data/tags.py index f87c5473..1bb6db49 100644 --- a/debexpo/model/data/tags.py +++ b/debexpo/model/data/tags.py @@ -17,7 +17,8 @@ TAGS = { ('Allow embedded code copies', 'embedded-code-copies', 'Your package can makes use of embedded code copies in a reasonable way.'), ('DEP-5 copyright', 'dep5', 'Your package does make use of DEP-5 copyright files.'), ('Non-DEP5 copyright', 'no-dep5', 'Your package does not make use of DEP-5 copyright files.'), - ('No Lintian cleanliness (but good reasons)', 'not-lintian-clean', 'Your package is not Lintian clean down to the informational level, but you have a good reason why not.') + ('No Lintian cleanliness (but good reasons)', 'not-lintian-clean', 'Your package is not Lintian clean down to the informational level, but you have a good reason why not.'), + ('Library package', 'library-package', 'You are packaging a policy compliant library'), ], debexpo.lib.constants.SPONSOR_METRICS_TYPE_SOCIAL: [ @@ -29,6 +30,8 @@ TAGS = { ('Sharing a time zone', 'sharing-time-zone', 'You share a time zone with your sponsors. This can be useful to get together more easily.'), ('Possibility to meet-up', 'possibility-to-meetup', 'You are living close to your sponsor and you are willing to meet him eventually'), ('Having already packages in Debian', 'maintainer-already', 'You are living close to your sponsor and you are willing to meet him eventually'), - ('Maintainer is not upstream', 'maintainer-is-not-upstream', 'You are not upstream of the package you are advertising to Debian'), + ('Maintainer is not upstream', 'maintainer-is-not-upstream', 'You are not upstream of the package you are proposing to Debian'), + ('Notable user base', 'notable-user-base', 'You can prove people are already using your program and consider it useful'), + ] } diff --git a/debexpo/templates/sponsor/index.mako b/debexpo/templates/sponsor/index.mako index 6c025782..e4dda43b 100644 --- a/debexpo/templates/sponsor/index.mako +++ b/debexpo/templates/sponsor/index.mako @@ -51,7 +51,7 @@ To help you finding a sponsor interested in your package, they can formulate spo - + -- GitLab From 9093adbc311032d8308bd4501fb32d335356c827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Mon, 12 Sep 2011 11:30:15 -0400 Subject: [PATCH 21/49] Add weight to tags, reformat user interfaces to honor that situation and (re-)move additionally some tags who became obsolete now --- debexpo/controllers/my.py | 28 +++++----- debexpo/controllers/sponsor.py | 31 +++++++---- debexpo/lib/schemas.py | 11 +++- debexpo/model/data/tags.py | 7 ++- debexpo/model/sponsor_metrics.py | 37 +++++++++---- debexpo/templates/my/index.mako | 80 ++++++++++++++++++++-------- debexpo/templates/sponsor/index.mako | 19 +++++-- 7 files changed, 147 insertions(+), 66 deletions(-) diff --git a/debexpo/controllers/my.py b/debexpo/controllers/my.py index 33abe5b3..c66a1c65 100644 --- a/debexpo/controllers/my.py +++ b/debexpo/controllers/my.py @@ -46,7 +46,7 @@ from debexpo.lib.gnupg import GnuPG from debexpo.model import meta from debexpo.model.users import User from debexpo.model.user_countries import UserCountry -from debexpo.model.sponsor_metrics import SponsorMetrics, SponsorTags +from debexpo.model.sponsor_metrics import SponsorMetrics, SponsorMetricsTags, SponsorTags from sqlalchemy.orm import joinedload @@ -183,16 +183,11 @@ class MyController(BaseController): else: sm.guidelines = constants.SPONSOR_GUIDELINES_TYPE_NONE - - for tag_set in self.form_result['social_requirements_tags']: - metrics = SponsorTags(tag_type=constants.SPONSOR_METRICS_TYPE_SOCIAL, tag=tag_set) - sm.tags.append(metrics) - #log.debug(tag_set) - - for tag_set in self.form_result['package_technical_requirements']: - metrics = SponsorTags(tag_type=constants.SPONSOR_METRICS_TYPE_TECHNICAL, tag=tag_set) - sm.tags.append(metrics) - #log.debug(tag_set) + for tag in meta.session.query(SponsorTags).all(): + if tag.tag in self.form_result: + log.debug("Weighten tag %s to %s" % (tag.tag, self.form_result[tag.tag])) + metrics = SponsorMetricsTags(tag=tag.tag, user_id=session['user_id'], weight=self.form_result[tag.tag]) + sm.tags.append(metrics) meta.session.merge(sm) meta.session.commit() @@ -277,12 +272,15 @@ class MyController(BaseController): (constants.SPONSOR_CONTACT_METHOD_JABBER, _('Jabber')), ] - self.metrics = meta.session.query(SponsorMetrics).options(joinedload(SponsorMetrics.tags)).filter_by(user_id=session['user_id']).first() + c.metrics = meta.session.query(SponsorMetrics)\ + .options(joinedload(SponsorMetrics.user))\ + .options(joinedload(SponsorMetrics.tags))\ + .filter_by(user_id = session['user_id'])\ + .first() c.technical_tags = meta.session.query(SponsorTags).filter_by(tag_type=constants.SPONSOR_METRICS_TYPE_TECHNICAL).all() c.social_tags = meta.session.query(SponsorTags).filter_by(tag_type=constants.SPONSOR_METRICS_TYPE_SOCIAL).all() - if not self.metrics: - self.metrics = SponsorMetrics() - c.metrics = self.metrics + if not c.metrics: + c.metrics = SponsorMetrics() log.debug('Rendering page') return render('/my/index.mako') diff --git a/debexpo/controllers/sponsor.py b/debexpo/controllers/sponsor.py index c0cfa4f8..40c1270a 100644 --- a/debexpo/controllers/sponsor.py +++ b/debexpo/controllers/sponsor.py @@ -43,7 +43,7 @@ from debexpo.lib import constants from debexpo.model.sponsor_metrics import SponsorMetrics, SponsorTags, SponsorMetricsTags from debexpo.model.users import User -from sqlalchemy.orm import joinedload +from sqlalchemy.orm import joinedload, contains_eager from debexpo.model import meta @@ -104,20 +104,33 @@ class SponsorController(BaseController): c.custom_html = '' c.constants = constants - query = meta.session.query(SponsorMetrics).join(SponsorMetrics.tags) + c.sponsors = meta.session.query(SponsorMetrics)\ + .options(joinedload(SponsorMetrics.user))\ + .options(joinedload(SponsorMetrics.tags))\ + .filter(SponsorMetrics.availability >= constants.SPONSOR_METRICS_RESTRICTED)\ + .all() + + # The select above works fine, except that it sucks. + # It suffers from a poor performance and it could be significantly improved by querying the tag + # labels and descriptions (i.e. the SponsorTags table by joining them with SponsorMetricsTags. + # However the resulting result set does not quite look like what I imagine. Feel free to replace it + # by something which actually works. + + #c.sponsors = meta.session.query(SponsorMetrics, SponsorMetricsTags, SponsorTags, User)\ + # .join(User)\ + # .join(SponsorMetricsTags)\ + # .join(SponsorTags)\ + # .filter(SponsorMetrics.availability >= constants.SPONSOR_METRICS_RESTRICTED)\ + + if 'sponsor_filters' in session: log.debug("Applying tag filter") c.sponsor_filter = session['sponsor_filters'] - # This does not work for 1+ tags. Hence do the filtering - # in the template. If you happen to know a SQL query which - # allpws to filter all tags fo all developers at once, go on :) - #for filtered_tag in session['sponsor_filters']: - # query = query.filter(SponsorTags.tag == filtered_tag) else: c.sponsor_filter = [] - c.sponsors = query.filter(SponsorMetrics.availability >= constants.SPONSOR_METRICS_RESTRICTED) \ - .join(User) + c.technical_tags = meta.session.query(SponsorTags).filter_by(tag_type=constants.SPONSOR_METRICS_TYPE_TECHNICAL).all() c.social_tags = meta.session.query(SponsorTags).filter_by(tag_type=constants.SPONSOR_METRICS_TYPE_SOCIAL).all() + return render('/sponsor/index.mako') diff --git a/debexpo/lib/schemas.py b/debexpo/lib/schemas.py index c28f6943..fc71e794 100644 --- a/debexpo/lib/schemas.py +++ b/debexpo/lib/schemas.py @@ -39,11 +39,14 @@ __license__ = 'MIT' import formencode from pylons import config +from debexpo.lib.base import meta from debexpo.lib import constants from debexpo.lib.validators import NewEmailToSystem, GpgKey, \ CurrentPassword, CheckBox, NewNameToSystem, ValidateSponsorEmail, \ ValidatePackagingGuidelines, DummyValidator +from debexpo.model.sponsor_metrics import SponsorTags + class LoginForm(formencode.Schema): """ @@ -102,6 +105,12 @@ class MetricsForm(MyForm): """ Schema for updating the metrics in the controller """ + + def __init__(self, *args, **kwargs): + for tag in meta.session.query(SponsorTags).all(): + kwargs[tag.tag] = formencode.validators.Number(min=-10, max=10, not_empty=True) + MyForm.__init__(self, *args, **kwargs) + preferred_contact_method = formencode.compound.All( formencode.validators.OneOf([ constants.SPONSOR_CONTACT_METHOD_NONE, @@ -121,8 +130,6 @@ class MetricsForm(MyForm): constants.SPONSOR_METRICS_PRIVATE, constants.SPONSOR_METRICS_RESTRICTED, constants.SPONSOR_METRICS_PUBLIC]), formencode.validators.Int(not_empty=True)) - package_technical_requirements = formencode.validators.Set - social_requirements_tags = formencode.validators.Set social_requirements = formencode.validators.String() # Postpone validation of packaging_guideline_text, as its validation diff --git a/debexpo/model/data/tags.py b/debexpo/model/data/tags.py index 1bb6db49..30b8dc38 100644 --- a/debexpo/model/data/tags.py +++ b/debexpo/model/data/tags.py @@ -10,15 +10,14 @@ TAGS = { ('QA uploads','qa', 'Your package is a QA upload'), ('Backports','backports', 'Your package is a backported package'), ('Modified tarballs (but good reasons)','modified-tarballs', 'Your package modified the original source tarball somehow in a way, it does not match the original checksum anymore, but you have a good reason to do so'), + ('Library package', 'library-package', 'You are packaging a policy compliant library'), ('VCS snapshot tarballs','vcs-tarball', 'Your package is not based on a original source tarball at all, but is based on a VCS snapshot',), ('contrib/non-free packages', 'non-free-package', 'Your package it targetting the contrib or non-free branches (Information)'), ('1.0 format packages', '1.0-format', 'Your package is using the 1.0 format (the traditional source format that is).'), ('3.0 format packages', '3.0-format', 'Your package is using the 3.0/quilt format.'), - ('Allow embedded code copies', 'embedded-code-copies', 'Your package can makes use of embedded code copies in a reasonable way.'), + ('Embedded code copies', 'embedded-code-copies', 'Your package makes use of embedded code copies in a reasonable way.'), ('DEP-5 copyright', 'dep5', 'Your package does make use of DEP-5 copyright files.'), - ('Non-DEP5 copyright', 'no-dep5', 'Your package does not make use of DEP-5 copyright files.'), ('No Lintian cleanliness (but good reasons)', 'not-lintian-clean', 'Your package is not Lintian clean down to the informational level, but you have a good reason why not.'), - ('Library package', 'library-package', 'You are packaging a policy compliant library'), ], debexpo.lib.constants.SPONSOR_METRICS_TYPE_SOCIAL: [ @@ -26,7 +25,7 @@ TAGS = { ('(Willing to be) DM', 'applicant-is-dm', 'You are a Debian Maintainer already, or you plan to become one soon.'), ('(Willing to enter) NM', 'applicant-is-nm', 'You are in the New Maintainer process to become a developer already, or you plan to apply soon.'), ('Signed GPG key', 'signed-gpg-key', 'Your GPG matches the guidelines of the Debian keyring maintainers and/or is signed by any Debian developer.'), - ('No one time uploads', 'no-one-time-upload', 'You want to maintain the package you want to have sponsored in the forseeable future. Your package is not a single shot.'), + ('One time uploads', 'no-one-time-upload', 'Your package is a single shot upload.'), ('Sharing a time zone', 'sharing-time-zone', 'You share a time zone with your sponsors. This can be useful to get together more easily.'), ('Possibility to meet-up', 'possibility-to-meetup', 'You are living close to your sponsor and you are willing to meet him eventually'), ('Having already packages in Debian', 'maintainer-already', 'You are living close to your sponsor and you are willing to meet him eventually'), diff --git a/debexpo/model/sponsor_metrics.py b/debexpo/model/sponsor_metrics.py index c34169ee..39f471a6 100644 --- a/debexpo/model/sponsor_metrics.py +++ b/debexpo/model/sponsor_metrics.py @@ -40,6 +40,7 @@ import datetime import sqlalchemy as sa from sqlalchemy import orm +from sqlalchemy.ext.associationproxy import association_proxy from debexpo.model import meta, OrmObject from debexpo.model.users import User @@ -69,14 +70,22 @@ 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('user_id', sa.Integer, sa.ForeignKey('sponsor_metrics.user_id'), primary_key=True), + sa.Column('weight', sa.Integer), ) class SponsorMetrics(OrmObject): foreign = ['user'] - #tags = orm.relationship('SponsorTags', secondary=t_sponsor_metrics_tags, backref=orm.backref('sponsors', lazy='dynamic')) + + def get_all_tags_weighted(self, weight = 0): + if weight > 0: + return [x.tag for x in self.tags if x.weight > 0] + elif weight < 0: + return [x.tag for x in self.tags if x.weight < 0] + else: + return [x.tag for x in self.tags] def get_all_tags(self): - return [x.tag for x in self.tags] + return get_all_tags_weighted(0) def get_technical_tags(self): return [x.tag for x in self.get_technical_tags_full()] @@ -85,10 +94,16 @@ class SponsorMetrics(OrmObject): return [x.tag for x in self.get_social_tags_full()] def get_technical_tags_full(self): - return [x for x in self.tags if x.tag_type == constants.SPONSOR_METRICS_TYPE_TECHNICAL] + return [x for x in self.tags if x.full_tag.tag_type == constants.SPONSOR_METRICS_TYPE_TECHNICAL] def get_social_tags_full(self): - return [x for x in self.tags if x.tag_type == constants.SPONSOR_METRICS_TYPE_SOCIAL] + return [x for x in self.tags if x.full_tag.tag_type == constants.SPONSOR_METRICS_TYPE_SOCIAL] + + def get_tag_weight(self, tag): + for t in self.tags: + if t.tag == tag: + return t.weight + return 0.0 def get_guidelines(self): """ @@ -153,20 +168,24 @@ class SponsorMetrics(OrmObject): class SponsorTags(OrmObject): pass + #keywords = association_proxy('metrics', 'metric') class SponsorMetricsTags(OrmObject): - # We need to filter on that object, so we must instantiate the M2M class - pass + foreign = ['user', 'tags'] orm.mapper(SponsorMetrics, t_sponsor_metrics, properties={ - 'user' : orm.relation(User, backref='sponsor_metrics'), - 'tags' : orm.relationship(SponsorTags, secondary=t_sponsor_metrics_tags, backref=orm.backref('sponsors', lazy='joined')) + 'tags' : orm.relationship(SponsorMetricsTags), + 'user' : orm.relationship(User), }) -orm.mapper(SponsorMetricsTags, t_sponsor_metrics_tags) orm.mapper(SponsorTags, t_sponsor_tags) +orm.mapper(SponsorMetricsTags, t_sponsor_metrics_tags, properties={ + 'full_tag': orm.relationship(SponsorTags) +}) + + def create_tags(): import debexpo.model.data.tags import logging diff --git a/debexpo/templates/my/index.mako b/debexpo/templates/my/index.mako index 5e5a1a15..2a020091 100644 --- a/debexpo/templates/my/index.mako +++ b/debexpo/templates/my/index.mako @@ -195,23 +195,39 @@ allow_unsigned_uploads = 0 - - + + + <% oneshot = "Sponsoring requirements" %> + % for requirement in c.technical_tags: + + + + + % endfor - - + + + + + - + <% oneshot = "Social requirements" %> + % for requirement in c.social_tags: + + + + + % endfor + + + + - + diff --git a/debexpo/templates/sponsor/index.mako b/debexpo/templates/sponsor/index.mako index e4dda43b..54f6dc82 100644 --- a/debexpo/templates/sponsor/index.mako +++ b/debexpo/templates/sponsor/index.mako @@ -110,7 +110,7 @@ To help you finding a sponsor interested in your package, they can formulate spo %> % for sponsor in c.sponsors: <% - sponsor_tags = set(sponsor.get_all_tags()) + sponsor_tags = set(sponsor.get_all_tags_weighted(1)) filters = set(c.sponsor_filter) %> % if len(filters & sponsor_tags) != len(filters): @@ -124,6 +124,7 @@ To help you finding a sponsor interested in your package, they can formulate spo
      % if sponsor.user.email and sponsor.allowed(c.constants.SPONSOR_CONTACT_METHOD_EMAIL):
    • Email: ${ sponsor.user.email } ${ preferred(sponsor.contact == c.constants.SPONSOR_CONTACT_METHOD_EMAIL) }
    • + % endif % if sponsor.user.ircnick and sponsor.allowed(c.constants.SPONSOR_CONTACT_METHOD_IRC):
    • IRC: ${ sponsor.user.ircnick } ${ preferred(sponsor.contact == c.constants.SPONSOR_CONTACT_METHOD_IRC) }
    • @@ -137,16 +138,24 @@ To help you finding a sponsor interested in your package, they can formulate spo
    - + % if 'user_id' in c.session: diff --git a/debexpo/templates/packages/list.mako b/debexpo/templates/packages/list.mako index bc277b40..90b02025 100644 --- a/debexpo/templates/packages/list.mako +++ b/debexpo/templates/packages/list.mako @@ -19,7 +19,7 @@ % for package in packagegroup.packages: - + % endfor -- GitLab From ef6a716e81297184d07cb5a1f6ec1b6084eca05e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Thu, 15 Sep 2011 13:51:53 -0400 Subject: [PATCH 26/49] Minor tweaks in the templates: Fix a HTML syntax error, reformulate column descriptions for the metrics form --- debexpo/templates/my/index.mako | 12 ++++++------ debexpo/templates/sponsor/index.mako | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/debexpo/templates/my/index.mako b/debexpo/templates/my/index.mako index 2a020091..83e7ad98 100644 --- a/debexpo/templates/my/index.mako +++ b/debexpo/templates/my/index.mako @@ -217,9 +217,9 @@ allow_unsigned_uploads = 0 @@ -262,9 +262,9 @@ allow_unsigned_uploads = 0 diff --git a/debexpo/templates/sponsor/index.mako b/debexpo/templates/sponsor/index.mako index 98a45181..6cca0f7b 100644 --- a/debexpo/templates/sponsor/index.mako +++ b/debexpo/templates/sponsor/index.mako @@ -52,7 +52,7 @@ To help you finding a sponsor interested in your package, they can formulate spo - +
    Technical requirementsAcceptable package traits Social requirements
    -
    - ${ _('Type of packages you are interested in') }: -
    -
    - ${ h.html.tags.textarea('package_types', c.metrics.types, cols=82, rows=10) } -
    ${ _('Type of packages you are interested in') }:
    ${ h.html.tags.textarea('package_types', c.metrics.types, cols=82, rows=10) }
    ${ oneshot | n}<% oneshot = " " %> + % for weight,label in [(-1, _("-")), \ + (0, _("~")), \ + (1, _("+")) ]: + ${ h.html.tags.radio(requirement.tag, value=weight, label=label, checked=(c.metrics.get_tag_weight(requirement.tag) == weight)) } + % endfor +   ${ requirement.label } +
    ${ _('Packaging types and workflows you are accepting') }: - % for requirement in c.technical_tags: - ${ h.html.tags.checkbox('package_technical_requirements', value=requirement.tag, label=requirement.label, checked=(requirement.tag in c.metrics.get_technical_tags())) } -
    - % endfor +
      +
      +
    • First column You are not accepting packages qualifying for that tag.
    • +
    • Middle column You have no strong opinion on that tag.
    • +
    • Last column You endorse usage of the implied meaning of the tag.
    • +
    +
    + ${ _("Additional technical notes") } +
    % for guideline,label in [(c.constants.SPONSOR_GUIDELINES_TYPE_NONE, _("None")), \ (c.constants.SPONSOR_GUIDELINES_TYPE_TEXT, _("Free text")), \ @@ -228,16 +244,36 @@ allow_unsigned_uploads = 0
    ${ oneshot | n}<% oneshot = " " %> + % for weight,label in [(-1, _("-")), \ + (0, _("~")), \ + (1, _("+")) ]: + ${ h.html.tags.radio(requirement.tag, value=weight, label=label, checked=(c.metrics.get_tag_weight(requirement.tag) == weight)) |n} + % endfor +   ${ requirement.label } +
      +
      +
    • First column You are not accepting packages qualifying for that tag.
    • +
    • Middle column You have no strong opinion on that tag.
    • +
    • Last column You endorse usage of the implied meaning of the tag.
    • +
    +
    ${ _('Social requirements for sponsored maintainers') }: - % for requirement in c.social_tags: - ${ h.html.tags.checkbox('social_requirements_tags', value=requirement.tag, label=requirement.label, checked=(requirement.tag in c.metrics.get_social_tags())) } -
    - % endfor -
    - ${ h.html.tags.textarea('social_requirements', c.metrics.social_requirements, cols=82, rows=10) } + ${ _("Additional social notes") } +
    +
    ${ h.html.tags.textarea('social_requirements', c.metrics.social_requirements, cols=82, rows=10) }
      - % for requirement in sponsor.get_technical_tags_full(): -
    • ${ h.tags.link_to( requirement.label, h.url.current(anchor=requirement.tag) )}
    • + % for tag in sponsor.get_technical_tags_full(): + % if tag.weight > 0: +
    • + ${ tag.full_tag.label } (?)
    • + % elif tag.weight < 0: +
    • - ${ tag.full_tag.label } (?)
    • + % endif % endfor

    ${ sponsor.get_guidelines() | n}

      - % for requirement in sponsor.get_social_tags_full(): -
    • ${ h.tags.link_to( requirement.label, h.url.current(anchor=requirement.tag) )}
    • + % for tag in sponsor.get_social_tags_full(): + % if tag.weight > 0: +
    • + ${ tag.full_tag.label } (?)
    • + % elif tag.weight < 0: +
    • - ${ tag.full_tag.label } (?)
    • + % endif % endfor
    ${ sponsor.get_social_requirements() | n} -- GitLab From da0bcd6ab1ba563d49469ea408c9f59228dda408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Wed, 14 Sep 2011 10:44:47 -0400 Subject: [PATCH 22/49] Make debexpo_importer runnable standalone, fix a minor format problem in case of a rejected message --- debexpo/scripts/debexpo_importer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debexpo/scripts/debexpo_importer.py b/debexpo/scripts/debexpo_importer.py index 8a36df44..3efa0228 100755 --- a/debexpo/scripts/debexpo_importer.py +++ b/debexpo/scripts/debexpo_importer.py @@ -1,3 +1,4 @@ +#! /usr/bin/env python # -*- coding: utf-8 -*- # # debexpo-importer — executable script to import new packages @@ -389,7 +390,7 @@ class Importer(object): if distribution not in allowed_distributions: self._remove_changes() self._reject("You are not uploading to one of those Debian distributions: %s" % - (reduce(lambda x,xs: x + xs + " ", allowed_distributions))) + (reduce(lambda x,xs: x + " " + xs, allowed_distributions))) # Look whether the orig tarball is present, and if not, try and get it from # the repository. -- GitLab From 7594ae208089582367dfc8c5f4e6f049dedcb4e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Wed, 14 Sep 2011 10:55:46 -0400 Subject: [PATCH 23/49] Consolidate crypto functions, move allowed_upload to the (new) filesystem module where such tasks are now handled --- debexpo/controllers/upload.py | 5 ++--- debexpo/lib/filesystem.py | 20 ++++++++++++++++++++ debexpo/lib/utils.py | 18 +----------------- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/debexpo/controllers/upload.py b/debexpo/controllers/upload.py index 4561a562..72bab747 100644 --- a/debexpo/controllers/upload.py +++ b/debexpo/controllers/upload.py @@ -39,7 +39,6 @@ __license__ = 'MIT' import os import logging import subprocess -import md5 import base64 try: @@ -48,7 +47,7 @@ except ImportError: # for sqlalchemy 0.7.1 and above from sqlalchemy.exc import InvalidRequestError from debexpo.lib.base import * -from debexpo.lib.utils import allowed_upload +from debexpo.lib.filesystem import CheckFiles from debexpo.model import meta from debexpo.model.user_upload_key import UserUploadKey @@ -105,7 +104,7 @@ class UploadController(BaseController): # Check whether the file extension is supported by debexpo - if not allowed_upload(filename): + if not CheckFiles().allowed_upload(filename): log.error('File type not supported: %s' % filename) abort(403, 'The uploaded file type is not supported') diff --git a/debexpo/lib/filesystem.py b/debexpo/lib/filesystem.py index 332ed91f..954e971a 100644 --- a/debexpo/lib/filesystem.py +++ b/debexpo/lib/filesystem.py @@ -164,3 +164,23 @@ class CheckFiles(object): if os.path.isdir(path): log.debug("Remove empty package repository '%s'" % (path)) os.rmdir(path) + + + + + + def allowed_upload(self, filename): + """ + Looks at a filename's extension and decides whether to accept it. + We only want package files to be uploaded, after all. + It returns a boolean of whether to accept the file or not. + + ``filename`` + File to test. + """ + for suffix in ['.changes', '.dsc', '.tar.gz', '.diff.gz', '.deb', '.udeb', '.tar.bz2', ".tar.xz"]: + if filename.endswith(suffix): + return True + + return False + diff --git a/debexpo/lib/utils.py b/debexpo/lib/utils.py index ee1ad4ea..1d8757a8 100644 --- a/debexpo/lib/utils.py +++ b/debexpo/lib/utils.py @@ -37,28 +37,12 @@ __license__ = 'MIT' import logging import hashlib -import md5 import os from pylons import config log = logging.getLogger(__name__) -def allowed_upload(filename): - """ - Looks at a filename's extension and decides whether to accept it. - We only want package files to be uploaded, after all. - It returns a boolean of whether to accept the file or not. - - ``filename`` - File to test. - """ - for suffix in ['.changes', '.dsc', '.tar.gz', '.diff.gz', '.deb', '.udeb', '.tar.bz2', ".tar.xz"]: - if filename.endswith(suffix): - return True - - return False - def parse_section(section): """ Works out the component and section from the "Section" field. @@ -101,7 +85,7 @@ def md5sum(filename): except: raise AttributeError('Failed to open file %s.' % filename) - sum = md5.new() + sum = hashlib.md5() while True: chunk = f.read(10240) if not chunk: -- GitLab From a46022f97839cce728d5cc9107700b39f9af7cc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Wed, 14 Sep 2011 13:30:31 -0400 Subject: [PATCH 24/49] Rework several templates to reflect the new direction of the sponsoring page --- debexpo/templates/base.mako | 8 ++--- debexpo/templates/index/index.mako | 20 ++++++----- .../templates/index/intro-maintainers.mako | 33 ++++++++++++++++--- debexpo/templates/index/qa.mako | 23 +++++++++---- 4 files changed, 60 insertions(+), 24 deletions(-) diff --git a/debexpo/templates/base.mako b/debexpo/templates/base.mako index 9cbdd0db..2c50928c 100644 --- a/debexpo/templates/base.mako +++ b/debexpo/templates/base.mako @@ -40,13 +40,13 @@
  • ${ h.tags.link_to( - _('Sponsors'), - h.url('sponsors')) } + _('Reviews'), + h.url('intro-reviewers')) }
  • ${ h.tags.link_to( - _('Reviews'), - h.url('intro-reviewers')) } + _('Sponsors'), + h.url('sponsors')) }
  • ${ h.tags.link_to( diff --git a/debexpo/templates/index/index.mako b/debexpo/templates/index/index.mako index d4f5326e..52b9ad2c 100644 --- a/debexpo/templates/index/index.mako +++ b/debexpo/templates/index/index.mako @@ -12,17 +12,21 @@ ${ c.custom_html } --> -

    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. 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.

    +

    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.

    -

    You can even help us to review packages if you are not a developer. We appreciate your efforts as well.

    +

    Note, not only Debian Developer are allowed to review packages. Everyone is encouraged to review packages! We appreciate your efforts as well.

    -
      -
    • I want to have my package uploaded to Debian: Please go to ${ h.tags.link_to("our introductory page", h.url('intro-maintainers')) } for maintainers and learn how to use ${ c.config['debexpo.sitename'] }.
    • -
    • I am a Debian Developer and want to offer sponsorship: Please go to ${ h.tags.link_to("our introductory page for sponsors", h.url('sponsors')) } to learn how you can help best.
    • -
    • I am a Debian Maintainer or a skilled sponsored maintainer and want to help: Please go to ${ h.tags.link_to("our page dedicated to reviewers", h.url('intro-reviewers')) }.
    • -
    +

    Getting your package into Debian

    -

    You can read more about debexpo on the Debian Wiki.

    +To get your package into Debian, please do as follows: + +
      +
    1. Make a Debian package and upload it to ${ c.config['debexpo.sitetitle'] }. See ${ h.tags.link_to("our introductory page", h.url('intro-maintainers')) } for maintainers and learn how to use ${ c.config['debexpo.sitename'] }.
    2. +
    3. Once you filed a request-for-sponsorship (RFS) you will hopefully get positive feedback for your package. See ${ h.tags.link_to("our page dedicated to reviewers", h.url('intro-reviewers')) } to learn more about package reviews.
    4. +
    5. Ultimately a Debian Developer needs to upload it to Debian. Learn on ${ h.tags.link_to("our introductory page for sponsors", h.url('sponsors')) } how to get in touch with a sponsor.
    6. +
    + +

    If you are curious about Debexpo, the software which is running this site, you can read more about Debexpo on the Debian Wiki.

    Recently uploaded packages

    diff --git a/debexpo/templates/index/intro-maintainers.mako b/debexpo/templates/index/intro-maintainers.mako index 10afcd07..c939cd32 100644 --- a/debexpo/templates/index/intro-maintainers.mako +++ b/debexpo/templates/index/intro-maintainers.mako @@ -23,30 +23,53 @@ ${ c.custom_html }
  • Your package will hopefully be reviewed by a sponsor and either acknowledge your work and upload your package to Debian, or ask you to address some problems.
  • +

    How to make a package?

    + +

    Have a look to our ${ h.tags.link_to("QA section", h.url(controller='index', action='qa')) }.

    +

    How to upload packages?

    -

    You need to use dput to upload packages. +

    You need to use dput to upload packages. We accept your uploads through HTTP or FTP. If you are using FTP your package must be signed with the GnuPG key you configured in your control panel.

    + +

    HTTP uploads

    % if c.logged_in: -See your ${ h.tags.link_to("account page", h.url('my')) } to see how to configure it, or put the following content to your ~/.dput.cf file:

    +

    See your ${ h.tags.link_to("account page", h.url('my')) } to see how to configure dput to use HTTP, or put the following content to your ~/.dput.cf file:

    -[debexpo]
    +[mentors]
     fqdn = ${ config['debexpo.sitename'] }
     incoming = /upload/${ c.user.email }/${ c.user.get_upload_key() }
     method = http
     allow_unsigned_uploads = 0
    +progress_indicator = 2
     
    % else: -You need to configure dput. Please ${ h.tags.link_to("login", h.url(controller='login', action='index')) } to see your personal ~/.dput.cf here. +

    You need to configure dput. Please ${ h.tags.link_to("login", h.url(controller='login', action='index')) } to see your personal ~/.dput.cf here.

    % endif +

    FTP uploads

    + +

    You can use FTP to upload packages to ${ c.config['debexpo.sitetitle'] }. If you prefer that method make sure you sign your uploads with your GPG key! This is the corresponding ~/.dput.cf file:

    + +
    +[mentors-ftp]
    +fqdn = ${ config['debexpo.sitename'] }
    +login = anonymous
    +progress_indicator = 2
    +passive_ftp = 1
    +incoming = /
    +method = ftp
    +allow_unsigned_uploads = 0
    +
    +
    +

    Once you have it set up, you can run it from your shell like this:

    -$ dput debexpo your_sourcepackage_1.0.changes
    +$ dput mentors your_sourcepackage_1.0.changes
     

    Will my name stay visible on the package?

    diff --git a/debexpo/templates/index/qa.mako b/debexpo/templates/index/qa.mako index 67e0b458..4e1435d4 100644 --- a/debexpo/templates/index/qa.mako +++ b/debexpo/templates/index/qa.mako @@ -8,18 +8,27 @@ ${ c.config['debexpo.sitename'] } is a rather complex service. Things can go wro

    Getting started

    How do I build a package?

    -

    If you want to learn how to create a proper Debian package you can find some interesting documentation to start with at:

    - - +

    If you want to learn how to create a proper Debian package you can find some interesting documentation to start with:

    + +
    +
    The Debian Policy Manual
    +
    A must read resource to learn about technical specification and technical requirements of Debian packages.
    +
    New Maintainer's Guide
    +
    A must read resource to learn basics of Debian source packages
    +
    Lucas Nussbaum's packaging tutorial
    +
    A quick introduction to Debian packaging
    +
    Developer's Reference
    +
    A comprehensive manual describing typical workflows and best practices related to Debian packages
    +
    Debian Mentors FAQ (Debian Wiki)
    +
    Another valuable resource to learn about common terms and workflows related to Debian
    +

    What is the Debian policy?

    Every package must comply with the Debian policy before it can enter the Debian distribution. This is a document which describes the structure and contents of the Debian archive and several design issues of the operating system, as well as technical requirements that each package must satisfy to be included in the distribution.

    +

    The policy is not a tutorial. Its a technical manual which specifies normative requirements of packages. Read it to learn package specifications. If you don't know how to package something for Debian, please read additionally the New Maintainer's Guide.

    +

    Is my package technically okay?

    When you upload your package to ${ c.config['debexpo.sitename'] } it will automatically be checked for common mistakes. You will get an information email after the upload. Either your package contains bugs and will be rejected, or the package is clean except for some minor technical issues. You will get hints about how to fix the package. If the email tells you that your package is fine then a sponsor will still do further checks. Don't worry too much. If your package is accepted by mentors.debian.net then let the sponsor help you with the rest. -- GitLab From 9568f367004b682decae6644c83080d898e9a95f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Wed, 14 Sep 2011 15:44:44 -0400 Subject: [PATCH 25/49] Consolidate formatter functions, add a semitrusted function which keeps newlines make it available to the templates --- debexpo/config/environment.py | 2 +- debexpo/lib/filters.py | 48 ++++++++++++++++++++++++++++ debexpo/model/packages.py | 7 ++-- debexpo/model/sponsor_metrics.py | 25 ++------------- debexpo/templates/error.mako | 2 +- debexpo/templates/package/index.mako | 2 +- debexpo/templates/packages/list.mako | 2 +- debexpo/templates/sponsor/index.mako | 17 +++++++--- 8 files changed, 70 insertions(+), 35 deletions(-) create mode 100644 debexpo/lib/filters.py diff --git a/debexpo/config/environment.py b/debexpo/config/environment.py index 905f7201..1e4b704a 100644 --- a/debexpo/config/environment.py +++ b/debexpo/config/environment.py @@ -89,7 +89,7 @@ def load_environment(global_conf, app_conf): error_handler=handle_mako_error, module_directory=os.path.join(app_conf['cache_dir'], 'templates'), input_encoding='utf-8', default_filters=['escape'], - imports=['from webhelpers.html import escape']) + imports=['from webhelpers.html import escape', 'from debexpo.lib.filters import semitrusted']) # CONFIGURATION OPTIONS HERE (note: all config options will override # any Pylons config options) diff --git a/debexpo/lib/filters.py b/debexpo/lib/filters.py new file mode 100644 index 00000000..1b72899a --- /dev/null +++ b/debexpo/lib/filters.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# +# filter.py — Output filters for the template engine +# +# This file is part of debexpo - http://debexpo.workaround.org +# +# Copyright © 2011 Arno Töll +# +# 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 various output filters which can be applied to templates +""" + +__author__ = 'Arno Töll' +__copyright__ = 'Copyright © 2011 Arno Töll' +__license__ = 'MIT' + +import cgi + +def semitrusted(input_filter): + """ + This filter filters all input, but keeps formatting, e.g. newlines + + ``input_filter`` The data to be filtered + """ + escaped_filter = cgi.escape(input_filter, True) + escaped_filter = escaped_filter.replace('\n', '
    ') + return escaped_filter diff --git a/debexpo/model/packages.py b/debexpo/model/packages.py index 997b5753..ebd9416c 100644 --- a/debexpo/model/packages.py +++ b/debexpo/model/packages.py @@ -55,11 +55,8 @@ t_packages = sa.Table('packages', meta.metadata, class Package(OrmObject): foreign = ['user'] - def get_description_nl2br(self): - s = self.description - s = s.replace('<', '<') - s = s.replace('\n', '
    ') - return s + def get_description(self): + return self.description orm.mapper(Package, t_packages, properties={ 'user' : orm.relation(User, backref='packages') diff --git a/debexpo/model/sponsor_metrics.py b/debexpo/model/sponsor_metrics.py index 39f471a6..dadeb6eb 100644 --- a/debexpo/model/sponsor_metrics.py +++ b/debexpo/model/sponsor_metrics.py @@ -110,18 +110,7 @@ class SponsorMetrics(OrmObject): Return a formatted and sanitized string of the guidelines the sponsor configured """ - - if self.guidelines == constants.SPONSOR_GUIDELINES_TYPE_TEXT: - s = self.guidelines_text - s = s.replace('<', '<') - s = s.replace('>', '>') - s = s.replace('\n', '
    ') - return s - elif self.guidelines == constants.SPONSOR_GUIDELINES_TYPE_URL: - return "%s" % (self.guidelines_text, self.guidelines_text) - else: - return "" - + return self.guidelines_text def get_types(self): """ @@ -130,11 +119,7 @@ class SponsorMetrics(OrmObject): """ if self.types: - s = self.types - s = s.replace('<', '<') - s = s.replace('>', '>') - s = s.replace('\n', '
    ') - return s + return self.types return "" def get_social_requirements(self): @@ -144,11 +129,7 @@ class SponsorMetrics(OrmObject): """ if self.social_requirements: - s = self.social_requirements - s = s.replace('<', '<') - s = s.replace('>', '>') - s = s.replace('\n', '
    ') - return s + return self.social_requirements else: return "" diff --git a/debexpo/templates/error.mako b/debexpo/templates/error.mako index 3f28fb0c..984e64a2 100644 --- a/debexpo/templates/error.mako +++ b/debexpo/templates/error.mako @@ -30,6 +30,6 @@

    ${ _('''If you have questions feel free to contact us at %s.''' - % (config['debexpo.email'], config['debexpo.email'])) } + % (config['debexpo.email'], config['debexpo.email'])) | n}

    diff --git a/debexpo/templates/package/index.mako b/debexpo/templates/package/index.mako index 254c1515..79da4bd9 100644 --- a/debexpo/templates/package/index.mako +++ b/debexpo/templates/package/index.mako @@ -24,7 +24,7 @@
    ${ _('Description') }:${ c.package.get_description_nl2br() | n }${ c.package.get_description() | semitrusted}
    ${ package.name }${ package.get_description_nl2br() | n }${ package.get_description() | n,semitrusted } ${ package.package_versions[-1].version } ${ package.user.name } diff --git a/debexpo/templates/sponsor/index.mako b/debexpo/templates/sponsor/index.mako index 54f6dc82..98a45181 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

    @@ -106,6 +105,10 @@ To help you finding a sponsor interested in your package, they can formulate spo else: return "" + def put_s(name): + if name[-1] != 's': + return 's' + sponsors_found = False %> % for sponsor in c.sponsors: @@ -134,7 +137,7 @@ To help you finding a sponsor interested in your package, they can formulate spo % endif Personal interests -

    ${ sponsor.get_types() | n}

    +

    ${ sponsor.get_types() | n,semitrusted}

      @@ -146,7 +149,13 @@ To help you finding a sponsor interested in your package, they can formulate spo % endif % endfor
    -

    ${ sponsor.get_guidelines() | n}

    +

    + % if sponsor.guidelines == c.constants.SPONSOR_GUIDELINES_TYPE_URL: + ${ sponsor.user.name }'${ put_s(sponsor.user.name) } personal guidelines + % else: + ${ sponsor.get_guidelines() | semitrusted} + % endif +

      @@ -158,7 +167,7 @@ To help you finding a sponsor interested in your package, they can formulate spo % endif % endfor
    - ${ sponsor.get_social_requirements() | n} + ${ sponsor.get_social_requirements() | n,semitrusted}
     
      -
    • First column You are not accepting packages qualifying for that tag.
    • -
    • Middle column You have no strong opinion on that tag.
    • -
    • Last column You endorse usage of the implied meaning of the tag.
    • +
    • - (first column) You are not accepting packages qualifying for that tag.
    • +
    • ~ (middle column) You have no strong opinion on that tag.
    • +
    • + (last column) You endorse usage of the implied meaning of the tag.
     
      -
    • First column You are not accepting packages qualifying for that tag.
    • -
    • Middle column You have no strong opinion on that tag.
    • -
    • Last column You endorse usage of the implied meaning of the tag.
    • +
    • - (first column) You are not accepting packages qualifying for that tag.
    • +
    • ~ (middle column) You have no strong opinion on that tag.
    • +
    • + (last column) You endorse usage of the implied meaning of the tag.
    Acceptable package traits Social requirements
    Debian allows several workflows and best practices to co-exist with each other. All packages must comply the Debian policy as bare essential minimum, but some workflows and best practices beyond that are optional, but nonetheless mandatory for you asking that person to sponsor your upload. -- GitLab From a6057e92165ba8869a44223eff444dbf34ed0040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Sat, 17 Sep 2011 21:41:02 -0400 Subject: [PATCH 27/49] Fix a nasty bug with the orig.tar.gz handling. Make return status of find_orig_tarball() more obvious, optimize the importer not to copy the orig.tar.gz twice, fix the getorigtarball plugin handling --- debexpo/lib/constants.py | 5 +++++ debexpo/lib/filesystem.py | 26 ++++++++++++++++-------- debexpo/lib/plugins.py | 3 +++ debexpo/plugins/getorigtarball.py | 31 ++++++++++++++++------------- debexpo/scripts/debexpo_importer.py | 20 ++++++++++++------- 5 files changed, 56 insertions(+), 29 deletions(-) diff --git a/debexpo/lib/constants.py b/debexpo/lib/constants.py index 1131f80b..987b3379 100644 --- a/debexpo/lib/constants.py +++ b/debexpo/lib/constants.py @@ -36,6 +36,11 @@ __copyright__ = 'Copyright © 2008 Jonny Lamb' __license__ = 'MIT' +# Importer related constants +ORIG_TARBALL_LOCATION_NOT_FOUND = 0 +ORIG_TARBALL_LOCATION_LOCAL = 1 +ORIG_TARBALL_LOCATION_REPOSITORY = 2 + # User constants USER_TYPE_NORMAL = 1 USER_TYPE_ADMIN = 2 diff --git a/debexpo/lib/filesystem.py b/debexpo/lib/filesystem.py index 954e971a..705ff9cf 100644 --- a/debexpo/lib/filesystem.py +++ b/debexpo/lib/filesystem.py @@ -106,8 +106,8 @@ class CheckFiles(object): def find_orig_tarball(self, changes_file): """ Look to see whether there is an orig tarball present, if the dsc refers to one. - If it is present or not necessary, this returns True. Otherwise, it returns the - name of the file required. + This method returns a triple (filename, file_found, location_hint), returning the (expected) + name of the original tarball, and whether it was found in the local repository ```changes_file``` The changes file to parse for the orig.tar (note the dsc file referenced must exist) @@ -119,12 +119,22 @@ class CheckFiles(object): if (file['name'].endswith('orig.tar.gz') or file['name'].endswith('orig.tar.bz2') or file['name'].endswith('orig.tar.xz')): - if os.path.isfile(file['name']): - return (file['name'], True) - else: - return (file['name'], False) - - return (None, False) + full_filename = os.path.join(pylons.config['debexpo.repository'], changes_file.get_pool_path(), file['name']) + # tar.gz was found in the local directory + if os.path.isfile(file['name']): + sum = md5sum(file['name']) + if sum == file['md5sum']: + return (file['name'], constants.ORIG_TARBALL_LOCATION_LOCAL) + # tar.gz was found, but does not seem to be the same file + break + # tar.gz was found in the repository + elif os.path.isfile(full_filename): + return (file['name'], constants.ORIG_TARBALL_LOCATION_REPOSITORY) + # tar.gz was expected but not found at all + else: + return (file['name'], constants.ORIG_TARBALL_LOCATION_NOT_FOUND) + + return (None, constants.ORIG_TARBALL_LOCATION_NOT_FOUND) def find_files_for_package(self, package, absolute_path=False): diff --git a/debexpo/lib/plugins.py b/debexpo/lib/plugins.py index b4251e17..29eab59d 100644 --- a/debexpo/lib/plugins.py +++ b/debexpo/lib/plugins.py @@ -141,8 +141,11 @@ class Plugins(object): for item in dsc['Files']: if item['name'] not in self.changes.get_files(): src_file = os.path.join(self.config['debexpo.upload.incoming'], item['name']) + repository_src_file = os.path.join(self.config['debexpo.repository'], self.changes.get_pool_path(), item['name']) if os.path.exists(src_file): shutil.copy(src_file, self.tempdir) + elif os.path.exists(repository_src_file): + shutil.copy(repository_src_file, self.tempdir) else: log.critical("Trying to copy non-existing file %s" % (src_file)) diff --git a/debexpo/plugins/getorigtarball.py b/debexpo/plugins/getorigtarball.py index 2b1d30fa..0513631b 100644 --- a/debexpo/plugins/getorigtarball.py +++ b/debexpo/plugins/getorigtarball.py @@ -6,6 +6,7 @@ # # Copyright © 2008 Jonny Lamb # Copyright © 2010 Jan Dittberner +# Copyright © 2011 Arno Töll # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation @@ -33,7 +34,7 @@ Holds the getorigtarball plugin. """ __author__ = 'Jonny Lamb' -__copyright__ = 'Copyright © 2008 Jonny Lamb, Copyright © 2010 Jan Dittberner' +__copyright__ = 'Copyright © 2008 Jonny Lamb, Copyright © 2010 Jan Dittberner, Copyright © 2011 Arno Töll' __license__ = 'MIT' from debian import deb822 @@ -42,7 +43,9 @@ import os import urllib import re +from debexpo.lib import constants from debexpo.lib.utils import md5sum +from debexpo.lib.filesystem import CheckFiles from debexpo.plugins import BasePlugin import pylons @@ -67,27 +70,27 @@ class GetOrigTarballPlugin(BasePlugin): size = 15728640 log.debug('Checking whether an orig tarball mentioned in the dsc is missing') dsc = deb822.Dsc(file(self.changes.get_dsc())) + filecheck = CheckFiles() + + if filecheck.is_native_package(self.changes): + log.debug('No orig.tar.gz file found; native package?') + return + + # An orig.tar.gz was found in the dsc, and also in the upload. + (orig, orig_file_found) = filecheck.find_orig_tarball(self.changes) + if orig_file_found > constants.ORIG_TARBALL_LOCATION_NOT_FOUND: + log.debug('%s found successfully', orig) + return - orig = None for dscfile in dsc['Files']: dscfile['size'] = int(dscfile['size']) - if re.search('(orig\.tar\.(gz|bz2|xz))$', dscfile['name']): - orig = dscfile + if orig == dscfile['name']: if dscfile['size'] > size: log.warning("Skipping eventual download of orig.tar.gz %s: size %d > %d" % (dscfile['name'], dscfile['size'], size)) return + orig = dscfile break - # There is no orig.tar.gz file in the dsc file. This is probably a native package. - if orig is None: - log.debug('No orig.tar.gz file found; native package?') - return - - # An orig.tar.gz was found in the dsc, and also in the upload. - if os.path.isfile(orig['name']): - log.debug('%s found successfully', orig['name']) - return - log.debug('Could not find %s; looking in Debian for it', orig['name']) url = os.path.join(pylons.config['debexpo.debian_mirror'], self.changes.get_pool_path(), orig['name']) diff --git a/debexpo/scripts/debexpo_importer.py b/debexpo/scripts/debexpo_importer.py index 3efa0228..20da22d4 100755 --- a/debexpo/scripts/debexpo_importer.py +++ b/debexpo/scripts/debexpo_importer.py @@ -395,13 +395,14 @@ class Importer(object): # Look whether the orig tarball is present, and if not, try and get it from # the repository. (orig, orig_file_found) = filecheck.find_orig_tarball(self.changes) - if orig and not orig_file_found: + if orig and not orig_file_found == constants.ORIG_TARBALL_LOCATION_NOT_FOUND: log.debug("Upload does not contain orig.tar.gz - trying to find it elsewhere") filename = os.path.join(pylons.config['debexpo.repository'], self.changes.get_pool_path(), orig) if os.path.isfile(filename): + log.debug("Found tar.gz in repository as %s" % (filename)) shutil.copy(filename, pylons.config['debexpo.upload.incoming']) - self.files.append(orig) + #self.files.append(orig) destdir = pylons.config['debexpo.repository'] @@ -431,11 +432,14 @@ class Importer(object): pool_dir = os.path.join(destdir, self.changes.get_pool_path()) log.debug("Pool directory: %s", pool_dir) for file in self.files: - if os.path.isfile(os.path.join(pool_dir, file)): + if os.path.isfile(file) and os.path.isfile(os.path.join(pool_dir, file)): log.warning('%s is being installed even though it already exists' % file) - else: + toinstall.append(file) + elif os.path.isfile(file): log.debug('File %s is safe to install' % os.path.join(pool_dir, file)) - toinstall.append(file) + toinstall.append(file) + # skip another corner case, where the dsc contains a orig.tar.gz but wasn't uploaded + # by doing nothing here for that case # Run post-upload plugins. post_upload = Plugins('post-upload', self.changes, self.changes_file, @@ -448,7 +452,7 @@ class Importer(object): # Check whether a post-upload plugin has got the orig tarball from somewhere. 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: + if orig_file_found == constants.ORIG_TARBALL_LOCATION_NOT_FOUND: # When coming here it means: # 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 @@ -456,8 +460,10 @@ class Importer(object): # ... time to give up self._remove_changes() self._reject("Rejecting incomplate upload. " - "You did not upload %s and we didn't find it on either one of our backup resources" % + "You did not upload %s and we didn't find it on either one of our alternative resources" % ( orig )) + else: + toinstall.append(orig) # Check whether the debexpo.repository variable is set if 'debexpo.repository' not in pylons.config: -- GitLab From 7cd85c49a3d2573e43bbb95ff00aec7481845a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Sun, 18 Sep 2011 11:34:15 -0400 Subject: [PATCH 28/49] Add the package-in-a-derivative tag --- debexpo/model/data/tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debexpo/model/data/tags.py b/debexpo/model/data/tags.py index 30b8dc38..accebfe5 100644 --- a/debexpo/model/data/tags.py +++ b/debexpo/model/data/tags.py @@ -31,6 +31,6 @@ TAGS = { ('Having already packages in Debian', 'maintainer-already', 'You are living close to your sponsor and you are willing to meet him eventually'), ('Maintainer is not upstream', 'maintainer-is-not-upstream', 'You are not upstream of the package you are proposing to Debian'), ('Notable user base', 'notable-user-base', 'You can prove people are already using your program and consider it useful'), - + ('Minimizing differences to derivatives', 'package-in-a-derivative', 'Your package feeds changes introduced by any derivative back to Debian to minimize differences'), ] } -- GitLab From af00478756c13ec86f103c9a05919cc5b0d243dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Sun, 18 Sep 2011 11:35:16 -0400 Subject: [PATCH 29/49] Improve error message when rejecting an upload due to a missing orig.tar.gz --- debexpo/scripts/debexpo_importer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debexpo/scripts/debexpo_importer.py b/debexpo/scripts/debexpo_importer.py index 20da22d4..b2ef3132 100755 --- a/debexpo/scripts/debexpo_importer.py +++ b/debexpo/scripts/debexpo_importer.py @@ -459,8 +459,11 @@ class Importer(object): # c) No plugin could get the orig.tar.gz # ... time to give up self._remove_changes() + if orig == None: + orig = "any original tarball (orig.tar.gz)" self._reject("Rejecting incomplate upload. " - "You did not upload %s and we didn't find it on either one of our alternative resources" % + "You did not upload %s and we didn't find it on either one of our alternative resources.\n" \ + "If you tried to upload a Debian revision package, make sure you include the full source (pass -sa to dpkg-buildpackage)" % ( orig )) else: toinstall.append(orig) -- GitLab From c8d5f37b148f8b07ed5b87ceb290705e4e234455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Sun, 18 Sep 2011 16:21:56 -0400 Subject: [PATCH 30/49] Rework the maintainer's page completely to give the big picture --- .../templates/index/intro-maintainers.mako | 98 ++++++++++++++----- debexpo/templates/sponsor/index.mako | 6 +- 2 files changed, 79 insertions(+), 25 deletions(-) diff --git a/debexpo/templates/index/intro-maintainers.mako b/debexpo/templates/index/intro-maintainers.mako index c939cd32..67004a8c 100644 --- a/debexpo/templates/index/intro-maintainers.mako +++ b/debexpo/templates/index/intro-maintainers.mako @@ -3,38 +3,66 @@ ${ c.custom_html } -

    Introduction for maintainers

    - -

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

    +

    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.

    +

    1. Find a requested package

    + +

    Debian is a distribution, not a general purpose repository. Many of us do not believe every piece of free software necessarily belongs to Debian. Please do not treat Debian as platform to advertise your own software, unless there is some real request for it. That said, there is no one who ultimately judges about that. Eventually you may get some feedback on that discussion after filing your WNPP bug (see below), however you are free to interpret that as suggestion, not as final vote. After all, you need to find a sponsor believing in the benefit of having your package in Debian, though. Please have a look to our ${ h.tags.link_to("sponsors page", h.url(controller='sponsor', action='index')) } to learn about personal interests of sponors. + +

    If you want to contribute to Debian, but you do not know which package Debian misses yet, have a look to "Request for package" (RFP) bugs. See WNPP below.

    + +

    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 its a bug against the WNPP pseudo package (or use a nice frontend to browse WNPP bugs). If you want to package something for 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

    -

    How will my package get into Debian?

    +

    Debian packages must comply to several normative requirements and guidelines. We can't give you exhaustive instructions how to build packages here. In short, we expect you to provide a source package complying to the Debian policy at least (see below). Please have a look to those excellent resources:

    -

    This web site is a public package repository of source packages. You can upload your package to this server (through special tools like 'dupload' or 'dput') and after a few checks it will be stored in our repository. ${ h.tags.link_to("Interested sponsors", h.url(controller='sponsor', action='index')) } can then download the package and upload it to Debian. So the basic procedure is:

    +
    +
    The Debian Policy Manual
    +
    A must read resource to learn about technical specification and technical requirements of Debian packages.
    +
    New Maintainer's Guide
    +
    A must read resource to learn basics of Debian source packages
    +
    Lucas Nussbaum's packaging tutorial
    +
    A quick introduction to Debian packaging
    +
    Developer's Reference
    +
    A comprehensive manual describing typical workflows and best practices related to Debian packages
    +
    Debian Mentors FAQ (Debian Wiki)
    +
    Another valuable resource to learn about common terms and workflows related to Debian
    +
    -
      + +

      4. Publish your package

      + +

      This web site is a public package repository of source packages. You can upload your package to this server (through special tools like 'dupload' or 'dput') and after a few checks it will be stored in our repository. ${ h.tags.link_to("Interested sponsors", h.url(controller='sponsor', action='index')) } can then download the package and upload it to Debian.

      + +

      Using ${ c.config['debexpo.sitetitle'] }

      + +
      • ${ h.tags.link_to("Sign up for an account", h.url(controller='register', action='register')) }. Getting an account on this server is an automatic process and will just take a moment. We require registration so we have a valid email address where sponsors can reach you.
      • Upload your package to mentors.debian.net. You do not need to put your packages into any other web space on the Internet. Everybody will be able to download your package using either the web browser, the 'dget' tools or even through a simple run of apt-get source ....
      • Have a look to your ${ h.tags.link_to("personal package page", h.url(controller='package', action='my')) }. Your uploaded package should show up there. From there you can toggle several settings and retrieve the RFS (request-for-sponsorship) template
      • Your package is on display on the main page of ${ c.config['debexpo.sitetitle'] }, if you enable the "Needs a Sponsor" button, so interested sponsors will see it and hopefully check it out.
      • You will be shown a RFS (request-for-sponsorship) template that you should send to the debian-mentors mailing list to draw attention to your package.
      • -
      • Your package will hopefully be reviewed by a sponsor and either acknowledge your work and upload your package to Debian, or ask you to address some problems.
      • -
    - -

    How to make a package?

    - -

    Have a look to our ${ h.tags.link_to("QA section", h.url(controller='index', action='qa')) }.

    + -

    How to upload packages?

    +

    How to upload packages to ${ config['debexpo.sitename'] }?

    You need to use dput to upload packages. We accept your uploads through HTTP or FTP. If you are using FTP your package must be signed with the GnuPG key you configured in your control panel.

    -

    HTTP uploads

    -% if c.logged_in: + + + + + + + + + +
    HTTP uploadsFTP uploads
    + % if c.logged_in: -

    See your ${ h.tags.link_to("account page", h.url('my')) } to see how to configure dput to use HTTP, or put the following content to your ~/.dput.cf file:

    +

    See your ${ h.tags.link_to("account page", h.url('my')) } to see how to configure dput to use HTTP, or put the following content to your ~/.dput.cf file:

     [mentors]
    @@ -44,15 +72,16 @@ method = http
     allow_unsigned_uploads = 0
     progress_indicator = 2
     
    -% else: - -

    You need to configure dput. Please ${ h.tags.link_to("login", h.url(controller='login', action='index')) } to see your personal ~/.dput.cf here.

    -% endif +Please keep this configuration private. + % else: -

    FTP uploads

    +

    You need to configure dput. Please ${ h.tags.link_to("login", h.url(controller='login', action='index')) } to see your personal ~/.dput.cf here.

    -

    You can use FTP to upload packages to ${ c.config['debexpo.sitetitle'] }. If you prefer that method make sure you sign your uploads with your GPG key! This is the corresponding ~/.dput.cf file:

    + % endif +
    +

    You can use FTP to upload packages to ${ c.config['debexpo.sitetitle'] }. If you prefer that method make sure you sign your uploads with your GPG key! This is the corresponding ~/.dput.cf file:

     [mentors-ftp]
    @@ -65,6 +94,9 @@ method = ftp
     allow_unsigned_uploads = 0
     
     
    +

    Once you have it set up, you can run it from your shell like this:

    @@ -72,9 +104,17 @@ allow_unsigned_uploads = 0 $ dput mentors your_sourcepackage_1.0.changes -

    Will my name stay visible on the package?

    +If you did everything right, you will get a confirmation mail from our site, and you can start seeking a sponsor for your package. + +

    5. Find a sponsor

    + +

    Once your package is publicly available on any resource, including but not limited to ${ c.config['debexpo.sitetitle'] } you may start searching a sponsor for your package. If you uploaded packages to Debian already, you should ask your former sponsor. A sponsor is any Debian Developer willing to upload your package to Debian on your behalf. Have a look to our ${ h.tags.link_to("sponsor's page", h.url(controller='sponsor', action='index')) } to learn more on sponsors and how you find one.

    + +

    The main point of the sponsor process is to review your package to make sure it meets our technical requirements. Everyone can and should review other people's packages. Also, a clean package will increase your likelihood to find a sponsor. Please have a look to our page ${ h.tags.link_to("telling more about reviews", h.url('intro-reviewers')) }.

    -

    Yes. The Debian project appreciates the work you do. So you will be named as the official maintainer of the package in Debian. You will even get the bug reports if people discover problems in your package. Besides from not being able to upload the package directly into Debian you are treated as a full member of the community.

    +

    The relation between you and your sponsor

    + +

    A sponsor is not technically responsible for your package. You will be listed as official maintainer of the package in Debian. You will even get the bug reports if people discover problems in your package. Besides from not being able to upload the package directly into Debian you are treated as a full member of the community. The Debian project appreciates the work you do.

    What can I do if I don't find a sponsor?

    @@ -84,3 +124,13 @@ $ dput mentors your_sourcepackage_1.0.changes
  • Ask again on the debian-mentors mailing list. Its common practice to ask again after a few weeks.
  • Offer your package directly to developers. We made a ${ h.tags.link_to("a list of sponsors", h.url(controller='sponsor', action='index')) }, eventually willing to upload packages for you. Please don't contact every sponsor listed there. Instead, read their individual requirements and choose the sponsor which matches you and your package best. + +

    6. Getting an upload to Debian

    + +

    Once you found a sponsor interested in your package, he will sponsor it, that means build it and successively upload it to Debian. You will get notified by dak - the software used by Debian to manage its repositories - by the upload. Please note, if your package was not at all in Debian before, it needs manual approval by ftpmasters to clear the NEW queue. They will do consistency checks, and check your debian/copyright file whether your package matches the Debian Free Software Guidelines. ftpmaster's opinion is binding here for both of you, you and your sponsor.

    + +

    7. Maintaining your package in Debian

    + +

    Please see the corresponding chapter in the New Maintainer's Guide to get the idea. Whenever you feel like, you should update your package in Debian. The general procedure isn't different to your fist upload. Please upload your updated package to ${ config['debexpo.sitename'] } and poke your former sponsor about your change. Alternatively, follow ${ h.tags.link_to("the usual procedures", h.url(controller='sponsor', action='index')) }.

    + +

    If your package passes through the sponsoring process for a few packages without any notable correction by your sponsor, you can become a Debian Maintainer which grants you limited upload rights to Debian directly. Get in touch with your sponsor to discuss your chances here. You can also become a Debian Developer giving you all necessary upload rights.

    diff --git a/debexpo/templates/sponsor/index.mako b/debexpo/templates/sponsor/index.mako index 6cca0f7b..214a398a 100644 --- a/debexpo/templates/sponsor/index.mako +++ b/debexpo/templates/sponsor/index.mako @@ -4,7 +4,7 @@ ${ c.custom_html }

    The sponsoring process

    -As sponsored maintainer you don't have upload permissions to the Debian repository. Therefore you have three possibilities to get your package into Debian: +

    As sponsored maintainer you don't have upload permissions to the Debian repository. Therefore you have three possibilities to get your package into Debian:

    • Join a packaging team
    • @@ -12,6 +12,8 @@ As sponsored maintainer you don't have upload permissions to the Debian reposito
    • Talk directly to people willing to sponsor your package
    +

    They will ${ h.tags.link_to("review", h.url('intro-reviewers')) } your package. Everyone is invited to review packages, including you for other people in your situation.

    +

    Join a packaging team

    There are teams in Debian who maintain packages collaboratively. If your package deals with libraries for programming langauges, or is about an ecosystem of associated packages, think of KDE or Gnome packages for example, you may want to join that team. Have a look to list of packaging teams in Debian.

    @@ -22,6 +24,8 @@ As sponsored maintainer you don't have upload permissions to the Debian reposito

    If your package does not match the interests of any team, or you are not sure whether a team could be interested in your package, please write to the debian-mentors mailing list to draw attention to your package. Your request should be formatted according to our RFS ("request for sponsorship") template. If you uploaded your package to ${ config['debexpo.sitename'] }, a RFS template can be shown on your package page.

    +

    If in doubt, choose this alternative.

    +

    Don't worry if you get no answer: It does not mean your package is bad. Ask again after a few weeks if you did not find a sponsor by other means yet.

    Finding a sponsor

    -- GitLab From bc27153a302fe0402280c10f5e2b820a92c9cf5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Sun, 18 Sep 2011 17:48:32 -0400 Subject: [PATCH 31/49] Provide sane defaults for new forms --- debexpo/controllers/my.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debexpo/controllers/my.py b/debexpo/controllers/my.py index c66a1c65..27b76189 100644 --- a/debexpo/controllers/my.py +++ b/debexpo/controllers/my.py @@ -280,7 +280,12 @@ class MyController(BaseController): c.technical_tags = meta.session.query(SponsorTags).filter_by(tag_type=constants.SPONSOR_METRICS_TYPE_TECHNICAL).all() c.social_tags = meta.session.query(SponsorTags).filter_by(tag_type=constants.SPONSOR_METRICS_TYPE_SOCIAL).all() if not c.metrics: + # Set some sane defaults + log.debug("Generating new defaults for sponsor metrics") c.metrics = SponsorMetrics() + c.metrics.availability = constants.SPONSOR_METRICS_PRIVATE + c.metrics.guidelines = constants.SPONSOR_GUIDELINES_TYPE_NONE + log.debug('Rendering page') return render('/my/index.mako') -- GitLab From ad72da62c7eb80b4b263afab89632b6eb58cf09e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Sun, 18 Sep 2011 17:50:04 -0400 Subject: [PATCH 32/49] Redesign the tag form for developer --- debexpo/templates/my/index.mako | 49 ++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/debexpo/templates/my/index.mako b/debexpo/templates/my/index.mako index 83e7ad98..9a344a62 100644 --- a/debexpo/templates/my/index.mako +++ b/debexpo/templates/my/index.mako @@ -172,7 +172,6 @@ allow_unsigned_uploads = 0 ${ h.html.tags.form(h.url.current()) } ${ h.html.tags.hidden('form', 'metrics') } -

    If you are unsure about the implications and meanings of fields, have a look to ${ h.tags.link_to("the sponsoring page", h.url('sponsors')) }

    @@ -203,12 +202,17 @@ allow_unsigned_uploads = 0 % endfor @@ -217,9 +221,10 @@ allow_unsigned_uploads = 0 @@ -249,12 +254,17 @@ allow_unsigned_uploads = 0 % endfor @@ -262,9 +272,10 @@ allow_unsigned_uploads = 0 -- GitLab From 4f79dcf9f11b7cae6356276e946e6b07cde35733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Mon, 19 Sep 2011 16:40:45 -0400 Subject: [PATCH 33/49] Run a spell/grammar check through the templates. Much appreciated chals --- debexpo/model/data/tags.py | 30 ++++++++-------- debexpo/templates/index/index.mako | 8 +---- .../templates/index/intro-maintainers.mako | 35 ++++++++++--------- debexpo/templates/sponsor/index.mako | 24 ++++++------- 4 files changed, 46 insertions(+), 51 deletions(-) diff --git a/debexpo/model/data/tags.py b/debexpo/model/data/tags.py index accebfe5..06687ac4 100644 --- a/debexpo/model/data/tags.py +++ b/debexpo/model/data/tags.py @@ -9,28 +9,28 @@ TAGS = { ('NMUs','nmu', 'Your package is a NMU'), ('QA uploads','qa', 'Your package is a QA upload'), ('Backports','backports', 'Your package is a backported package'), - ('Modified tarballs (but good reasons)','modified-tarballs', 'Your package modified the original source tarball somehow in a way, it does not match the original checksum anymore, but you have a good reason to do so'), + ('Modified tarballs (but good reasons)','modified-tarballs', 'Your package modified the original source tarball somehow in a way. It does not match the original checksum anymore but you have a good reason to do so'), ('Library package', 'library-package', 'You are packaging a policy compliant library'), - ('VCS snapshot tarballs','vcs-tarball', 'Your package is not based on a original source tarball at all, but is based on a VCS snapshot',), + ('VCS snapshot tarballs','vcs-tarball', 'Your package is not based on a original source tarball at all but is based on a VCS snapshot',), ('contrib/non-free packages', 'non-free-package', 'Your package it targetting the contrib or non-free branches (Information)'), - ('1.0 format packages', '1.0-format', 'Your package is using the 1.0 format (the traditional source format that is).'), - ('3.0 format packages', '3.0-format', 'Your package is using the 3.0/quilt format.'), - ('Embedded code copies', 'embedded-code-copies', 'Your package makes use of embedded code copies in a reasonable way.'), - ('DEP-5 copyright', 'dep5', 'Your package does make use of DEP-5 copyright files.'), - ('No Lintian cleanliness (but good reasons)', 'not-lintian-clean', 'Your package is not Lintian clean down to the informational level, but you have a good reason why not.'), + ('1.0 format packages', '1.0-format', 'Your package is using the 1.0 format (the traditional source format that is)'), + ('3.0 format packages', '3.0-format', 'Your package is using the 3.0/quilt format'), + ('Embedded code copies', 'embedded-code-copies', 'Your package makes use of embedded code copies in a reasonable way'), + ('DEP-5 copyright', 'dep5', 'Your package does make use of DEP-5 copyright files'), + ('No Lintian cleanliness (but good reasons)', 'not-lintian-clean', 'Your package is not Lintian clean down to the informational level but you have a good reason why not'), ], debexpo.lib.constants.SPONSOR_METRICS_TYPE_SOCIAL: [ - ('Prospective DM/DD', 'prospective-dm-dd', 'You are willing to become a Debian Maintainer/Debian Developer some day.'), - ('(Willing to be) DM', 'applicant-is-dm', 'You are a Debian Maintainer already, or you plan to become one soon.'), - ('(Willing to enter) NM', 'applicant-is-nm', 'You are in the New Maintainer process to become a developer already, or you plan to apply soon.'), - ('Signed GPG key', 'signed-gpg-key', 'Your GPG matches the guidelines of the Debian keyring maintainers and/or is signed by any Debian developer.'), - ('One time uploads', 'no-one-time-upload', 'Your package is a single shot upload.'), - ('Sharing a time zone', 'sharing-time-zone', 'You share a time zone with your sponsors. This can be useful to get together more easily.'), + ('Prospective DM/DD', 'prospective-dm-dd', 'You are willing to become a Debian Maintainer/Debian Developer some day'), + ('(Willing to be) DM', 'applicant-is-dm', 'You are a Debian Maintainer already, or you plan to become one soon'), + ('(Willing to enter) NM', 'applicant-is-nm', 'You are in the New Maintainer process to become a developer or you plan to apply soon'), + ('Signed GPG key', 'signed-gpg-key', 'Your GPG matches the guidelines of the Debian keyring maintainers and/or is signed by any Debian developer'), + ('One time uploads', 'no-one-time-upload', 'Your package is a single shot upload'), + ('Sharing a time zone', 'sharing-time-zone', 'You share a time zone with your sponsors. This can be useful to get together more easily'), ('Possibility to meet-up', 'possibility-to-meetup', 'You are living close to your sponsor and you are willing to meet him eventually'), - ('Having already packages in Debian', 'maintainer-already', 'You are living close to your sponsor and you are willing to meet him eventually'), + ('Having already packages in Debian', 'maintainer-already', 'You do already have one or more packages in Debian'), ('Maintainer is not upstream', 'maintainer-is-not-upstream', 'You are not upstream of the package you are proposing to Debian'), - ('Notable user base', 'notable-user-base', 'You can prove people are already using your program and consider it useful'), + ('Notable user base', 'notable-user-base', 'You can show us that people are already using your program and consider it useful'), ('Minimizing differences to derivatives', 'package-in-a-derivative', 'Your package feeds changes introduced by any derivative back to Debian to minimize differences'), ] } diff --git a/debexpo/templates/index/index.mako b/debexpo/templates/index/index.mako index 52b9ad2c..436b217a 100644 --- a/debexpo/templates/index/index.mako +++ b/debexpo/templates/index/index.mako @@ -18,13 +18,7 @@ ${ c.custom_html }

    Getting your package into Debian

    -To get your package into Debian, please do as follows: - -
      -
    1. Make a Debian package and upload it to ${ c.config['debexpo.sitetitle'] }. See ${ h.tags.link_to("our introductory page", h.url('intro-maintainers')) } for maintainers and learn how to use ${ c.config['debexpo.sitename'] }.
    2. -
    3. Once you filed a request-for-sponsorship (RFS) you will hopefully get positive feedback for your package. See ${ h.tags.link_to("our page dedicated to reviewers", h.url('intro-reviewers')) } to learn more about package reviews.
    4. -
    5. Ultimately a Debian Developer needs to upload it to Debian. Learn on ${ h.tags.link_to("our introductory page for sponsors", h.url('sponsors')) } how to get in touch with a sponsor.
    6. -
    +

    See ${ h.tags.link_to("our introductory page", h.url('intro-maintainers')) } for maintainers and learn how to use ${ c.config['debexpo.sitename'] } and get your packages into Debian. Furthermore see our ${ h.tags.link_to("our introductory page for sponsors", h.url('sponsors')) } to learn how to get in touch with a sponsor.

    If you are curious about Debexpo, the software which is running this site, you can read more about Debexpo on the Debian Wiki.

    diff --git a/debexpo/templates/index/intro-maintainers.mako b/debexpo/templates/index/intro-maintainers.mako index 67004a8c..0a11914f 100644 --- a/debexpo/templates/index/intro-maintainers.mako +++ b/debexpo/templates/index/intro-maintainers.mako @@ -9,23 +9,23 @@ ${ c.custom_html }

    1. Find a requested package

    -

    Debian is a distribution, not a general purpose repository. Many of us do not believe every piece of free software necessarily belongs to Debian. Please do not treat Debian as platform to advertise your own software, unless there is some real request for it. That said, there is no one who ultimately judges about that. Eventually you may get some feedback on that discussion after filing your WNPP bug (see below), however you are free to interpret that as suggestion, not as final vote. After all, you need to find a sponsor believing in the benefit of having your package in Debian, though. Please have a look to our ${ h.tags.link_to("sponsors page", h.url(controller='sponsor', action='index')) } to learn about personal interests of sponors. +

    Debian is a distribution, not a general purpose repository. Many of us do not believe every piece of free software necessarily belongs to Debian. Please do not treat Debian as a platform to advertise your own software, unless there is some real request for it. That said, there is no one who ultimately judges about that. Eventually you may get some feedback on that discussion after filing your WNPP bug (see below) however you are free to interpret that as a suggestion, not as a final vote. After all, you need to find a sponsor believing in the benefit of having your package in Debian. Please have a look at our ${ h.tags.link_to("sponsors page", h.url(controller='sponsor', action='index')) } to learn about personal interests of sponsors. -

    If you want to contribute to Debian, but you do not know which package Debian misses yet, have a look to "Request for package" (RFP) bugs. See WNPP below.

    +

    If you want to contribute to Debian, but you do not know which package Debian misses yet, take a look at "Request for package" (RFP) bugs. See WNPP below.

    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 its a bug against the WNPP pseudo package (or use a nice frontend to browse WNPP bugs). If you want to package something for 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 for 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

    -

    Debian packages must comply to several normative requirements and guidelines. We can't give you exhaustive instructions how to build packages here. In short, we expect you to provide a source package complying to the Debian policy at least (see below). Please have a look to those excellent resources:

    +

    Debian packages must comply to several normative requirements and guidelines. We can't give you exhaustive instructions on how to build packages here. In short, we expect you to provide a source package complying to the Debian policy at least (see below). Please take a look at those excellent resources:

    The Debian Policy Manual
    -
    A must read resource to learn about technical specification and technical requirements of Debian packages.
    +
    A must-read resource to learn about technical specification and technical requirements of Debian packages.
    New Maintainer's Guide
    -
    A must read resource to learn basics of Debian source packages
    +
    A must-read resource to learn basics of Debian source packages
    Lucas Nussbaum's packaging tutorial
    A quick introduction to Debian packaging
    Developer's Reference
    @@ -43,9 +43,9 @@ ${ c.custom_html }
    • ${ h.tags.link_to("Sign up for an account", h.url(controller='register', action='register')) }. Getting an account on this server is an automatic process and will just take a moment. We require registration so we have a valid email address where sponsors can reach you.
    • -
    • Upload your package to mentors.debian.net. You do not need to put your packages into any other web space on the Internet. Everybody will be able to download your package using either the web browser, the 'dget' tools or even through a simple run of apt-get source ....
    • -
    • Have a look to your ${ h.tags.link_to("personal package page", h.url(controller='package', action='my')) }. Your uploaded package should show up there. From there you can toggle several settings and retrieve the RFS (request-for-sponsorship) template
    • -
    • Your package is on display on the main page of ${ c.config['debexpo.sitetitle'] }, if you enable the "Needs a Sponsor" button, so interested sponsors will see it and hopefully check it out.
    • +
    • Upload your package to ${ config['debexpo.sitename'] }. You do not need to put your packages into any other web space on the Internet. Everybody will be able to download your package using either the web browser, the 'dget' tools or even through a simple run of apt-get source ....
    • +
    • Have a look at your ${ h.tags.link_to("personal package page", h.url(controller='package', action='my')) }. Your uploaded package should show up there. From there you can toggle several settings and retrieve the RFS (request-for-sponsorship) template
    • +
    • Your package is on display on the main page of ${ c.config['debexpo.sitetitle'] } (if you enable the "Needs a Sponsor" button) so interested sponsors will see it and hopefully check it out.
    • You will be shown a RFS (request-for-sponsorship) template that you should send to the debian-mentors mailing list to draw attention to your package.
    @@ -104,33 +104,34 @@ allow_unsigned_uploads = 0 $ dput mentors your_sourcepackage_1.0.changes -If you did everything right, you will get a confirmation mail from our site, and you can start seeking a sponsor for your package. +If you did everything right, you will get a confirmation mail from our site and you can start seeking a sponsor for your package.

    5. Find a sponsor

    -

    Once your package is publicly available on any resource, including but not limited to ${ c.config['debexpo.sitetitle'] } you may start searching a sponsor for your package. If you uploaded packages to Debian already, you should ask your former sponsor. A sponsor is any Debian Developer willing to upload your package to Debian on your behalf. Have a look to our ${ h.tags.link_to("sponsor's page", h.url(controller='sponsor', action='index')) } to learn more on sponsors and how you find one.

    +

    Once your package is publicly available on any resource, including but not limited to ${ c.config['debexpo.sitetitle'] } you may start searching a sponsor for your package. If you have already uploaded packages to Debian, you should ask your former sponsor. A sponsor is any Debian Developer willing to upload your package to Debian on your behalf. Have a look to our ${ h.tags.link_to("sponsor's page", h.url(controller='sponsor', action='index')) } to learn more on sponsors and how to find one.

    -

    The main point of the sponsor process is to review your package to make sure it meets our technical requirements. Everyone can and should review other people's packages. Also, a clean package will increase your likelihood to find a sponsor. Please have a look to our page ${ h.tags.link_to("telling more about reviews", h.url('intro-reviewers')) }.

    +

    The main point of the sponsoring process is to review your package to make sure it meets our technical requirements. Everyone can and should review other people's packages. Also, a clean package will increase your likelihood to find a sponsor. Please take a look at our page ${ h.tags.link_to("telling more about reviews", h.url('intro-reviewers')) }.

    The relation between you and your sponsor

    -

    A sponsor is not technically responsible for your package. You will be listed as official maintainer of the package in Debian. You will even get the bug reports if people discover problems in your package. Besides from not being able to upload the package directly into Debian you are treated as a full member of the community. The Debian project appreciates the work you do.

    +

    A sponsor is not technically responsible for your package. You will be listed as the official maintainer of the package in Debian. You will even get the bug reports if people discover problems in your package. Apart from not being able to upload the package directly into Debian you are treated as a full member of the community. The Debian project appreciates the work you do.

    What can I do if I don't find a sponsor?

    Don't become desperate. Sponsoring can take a while. Nonetheless, here are a few hints:

      -
    • Ask again on the debian-mentors mailing list. Its common practice to ask again after a few weeks.
    • +
    • Ask again on the debian-mentors mailing list. It is common practice to ask again after a few weeks.
    • Offer your package directly to developers. We made a ${ h.tags.link_to("a list of sponsors", h.url(controller='sponsor', action='index')) }, eventually willing to upload packages for you. Please don't contact every sponsor listed there. Instead, read their individual requirements and choose the sponsor which matches you and your package best.

    6. Getting an upload to Debian

    -

    Once you found a sponsor interested in your package, he will sponsor it, that means build it and successively upload it to Debian. You will get notified by dak - the software used by Debian to manage its repositories - by the upload. Please note, if your package was not at all in Debian before, it needs manual approval by ftpmasters to clear the NEW queue. They will do consistency checks, and check your debian/copyright file whether your package matches the Debian Free Software Guidelines. ftpmaster's opinion is binding here for both of you, you and your sponsor.

    +

    Once you find a sponsor interested in your package, he will sponsor it. That means building it and successively uploading it to Debian. You will get notified by dak - the software used by Debian to manage its repositories - about the upload. Please note, if your package was not at all in Debian before, it needs manual approval by ftpmasters to clear the NEW queue. They will do consistency checks, and review your debian/copyright file whether your package matches the Debian Free Software Guidelines. ftpmaster's opinion is binding here for both your sponsor and you.

    7. Maintaining your package in Debian

    -

    Please see the corresponding chapter in the New Maintainer's Guide to get the idea. Whenever you feel like, you should update your package in Debian. The general procedure isn't different to your fist upload. Please upload your updated package to ${ config['debexpo.sitename'] } and poke your former sponsor about your change. Alternatively, follow ${ h.tags.link_to("the usual procedures", h.url(controller='sponsor', action='index')) }.

    +

    Please see the corresponding chapter in the New Maintainer's Guide to get the idea. Whenever you feel like, you should update your package in Debian. The general procedure isn't different form your fist upload. Please upload your updated package to ${ config['debexpo.sitename'] } and poke your former sponsor about your change. Alternatively, follow ${ h.tags.link_to("the usual procedures", h.url(controller='sponsor', action='index')) }.

    + +

    If your package passes through the sponsoring process for a few successive uploads without any notable correction by your sponsor, you can become a Debian Maintainer which grants you limited upload rights to Debian directly. Get in touch with your sponsor to discuss your chances here. You can also become a Debian Developer giving you all necessary upload rights.

    -

    If your package passes through the sponsoring process for a few packages without any notable correction by your sponsor, you can become a Debian Maintainer which grants you limited upload rights to Debian directly. Get in touch with your sponsor to discuss your chances here. You can also become a Debian Developer giving you all necessary upload rights.

    diff --git a/debexpo/templates/sponsor/index.mako b/debexpo/templates/sponsor/index.mako index 214a398a..44e8e804 100644 --- a/debexpo/templates/sponsor/index.mako +++ b/debexpo/templates/sponsor/index.mako @@ -4,7 +4,7 @@ ${ c.custom_html }

    The sponsoring process

    -

    As sponsored maintainer you don't have upload permissions to the Debian repository. Therefore you have three possibilities to get your package into Debian:

    +

    As sponsored maintainer you do not have upload permissions to the Debian repository. Therefore you have three possibilities to get your package into Debian:

    • Join a packaging team
    • @@ -12,33 +12,33 @@ ${ c.custom_html }
    • Talk directly to people willing to sponsor your package
    -

    They will ${ h.tags.link_to("review", h.url('intro-reviewers')) } your package. Everyone is invited to review packages, including you for other people in your situation.

    +

    A sponsor, regardless of how you found one will ${ h.tags.link_to("review", h.url('intro-reviewers')) } your package. Yet everyone is invited to review packages, including yourself. We encourage you to review other people's packages - both of you will benefit.

    Join a packaging team

    -

    There are teams in Debian who maintain packages collaboratively. If your package deals with libraries for programming langauges, or is about an ecosystem of associated packages, think of KDE or Gnome packages for example, you may want to join that team. Have a look to list of packaging teams in Debian.

    +

    There are teams in Debian who maintain packages collaboratively. If your package deals with libraries for programming languages or is about an ecosystem of associated packages, think of KDE or Gnome packages for example, you may want to join the respective team. Have a look at the (incomplete) list of packaging teams in Debian.

    -

    Please note, each of those teams may have their own workflows and policies. Contact their respective mailing lists to learn more.

    +

    Please note, each of those teams may have their own workflows and policies covering how to deal with package uploads. Contact their respective mailing lists and home pages to learn more.

    Ask the debian-mentors mailing list

    -

    If your package does not match the interests of any team, or you are not sure whether a team could be interested in your package, please write to the debian-mentors mailing list to draw attention to your package. Your request should be formatted according to our RFS ("request for sponsorship") template. If you uploaded your package to ${ config['debexpo.sitename'] }, a RFS template can be shown on your package page.

    +

    If your package does not match the interests of any team or you are not sure whether a team could be interested in your package, please write to the debian-mentors mailing list to draw attention to your package. Your request should be formatted according to our RFS ("request for sponsorship") template. If you uploaded your package to ${ config['debexpo.sitename'] }, a RFS template can be shown on your package page.

    -

    If in doubt, choose this alternative.

    +

    If you are unsure or in doubt, choose this alternative.

    -

    Don't worry if you get no answer: It does not mean your package is bad. Ask again after a few weeks if you did not find a sponsor by other means yet.

    +

    Typically you will reach the greatest audience by writing to our public mailing list. Eventually also some non-uploading reviewer may have a look at your package. Please do not worry if you get no answer: It happens from time to time that all interested people might be distracted or busy. It does not mean your package is bad. Feel free to ask again after a few weeks or try any of the alternative methods to find a sponsor.

    Finding a sponsor

    -

    If you want, you can write sponsors willing to upload packages to other maintainers directly. Don't contact them blindly! Instead watch out for their requirements and guidelines. Contact them only if your package is compatible to their individual requirements and matches their area of interest. To tell apart sponsors who are interested in your package and who are not, they can formulate their own sponsor metrics.

    +

    If you want, you can write sponsors willing to upload packages to other maintainers directly. Please do not send out mass emails! Instead watch out for their individual requirements and guidelines. Contact individuals only if your package is compatible to their respective requirements and matches their area of interest. To tell apart sponsors who are interested in your package and those who are not, we asked developers to formulate their own sponsor traits. Please read them carefully and compare your package with their expectations.

    Sponsor metrics

    -To help you finding a sponsor interested in your package, they can formulate sponsor metrics: +To help you find a sponsor interested in your package, they can formulate sponsor traits for either social or technical aspects. Additionally a sponsor may not usually be interested in every package but only in a certain category.

    Sponsor's personal interests

    -

    Sponsors typically are not interested to upload any package for you. They could, however, be interested if your package matches their area of interest. Please compare those package types with your package. Such categories eventually are certain programming languages your program is written in, a field of endeavour, or software fulfilling a certain task.

    +

    Typically, sponsors are not interested in uploading any package for you. However, they could be interested if your package matched their area of interest. Please compare those package types with your package. Such categories eventually are certain programming languages your program is written in, a field of endeavour or software fulfilling a certain task.

    <%def name="tag_helper(requirement)"> % if not c.sponsor_filter: @@ -59,10 +59,10 @@ To help you finding a sponsor interested in your package, they can formulate spo
    -- GitLab From 74421fa2d2dbb9265a48d2d3a0b8b07acd0c84a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Mon, 19 Sep 2011 18:34:53 -0400 Subject: [PATCH 34/49] Fix spelling error in reject message --- debexpo/scripts/debexpo_importer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debexpo/scripts/debexpo_importer.py b/debexpo/scripts/debexpo_importer.py index b2ef3132..7c9860db 100755 --- a/debexpo/scripts/debexpo_importer.py +++ b/debexpo/scripts/debexpo_importer.py @@ -461,9 +461,9 @@ class Importer(object): self._remove_changes() if orig == None: orig = "any original tarball (orig.tar.gz)" - self._reject("Rejecting incomplate upload. " - "You did not upload %s and we didn't find it on either one of our alternative resources.\n" \ - "If you tried to upload a Debian revision package, make sure you include the full source (pass -sa to dpkg-buildpackage)" % + self._reject("Rejecting incomplete upload. " + "You did not upload %s and we didn't find it on any of our alternative resources.\n" \ + "If you tried to upload a package which only increased the Debian revision part, make sure you include the full source (pass -sa to dpkg-buildpackage)" % ( orig )) else: toinstall.append(orig) -- GitLab From 4bcd852bffde01d4483f5c7c1d79d098c4336f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Tue, 20 Sep 2011 09:35:59 -0400 Subject: [PATCH 35/49] More typos fixed --- debexpo/model/data/tags.py | 2 +- debexpo/templates/index/intro-maintainers.mako | 4 ++-- debexpo/templates/sponsor/index.mako | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debexpo/model/data/tags.py b/debexpo/model/data/tags.py index 06687ac4..73c867a2 100644 --- a/debexpo/model/data/tags.py +++ b/debexpo/model/data/tags.py @@ -9,7 +9,7 @@ TAGS = { ('NMUs','nmu', 'Your package is a NMU'), ('QA uploads','qa', 'Your package is a QA upload'), ('Backports','backports', 'Your package is a backported package'), - ('Modified tarballs (but good reasons)','modified-tarballs', 'Your package modified the original source tarball somehow in a way. It does not match the original checksum anymore but you have a good reason to do so'), + ('Modified tarballs (but good reasons)','modified-tarballs', 'Your package modified the original source tarball somehow. It does not match the original checksum anymore but you have a good reason to do so'), ('Library package', 'library-package', 'You are packaging a policy compliant library'), ('VCS snapshot tarballs','vcs-tarball', 'Your package is not based on a original source tarball at all but is based on a VCS snapshot',), ('contrib/non-free packages', 'non-free-package', 'Your package it targetting the contrib or non-free branches (Information)'), diff --git a/debexpo/templates/index/intro-maintainers.mako b/debexpo/templates/index/intro-maintainers.mako index 0a11914f..7a2dffdd 100644 --- a/debexpo/templates/index/intro-maintainers.mako +++ b/debexpo/templates/index/intro-maintainers.mako @@ -9,7 +9,7 @@ ${ c.custom_html }

    1. Find a requested package

    -

    Debian is a distribution, not a general purpose repository. Many of us do not believe every piece of free software necessarily belongs to Debian. Please do not treat Debian as a platform to advertise your own software, unless there is some real request for it. That said, there is no one who ultimately judges about that. Eventually you may get some feedback on that discussion after filing your WNPP bug (see below) however you are free to interpret that as a suggestion, not as a final vote. After all, you need to find a sponsor believing in the benefit of having your package in Debian. Please have a look at our ${ h.tags.link_to("sponsors page", h.url(controller='sponsor', action='index')) } to learn about personal interests of sponsors. +

    Debian is a distribution, not a general purpose repository. Many of us do not believe every piece of free software necessarily belongs in Debian. Please do not treat Debian as a platform to advertise your own software, unless there is some real request for it. That said, there is no one who ultimately judges about that. Eventually you may get some feedback on that discussion after filing your WNPP bug (see below) however you are free to interpret that as a suggestion, not as a final vote. After all, you need to find a sponsor believing in the benefit of having your package in Debian. Please have a look at our ${ h.tags.link_to("sponsors page", h.url(controller='sponsor', action='index')) } to learn about personal interests of sponsors.

    If you want to contribute to Debian, but you do not know which package Debian misses yet, take a look at "Request for package" (RFP) bugs. See WNPP below.

    @@ -131,7 +131,7 @@ If you did everything right, you will get a confirmation mail from our site and

    7. Maintaining your package in Debian

    -

    Please see the corresponding chapter in the New Maintainer's Guide to get the idea. Whenever you feel like, you should update your package in Debian. The general procedure isn't different form your fist upload. Please upload your updated package to ${ config['debexpo.sitename'] } and poke your former sponsor about your change. Alternatively, follow ${ h.tags.link_to("the usual procedures", h.url(controller='sponsor', action='index')) }.

    +

    Please see the corresponding chapter in the New Maintainer's Guide to get the idea. Whenever you feel like, you should update your package in Debian. The general procedure is not different from your fist upload. Please upload your updated package to ${ config['debexpo.sitename'] } and poke your former sponsor about your change. Alternatively, follow ${ h.tags.link_to("the usual procedures", h.url(controller='sponsor', action='index')) }.

    If your package passes through the sponsoring process for a few successive uploads without any notable correction by your sponsor, you can become a Debian Maintainer which grants you limited upload rights to Debian directly. Get in touch with your sponsor to discuss your chances here. You can also become a Debian Developer giving you all necessary upload rights.

    diff --git a/debexpo/templates/sponsor/index.mako b/debexpo/templates/sponsor/index.mako index 44e8e804..492fe5ad 100644 --- a/debexpo/templates/sponsor/index.mako +++ b/debexpo/templates/sponsor/index.mako @@ -30,7 +30,7 @@ ${ c.custom_html }

    Finding a sponsor

    -

    If you want, you can write sponsors willing to upload packages to other maintainers directly. Please do not send out mass emails! Instead watch out for their individual requirements and guidelines. Contact individuals only if your package is compatible to their respective requirements and matches their area of interest. To tell apart sponsors who are interested in your package and those who are not, we asked developers to formulate their own sponsor traits. Please read them carefully and compare your package with their expectations.

    +

    If you want, you can write sponsors willing to upload packages of other maintainers directly. Please do not send out mass emails! Instead watch out for their individual requirements and guidelines. Contact individuals only if your package is compatible to their respective requirements and matches their area of interest. To tell apart sponsors who are interested in your package from those who are not, we asked developers to formulate their own sponsor traits. Please read them carefully and compare your package with their expectations.

    Sponsor metrics

    -- GitLab From 32f019aa7035a560bec8c54527bd77ddec376847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Tue, 20 Sep 2011 20:11:15 -0400 Subject: [PATCH 36/49] Add a paragraph on contacting maintainers of related packages --- debexpo/templates/sponsor/index.mako | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debexpo/templates/sponsor/index.mako b/debexpo/templates/sponsor/index.mako index 492fe5ad..4cb2ebe2 100644 --- a/debexpo/templates/sponsor/index.mako +++ b/debexpo/templates/sponsor/index.mako @@ -32,7 +32,9 @@ ${ c.custom_html }

    If you want, you can write sponsors willing to upload packages of other maintainers directly. Please do not send out mass emails! Instead watch out for their individual requirements and guidelines. Contact individuals only if your package is compatible to their respective requirements and matches their area of interest. To tell apart sponsors who are interested in your package from those who are not, we asked developers to formulate their own sponsor traits. Please read them carefully and compare your package with their expectations.

    -

    Sponsor metrics

    +

    Similarly, you can also try to get in touch with other package maintainers directly. This makes sense if you prepared a package which is extends the functionality of a related package in a useful way or can be used together. Consider you packaged log analysis tool for a web server, the maintainer of that web server might be interested to sponsor you. If you consider to contact a maintainer of such a related package directly, make sure he is actually able to sponsor you. Remember: Only Debian Developer are allowed to sponsor packages. You can identify developers by looking up their name at db.debian.org.

    + +

    Sponsor guidelines

    To help you find a sponsor interested in your package, they can formulate sponsor traits for either social or technical aspects. Additionally a sponsor may not usually be interested in every package but only in a certain category. -- GitLab From 7519945152ce23ac62cf7cd71d9350216c21b202 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 37/49] 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 9b733dae9ab5d7da966ae05e17a323c08992db45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Wed, 21 Sep 2011 21:11:56 -0400 Subject: [PATCH 38/49] Spelling fixes on several templates. Thanks pabs --- debexpo/templates/index/intro-maintainers.mako | 18 +++++++++--------- debexpo/templates/index/reviewers.mako | 2 +- debexpo/templates/sponsor/index.mako | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/debexpo/templates/index/intro-maintainers.mako b/debexpo/templates/index/intro-maintainers.mako index 7a2dffdd..affb254d 100644 --- a/debexpo/templates/index/intro-maintainers.mako +++ b/debexpo/templates/index/intro-maintainers.mako @@ -11,11 +11,11 @@ ${ c.custom_html }

    Debian is a distribution, not a general purpose repository. Many of us do not believe every piece of free software necessarily belongs in Debian. Please do not treat Debian as a platform to advertise your own software, unless there is some real request for it. That said, there is no one who ultimately judges about that. Eventually you may get some feedback on that discussion after filing your WNPP bug (see below) however you are free to interpret that as a suggestion, not as a final vote. After all, you need to find a sponsor believing in the benefit of having your package in Debian. Please have a look at our ${ h.tags.link_to("sponsors page", h.url(controller='sponsor', action='index')) } to learn about personal interests of sponsors. -

    If you want to contribute to Debian, but you do not know which package Debian misses yet, take a look at "Request for package" (RFP) bugs. See WNPP below.

    +

    If you want to contribute to Debian, but you do not know which packages to contribute to, take a look at "Request for help" (RFH), "Request for adopter" (RFA), "Orphaned package" (O) and "Request for package" (RFP) bugs. See WNPP below.

    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 something for 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 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

    @@ -108,9 +108,9 @@ If you did everything right, you will get a confirmation mail from our site and

    5. Find a sponsor

    -

    Once your package is publicly available on any resource, including but not limited to ${ c.config['debexpo.sitetitle'] } you may start searching a sponsor for your package. If you have already uploaded packages to Debian, you should ask your former sponsor. A sponsor is any Debian Developer willing to upload your package to Debian on your behalf. Have a look to our ${ h.tags.link_to("sponsor's page", h.url(controller='sponsor', action='index')) } to learn more on sponsors and how to find one.

    +

    Once your package is publicly available on any resource, including but not limited to ${ c.config['debexpo.sitetitle'] } you may start searching for a sponsor for your package. If you have already uploaded packages to Debian, you should ask your former sponsor. A sponsor is any Debian Developer willing to upload your package to Debian on your behalf. Have a look to our ${ h.tags.link_to("sponsor's page", h.url(controller='sponsor', action='index')) } to learn more on sponsors and how to find one.

    -

    The main point of the sponsoring process is to review your package to make sure it meets our technical requirements. Everyone can and should review other people's packages. Also, a clean package will increase your likelihood to find a sponsor. Please take a look at our page ${ h.tags.link_to("telling more about reviews", h.url('intro-reviewers')) }.

    +

    The main point of the sponsoring process is to review your package to make sure it meets our technical requirements. Everyone can and should review other people's packages. Also, a clean package will increase your likelihood to find a sponsor. Please take a look at our page ${ h.tags.link_to("about package reviews", h.url('intro-reviewers')) }.

    The relation between you and your sponsor

    @@ -118,20 +118,20 @@ If you did everything right, you will get a confirmation mail from our site and

    What can I do if I don't find a sponsor?

    -

    Don't become desperate. Sponsoring can take a while. Nonetheless, here are a few hints:

    +

    Do not give up. Sponsoring can take a while. Nonetheless, here are a few hints:

    • Ask again on the debian-mentors mailing list. It is common practice to ask again after a few weeks.
    • -
    • Offer your package directly to developers. We made a ${ h.tags.link_to("a list of sponsors", h.url(controller='sponsor', action='index')) }, eventually willing to upload packages for you. Please don't contact every sponsor listed there. Instead, read their individual requirements and choose the sponsor which matches you and your package best. +
    • Offer your package directly to relevant teams and individual developers. We made a ${ h.tags.link_to("a list of sponsors", h.url(controller='sponsor', action='index')) }, eventually willing to upload packages for you. Please don't contact every sponsor listed there. Instead, read their individual requirements and choose the sponsor which matches you and your package best.

    6. Getting an upload to Debian

    -

    Once you find a sponsor interested in your package, he will sponsor it. That means building it and successively uploading it to Debian. You will get notified by dak - the software used by Debian to manage its repositories - about the upload. Please note, if your package was not at all in Debian before, it needs manual approval by ftpmasters to clear the NEW queue. They will do consistency checks, and review your debian/copyright file whether your package matches the Debian Free Software Guidelines. ftpmaster's opinion is binding here for both your sponsor and you.

    +

    Once you find a sponsor interested in your package, he will sponsor it. That means reviewing, building and testing it and then uploading it and then uploading it to Debian. You will get notified by dak - the software used by Debian to manage its repositories - about the upload. Please note, if your package was not at all in Debian before, it needs manual approval by ftpmasters to clear the NEW queue. They will do consistency checks, and review your debian/copyright file whether your package matches the Debian Free Software Guidelines. ftpmaster's opinion is binding here for both your sponsor and you.

    7. Maintaining your package in Debian

    -

    Please see the corresponding chapter in the New Maintainer's Guide to get the idea. Whenever you feel like, you should update your package in Debian. The general procedure is not different from your fist upload. Please upload your updated package to ${ config['debexpo.sitename'] } and poke your former sponsor about your change. Alternatively, follow ${ h.tags.link_to("the usual procedures", h.url(controller='sponsor', action='index')) }.

    +

    Please see the corresponding chapter in the New Maintainer's Guide to get the idea. Whenever you feel like, you should update your package in Debian. The general procedure is not different from your fist upload. Please upload your updated package to ${ config['debexpo.sitename'] } and notify your former sponsor about your change. Alternatively, follow ${ h.tags.link_to("the usual procedures", h.url(controller='sponsor', action='index')) }.

    -

    If your package passes through the sponsoring process for a few successive uploads without any notable correction by your sponsor, you can become a Debian Maintainer which grants you limited upload rights to Debian directly. Get in touch with your sponsor to discuss your chances here. You can also become a Debian Developer giving you all necessary upload rights.

    +

    If your package passes through the sponsoring process for a few successive uploads without any notable correction by your sponsor, you can become a Debian Maintainer which grants you limited upload rights to Debian directly. Get in touch with your sponsor to discuss your chances here. You can also become a Debian Developer giving you full membership in the project.

    diff --git a/debexpo/templates/index/reviewers.mako b/debexpo/templates/index/reviewers.mako index 315b6ad0..b632c4f8 100644 --- a/debexpo/templates/index/reviewers.mako +++ b/debexpo/templates/index/reviewers.mako @@ -10,7 +10,7 @@

    Glad you ask! There are many reasons why you should review packages even if you can't actually upload them.

      -
    • The person you are reviewing will appreciate it. Chances are, you find problems in a package the person was not aware of yet. So he can learn from you.
    • +
    • The person you are reviewing will appreciate it. Chances are, you find problems in a package the person was not aware of yet. So they can learn from you.
    • Eventually the package you are reviewing will be in a very good shape and you happen to learn something yourself. Moreover, you will also learn about best practices and workflows other people are using. Even if the package does not meet Debian's quality standards you can learn how not to do things.
    • People who can upload may decide based on your review whether the package in question is a suitable candidate or not.
    diff --git a/debexpo/templates/sponsor/index.mako b/debexpo/templates/sponsor/index.mako index 4cb2ebe2..8d9eb929 100644 --- a/debexpo/templates/sponsor/index.mako +++ b/debexpo/templates/sponsor/index.mako @@ -12,11 +12,11 @@ ${ c.custom_html }
  • Talk directly to people willing to sponsor your package
  • -

    A sponsor, regardless of how you found one will ${ h.tags.link_to("review", h.url('intro-reviewers')) } your package. Yet everyone is invited to review packages, including yourself. We encourage you to review other people's packages - both of you will benefit.

    +

    A sponsor, regardless of how you found one will ${ h.tags.link_to("review", h.url('intro-reviewers')) } your package. Everyone is invited to review packages, including yourself. We encourage you to review other people's packages - both of you will benefit.

    Join a packaging team

    -

    There are teams in Debian who maintain packages collaboratively. If your package deals with libraries for programming languages or is about an ecosystem of associated packages, think of KDE or Gnome packages for example, you may want to join the respective team. Have a look at the (incomplete) list of packaging teams in Debian.

    +

    There are teams in Debian who maintain packages collaboratively. If your package deals with libraries for programming languages or is part of an ecosystem of associated packages, think of KDE or Gnome packages for example, you may want to join the respective team. Have a look at the (incomplete) list of packaging teams in Debian.

    Please note, each of those teams may have their own workflows and policies covering how to deal with package uploads. Contact their respective mailing lists and home pages to learn more.

    @@ -30,9 +30,9 @@ ${ c.custom_html }

    Finding a sponsor

    -

    If you want, you can write sponsors willing to upload packages of other maintainers directly. Please do not send out mass emails! Instead watch out for their individual requirements and guidelines. Contact individuals only if your package is compatible to their respective requirements and matches their area of interest. To tell apart sponsors who are interested in your package from those who are not, we asked developers to formulate their own sponsor traits. Please read them carefully and compare your package with their expectations.

    +

    If you want, you can contact sponsors willing to upload packages of other maintainers directly. Please do not send out mass emails! Instead watch out for their individual requirements and guidelines. Contact individuals only if your package is compatible to their respective requirements and matches their area of interest. To tell apart sponsors who are interested in your package from those who are not, we asked developers to formulate their own sponsor traits. Please read them carefully and compare your package with their expectations.

    -

    Similarly, you can also try to get in touch with other package maintainers directly. This makes sense if you prepared a package which is extends the functionality of a related package in a useful way or can be used together. Consider you packaged log analysis tool for a web server, the maintainer of that web server might be interested to sponsor you. If you consider to contact a maintainer of such a related package directly, make sure he is actually able to sponsor you. Remember: Only Debian Developer are allowed to sponsor packages. You can identify developers by looking up their name at db.debian.org.

    +

    Similarly, you can also try to get in touch with other package maintainers directly. This makes sense if you prepared a package which extends the functionality of a related package in a useful way or can be used together. Consider you packaged log analysis tool for a web server, the maintainer of that web server might be interested to sponsor you. If you consider to contact a maintainer of such a related package directly, make sure he is actually able to sponsor you. Remember: Only Debian Developer are allowed to sponsor packages. You can identify developers by looking up their name at db.debian.org.

    Sponsor guidelines

    -- GitLab From 33f54d68e7a004a93aef432c8b1bf657d150fa0a 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 39/49] 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 f7e155ed07b3b83f719d2b093a83f8fee5378b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Mon, 26 Sep 2011 12:36:37 -0400 Subject: [PATCH 40/49] Cherry pick fix from df89b5b8 --- debexpo/lib/filesystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debexpo/lib/filesystem.py b/debexpo/lib/filesystem.py index 705ff9cf..81b04023 100644 --- a/debexpo/lib/filesystem.py +++ b/debexpo/lib/filesystem.py @@ -171,7 +171,7 @@ class CheckFiles(object): if os.path.exists(file): log.debug("Removing file '%s'" % (file)) os.unlink(file) - if os.path.isdir(path): + if os.path.isdir(path) and os.listdir(path) == []: log.debug("Remove empty package repository '%s'" % (path)) os.rmdir(path) -- GitLab From 793b6a355bfda9af3ee80ce1169a8a72f9c98a28 Mon Sep 17 00:00:00 2001 From: Asheesh Laroia Date: Thu, 29 Sep 2011 17:46:19 -0400 Subject: [PATCH 41/49] Change one visible mention of "Sponsor metrics" to "Public sponsor info" --- debexpo/templates/my/index.mako | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debexpo/templates/my/index.mako b/debexpo/templates/my/index.mako index 9a344a62..e08c4c18 100644 --- a/debexpo/templates/my/index.mako +++ b/debexpo/templates/my/index.mako @@ -167,7 +167,7 @@ allow_unsigned_uploads = 0 % if c.debian_developer:
    - ${ _('Sponsor metrics') } + ${ _('Public sponsor info') } ${ h.html.tags.form(h.url.current()) } ${ h.html.tags.hidden('form', 'metrics') } -- GitLab From 84a78437345d20c208ef571437e3146850f42935 Mon Sep 17 00:00:00 2001 From: Asheesh Laroia Date: Thu, 29 Sep 2011 18:12:33 -0400 Subject: [PATCH 42/49] Adjust the string so that it is clear that this section refers to tech details about packages --- debexpo/templates/my/index.mako | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debexpo/templates/my/index.mako b/debexpo/templates/my/index.mako index e08c4c18..ab665997 100644 --- a/debexpo/templates/my/index.mako +++ b/debexpo/templates/my/index.mako @@ -197,7 +197,7 @@ allow_unsigned_uploads = 0
    - <% oneshot = "Sponsoring requirements" %> + <% oneshot = "Technical choices within packages" %> % for requirement in c.technical_tags: -- GitLab From 59f2ef581437bf1239635be9d12e5f44114367ff Mon Sep 17 00:00:00 2001 From: Asheesh Laroia Date: Thu, 29 Sep 2011 18:13:29 -0400 Subject: [PATCH 43/49] Move the form labels into the
    --- debexpo/templates/my/index.mako | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/debexpo/templates/my/index.mako b/debexpo/templates/my/index.mako index ab665997..9cacd3fb 100644 --- a/debexpo/templates/my/index.mako +++ b/debexpo/templates/my/index.mako @@ -203,14 +203,15 @@ allow_unsigned_uploads = 0
    -- GitLab From 3fd8a76bffbfc33e48e5475894501dd616165946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Thu, 29 Sep 2011 18:21:57 -0400 Subject: [PATCH 44/49] Finish what paulproteus began: Convert social tags as well, put description before the list, swap technical with social tags --- debexpo/templates/my/index.mako | 93 +++++++++++++++++---------------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/debexpo/templates/my/index.mako b/debexpo/templates/my/index.mako index 9cacd3fb..e1d44ab7 100644 --- a/debexpo/templates/my/index.mako +++ b/debexpo/templates/my/index.mako @@ -197,10 +197,23 @@ allow_unsigned_uploads = 0 - <% oneshot = "Technical choices within packages" %> - % for requirement in c.technical_tags: + + + + + + + + % for requirement in c.social_tags: - + % endfor + + + + - + + % for requirement in c.technical_tags: + + + + + % endfor - <% oneshot = "Social requirements" %> - % for requirement in c.social_tags: - - - - - % endfor - - - - - - - - - -- GitLab From 453e54fc0ce672b1c7384f467c858106de58c66a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= Date: Thu, 29 Sep 2011 18:36:19 -0400 Subject: [PATCH 45/49] Put a text link to our sponsor into the footer --- debexpo/templates/base.mako | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debexpo/templates/base.mako b/debexpo/templates/base.mako index 2c50928c..b8de44a2 100644 --- a/debexpo/templates/base.mako +++ b/debexpo/templates/base.mako @@ -95,13 +95,15 @@
    ${ _('Public visibility of your profile') }:
    ${ oneshot | n}<% oneshot = " " %> - % for weight,label in [(-1, _("-")), \ - (0, _("~")), \ - (1, _("+")) ]: - ${ h.html.tags.radio(requirement.tag, value=weight, label=label, checked=(c.metrics.get_tag_weight(requirement.tag) == weight)) } - % endfor -   ${ requirement.label } +
    +
    ${ requirement.label }
    +
    "${ requirement.long_description | n}"
    +
    + % for weight,label in [(-1, _("undesirable")), \ + (0, _("undecided")), \ + (1, _("preferred")) ]: + ${ h.html.tags.radio(requirement.tag, value=weight, label=label, checked=(c.metrics.get_tag_weight(requirement.tag) == weight)) } + % endfor +
    +
     
      -
    • - (first column) You are not accepting packages qualifying for that tag.
    • -
    • ~ (middle column) You have no strong opinion on that tag.
    • -
    • + (last column) You endorse usage of the implied meaning of the tag.
    • +
    • undesirable (first column) You are not accepting packages qualifying for that tag.
    • +
    • undecided (middle column) You have no strong opinion on that tag.
    • +
    • preferred (last column) You endorse usage of the implied meaning of the tag.
    • +
    • Please note, the personal pronouns in the long description address your sponsor. Please see ${ h.tags.link_to("the sponsoring page", h.url('sponsors')) }
    ${ oneshot | n}<% oneshot = " " %> - % for weight,label in [(-1, _("-")), \ - (0, _("~")), \ - (1, _("+")) ]: - ${ h.html.tags.radio(requirement.tag, value=weight, label=label, checked=(c.metrics.get_tag_weight(requirement.tag) == weight)) |n} - % endfor -   ${ requirement.label } +
    +
    ${ requirement.label }
    +
    "${ requirement.long_description | n}"
    +
    + % for weight,label in [(-1, _("undesirable")), \ + (0, _("undecided")), \ + (1, _("preferred")) ]: + ${ h.html.tags.radio(requirement.tag, value=weight, label=label, checked=(c.metrics.get_tag_weight(requirement.tag) == weight)) } + % endfor +
    +
     
      -
    • - (first column) You are not accepting packages qualifying for that tag.
    • -
    • ~ (middle column) You have no strong opinion on that tag.
    • -
    • + (last column) You endorse usage of the implied meaning of the tag.
    • +
    • undesirable (first column) You are not accepting packages qualifying for that tag.
    • +
    • undecided (middle column) You have no strong opinion on that tag.
    • +
    • preferred (last column) You endorse usage of the implied meaning of the tag.
    • +
    • Please note, the personal pronouns in the long description address your sponsor. Please see ${ h.tags.link_to("the sponsoring page", h.url('sponsors')) }
    - Debian allows several workflows and best practices to co-exist with each other. All packages must comply the Debian policy as bare essential minimum, but some workflows and best practices beyond that are optional, but nonetheless mandatory for you asking that person to sponsor your upload. + Debian allows several workflows and best practices to co-exist with each other. All packages must comply to the Debian policy as a bare essential minimum and although some workflows and best practices beyond that are optional it is nonetheless mandatory for you to ask someone to sponsor your upload. - Some sponsors prefer to upload only packages from people, that fulfill certain social criterias. Please don't ask an uploader to sponsor your request if you don't match them. + Some sponsors prefer to only upload packages from people who fulfill certain social criteria. Please don't ask an uploader to sponsor your request if you don't match them.
    ${ _('Type of packages you are interested in') }:
    ${ h.html.tags.textarea('package_types', c.metrics.types, cols=82, rows=10) }
    ${ oneshot | n}<% oneshot = " " %>${ oneshot | n}<% oneshot = " " %>
    -
    ${ requirement.label }
    -
    "${ requirement.long_description | n}"
    -
    - % for weight,label in [(-1, _("undesirable")), \ - (0, _("undecided")), \ - (1, _("preferred")) ]: +
    + % for weight,label in [(-1, _("-")), \ + (0, _("0")), \ + (1, _("+")) ]: ${ h.html.tags.radio(requirement.tag, value=weight, label=label, checked=(c.metrics.get_tag_weight(requirement.tag) == weight)) } % endfor + ${ requirement.label }
    +
    "${ requirement.long_description | n}"
    +
    ${ _('Type of packages you are interested in') }:
    ${ h.html.tags.textarea('package_types', c.metrics.types, cols=82, rows=10) }
    Social requirements +
      +
    • - (first column) You are not accepting packages qualifying for that tag.
    • +
    • 0 (middle column) You have no strong opinion on that tag.
    • +
    • + (last column) You endorse usage of the implied meaning of the tag.
    • +
    • Please note, the personal pronouns in the long description address your sponsor. Please see ${ h.tags.link_to("the sponsoring page", h.url('sponsors')) }
    • +
    +
    ${ oneshot | n}<% oneshot = " " %> 
    @@ -217,18 +230,45 @@ allow_unsigned_uploads = 0
    + ${ _("Additional social notes") } + +
    ${ h.html.tags.textarea('social_requirements', c.metrics.social_requirements, cols=82, rows=10) } +
     Technical choices within packages
      -
    • undesirable (first column) You are not accepting packages qualifying for that tag.
    • -
    • undecided (middle column) You have no strong opinion on that tag.
    • -
    • preferred (last column) You endorse usage of the implied meaning of the tag.
    • +
    • - (first column) You are not accepting packages qualifying for that tag.
    • +
    • 0 (middle column) You have no strong opinion on that tag.
    • +
    • + (last column) You endorse usage of the implied meaning of the tag.
    • Please note, the personal pronouns in the long description address your sponsor. Please see ${ h.tags.link_to("the sponsoring page", h.url('sponsors')) }
      +
    +
    + % for weight,label in [(-1, _("-")), \ + (0, _("0")), \ + (1, _("+")) ]: + ${ h.html.tags.radio(requirement.tag, value=weight, label=label, checked=(c.metrics.get_tag_weight(requirement.tag) == weight)) } + % endfor + ${ requirement.label }
    +
    "${ requirement.long_description | n}"
    +
    +
    +
    +
    ${ _("Additional technical notes") } @@ -250,45 +290,6 @@ allow_unsigned_uploads = 0
    ${ oneshot | n}<% oneshot = " " %> -
    -
    ${ requirement.label }
    -
    "${ requirement.long_description | n}"
    -
    - % for weight,label in [(-1, _("undesirable")), \ - (0, _("undecided")), \ - (1, _("preferred")) ]: - ${ h.html.tags.radio(requirement.tag, value=weight, label=label, checked=(c.metrics.get_tag_weight(requirement.tag) == weight)) } - % endfor -
    -
    -
      -
      -
    • undesirable (first column) You are not accepting packages qualifying for that tag.
    • -
    • undecided (middle column) You have no strong opinion on that tag.
    • -
    • preferred (last column) You endorse usage of the implied meaning of the tag.
    • -
    • Please note, the personal pronouns in the long description address your sponsor. Please see ${ h.tags.link_to("the sponsoring page", h.url('sponsors')) }
    • -
    -
    - ${ _("Additional social notes") } - -
    ${ h.html.tags.textarea('social_requirements', c.metrics.social_requirements, cols=82, rows=10) } -
    ${ h.html.tags.submit('commit', _('Submit')) }
    ${ h.html.tags.end_form() } -% if c.debian_developer: +% if c.debian_developer and config['debexpo.enable_experimental_code'] == 'true':
    ${ _('Public sponsor info') } -- GitLab