Install the entire folder and files in it, RPM specification file

I have a spec file for building the rpm package, in my% install section I have this:

%install
install -m 700 foo/bar/filesToCopy/. $RPM_BUILD_ROOT/

The filesToCopy folder is a tree of what the package file tree should look like. It has all the subdirectories the package has such as etc /...,/ usr / bin, / usr / share ... and the basement files in them.

When building, he gives me

install: omitting directory 'foo/bar/filesToCopy/'
error: Bad exit status from /var/tmp/rpm-tmp.sea6XO (%install)

Is there a way that I should not copy each file separately, for example:

install -m 700 foo/bar/filesToCopy/usr/bin/file1.ex $RPM_BUILD_ROOT/usr/bin/
...

Like everything in filesToCopy / this is a structure, as in $ RPM_BUILD_ROOT /

UPDATE

I found a solution, I changed "install -m 700" to "cp -a"

+4
source share

Source: https://habr.com/ru/post/1615539/


All Articles