# `gbp.rpm.policy.RpmPkgPolicy(PkgPolicy)` class documentation

Part of `gbp.rpm.policy` (View In Hierarchy)

Packaging policy for RPM

Class Variable | python_rpmlib_module_name | Undocumented
Class Variable | alnum | Undocumented
Class Variable | name_whitelist_chars | Undocumented
Class Variable | version_whitelist_chars | Undocumented
Class Variable | packagename_re | Undocumented
Class Variable | packagename_msg | Undocumented
Class Variable | upstreamversion_re | Undocumented
Class Variable | upstreamversion_msg | Undocumented
Class Method | is_valid_orig_archive | Is this a valid orig source archive
Class | Changelog | Container for changelog related policy settings
Class | ChangelogEntryFormatter | Helper class for generating changelog entries from git commits

Inherited from PkgPolicy:

Class Variable | version_mangle_re | Undocumented
Class Method | is_valid_packagename | Is this a valid package name?
Class Method | is_valid_upstreamversion | Is this a valid upstream version number?
Static Method | guess_upstream_src_version | Guess the package name and version from the filename of an upstream archive.
Static Method | has_origs | Check orig tarball and additional tarballs exists in dir
Class Method | has_orig | Undocumented
Static Method | symlink_origs | symlink orig tarball from orig_dir to output_dir @return: [] if all links were created, list of failed links otherwise
Class Method | symlink_orig | Undocumented
Class Method | version_subst | Generate a string from a given format and a version. The extracted version can be passed through the sanitizer function argument before being formatted into a string.

python_rpmlib_module_name =
Undocumented
(type: `str`)
alnum =
Undocumented
(type: `str`)
name_whitelist_chars =
Undocumented
(type: `str`)
version_whitelist_chars =
Undocumented
(type: `str`)
packagename_re =
Undocumented
packagename_msg =
Undocumented
upstreamversion_re =
Undocumented
upstreamversion_msg =
Undocumented
@classmethod
def is_valid_orig_archive(cls, filename):

Is this a valid orig source archive

Parameters | filename | upstream source archive filename (type: `str`)

Returns

true if valid upstream source archive filename (type: `bool`

    >>> RpmPkgPolicy.is_valid_orig_archive("foo/bar_baz.tar.gz")
    True
    >>> RpmPkgPolicy.is_valid_orig_archive("foo.bar.tar")
    True
    >>> RpmPkgPolicy.is_valid_orig_archive("foo.bar")
    False
    >>> RpmPkgPolicy.is_valid_orig_archive("foo.gz")
    False

)