symlink in particular directory using rpm spec

馋奶兔 提交于 2019-12-10 17:21:42

问题


rpm created using spec file will create directory "directory1" and all files in /var/lib/directory1.

For another use case i want to create another directory in "/var/lib" which should be a symlink to directory1.

eg: 
cd /var/lib/
ls -la
directory2 -> directory1 
directory1

how is it possible to do achieve this without using absolute paths in spec file?


回答1:


%install
mkdir -p %{buildroot}/%{_sharedstatedir}/directory1
ln -s directory1 %{buildroot}/%{_sharedstatedir}/directory2

%files
%{_sharedstatedir}/directory1
%{_sharedstatedir}/directory2


来源:https://stackoverflow.com/questions/32067277/symlink-in-particular-directory-using-rpm-spec

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!