从编译二进制文件中创建RPM规格文件



环境是AIX 7.0 RPM版本3.0.5。我对Unix World非常陌生,请耐心等待。

我们有3种不同类型的文件要包装为RPM。

•源/二进制/*。bainaryfiles(其中约160个)

•source/ui/*。mm(否文件2)

•源/脚本/*。SH(10至20)

这些文件是针对目标服务器编译的,它们是二进制形式的,我们不想压缩这些文件以tar。

使用rpmbuild在生成的rpm上进行安装时,.BinaryFiles,.UI和.SH文件必须转到目标服务器上的不同目录

自从已经构建以来,必须没有发生任何构建。

任何人都可以为我提供.spec文件样本和步骤。我们可以在无根访问的情况下运行rpmbuild吗?我们可以在无根访问的情况下运行RPM的安装?

这是一个没有任何构建部分的示例。

Name: special-package
Version: 0.0
Release: 0.1
Summary: This is a special package
Group: Devlopment/Tools
License: Special Proprietary
BuildArch: noarch
%description
This package contains some special stuff
%install
# e.g., on the target server path_to_all_binary_files=/usr/share/special/bin
%{mkdir_p} %{buildroot}%{_path_to_all_binary_files}
# In case of a copy, file permissions will be copied as it is.
# You can also try 'install -m 755 $RPM_SOURCE_DIR/....'
# 'man install' for more information
%{__cp} $RPM_SOURCE_DIR/binary/*.binaryfiles %{buildroot}%{_path_to_all_binary_files}
# Similarly do this for other sets of files 
%files
%{_path_to_binary_files}/*.binaryfiles
%{_path_to_sh_files}/*.sh
%changelog
* Tue Mar 14 2017 Name Surname<name.surname@email.com>
 - First build of the special package

这是Fedora撰写的,但我认为许多准则通常适用https://fedoraproject.org/wiki/how_to_create_an_rpm_package

最新更新