что делает следующий шаг rpm «% prepare»?

Предполагая

Source0:        %{gnu_download_url}/coreutils/coreutils-%{version}.tar.gz
Source1:        mk7distro.tar.bz2
Patch0:         hostutils.patch.bz2

Может ли кто-нибудь сказать мне, что делает следующая команда в разделе % prepare файла спецификации RPM?

%setup -q -n %{name} -c -a 1
0
13.10.2016, 20:58
1 ответ

Чтобы точнее ответить на вопрос и предоставить обновленную ссылку, да, команда %setup распаковывает архив Source1, однако не распаковывает архив Source0 из-за опции -a 1указано. Параметр -cприведет к извлечению архива в подкаталог -, названный в соответствии с -n %{name}, который происходит из части «Имя :» файла спецификации.

%setup -q This command changes to the build directory, typically /usr/src/redhat/BUILD, and then extracts the source files. This macro expects that at least one of the source files will create the necessary subdirectory under /usr/src/redhat/BUILD. This subdirectory should be named with the package name and version, such as telnet-1.0.1. If you are not using a compressed tar archive that will automatically create the right subdirectory, add the –c option to the %setup macro. The –c option creates the subdirectory for extracting the sources.

The %setup directive can automatically extract tar, zip, gzip, bzip2, pack, compress, and lzh compressed files. The tar-gzip format is most widely used, though.

0
25.09.2021, 01:18

Теги

Похожие вопросы