[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

%files directive with relocation in %install



Hello,

Do the files listed with %files refer to files before %install is run, or after?

I have the following setup in the binary tarball I use with rpmbuild:

/usr/local/bin/foo
/usr/local/lib/libfoo.so
/usr/local/etc/init.d/foo
/usr/local/etc/foo/foo.conf

In the spec file I have:

Prefix: /usr/local

%install

if test -d %{buildroot}%{prefix}/etc
  mkdir -p %{buildroot}/etc
  mv %{buildroot}%{prefix}/etc/* %{buildroot}/etc/
  rm -rf %{buildroot}%{prefix}/etc
fi

%files
%{prefix}/*
%config /etc/foo/foo.conf


Will such a setup work?

On the other hand, can I do this:

%files
/*
%config /etc/foo/foo.conf


Thanks,

Wesley Leggette
Cleversafe, LLC







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]