通过rpmbuild打包符号链接?

SyB*_*Ber 12 symlink rpm rpmbuild rpm-spec

是否有可能使rpmbuild在包装上保留符号链接?

目前的行为是创建文件的副本,我想避免.

Sta*_*tan 20

当然它支持符号链接.但实际上你必须打包符号链接而不是将内容复制到buildroot.示例规范将符号链接打包到名为/ newbin的/ bin目录

Name:           test
Version:        1.0
Release:        1%{?dist}
Summary:        nothing
License:        GPLv2
Source0:        nothing

%description 

%install
rm -rf %{buildroot}
mkdir %{buildroot}
ln -sf /bin %{buildroot}/newbin

%files
/newbin
Run Code Online (Sandbox Code Playgroud)

您还需要nothing在SOURCES目录中的文件,以便成功构建rpm.用rpm 4.9.1.2测试