Skip to content

pulp cli rpm publication create misses option for compression-type #1246

@simenon

Description

@simenon

Summary

When creating a publication there is an option to set the compression type of the metadata. If you define it with the cli there is no option to set the compression type, and, the compression type is not set to default, contrary what the manual states:

compression_type: Sets the compression type to be used by the repository metadata (primary.xml, filelists.xml, etc.) If not specified, the default Gzip algorithm will be used.

pulp rpm publication list --repository ${REPO_NAME}
[
{
"pulp_href": "/pulp/api/v3/publications/rpm/rpm/01995c5f-0d3a-74c1-9fd9-e229730a83b8/",
"prn": "prn:rpm.rpmpublication:01995c5f-0d3a-74c1-9fd9-e229730a83b8",
"pulp_created": "2025-09-18T10:29:17.244098Z",
"pulp_last_updated": "2025-09-18T10:30:51.385542Z",
"repository_version": "/pulp/api/v3/repositories/rpm/rpm/01995c55-5557-76d5-a0f4-afb4c9c3de07/versions/1/",
"repository": "/pulp/api/v3/repositories/rpm/rpm/01995c55-5557-76d5-a0f4-afb4c9c3de07/",
"checkpoint": false,
"checksum_type": "sha256",
"metadata_checksum_type": null,
"package_checksum_type": null,
"sqlite_metadata": false,
"repo_config": {},
"compression_type": null,
"layout": "nested_alphabetically"
},
{
"pulp_href": "/pulp/api/v3/publications/rpm/rpm/01995c5d-167e-7df8-ada7-8337d1717897/",
"prn": "prn:rpm.rpmpublication:01995c5d-167e-7df8-ada7-8337d1717897",
"pulp_created": "2025-09-18T10:27:03.183257Z",
"pulp_last_updated": "2025-09-18T10:28:53.816750Z",
"repository_version": "/pulp/api/v3/repositories/rpm/rpm/01995c55-5557-76d5-a0f4-afb4c9c3de07/versions/1/",
"repository": "/pulp/api/v3/repositories/rpm/rpm/01995c55-5557-76d5-a0f4-afb4c9c3de07/",
"checkpoint": false,
"checksum_type": "sha256",
"metadata_checksum_type": null,
"package_checksum_type": null,
"sqlite_metadata": false,
"repo_config": {},
"compression_type": null,
"layout": null
}
]

Steps to reproduce

pulp rpm publication create --help
Usage: pulp rpm publication create [OPTIONS]

Create a rpm publication.

Options:
--repository TEXT Referenced resource, in the form
[:][<resource_type>:] or by
href. '' defaults to rpm.
'<resource_type>' defaults to rpm.
--version INTEGER a repository version number, leave blank for
latest
--repo-config TEXT A JSON dictionary describing config.repo
file (or @file containing a JSON dictionary)
--checksum-type [sha256|sha384|sha512]
Option specifying the checksum type to use
for package and metadata integrity checks.
--checkpoint Create a checkpoint publication
--help Show this message and exit.

pulp --version
Pulp3 Command Line Interface, Version 0.36.0
Plugin Versions:
common: 0.36.0

Expected behavior

Have an option to set compression type and if not set expect that the default is set according to the manual

Stacktrace/Error log

Pulp and pulp-cli version info

pulp --version
Pulp3 Command Line Interface, Version 0.36.0
Plugin Versions:
common: 0.36.0

pulp status
{
"versions": [
{
"component": "core",
"version": "3.80.0",
"package": "pulpcore",
"module": "pulpcore.app",
"domain_compatible": true
},
{
"component": "ansible",
"version": "0.26.0",
"package": "pulp-ansible",
"module": "pulp_ansible.app",
"domain_compatible": false
},
{
"component": "container",
"version": "2.25.1",
"package": "pulp-container",
"module": "pulp_container.app",
"domain_compatible": true
},
{
"component": "deb",
"version": "3.5.2",
"package": "pulp_deb",
"module": "pulp_deb.app",
"domain_compatible": false
},
{
"component": "gem",
"version": "0.7.1",
"package": "pulp-gem",
"module": "pulp_gem.app",
"domain_compatible": true
},
{
"component": "maven",
"version": "0.10.1",
"package": "pulp-maven",
"module": "pulp_maven.app",
"domain_compatible": true
},
{
"component": "npm",
"version": "0.3.3",
"package": "pulp-npm",
"module": "pulp_npm.app",
"domain_compatible": true
},
{
"component": "ostree",
"version": "2.4.8",
"package": "pulp-ostree",
"module": "pulp_ostree.app",
"domain_compatible": true
},
{
"component": "python",
"version": "3.16.0",
"package": "pulp-python",
"module": "pulp_python.app",
"domain_compatible": true
},
{
"component": "rpm",
"version": "3.30.1",
"package": "pulp-rpm",
"module": "pulp_rpm.app",
"domain_compatible": true
},
{
"component": "certguard",
"version": "3.80.0",
"package": "pulpcore",
"module": "pulp_certguard.app",
"domain_compatible": true
},
{
"component": "file",
"version": "3.80.0",
"package": "pulpcore",
"module": "pulp_file.app",
"domain_compatible": true
}
],

Additonal context

Metadata

Metadata

Assignees

No one assigned

    Labels

    easy fixGood for newcomersfeature requestNew feature request (template-set)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions