python-rpm-spec
python-rpm-spec copied to clipboard
Python module for parsing RPM spec files
Added variable expansion. Added ininitialization dict. Stored most of added properties separately from attrs of the types.
When the code contain "from pyrpm...", some IDE (PyCharm for example) will install and import "pyrpm". Seems legit, but it will actually install https://pypi.org/project/pyrpm/ It could be possible to document,...
Compile a list f alternatives to save people from searching.
Could you make it work with rich dependencies? https://rpm.org/user_doc/boolean_dependencies.html Thanks.
See git.spec file. perl-Git sub-package has packages [] list. This is wrong. Sub-packages should not have a package list. Who is adding that? Take a look at, or amend, a5ce036...
Hi, I have to list * requires * build_requires but for a specific condition. Can I do this actually ? Regards,
test src.rpm: https://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.6.1810/cloud/Source/openstack-pike/common/python-autobahn-0.10.9-1.gitcf10233.el7.src.rpm ================= before fix: >>> s.build_requires [python2-devel, python-pep8, python-flake8, python-mock >= 1.0.1, pytest >= 2.6.4, python-six, python2-txaio, python-trollius, python-unittest2, python-scour, #, No, python, 3, https://github.com/oberstet/scour/issues/4, scons, python-taschenmesser, #,...
Fixes #61 by using a maximum number of attempts while replacing macros recursively.
Spec files can include shell commands inline in macros, so that something like: ``` Release: %(echo foo) ``` translates to the same thing as: ``` Release: foo ``` This commit...
Currently, it's possible to trick `replace_macros()` to never return, causing a DoS to software using this library with carefully crafted spec files. [The offending code in `replace_macros()`](https://github.com/bkircher/python-rpm-spec/blob/ef0f2daa77d49480446423abefe90c07aa2f9aa8/pyrpm/spec.py#L558): ```python while True:...