����� ������������ OpenNet.ru / ������ "������������ ��� Linux" / ������

12.1.3 ������� spec-����� � ������� rpmlint

����� ����, ��� spec-���� �������, �� ��� ������ ����� ���� ������ �������� rpm-�����, ������� � ���� ������� ����� ���� �������� �� ������� �������� ����� ������. ��� �������� ����� ��������� � ������� ������� rpmlint. ��� rpmlint ������ �� Unix, ��� ��������� ������� lint. ��� ������������ ��� "���������� ��������" ���� �� C. �������� ������ ������������� ������ � ������� �������� ���� ������. ���� rpmlint ������� - � �������� ������� ��������� rpm-������ ������ �������� ����� ������������� ������ ��������������.

rpmlint ����� ��������� ����������� ����� �������, ������ � ������������ � �������� ������� ������� ����������� ��������. ���������� ����������� ��������� �����: .noarch.rpm �� �������� �������� ������, ������� �������� ����� �� ��������������� � ������� /etc, ���� �������� ������ ������������� ���������� ������������ �����������, ����������� ���������� ���������������� ���������, ��� ����������� ����� ����������� ������� �� ������ �������� (�������� strip).

����� ����, rpmlint ��������� ��� �������� �� ������������ ������ ������ ��������� Filesystem Hierarchy Standard, ��������� Linux Standards Base � ��� ��� ����� � �������� ����� ���������� �������� �������. Init-������� ����������� �� ������������ ������� ��������� init-������� � ��� %post � %preun ��������� �� �������������. %post, %pre � %preun ����������� �� �������� �� ���������� �������������� � �� �������� ���������� � ����� ������ ���� ���������������. ����� ����������� ���������� ��������� ����������� ������ � �����.

������������� ������� rpmlint ����� ���� ���������������� ����� �������������� ������ /etc/rpmlint/config ���, � �������� ������������, $HOME/.rpmlintrc.

������ ������� rpmlint ��� ������ � �������� �����:

$ rpmlint tin-1.5.12-1.src.rpm

E: tin no-packager-tag

W: tin invalid-license distributable

W: tin no-url-tag

W: tin strange-permission tin-1.5.12.tar.bz2 0664

W: tin obsolete-tag Copyright

��� ���������� �����, � �������� ����� �������� ��� ��������� ��������������. ����� �� ����� ���� ����� ���� �������� �� 0644 � ���� Copyright �������� �� License, ����� ���� ����� ������ ��������� ���������� (� ����� ������ rpmlint).

��� ������� rpmlint ��� ��������� ������ ������ �������� ���������:

$ rpmlint tin-1.5.12-1.i386.rpm

W: tin invalid-vendor None

W: tin invalid-distribution None

E: tin no-packager-tag

W: tin invalid-license distributable

W: tin no-url-tag

������ ����� �������� ����������. �������������� �� ���������� �������������� ����� ����� ������������. ��� �������� rpmlint ����������. ��� ����� �������� ��� ����� ���������������.

������ ������� Linux ��������� � ������� rpmlint ������������ � �����. ���������� ����� �������� ��������� ������, �������� ���������� ����� - ��� ������� ������.

����� - ������������� rpm2cpio ��� ���������� ������ �� �������� �������
����� - ���������� ������� �������������� � ������� emacs-������� rpm-spec-mode
����������


����� ������������ �� OpenNet.ru