Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding tests to upload source packages #1

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

Moustafa-Moustafa
Copy link

Adding tests to upload source packages.

masselstine and others added 12 commits May 24, 2023 11:54
fixes pulp#409
pulp#409
(was https://pulp.plan.io/issues/8775)

Allows the addition of Debian Source Packages, DSC files and any
associate source files (.orig.tar.gz, .debian.tar.xz, ...), as well as
synchronizing with a remote's source indices (sync_sources=True).
Publishing a distribution will make available DSC files, sources and
source indices in the repository, compliant with the Debian
rempository format.

The source files referenced in a dsc_file must be uploaded as
artifacts before the dsc_file so a typical workflow might be

--
apt-get source bc

http --form post $BASE/pulp/api/v3/artifacts/ \
  file@"/tmp/bc_1.07.1-2build1.debian.tar.xz"
http --form post $BASE/pulp/api/v3/artifacts/ \
  file@"/tmp/bc_1.07.1.orig.tar.gz"
http --form post $BASE/pulp/api/v3/artifacts/ \
  file@"/tmp/bc_1.07.1-2build1.dsc"
http --form post $BASE/pulp/api/v3/content/deb/source_packages/ \
  artifact=/pulp/api/v3/artifacts/3094de7e-da61-4cf6-ae75-a35b74472d9a/
--

Attempting to create the source_packages content from a DSC file
artifact before its source files are present as artifacts will result
validation errors.

Once source_packages content has been created it can be inspected via
its pulp_href or using the source_packages endpoint

http get $BASE/pulp/api/v3/content/deb/source_packages/

Synchronizing with a remote with "sync_sources=True" will synchronize
the Source Indicies files inspecting each contained paragraph to
download all associated DSC files and referced source files (note:
source file download may be deferred if remote policy="on_demand"),
performing a high level of data validation and creating all required
associations. As with uploading inspecting contents after a sync is
complete can be done with the same endpoints as above.

To remain spec compliant with https://wiki.debian.org/DebianRepository
"md5" must be present in the ALLOWED_CONTENT_CHECKSUMS. In all cases
the use of md5 is supplemental so security concerns around this
addition, at least for use with this feature, should be minimal.
fixes pulp#409
pulp#409
(was https://pulp.plan.io/issues/8775)

Allows the addition of Debian Source Packages, DSC files and any
associate source files (.orig.tar.gz, .debian.tar.xz, ...), as well as
synchronizing with a remote's source indices (sync_sources=True).
Publishing a distribution will make available DSC files, sources and
source indices in the repository, compliant with the Debian
rempository format.

The source files referenced in a dsc_file must be uploaded as
artifacts before the dsc_file so a typical workflow might be

--
apt-get source bc

http --form post $BASE/pulp/api/v3/artifacts/ \
  file@"/tmp/bc_1.07.1-2build1.debian.tar.xz"
http --form post $BASE/pulp/api/v3/artifacts/ \
  file@"/tmp/bc_1.07.1.orig.tar.gz"
http --form post $BASE/pulp/api/v3/artifacts/ \
  file@"/tmp/bc_1.07.1-2build1.dsc"
http --form post $BASE/pulp/api/v3/content/deb/source_packages/ \
  artifact=/pulp/api/v3/artifacts/3094de7e-da61-4cf6-ae75-a35b74472d9a/
--

Attempting to create the source_packages content from a DSC file
artifact before its source files are present as artifacts will result
validation errors.

Once source_packages content has been created it can be inspected via
its pulp_href or using the source_packages endpoint

http get $BASE/pulp/api/v3/content/deb/source_packages/

Synchronizing with a remote with "sync_sources=True" will synchronize
the Source Indicies files inspecting each contained paragraph to
download all associated DSC files and referced source files (note:
source file download may be deferred if remote policy="on_demand"),
performing a high level of data validation and creating all required
associations. As with uploading inspecting contents after a sync is
complete can be done with the same endpoints as above.

To remain spec compliant with https://wiki.debian.org/DebianRepository
"md5" must be present in the ALLOWED_CONTENT_CHECKSUMS. In all cases
the use of md5 is supplemental so security concerns around this
addition, at least for use with this feature, should be minimal.
related to:
pulp#409
(was https://pulp.plan.io/issues/8775)

Extend the tests fixture to include source indicies and an example
(hello) source package composed of an orig.tar.gz, DSC file and
debian.tar.xz. The 'test_sync' test which already does sync tests on a
remote repo with and without installer (udeb) packages is extended to
perform a new round of testing which will include source packages.

This is a minimum set of tests for the new source package
support. Future commits will expand the testing of source package
support.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
…kageTest

Adding uploading source package tests
…ourcePackageTest"

This reverts commit f26ccdb, reversing
changes made to f9cc644.
Syncing my fork to masselstine's
fixes pulp#409
pulp#409
(was https://pulp.plan.io/issues/8775)

Allows the addition of Debian Source Packages, DSC files and any
associate source files (.orig.tar.gz, .debian.tar.xz, ...), as well as
synchronizing with a remote's source indices (sync_sources=True).
Publishing a distribution will make available DSC files, sources and
source indices in the repository, compliant with the Debian
rempository format.

The source files referenced in a dsc_file must be uploaded as
artifacts before the dsc_file so a typical workflow might be

--
apt-get source bc

http --form post $BASE/pulp/api/v3/artifacts/ \
  file@"/tmp/bc_1.07.1-2build1.debian.tar.xz"
http --form post $BASE/pulp/api/v3/artifacts/ \
  file@"/tmp/bc_1.07.1.orig.tar.gz"
http --form post $BASE/pulp/api/v3/artifacts/ \
  file@"/tmp/bc_1.07.1-2build1.dsc"
http --form post $BASE/pulp/api/v3/content/deb/source_packages/ \
  artifact=/pulp/api/v3/artifacts/3094de7e-da61-4cf6-ae75-a35b74472d9a/
--

Attempting to create the source_packages content from a DSC file
artifact before its source files are present as artifacts will result
validation errors.

Once source_packages content has been created it can be inspected via
its pulp_href or using the source_packages endpoint

http get $BASE/pulp/api/v3/content/deb/source_packages/

Synchronizing with a remote with "sync_sources=True" will synchronize
the Source Indicies files inspecting each contained paragraph to
download all associated DSC files and referced source files (note:
source file download may be deferred if remote policy="on_demand"),
performing a high level of data validation and creating all required
associations. As with uploading inspecting contents after a sync is
complete can be done with the same endpoints as above.

To remain spec compliant with https://wiki.debian.org/DebianRepository
"md5" must be present in the ALLOWED_CONTENT_CHECKSUMS. In all cases
the use of md5 is supplemental so security concerns around this
addition, at least for use with this feature, should be minimal.
related to:
pulp#409
(was https://pulp.plan.io/issues/8775)

Extend the tests fixture to include source indicies and an example
(hello) source package composed of an orig.tar.gz, DSC file and
debian.tar.xz. The 'test_sync' test which already does sync tests on a
remote repo with and without installer (udeb) packages is extended to
perform a new round of testing which will include source packages.

This is a minimum set of tests for the new source package
support. Future commits will expand the testing of source package
support.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants