Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D debexpo
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 42
    • Issues 42
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • mentors.debian.net
  • debexpo
  • Merge requests
  • !112

django: Origin tarball validation and retrieval

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Baptiste Beauplat requested to merge lyknode/debexpo:dj/origin-tarball into django Feb 26, 2020
  • Overview 36
  • Commits 23
  • Pipelines 18
  • Changes 24

Django migration: #47 (closed)

This MR re-adds the origin tarball validation and retrieval.

The original class OriginTarball has been converted to a Origin object suitable to be used in a Dsc.

Origin has two main methods:

  • validate() that checks against the Debian archive origin files referenced in the Dsc.
  • fetch() that retrieve the tarball from whether the archive or the local repository.

OfficialPackage class has been split into 2 classes, in an attempt to distinguish communication to different debian services:

  • ClientDebianArchive that can download files from the archive (fetch_from_pool())
  • ClientFTPMasterAPI that can query the ftpmaster api to fetch info about origin tarballs (get_origin_files())

Those classes inherit from connection helper ClientHTTP and ClientJsonAPI. Other debian services can be implemented using those helpers.

Two main changes have been made to the validation and the retrieval:

  • Validation is only done against Debian archive and not the local repository. Allowing users to overrides their orig files like they do with other source package files (dsc, debian.tar, etc...)
  • Validation ignores extra and missing origin files. Only referenced files are validated. This allows to upload a new debian revision with another tarball using a different compression scheme, mirroring the behavior of the archive.

I've also dropped the ability to customize the Repository for the importer as that was to facilitate testing. I've found a better way to alter that setting.

Tox and gitlab CI have dropped support for django-1.x, moving to using the 2.x versions from buster-backports

Edited Mar 28, 2020 by Baptiste Beauplat
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: dj/origin-tarball