how to code spec file to install a file on system only if a file is missing
1
vote
1
answer
252
views
I am new to rpm building and for the past week I am trying to code a spec file to install a file on the system only if a specific files is missing. Here is a snippet
%global homedir %{_var}/lib/test
Source10: main.db
Source11: back.db
%files data
%defattr(-,%{updateuser},%{updateuser},-)
%config(noreplace) %verify(not size md5 mtime) %{homedir}/*.db
I would like to add a condition where, If file /var/lib/test/file1.txt is missing, install /var/lib/test/back.db
I am aware I need to use the %files macro but so far I am not able to figure out how to write the if condition
Asked by giomanda
(155 rep)
Aug 23, 2024, 06:49 AM
Last activity: Aug 23, 2024, 09:49 AM
Last activity: Aug 23, 2024, 09:49 AM