:py:mod:`dissect.database.bsd.tools.rpm` ======================================== .. py:module:: dissect.database.bsd.tools.rpm Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.database.bsd.tools.rpm.PackageEntry dissect.database.bsd.tools.rpm.File dissect.database.bsd.tools.rpm.Directory dissect.database.bsd.tools.rpm.Package dissect.database.bsd.tools.rpm.HeaderBlob dissect.database.bsd.tools.rpm.Packages Functions ~~~~~~~~~ .. autoapisummary:: :nosignatures: dissect.database.bsd.tools.rpm.main Attributes ~~~~~~~~~~ .. autoapisummary:: dissect.database.bsd.tools.rpm.TYPE_SIZE_MAP dissect.database.bsd.tools.rpm.TYPE_PARSERS dissect.database.bsd.tools.rpm.ARRAY_TYPES .. py:data:: TYPE_SIZE_MAP .. py:data:: TYPE_PARSERS .. py:data:: ARRAY_TYPES .. py:class:: PackageEntry Bases: :py:obj:`NamedTuple` .. py:attribute:: path :type: str .. py:attribute:: size :type: int .. py:attribute:: mode :type: int .. py:attribute:: mtime :type: int .. py:attribute:: user :type: str .. py:attribute:: group :type: str .. py:attribute:: digest :type: bytes .. py:class:: File Bases: :py:obj:`PackageEntry` Built-in immutable sequence. If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable's items. If the argument is a tuple, the return value is the same object. .. py:class:: Directory Bases: :py:obj:`PackageEntry` Built-in immutable sequence. If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable's items. If the argument is a tuple, the return value is the same object. .. py:class:: Package(buf: bytes) RPM Package. :param buf: Bytes containing the RPM Package header blob. .. py:attribute:: blob .. py:method:: __repr__() -> str .. py:method:: __iter__() -> collections.abc.Iterator[File | Directory] .. py:property:: name :type: str Package name. .. py:property:: version :type: str Package version. .. py:property:: release :type: str Package release. .. py:property:: summary :type: str Package summary. .. py:property:: description :type: str Package description. .. py:method:: entries() -> collections.abc.Iterator[File | Directory] Iterate over all files and directories in the package. .. py:class:: HeaderBlob(buf: bytes) RPM Header Blob. :param buf: Bytes containing the RPM Header Blob. .. py:attribute:: buf .. py:attribute:: header .. py:attribute:: pvlen .. py:attribute:: data_start .. py:attribute:: data_end .. py:attribute:: tag_map .. py:method:: __contains__(tag: dissect.database.bsd.tools.c_rpm.c_rpm.rpmTag) -> bool .. py:method:: entry(idx: int) -> tuple[dissect.database.bsd.tools.c_rpm.c_rpm.rpmTag, int | str | bytes | list[int] | list[str] | None] Get the ``(tag, value)`` for the given index. .. py:method:: entries() -> collections.abc.Iterator[tuple[dissect.database.bsd.tools.c_rpm.c_rpm.rpmTag, int | str | bytes | list[int] | list[str] | None]] Iterate over all ``(tag, value)`` entries in the header. .. py:method:: value(tag: dissect.database.bsd.tools.c_rpm.c_rpm.rpmTag) -> int | str | bytes | list[int] | list[str] | None Get the value for the given tag. .. py:class:: Packages(fh: BinaryIO) RPMDB Packages database. :param fh: File-like object containing the RPMDB Packages database (a Berkeley DB). .. py:attribute:: db .. py:method:: __iter__() -> collections.abc.Iterator[Package] .. py:method:: entries() -> collections.abc.Iterator[Package] Iterate over all packages in the database. .. py:function:: main() -> int