����, RPM ������ ���������� �� ������� ��������� � ����������. ������ ����� � ������ � RPM �������� ������������� �� RPM, ���������� ��� ����:
* ������������� ������ ����
* ���������� ���� ����������� � �������, � ����������� � ��������� ������������
19.3.1.1 ������������� ������ �� RPM
������ ���� ��������� � ������� ����� --initdb:
# mkdir /var/lib/rpm |
������ ������� ������� ������� ��� �������� �� (���� �� ���������). ���� ����� �������������� ���� ����, ���������� �������� ��� � ����������, ��� �������� ����:
# rpm --dbpath /location/of/your/rpm/database --initdb |
����� ����, ����� ������������ ����� v ��� ��������� ��������������� ������, ��� ������ �������� ��� ������������� ������.
��� �������� �������������� �������� ���������� ������������ ����� --root. ������������� ����� �������� �������, ��������� �� ��������������, ���������, ����� ������������ ����������������� ������ � ��������, �������� ������� �������� ������ �� ������ ����������� ������� � � ������ �������� �������.
��� �������� ������ rc ������, ��������� �� ������������, ������������ ����� --rcfile, ����������������� ������ �������� - ����� --macros.
���������� ������ �� ����������� � ������� � ����������� ������� �������� � ��������� ����� ������� � ���������� ������������� ���������� RPM.
19.3.1.2 ��������� ������������ �������, ������������� ��� ������� ������� RPM
������ ���, ����� ��������������� ����� �����, ���������� � ��� �������� � �� RPM. ��� ������ ��������, ���� ��� ����������� ����� ���������������� ������ ��� �����������.
� rpmbased ������������ ��������, ����� ��� Red Hat Linux, ��� ������ �� ����������� ���������� ���������� ��������� ����������, ��������������� ����� RPM. ��� ��������, ��� ����������� ��� ������� �������� � ��, RPM "�����" ��� ���� ������������� ������� � ����� ��������� ������������ �����������. ����� �������, ������ ��� ��������� ������������ ��������, ��� ������ ������ �� �����������.
� ������������ ��������, ������� �� ���������� �� RPM, ����� ��� Solaris ��� IRIX, ����������� ������� ����������� ������ ������� RPM, ��������� ��� ������������ ������� ����� ����������� ������ ��������� �����������. �������, ���� rpm-������, ������� ������� � ���� ����������, ������� �� ��, ��������������� ���-�� �����, ��� � rpm-�������, ����� ������ ����� ������� ��������. ��������, ������� rpm ��� Windows ������� �� cygwin, � cygwin ����� ����������� ����������� setup.exe � �� ������� �� ������� ��� ���������� RPM.
�������������, ��� ���������� ��������� ������������ ���������� ��������� �� RPM ����� �����������, ������� �������� ������� ��������� �������. �������� ���� ����� - ��������� ������������ ������.
19.3.1.3 ��������� ������������ ������
�������� ��, ������� ������������ �� �������������� RPM ����� ������ ����������� ������������ ������, ������� �������� ������ ��� ������������� ��������� � ����������. ����� ��������� ������ ������, rpm ����� ����� ���������� � ����������������� �����������, ���� ��� �� ���� ����������� �� rpm-�������. ��� ���������� ��������� � ��������� ���� ��������������� �������� ������������ � ��������� ���������, �������� � �� ������ �������� RPM.
��� �������� ������������ ������ ������������ ������ vpkg-provides.sh �� �������� ��������. ���� ������ ������� �������� � ������� ����������� ��������� � ���������������. ����� ����������� ������, ���������� � spec-����. ������ �������� ��� ��������� ������� (�� ��� ������ ������ � �� �������). ��� ���������� �� RPM ����������� � ��������������� �������� ������������, �� ������ ����� spec-����� ���������� �����, ������� ��������������� ��� ����������� ������� rpm.
����������� ����� �� ������������� � ������� ������� ������, ��������� ��� ��� �����������, � �� �� ����� ���������� ������ � ����� ������ �� ������ �������� ���� �����. ��������� ������������ ��� ����� ��������������� ������� ������ ����� ������������� ���������.
������ vpkg-provides.sh ��������� ��� �������� �����: --spec_header, --ignore_dirs � --no_verify.
����� --spec_header �������� ��� spec-�����, ������� ����� �������������� � �������� ������� ��� ����� ������������ spec-�����. ��������:
# sh vpkg-provides.sh --spec_header /path/to/spec/file |
������ ����� ��� ��������� ������� spec-�����. ������ ������ ��������� ��� ������� ���� Summary, Name, Version � Release.
����� --ignore_dirs ������� �������, ����� �������� ���������� ����������. ��� ������������ ������ ������������ ��������� ���������� ������� ������ egrep. ������� ����������� �������� ������������ �����. ���� egrep � ������� ����������, ������� ��������������� ������ vpkg-provides.sh, ����� � ������ ����� ������ ��������� ��� ������������� �������.
����� --no_verify ��������� ���������� ��� �������� ������� ��� �������� ����������� ���� ���� ��������� ������.
����� ������� ����� ������� ��������������:
����� --shlib_dirs ��������� �� �������� � ������������ ������������, ������ ������������ � ���� ������ � ������� �������� � ���������� � �������� �����������:
# sh vpkg-provides.sh --spec_header /path/to/spec/file \ --shlib_dirs "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/bsd" |
����� --interp_dirs �������, � ����� ��������� ������ ��������������, ��������, sh, bash, perl, awk. � ���� ������� ����� --interps ������������ ��� ������������ ���� ���������������. ��� ��� ����� ������� ��� ����� ������ � ����������� ����� �����������.
����� --find_provides ��������� �� ������������ ������� find-provides (�� ��������� /usr/lib/rpm/find-provides).
������ vpkg-provides.sh ������� �������� � ������������ ������������ � ���������������� � ��������� ������������ ��������. ��� �������, ������ ���������� ��������������� ��������������� ������ � �������.
���� �� ��������� � ��-Unix ��������, ��� ��� ������� ������� ��������� ������, ����� ������������� ������ � ����� �������� ���������� ������. ����� �� ������ vpkg-provides.sh ����� ������� ����� �������� �� �����, �������������� ������� ��������. ��������� ������� ����� �� ������������ �� ������ ��������� �������, ������� ���������� �� �������, �� � ��� ���� shell. vpkg-provides.sh ����������� ������������ ���������� ��������, ������������ ������ �� ��, ����� ������ ��� ����������� �������������. ��� ������ ����� ���� ��������� ����� ������� �������� ���������, ������ � ���� �������� ����������. ����� ����, ����� ������ �� ������������ vpkg-provides.sh, � ������� ����������� ����� �������.
����� ���������� ���� �������� ������ ������ spec-����, � ������� ���������� � ���������� ��� ������, � ������ �����, ������ �� ������� �������� ����������� ��� ������� �������. ����� ���� ��������� ��������� ������ ����������� ��� ���������� ������ prep, build, install � clean.
������ ���������� vpkg-provides.sh:
$ sh ./vpkg-provides.sh --spec_header my_header.spec --find_provides ./find-provides --no_verify |
����� ����������� �������� ������, ���������� ���������� � ���, ��� ����� ��� ������.
����� � ������� ���������� spec-����� ���������� ����������� rpm-�����.
19.3.1.4 �������� ������������ ������ �������
�������� ������������������ ��������� spec-����� ��� ������������ ������ ����� ���������� � �� Unix-�������� ��������, ��� ��� vpkg-provides.sh �������, ��� ��� ������ Unix � GNU ����� ��������.
���� �� ������ ������ � ������ �������� ������ ���������� �� ���� �������, ������� �������� spec-���� �������. �������� Provides: ��� ������ ���������� � �������������� � ������ spec-�����, ��������:
Provides: libgen.so |
���������� ������ ������ prep, build, install, � clean ��� �������� � ��������, ��������� rpmbuild ��� ������ ������ � ���������� ���.
����� - ��������� ��������� RPM
����� - ������� �������
����������