rpmbuild generates RPM under which dir开发者_如何学Pythonectory?
I checked the RPMS directory:-
[root@tom adil]# ls /usr/src/redhat/
BUILD RPMS SOURCES SPECS SRPMS
[root@tom adil]# ls /usr/src/redhat/RPMS/
athlon i386 i486 i586 i686 noarch
[root@tom adil]#
How to decide rpmbuild outputs in which of the above sub-directories? Is it controlled by spec file? What is the default option?
I thought uname -p
but its not the case probable uname -i
is used.
The binary package is named according to the %_build_name_fmt
macro. By default this macro contains %{ARCH}/
at the beginning, so that is where the binary package is placed.
Following on from your last comment, by default the RPM will go into the subdirectory that matches the platform you're building on. You can override this by passing the --target parameter to rpmbuild, but this only applies where valid; for example, you can use --target i386 on an x86_64 system to build a 32-bit RPM, but you can't build a 64-bit RPM on a 32-bit platform.
The RPM goes to the RPMS folder and the source RPM to the SRPMS. This is not controlled by the spec file - this is convention. What exactly are you trying to do?
精彩评论