Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何传递命令中的.rpmmacros file位置rpmbuild?
.rpmmacros file
rpmbuild
默认情况下,它会尝试在主目录中查找它。
我试过-rcfiles /location/to/.rpmmacros但它给了我
-rcfiles /location/to/.rpmmacros
error: missing ':' (found 0x2f) at /usr/local/.rpmmacros:1
.rpmmacros 的内容
%_topdir /usr/path/
嗯...我自己不是专家,但不应该是 --rcfil=location_to_rpmrc
并且 rpmrc 文件应该包含 rpmmacros 的路径,格式为
宏文件::full_path_to_rpmmacros_file
对于 RPM 版本 4.12.0.1,您可以按如下方式指定 rpmmacro 文件: rpmbuild --macros=<YOUR_LOCAL_MACRO> <YOUR_LOCAL_SPEC_FILE>
rpmbuild --macros=<YOUR_LOCAL_MACRO> <YOUR_LOCAL_SPEC_FILE>
替换并使用文件的相应路径后。