pulp / pulp/pulp_deb

Support the debug .ddeb package type

Open
#384 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

.feature Looking_for_Contributor
Dominant language
Python
Stars
71
Forks
91
Avg merge
1d 19h
Merged PRs (30d)
22

Description

Author: lieter (lieter)

Redmine Issue: 6757, https://pulp.plan.io/issues/6757


From Ubuntu Bionic onward, Canonical has patched debuild to change the suffix for debug ($package-dbgsym_$version) package from .deb to .ddeb.

When attempting to upload packages with this suffix, the tasks has the following error:

  File "/home/lieter/.virtualenvs/pulp3-devel/lib/python3.8/site-packages/rq/worker.py", line 886, in perform_job
    rv = job.perform()
  File "/home/lieter/.virtualenvs/pulp3-devel/lib/python3.8/site-packages/rq/job.py", line 664, in perform
    self._result = self._execute()
  File "/home/lieter/.virtualenvs/pulp3-devel/lib/python3.8/site-packages/rq/job.py", line 670, in _execute
    return self.func(*self.args, **self.kwargs)
  File "/home/lieter/src/Pulp/pulpcore/pulpcore/app/tasks/base.py", line 40, in general_create
    serializer.is_valid(raise_exception=True)
  File "/home/lieter/.virtualenvs/pulp3-devel/lib/python3.8/site-packages/rest_framework/serializers.py", line 243, in is_valid
    raise ValidationError(self.errors)

This is because the plugin (rightfully) assumes that all packages are called .deb (or .udeb for installer packages). I believe adding a 'DebugPackage` model that inherits from Package (changing only SUFFIX) would be a good addition to pulp_deb.

The workaround here would be to upload the .ddeb with a relatve_path ending with .deb, but I don't know if Ubuntu's apt/dpkg would like that (afaik, it accepts it).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the validation failure shown at pulpcore/app/tasks/base.py:40, then trace the pulp_deb package model and its suffix handling. Confirm how .deb and .udeb packages are recognized, add coverage for .ddeb uploads, and verify that a .ddeb package is accepted without the relative-path workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.